Why does my linear system of coupled curl PDEs diverge?

I used the many FEniCS tutorials to try and model coupled Maxwell’s equations (including curl, source terms and nontrivial material coefficients) in a unit cube using tetrahedra and Nedelec edge elements of the first kind. I am considering the case where the electric and magnetic fields go to zero at the boundary. To my understanding, my problem formulation is linear.

In particular I used the following two tutorials to try to model this:
A system of advection–diffusion–reaction equations /pub/tutorial/html/._ftut1010.html
Stable and unstable finite elements for the Maxwell eigenvalue problem (/docs/dolfin/latest/python/demos/maxwell-eigenvalues/demo_maxwell-eigenvalues.py.html)

I have been messing with various parameters (such as mesh size, coefficient values, formulation, function spaces) and implementations of the problem, but cannot seem to make the errors converge even for a simplified case with some trivial material coefficients and source terms. I have been working on this problem for a few weeks now in an attempt to learn modeling and FEniCS, however my education is stalling due to me not being able to make my results converge. So I would appreciate any advice from someone who can see what I am doing wrong (or have suggestions as to what might be going wrong).

Thank you for your time!

Dear Thauwa,

From a mathematical point of view, it is adequate to solve electromagnetic fields, E, B (in your case you use E, H because of reading old books) directly by fulfilling the Maxwell equations. However, there are many numerical problems, a very good explanation is
in Section 17
L. Demkowicz, Computing With Hp-Adaptive Finite Elements: vol. 1 One and Two Dimensional Elliptic and Maxwell Problems, CRC Press, 2006.

Another method is to solve the Maxwell equations analytically and introduce electromagnetic potentials (often called scalar and vector potentials), then it is numerically simpler to solve the equations. There are some problems there as well, especially it is important how one implements the gauge condition and jump terms.

In FEniCS you can find my implementations under
https://www.lkm.tu-berlin.de/ComputationalReality

For the theory you may have a look at my website (see Publications, click on them)
http://bilenemek.abali.org/

Write to me an e-mail if you need further details. Have fun in FEniCS.
Best, Emek

1 Like