Header file for Constrained-Transport (CT) module. More...
Go to the source code of this file.
Data Structures | |
struct | EMF |
Functions | |
void | CT_EMF_ArithmeticAverage (const EMF *, const double) |
Compute arithmetic average of EMF at cell edges. | |
void | CT_EMF_IntegrateToCorner (const Data *, const EMF *, Grid *) |
void | CT_AverageNormalMagField (const Data *, int, Grid *) |
Compute the normal component of the volume-average magnetic field from the staggered components in the ghost zones. | |
void | CT_Update (const Data *, Grid *) |
void | CT_CheckDivB (double ***b[], Grid *) |
void | CT_StoreEMF (const State_1D *, int, int, Grid *) |
void | CT_StoreResistiveEMF (double **, int, int, Grid *) |
EMF * | CT_GetEMF (const Data *, Grid *) |
void | FillMagneticField (const Data *, int, Grid *) |
Assign the normal component of the staggered magnetic field in the ghost zone-faces. | |
void | CT_GetStagSlopes (const Data_Arr, EMF *, Grid *) |
void | CT_EMF_HLL_Solver (const Data *, const EMF *, Grid *) |
Solve 2D Riemann problem for induction equation. | |
void | CT_EMF_CMUSCL_Average (const Data *, const EMF *, Grid *) |
– | |
Provides macros, function prototypes and structure definitions for the constrained transport (CT) MHD module to control the divergence-free condition.
For a given "side" of the boundary, average the staggered magnetic field components normal to that boundary into a cell-centered field. For instance, at X3_BEG we only average Bz. Transverse components should be averaged using a slightly different stencil. This function is automatically called from Boundary() for consistency between staggered and zone-centered fields.
[in,out] | d | pointer to PLUTO Data structure |
[in] | side | the side |
[in] | grid | pointer to PLUTO Grid structure |
void CT_CheckDivB | ( | double *** | bf[], |
Grid * | grid | ||
) |
Check the divergence-free condition of magnetic field in the constrained transport formalism.
void CT_EMF_ArithmeticAverage | ( | const EMF * | Z1, |
const double | w | ||
) |
Combine the four electric field values computed at zone faces as upwind Godunov fluxes into an edge-centered value.
The face-centered EMF should have been stored by previous calls to CT_StoreEMF() during the one-dimensional sweeps.
This function employs a simple arithmetic averaging of the face-centered electric field.
References:
[in] | Z1 | pointer to EMF structure |
[in] | w | weighting factor |
Used in the predictor scheme of CTU scheme in conjunction with UCT_HLL average. No riemann solver actually used, but only a simple pointwise average.
References:
Solve 2-D Riemann problem using the 2D HLL Riemann flux formula of Londrillo & Del Zanna (2004), JCP, eq. 56. Here N, W, E, S refer to the following configuration:
* | * N * NW | NE * | * --W--+--E-- * | * SW | SE * S * | *
Add derivatives to the 4-point arithmetic average of magnetic fields. Obtain the electric field at corners.
References:
[in] | d | pointer to PLUTO Data structure |
[in] | emf | pointer to EMF structure |
[in] | grid | pointer to Grid structure |
Compute slopes of staggered magnetic fields components Exclude normal derivatives (i.e. dbx_dx).
void CT_StoreResistiveEMF | ( | double ** | res_flx, |
int | beg, | ||
int | end, | ||
Grid * | grid | ||
) |
Using the div.B = 0 condition in staggered MHD, this function computes the staggered component of magnetic field lying on the zone-face parallel to the boundary specified by "side". This is preformed by solving the div.B = 0 condition for one variable only which in 2-D requires the knowledge of the other 3 components while in 3-D required the knowledge of the other 5 staggered components.
Note that this operation is performed in the outermost ghost zones only since the face value at IBEG-1 or IEND is supposed to be part of the solution and is not changed during this function. Therefore, only nghost-1 faces are assigned:
* +-----+-----+-----+-----+-----+-- * | | | | | | * | X X | | | * | | | | | | * +-----+-----+-----+-----+-----+-- * | * <-----------------> BEG * Physical boundary * * X = components assigned in this function. *
[in,out] | d | pointer to PLUTO Data structure |
[in] | side | the side |
[in] | grid | pointer to PLUTO Grid structure |