PLUTO Test Problems  4.4-patch2
Functions
init.c File Reference

Diffusion of a linear force-free magnetic field in cylindrical coordinates. More...

Functions

void InitDomain (Data *d, Grid *grid)
 

Detailed Description

Solve the diffusion equation for a linear force-free magnetic field in cylindrical coordinates. A force-free field satisfies

\[ \vec{J} \times \vec{B} = 0 \qquad\Longrightarrow\qquad \vec{J} = \nabla\times\vec{B} = \mu \vec{B} \]

which means that $\vec{J}$ and $\vec{B}$ must be parallel. If $ \mu $ is constant then the solution is given by the Bessel functions:

\[ B_z(r) = B_0 J_1(\mu r) \,,\qquad B_\phi(r) = B_0 J_0(\mu r) \]

with vector potential given by

\[ A_z(r) = - \int J_1(\mu r)\,dr = \frac{1}{\mu}J_0(\mu r) \,,\qquad A_\phi(r) = - \frac{1}{r}\int rJ_0(\mu r)\,dr = \frac{1}{\mu}J_0(\mu r) \]

For constant resistivity and zero velocity the induction equation simplifies as follows:

\[ \frac{d\vec{B}}{dt} = - \nabla\times (\eta \vec{J}) = - \nabla\times (\eta \mu \vec{B}) = -\eta \mu^2 \vec{B} \]

which admits the exact analytical solution $\vec{B}(r,t) = \vec{B}(r,0) \exp(-\eta\mu^2 t)$ meaning that the field remains force free also at subsequent times.

In the test we set $\mu = \eta = 1$.

Note that if pressure and density are initially constant and the velocity is also initially zero everywhere, the previous solution is also an exact solution of the isothermal MHD equations but not of the adiabatic MHD equations because of the Ohmic dissipation term (magnetic energy transforms into heat). However, using a large density makes pressure effects negligible.

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
July 12, 2019

Function Documentation

◆ InitDomain()

void InitDomain ( Data *  d,
Grid *  grid 
)

Assign initial condition by looping over the computational domain. Called after the usual Init() function to assign initial conditions on primitive variables. Value assigned here will overwrite those prescribed during Init().