Implementing the MHD Continuity Equation

84 views
Skip to first unread message

Siddhant Ranka

unread,
Jun 25, 2024, 2:29:34 PMJun 25
to Dedalus Users
Hello,

My name is Siddhant Ranka and I am a new dedalus user. I am trying to use the MHD model to simulate the merging of two Taylor states. I am using a 2 by 2 mesh, cartesian coordinates in 3 dimensions, and the RealFourier basis for the x, y, and z bases. Currently I am having trouble implementing the MHD continuity equation. The continuity equation is written as, with rho being the density field and v being the velocity field,  "dt(lnrho) + trace(grad_v) = - v@grad(lnrho)". I have defined lnrho as the natural log of the density field. I am not sure how to add the full equation to the simulation. When I tried using an IVP to simulate the model, I had to rewrite the equation in terms of rho instead of lnrho, and when I tried using an NLBVP to simulate the model, I had to drop the temporal derivative term. Is there any problem type I can use to add this equation?

Thank you,

Siddhant

Siddhant Ranka

unread,
Jun 25, 2024, 2:55:49 PMJun 25
to Dedalus Users
I have also just attached the code files. The LBVP file is used to initialize the two spheromaks and the IVP code is the running simulation code. The NLBVP code is another attempt to create a density field using the MHD continuity equation.

Thank you,

Siddhant

D3_IVP_SSX.py
D3_LBVP_SSX.py
D3_Rho_NLBVP_SSX.py

Siddhant Ranka

unread,
Jun 25, 2024, 3:10:08 PMJun 25
to Dedalus Users
The specific error occurs in my current simulation after a few Alfvén times. After a few Alfvén times the minimum density becomes negative. I have also attached a slurm output file for when I run the IVP simulation.

Thank you,

Siddhant

slurm-24318271.out
Reply all
Reply to author
Forward
0 new messages