Using the athena code for non-ideal MHD simulations #401
-
Hi everyone, I am a fifth-year graduate student at the University of Maryland, College Park. I work on fusion plasma turbulence. I want to simulate a plasma equilibrium for a rapidly(sound Mach number ~ 5) rotating plasma in cylindrical geometry using the non-ideal(resistive and viscous) MHD equations. Is it possible to solve non-ideal MHD equations using this repo of athena? If so, could you point me towards an example or tell me how to turn on resistivity and viscosity? All the problem generator files I have looked at either work with ideal MHD or use resistivity(resist.cpp) only during the initial setup. Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
Non-ideal physics is described under Diffusion Processes. In order to turn on constant momentum, thermal, ohmic, and/or ambipolar diffusivities (units of code length squared per code time), just set the variables Non-constant diffusivities should also be possible, but that requires writing and enrolling certain functions in the problem generator. I don't know if there are any test problems in the code for non-ideal physics + curvilinear coordinates. These should work together, but I recommend running a simple problem to make sure the code is doing what you think it's doing. By default, the code will take explicit steps with diffusive terms. These might become much smaller than the sound crossing times, slowing down the calculation. If that is an issue, you should look into turning on super time stepping. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much, Chris! I'll try to run a simple test case and share my input file with you by the end of this week. |
Beta Was this translation helpful? Give feedback.
-
Hi Chris and Kyle(@c-white, @felker), Here are all the details of the simple test problem that I am trying to solve: Problem definitionI am trying to solve an axisymmetric, axially symmetric MHD problem in cylindrical coordinates I have turned on resistivity and viscosity. The system is isothermal. The initial conditions are as follows: where a=0.15 and b=0.5 as you can see the attached problem file. Assuming radial force balance during the initialization, we must satisfy I have assumed m = 1. Integrating the radial force balance equation, we obtain the initial density which has been calculated exactly and is given in the attached pgen file. I have assumed n_0 = 1. The user-defined boundary conditions are as follows: and periodic boundary conditions in theta. z_0=0.5 is the position of the Z boundary. OutputsUpon configuring the custom problem, compiling the code and running with the attached input file I get the following results. Related queriesThe density should satisfy Neumann BC according to the problem file but it's 0 at r = a, b. Similarly, I want B_z =B_0 everywhere, even at the boundaries. I don't know how to do that. Finally, there could be a problem with my understanding of the normalizations. It would be helpful if you could explain how normalizations work in Athena++. I would be immensely grateful for any help/suggestion. I have attached the problem generator and input file. |
Beta Was this translation helpful? Give feedback.
Non-ideal physics is described under Diffusion Processes. In order to turn on constant momentum, thermal, ohmic, and/or ambipolar diffusivities (units of code length squared per code time), just set the variables
nu_iso
,kappa_iso
,eta_ohm
, and/oreta_ad
in the<problem>
section of the input file. There are no configuration changes, nor does the problem generator need to be modified. Note that there are suggestive variablesnu_aniso
,kappa_aniso
, andeta_hall
that the code will read and process, but I do not believe anything will be done with them.Non-constant diffusivities should also be possible, but that requires writing and enrolling certain functions in the problem generator.
I don'…