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

Compute time-centered interface states using characteristic tracing. More...

#include "pluto.h"

Macros

#define REF_STATE   2
 

Functions

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

Detailed Description

Advance 1-D left and right interface states, previously computed with any of the States functions, to the half time level (n+1/2) by extrapolating characteristic variables. This is done using an upwind selection rule that discards waves not reaching the interface in dt/2.

References:

Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Sept 17, 2012

Macro Definition Documentation

#define REF_STATE   2

Flag to control the choice of the reference state in the upwind selection rule. Set REF_STATE to 1,2,3 to use cell centered value (1), interpolated states (2) or fastest wave (3, the usual PPM prescription).

Function Documentation

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

Compute interface states using characteristic tracing step.

Parameters
[in]statepointer to a State_1D structure
[in]beginitial index of computation
[in]endfinal index of computation
[in]gridpointer to an array of Grid structures
Returns
This function has no return value.

Tasks are numbered below.

1) Compute eigenvectors and eigenvalues if not yet defined.

2) Obtain characteristic variable increments dwp and dwm.

3) Initialize vp and vm to the reference state. Since this is somewhat arbitrary we use the value of REF_STATE to select one of the following cases:

  • REF_STATE==1: use cell-center value;
  • REF_STATE==2: interpolated value at base time level
  • REF_STATE==3: traditional PPM reference state (fastest wave), minimize the size of the term subject to characteristic limiting.

Passive scalars use always REF_STATE == 2.

4) Compute left and right states in primitive variables. This step also depends on the value of REF_STATE and include:

  • evolve characteristic variable increments by dt/2;
  • discard contributions from waves not reaching the interface;
  • project characteristic differences dwp and dwm onto right eigenvectors

5) Add source term to L/R states

6) Repeat construction for passive scalars