PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
Functions
adv_flux.c File Reference

Compute flux for passive scalars. More...

#include "pluto.h"

Functions

void AdvectFlux (const State_1D *state, int beg, int end, Grid *grid)
 

Detailed Description

Compute the interface upwind flux for passive scalars 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.

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

Note
The CMA (Consistent multi-fluid advection method), may be switched on (#define USE_CMA YES) when the sum of several scalars (e.g. different fluid phases) must be normalized to 1.
Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t), O. Tesileanu
Date
14 Aug, 2012

Function Documentation

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