B@grad(B) term in MHD shallow-water simulation causing problems

31 views
Skip to first unread message

amélie ch

unread,
Mar 3, 2026, 7:32:53 PM (12 days ago) Mar 3
to Dedalus Users
Hello all, 

I am running into some problems which I suspect are numerical when running my shallow-water MHD code. For reference, I am attempting to recreate this paper from Hindle et al. but in spherical shell geometry, instead of cartesian. So I first evolve the hydro (which works), then I turn on the MHD.

No matter the initial conditions I set for the velocity and height, I keep getting that the height of the fluid gets pushed to the poles when I set an azimuthal/antisymmetric field (see images and video below). I suspect the problem may be linked with the B@grad(B) term in the momentum equation, as it is supposed to be initially (approximately) zero due to the initial condition I set for the vector potential A, but it is not.

Is there any term I can add to my equations to make this B@grad(B) term more stable? Some things I have already tried:
- double the resolution 
- add / remove magnetic diffusion / diffusivity
- flat initial conditions in velocity and height
- a different azimuthal/antisymmetric B-field 
- checked my units
but I still get the same results. 

Any insight into this problem would be helpful! Below I have provided a sample of the code simplified, the first two time steps for the flat initial conds and a screenshot of the equations I am evolving with diffusion/diffusivity. 

Thank you, 

Amélie

codesnip.png
SWMHD_test.py
write_000002.png
write_000001.png
Reply all
Reply to author
Forward
0 new messages