pseudo-vacuum boundary condition

35 views
Skip to first unread message

Andrei Igoshev

unread,
May 7, 2026, 9:51:19 AM (9 days ago) May 7
to Dedalus Users

Dear All,

I am trying to implement the pseudo-vacuum boundary condition for magnetic vector potential as described by eq. (27) in Dedalus paper (please see screenshoot attached).

https://www.sciencedirect.com/science/article/pii/S2590055219300289?via%3Dihub

But I do not completely understand this boundary condition. The first part div(A) = 0 should be automatic because of the gauge we choose for the magnetic potential. If I try to impose it, I get error:

RuntimeError: Factor is exactly singular ** On entry to DGEMV parameter number 2 had an illegal value ** On entry to DGEMV parameter number 2 had an illegal value 2026-05-06 16:53:35,531 main 3/4 ERROR :: Exception raised, triggering end of main loop

Instead I tried to request Phi (r=1) = 0 which works but I am not sure if it is correct.

Please find my code attached.

problem = d3.IVP([A, phi_A, tau_A, tau_a1], namespace=locals()) problem.add_equation("dt(A) + grad(phi_A) + curl(curl(A)) + lift(tau_A) = 0") problem.add_equation("div(A) + tau_a1 = 0.0") problem.add_equation("integ(phi_A) = 0") problem.add_equation("angular(curl(A)(r=1))=0") ## Pseudo-vacuum

problem.add_equation("phi_A(r=1) = 0") ## Pseudo-vacuum solver = problem.build_solver(timestepper)

Best regards,

Andrei Igoshev

pseudo_vacuum.py
Screenshot 2026-05-06 at 16.20.26.png

Andrei Igoshev

unread,
May 11, 2026, 11:45:13 AM (5 days ago) May 11
to Dedalus Users
Dear All,

Looking at the pseudo-vacuum definition in the MagIC code: https://magic-sph.github.io/inputNamelists/physNamelist.html I can connect their toroidal potential h to the radial component of vector potential A. 
So, their pseudo-vacuum boundary condition means:


problem.add_equation("angular(curl(A)(r=1))=0") ## Pseudo-vacuum 
problem.add_equation("radial(A(r=1))=0")              ## Pseudo-vacuum 

This is significantly better than to fix scalar potential at 0 at the boundary because in that case it is possible to have non-zero electric field at the boundary.

Let me know if this implementation is wrong for some reasons.

Best regards,
Andrei Igoshev
pseudo_vacuum.py
Reply all
Reply to author
Forward
0 new messages