PLUTO  4.4-patch2
Functions
two_shock.c File Reference

Implementation of the two-shock Riemann solver for the relativistic hydro equations. More...

#include "pluto.h"

Functions

static double TwoShock_Lorentz (double *U, int n)
 
static void TwoShock_Shock (double, double, double, double, double, double, double, double *, double *, double *, int)
 
void TwoShock_Solver (const Sweep *sweep, int beg, int end, double *cmax, Grid *grid)
 
double TwoShock_RarefactionSpeed (double w[], int iside)
 

Detailed Description

Solve the Riemann problem for the relativistic hydrodynamics equations using the two-shock approach described by Mignone, Plewa and Bodo (2005). The formulation works with IDEAL or TAUB equation of state.

On input, this function takes left and right primitive state vectors stateL->v and stateR->v at zone edge i+1/2. On output, return flux and pressure vectors at the same interface i+1/2 (note that the i refers to i+1/2).

Also during this step, compute maximum wave propagation speed (cmax) for explicit time step computation.

Reference:

Authors
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
May 15, 2020

Function Documentation

◆ TwoShock_Lorentz()

double TwoShock_Lorentz ( double *  U,
int  n 
)
static

Compute Lorentz gamma factor.

◆ TwoShock_RarefactionSpeed()

double TwoShock_RarefactionSpeed ( double  w[],
int  iside 
)

Compute head or tail characteristic speeds enclosing the rarefaction fan:

Parameters
[in]wa vector of primitive quantities containing the three velocities.
[in]iside(IN)an integer specifying a left (-1) or right (+1) rarefaction wave.

◆ TwoShock_Shock()

void TwoShock_Shock ( double  tau0,
double  u0,
double  p0,
double  g0,
double  V0,
double  h0,
double  p1,
double *  u1,
double *  dudp,
double *  zeta,
int  isweep 
)
static

Compute post shock quantities u1, dudp, zeta, for a given value of the post-shock pressure p1

◆ TwoShock_Solver()

void TwoShock_Solver ( const Sweep sweep,
int  beg,
int  end,
double *  cmax,
Grid grid 
)

Solve Riemann problem for the relativistic HD equations using the two-shock Riemann solver of Mignone et al. (2005).

Parameters
[in,out]sweeppointer to Sweep structure
[in]beginitial grid index
[out]endfinal grid index
[out]cmax1D array of maximum characteristic speeds
[in]gridpointer to array of Grid structures.