PLUTO Test Problems
 All Files Functions Pages
init.c File Reference

Magnetic field diffusion in 2D and 3D. More...

Detailed Description

Sets the initial conditions for a magnetic field diffusion problem in 2 or 3 dimensions. This is a useful test to check the ability of the code to solve standard diffusion problems. The magnetic field has initially a Gaussian profile, and an anisotropic resistivity is possible. This problem has an analytical solution given, in 2D, by

\[ B_x(y,t) = \exp(-y^2/4\eta_zt)/\sqrt{t} \quad\quad\quad B_y(x,t) = \exp(-x^2/4\eta_zt)/\sqrt{t} \quad\quad\quad B_z(x,y,t) = \exp(-x^2/4\eta_yt)\exp(-y^2/4\eta_xt)/t \]

and in 3D by

\[ \begin{array}{lcl} B_x(y,z,t) &=& \exp(-y^2/4\eta_zt)\exp(-z^2/4\eta_yt)/t \\ \noalign{\medskip} B_y(x,z,t) &=& \exp(-x^2/4\eta_zt)\exp(-z^2/4\eta_xt)/t \\ \noalign{\medskip} B_z(x,y,t) &=& \exp(-x^2/4\eta_yt)\exp(-y^2/4\eta_xt)/t \end{array} \]

The initial condition is simply set using the previous profiles with t=1. In order to solve only the parabolic term in the induction equation ( $ \nabla\times\vec{J}=\nabla\times(\eta\nabla\times\vec{B})$) we give to the fluid a very large intertia using a high density value. Moreover, to avoid any fluid motion, the velocity is reset to zero at each time step by using the INTERNAL_BOUNDARY.

The runtime parameters that are read from pluto.ini are

3D-cart-0.jpg
Initial and final profiles of the numerical (points) and analytical (lines) solutions for a component of the magnetic field.

The configurations use both EXPLICIT and STS time integrators and different geometries are explored:

Conf.GEOMETRY DIMT.STEPPING divBRESISTIVITY
#01 CARTESIAN 3 RK2 8W EXPLICIT
#02 CARTESIAN 3 HANCOCK GLMSTS
#03 CARTESIAN 3 RK3 CT EXPLICIT
#04 CARTESIAN 3 HANCOCK GLMEXPLICIT
#05 POLAR 3 RK2 8W EXPLICIT
#06 POLAR 3 RK2 8W STS
#07 SPHERICAL 3 RK2 8W EXPLICIT
#08 SPHERICAL 3 RK2 8W STS
#09 SPHERICAL 3 RK3 CT EXPLICIT
#10 CARTESIAN 2 HANCOCK CT EXPLICIT
#11 CARTESIAN 3 HANCOCK CT EXPLICIT
#12 CARTESIAN 2 HANCOCK CT STS
#13 SPHERICAL 3 RK2 CT STS
Authors
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
T. Matsakos (titos.nosp@m.@odd.nosp@m.job.u.nosp@m.chic.nosp@m.ago.e.nosp@m.du)
Date
Sept 17, 2014