kinnala / scikit-fem

Simple finite element assemblers
https://scikit-fem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
470 stars 76 forks source link

Postprocessing - calculation of eddy current loss #1060

Closed martinbaun closed 10 months ago

martinbaun commented 10 months ago

Hi,

I´ve got a question about postprocessing. I've run a magneto-harmonic 2d Simulation with linear triangle elements. Now I want to calculate the eddy current losses

$P = Re ( \frac{1}{2 \sigma} \int \int_\Delta J J^* dx dy ) $

In a book I found an equation for the integration with linear triangular elements

$P_e = \frac{\sigma}{2 \Delta} ( |J_i|^2 + |J_j|^2 + |J_k|^2 ) + Re( \frac{1}{2} ( J_i J_j^ + J_i J_k^ + J_k J_i^ +J_j J_k^ + J_j J_i^ + J_k J_j^ ) )$

with the current density $J = j \omega \sigma A$ and vector potential A given at the three nodes $i, j, k$

This works well but I wonder if there is a more simpler way to do this with skfem - even if you want to use other elements.