PLUTO
4.4-patch2
|
Compute flux for passive scalars. More...
#include "pluto.h"
Functions | |
void | AdvectFlux (const Sweep *sweep, int beg, int end, Grid *grid) |
void | StoreAMRFlux (double **flux, double **aflux, int sign, int nvar_beg, int nvar_end, int beg, int end, Grid *grid) |
Compute the interface upwind flux for passive scalars q
obeying advection equations of the form:
Fluxes are computed using an upwind selection rule based on the density flux, already computed during a previous Riemann solver:
where is the density flux computed with the employed Riemann solver.
When ionization fractions are present, we employ a technique similar to the CMA (Consistent multi-fluid advection method) to normalize the sum of mass fractions to one.
The CMA can also be switched on for standard tracers ( #define USE_CMA YES
)
Reference "The consistent multi-fluid advection method" Plewa and Muller, A&A (1999) 342, 179.
[in,out] | sweep | |
[in] | beg | initial index of computation |
[in] | end | final index of computation |
[in] | grid | Pointer to Grid structure |
void StoreAMRFlux | ( | double ** | flux, |
double ** | aflux, | ||
int | sign, | ||
int | nvar_beg, | ||
int | nvar_end, | ||
int | beg, | ||
int | end, | ||
Grid * | grid | ||
) |
[in] | flux | pointer to a 1D flux array |
[out] | aflux | pointer to a 1D flux array for AMR refluxing operation |
[in] | sign | an integer equal to 0, +1 or -1. When equal to 0, flux is initialized, otherwise it is added (+1) or subtracted (-1) |
[in] | nvar_beg | the starting variable index |
[in] | nvar_end | the final variable index |
[in] | grid | a pointer to the grid structure. |