PLUTO  4.4-patch2
Functions
plm_states.c File Reference

Piecewise linear reconstruction. More...

#include "pluto.h"

Functions

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

Detailed Description

Compute interface states using piecewise linear reconstruction inside each zone. Reconstruction is performed in primitive variable when CHAR_LIMITING == NO ) or characteristic variables when CHAR_LIMITING == YES .

The convention used throughout is that vL and vR are left and right states with respect to the interface, while vm and vp refer to the cell center:

                    vL(i)-> <-vR(i)
     |----------*----------|----------*----------|
      <-vm(i)  (i)  vp(i)->         (i+1)

The default setting (LIMITER == DEFAULT) applies a different limiter to each variable:

Otherwise the same limiter can be imposed to all variables from definitions.h.

The approach followed here is taken from Mignone (JCP, 2014) "High-order conservative reconstruction schemes for finite volume methods in cylindrical and spherical geometries" where interface states are constructed as

\[ V_i^{\pm} = V_i \;\pm\; \overline{\Delta V}_i \; d^\pm_i\,, \qquad \overline{\Delta V}_i = {\rm Lim}\left(\Delta V_i^+,\,\Delta V_i^-,\, c^+_i, c^-_i\right)\,, \qquad \Delta V^\pm_i = \pm\left(V_{i\pm1}-V_i\right)w^\pm_i \]

where

\[ w^\pm_i = \left|\frac{\Delta\xi_i}{\bar{\xi}_{i\pm1} - \bar{\xi}_i}\right| \,, \qquad d^\pm_i = \left|\frac{\xi_{i\pm\HALF} - \bar{\xi}_i}{\Delta\xi_i}\right|\,, \qquad c^\pm_i = \left|\frac{\bar{\xi}_{i\pm1} - \bar{\xi}_i} {\xi_{i\pm\HALF}- \bar{\xi}_i}\right| \]

are interpolation coefficients returned by the PLM_Coeffs structure (see the PLM_CoefficientsGet() function). The slope limiter $\overline{\Delta V}_i=$ dv_lim[i][nv] is a function of the forward and backward (undivided) derivatives and geometrical coefficients in case of non-uniform or non-Cartesian grids. Different limiters are implemented through small macros defined in plm_coeffs.h. Note that $ \bar{\xi} $ defines the centroid of volume which differs from the cell center in cylindrical and spherical geometires.

A stencil of 3 zones is required for all limiters except for the FOURTH_ORDER_LIM which requires 5 zones.

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
July 1, 2019

References

Function Documentation

◆ States()

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

Compute states using piecewise linear interpolation.

Parameters
[in]sweeppointer to a Sweep structure
[in]begstarting point where vp and vm must be computed
[in]endfinal point where vp and vm must be computed
[in]gridpointer to array of Grid structures
Returns
This function has no return value.

Compute 1D left and right interface states using piecewise linear reconstruction and the characteristic decomposition of the quasi-linear form of the equations.

This is done by first extrapolating the cell center value to the interface using piecewise limited linear reconstruction on the characteristic variables.

Left and right states are then evolved for the half time step using characteristic tracing if necessary.