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