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

Collects different EMF averaging schemes. More...

Functions

void CT_EMF_ArithmeticAverage (const EMF *Z1, const double w)
 
void CT_EMF_IntegrateToCorner (const Data *d, const EMF *emf, Grid *grid)
 
void CT_EMF_HLL_Solver (const Data *d, const EMF *emf, Grid *grid)
 
void CT_EMF_NEW_HLL_Solver (const Data *d, const EMF *emf, Grid *grid)
 
void CT_EMF_RiemannVelocity (const Data *d, const EMF *emf, Grid *grid)
 
void CT_EMF_RiemannFluxAverage (const Data *d, const EMF *emf, Grid *grid)
 

Detailed Description

Author
A. Mignone
Date
Oct 14, 2019

Function Documentation

◆ CT_EMF_ArithmeticAverage()

void CT_EMF_ArithmeticAverage ( const EMF *  Z1,
const double  w 
)

Compute arithmetic average of EMF at cell edges by combining 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:

  • "A Staggered Mesh Algorithm Using High Order Godunov Fluxes to Ensure Solenoidal Magnetic Fields in Magnetohydrodynamic Simulations"
    Balsara & Spicer, JCP (1999) 149, 270.
Parameters
[in]Z1pointer to EMF structure
[in]wweighting factor
Returns
This function has no return value.

◆ CT_EMF_HLL_Solver()

void CT_EMF_HLL_Solver ( const Data *  d,
const EMF *  emf,
Grid *  grid 
)

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
*                    |
* 
Parameters
[in]dpointer to PLUTO Data structure
[in]gridpointer to Grid structure;

◆ CT_EMF_IntegrateToCorner()

void CT_EMF_IntegrateToCorner ( const Data *  d,
const EMF *  emf,
Grid *  grid 
)

Add derivatives to the 4-point arithmetic average of magnetic fields. Obtain the electric field at corners.

References:

  • "An unsplit Godunov method for ideal MHD via constrained transport"
    Gardiner & Stone, JCP (2005) 205, 509. See Eq. (41), (45) and (50).
Parameters
[in]dpointer to PLUTO Data structure
[in]emfpointer to EMF structure
[in]gridpointer to Grid structure
Returns
This function has no return value.

◆ CT_EMF_NEW_HLL_Solver()

void CT_EMF_NEW_HLL_Solver ( const Data *  d,
const EMF *  emf,
Grid *  grid 
)

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
*                    |
* 
Parameters
[in]dpointer to PLUTO Data structure
[in]gridpointer to Grid structure;

◆ CT_EMF_RiemannFluxAverage()

void CT_EMF_RiemannFluxAverage ( const Data *  d,
const EMF *  emf,
Grid *  grid 
)

Reconstruct electric field at faces to the edges. The electric field interpolated from the 1D Riemann solver and defined as E = E(pnt) + 2*E(diff), that is, the sum of the smooth flux term plust twice the diffusive part.

For the UCT_MAXWELL solver we use:

\[ \begin{array}{l} \DS E_{x,e} = \frac{1}{4}( \hat{E}^{N}_x + \hat{E}^{S}_x + \hat{E}^{E}_x + \hat{E}^{W}_x) - \frac{\Delta B_y}{2} + \frac{\Delta B_z}{2} \\ \noalign{\medskip} \DS E_{y,e} = \frac{1}{4}( \hat{E}^{N}_y + \hat{E}^{S}_y + \hat{E}^{E}_y + \hat{E}^{W}_y) - \frac{\Delta_x B_z}{2} + \frac{\Delta_z B_x}{2} \\ \noalign{\medskip} \DS E_{z,e} = \frac{1}{4}( \hat{E}^{N}_z + \hat{E}^{S}_z + \hat{E}^{E}_z + \hat{E}^{W}_z) - \frac{\Delta_y B_x}{2} + \frac{\Delta_x B_y}{2} \end{array} \]

where $\hat{E}$ is the smooth part of the flux, usually obtained as arithmetic average at faces and reconstructed up to the edge, while $\Delta B_x = B^R_x - B^L_x$.

◆ CT_EMF_RiemannVelocity()

void CT_EMF_RiemannVelocity ( const Data *  d,
const EMF *  emf,
Grid *  grid 
)

Reconstruct electric field at faces to the edges. The electric field interpolated from the 1D Riemann solver and defined as E = E(pnt) + 2*E(diff), that is, the sum of the smooth flux term plust twice the diffusive part.

For the UCT_MAXWELL solver we use:

\[ \begin{array}{l} \DS E_{x,e} = \frac{1}{4}( \hat{E}^{N}_x + \hat{E}^{S}_x + \hat{E}^{E}_x + \hat{E}^{W}_x) - \frac{\Delta B_y}{2} + \frac{\Delta B_z}{2} \\ \noalign{\medskip} \DS E_{y,e} = \frac{1}{4}( \hat{E}^{N}_y + \hat{E}^{S}_y + \hat{E}^{E}_y + \hat{E}^{W}_y) - \frac{\Delta_x B_z}{2} + \frac{\Delta_z B_x}{2} \\ \noalign{\medskip} \DS E_{z,e} = \frac{1}{4}( \hat{E}^{N}_z + \hat{E}^{S}_z + \hat{E}^{E}_z + \hat{E}^{W}_z) - \frac{\Delta_y B_x}{2} + \frac{\Delta_x B_y}{2} \end{array} \]

where $\hat{E}$ is the smooth part of the flux, usually obtained as arithmetic average at faces and reconstructed up to the edge, while $\Delta B_x = B^R_x - B^L_x$.

      i+1/2    j+1/2   k+1/2 

exj +vz exk -vy eyi -vz eyk +vx ezi +vy ezj -vx