PLUTO  4.4-patch2
Macros | Functions
char_tracing.c File Reference

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

#include "pluto.h"

Macros

#define CHTR_REF_STATE   2
 

Functions

void CharTracingStep (const Sweep *sweep, 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
Aug 22, 2017

Macro Definition Documentation

◆ CHTR_REF_STATE

#define CHTR_REF_STATE   2

Flag to control the choice of the reference state in the upwind selection rule. Set CHTR_REF_STATE to 1,2,3 to use

  • cell centered value (1),
  • interpolated states (2),
  • fastest wave (3, the usual PPM rescription).

Function Documentation

◆ CharTracingStep()

void CharTracingStep ( const Sweep sweep,
int  beg,
int  end,
Grid grid 
)

Compute interface states using characteristic tracing step.

Parameters
[in]sweeppointer to a Sweep structure
[in]beginitial index of computation
[in]endfinal index of computation
[in]gridpointer to Grid structure
Returns
This function has no return value.

Tasks are numbered below.

2a) Define characteristic cfl coefficients.

2b) Obtain characteristic variable increments dwp and dwm.

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

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

Passive scalars use always CHTR_REF_STATE == 2.

2d) Compute left and right states in primitive variables. This step also depends on the value of CHTR_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

2e) Add source term to L/R states

2f) Repeat construction for passive scalars