PLUTO  4.4-patch2
Functions
adv_flux.c File Reference

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)
 

Detailed Description

Compute the interface upwind flux for passive scalars q obeying advection equations of the form:

\[ \partial_tq + v\cdot \nabla q = 0 \qquad\Longleftrightarrow\qquad \partial_t(\rho q) + \nabla\cdot(\rho\vec{v}q) = 0 \]

Fluxes are computed using an upwind selection rule based on the density flux, already computed during a previous Riemann solver:

\[ (\rho vq)_{i+\HALF} = \left\{\begin{array}{ll} (\rho v)_{i+\HALF}q_L & \;\textrm{if} \quad (\rho v)_{i+\HALF} \ge 0 \\ \noalign{\medskip} (\rho v)_{i+\HALF}q_R & \; \textrm{otherwise} \end{array}\right. \]

where $ (\rho v)_{i+\HALF}$ 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)

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
O. Tesileanu
Date
April 02, 2019

Reference "The consistent multi-fluid advection method" Plewa and Muller, A&A (1999) 342, 179.

Function Documentation

◆ AdvectFlux()

void AdvectFlux ( const Sweep sweep,
int  beg,
int  end,
Grid grid 
)
Parameters
[in,out]sweep
[in]beginitial index of computation
[in]endfinal index of computation
[in]gridPointer to Grid structure
Returns
This function has no return value.

◆ StoreAMRFlux()

void StoreAMRFlux ( double **  flux,
double **  aflux,
int  sign,
int  nvar_beg,
int  nvar_end,
int  beg,
int  end,
Grid grid 
)
Parameters
[in]fluxpointer to a 1D flux array
[out]afluxpointer to a 1D flux array for AMR refluxing operation
[in]signan integer equal to 0, +1 or -1. When equal to 0, flux is initialized, otherwise it is added (+1) or subtracted (-1)
[in]nvar_begthe starting variable index
[in]nvar_endthe final variable index
[in]grida pointer to the grid structure.