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

Advection of a magnetic field loop. More...

Functions

void InitDomain (Data *d, Grid *grid)
 

Detailed Description

This problem consists of a weak magnetic field loop being advected in a uniform velocity field. Since the total pressure is dominated by the thermal contribution, the magnetic field is essentially transported as a passive scalar. The preservation of the initial circular shape tests the scheme dissipative properties and the correct discretization balance of multidimensional terms.

Following [GS05][MT10][MTB10] (see also references therein), the computational box is defined by $ x\in[-1,1],\, y\in[-0.5,0.5] $ discretized on $ 2N_y\times N_y$ grid cells (Ny=64). Density and pressure are initially constant and equal to 1. The velocity of the flow is given by

\[ \vec{v} = V_0(\cos\alpha, \sin\alpha) \]

with $V_0 = \sqrt{5},\,\sin \alpha = 1/\sqrt{5},\, \cos \alpha = 2/\sqrt{5}$. The magnetic field is defined through its magnetic vector potential as

\[ A_z = \left\{ \begin{array}{ll} A_0(R-r) & \textrm{if} \quad R_1 < r \leq R \,, \\ \noalign{\medskip} 0 & \textrm{if} \quad r > R \,, \end{array} \right. \]

with $ A_0 = 10^{-3},\, R = 0.3,\, r = \sqrt{x^2+y^2}$. A slightly different variant is used for the finite difference schemes as explained in [MTB10]:

\[ A_z = \left\{ \begin{array}{ll} a_0 + a_2r^2 & \textrm{if} \quad 0 \leq r \leq R_1 \,, \\ \noalign{\medskip} A_0(R-r) & \textrm{if} \quad R_1 < r \leq R \,, \\ \noalign{\medskip} 0 & \textrm{if} \quad r > R \,, \end{array} \right. \]

where $R_1=0.2 R,\, a_2 = -0.5A_0/R_1,\, a_0 = A_0(R-R_1) - a_2R_1^2$.

Double periodic boundary conditions are imposed.

A snapshot of the solution on a 128x64 grid at t=0.2 is shown below.

mhd_fl.03.jpg
Magetic pressure at t=0.2 (configuration #03).
Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Aug 6, 2015

References

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().