Enumerations | Functions | Variables

rsolvers/exact_sr.c File Reference

Computes 1D fluxes using exact special relativistic Riemann solver. More...

Go to the source code of this file.

Enumerations

enum  WaveType {
  Two_S, RS, SR, Two_R,
  None
}

Functions

void fluxes (const Cons1DS Ul, const Cons1DS Ur, const Prim1DS Wl, const Prim1DS Wr, const Real Bx, Cons1DS *pF)
 Calculates fluxes of CONSERVED variables.
void gauleg (double x1, double x2, Real x[], Real w[], int n)
 Given the lower and upper limits of integration x1 and x2, and the abscissas and weights of the Gauss-Legendre n-point quadrature formula.
Real rtbis_vel (Real(*func)(const Prim1DS Wl, const Prim1DS Wr, Real p), const Prim1DS Wl, const Prim1DS Wr, Real x1, Real x2, Real xacc)
 Implements bisection root finding algorithm to solve the velocity eqn.
Real getDelVRel (const Prim1DS Wl, const Prim1DS Wr, Real p)
 Determine vRel for the wave pattern indicated by wave.
Real getVRel_2R (const Prim1DS Wl, const Prim1DS Wr, Real p)
 Determine vRel for the case of two rarefactions.
Real getVRel_RS (const Prim1DS Wl, const Prim1DS Wr, Real p)
 Determine vRel for the case of rarefaction-shock wave.
Real getVRel_2S (const Prim1DS Wl, const Prim1DS Wr, Real p)
 Determine vRel for the case of two shocks.
Real getVlim_2S (const Prim1DS Wl, const Prim1DS Wr)
 Determine vlim for the case of two shocks (eq 4.5).
Real getVlim_RS (const Prim1DS Wl, const Prim1DS Wr)
 Determine vlim for the case of rarefaction-shock (eq 4.10).
Real getVlim_2R (const Prim1DS Wl, const Prim1DS Wr)
 Determine vlim for two rarefactions (eq.
Real integrateRaref (const Prim1DS W, Real a, Real b)
 Numerically integrate the integral for rarefactions (eq 3.22 in RZP) using Gaussian-Legendre quadrature.
Real getP (const Prim1DS Wl, const Prim1DS Wr)
 Determine the pressure in the intermediate state using interval bisection.
void getShockVars (const Prim1DS Wa, Real Pb, char dir, Real *pJ, Real *pV_shock, Real *pd)
 Determine the mass flux, shock velocity and density across a shock wave.
Real getVb_Shock (const Prim1DS Wa, Real Pb, char dir)
 Determine the normal velocity behind a shock wave.
Real getVb_Raref (const Prim1DS Wa, Real Pb, char dir)
 Determine the normal velocity behind a rarefaction wave.
Real getXi (const Prim1DS Wa, Real P, Real vxc, char dir)
 Determine the self-similarity variable xi for rarefactions (eq 3.15).
Real rtbis_xi (Real(*func)(const Prim1DS Wa, Real P, Real vx, char), const Prim1DS Wa, char dir, Real f_x1, Real f_x2, Real x1, Real x2, Real xacc)
 Implements bisection root finding algorithm to find the rarefaction head and tail velocity.
void getVelT_Raref (const Prim1DS Wa, Real P, Real vxb, Real *pVy, Real *pVz)
 Determine the tangential velocities vy and vz behind a rarefaction wave.
void getVelT_Shock (const Prim1DS Wa, Real P, Real vxb, Real *pVy, Real *pVz)
 Determine the tangential velocitiies vy and vz behind a shock wave.
void setFluxes (Real vx, Real vy, Real vz, Real P, Real d, Cons1DS *pF)
 Set the corresponding fluxes as the fields of pF.

Variables

static enum WaveType wave

Detailed Description

Computes 1D fluxes using exact special relativistic Riemann solver.

PURPOSE: Computes 1D fluxes using exact special relativistic Riemann solver. currently works only for hydrodynamics

REFERENCES:

HISTORY:

CONTAINS PUBLIC FUNCTIONS:

Definition in file exact_sr.c.


Enumeration Type Documentation

enum WaveType
Enumerator:
Two_S 
RS 
SR 
Two_R 
None 

Definition at line 44 of file exact_sr.c.


Function Documentation

void fluxes ( const Cons1DS  Ul,
const Cons1DS  Ur,
const Prim1DS  Wl,
const Prim1DS  Wr,
const Real  Bx,
Cons1DS pF 
)

Calculates fluxes of CONSERVED variables.

Computes 1D fluxes Input Arguments:

  • Bxi = B in direction of slice at cell interface
  • Ul,Ur = L/R-states of CONSERVED variables at cell interface Output Arguments:
  • pFlux = pointer to fluxes of CONSERVED variables at cell interface.

Computes 1D fluxes.

Compute 1D fluxes Input Arguments:

  • Bxi = B in direction of slice at cell interface
  • Ul,Ur = L/R-states of CONSERVED variables at cell interface.

Computes 1D fluxes Input Arguments:

  • Ul,Ur = L/R-states of CONSERVED variables at cell interface
  • Wl,Wr = L/R-states of PRIMITIVE variables at cell interface Output Arguments:
  • pFlux = pointer to fluxes of CONSERVED variables at cell interface.

Computes 1D fluxes Input Arguments:

  • Ul,Ur = L/R-states of CONSERVED variables at cell interface Output Arguments:
  • pFlux = pointer to fluxes of CONSERVED variables at cell interface.

Computes 1D fluxes Input Arguments:

  • Bxi = B in direction of 1D slice at cell interface
  • Ul,Ur = L/R-states of CONSERVED variables at cell interface Output Arguments:
  • pFlux = pointer to fluxes of CONSERVED variables at cell interface.

Computes 1D fluxes using exact special relativistic Riemann solver.

Computes fluxes of CONSERVES variables.

Input Arguments:

  • Bxi = B in direction of slice at cell interface
  • Ul,Ur = L/R-states of CONSERVED variables at cell interface Output Arguments:
  • pFlux = pointer to fluxes of CONSERVED variables at cell interface

Input Arguments:

  • Bxi = B in direction of slice at cell interface
  • Ul,Ur = L/R-states of CONSERVED variables at cell interface Output Arguments:
  • pF = pointer to fluxes of CONSERVED variables at cell interface

Input Arguments:

  • Ul,Ur = L/R-states of CONSERVED variables at cell interface
  • Bx = B in direction of slice at cell interface Output Arguments:
  • pF = pointer to fluxes of CONSERVED variables at cell interface

--------------------------------------------------------------------------

Output Arguments:

  • Flux = fluxes of CONSERVED variables at cell interface

Input Arguments:

  • Ul,Ur = L/R-states of CONSERVED variables at cell interface
  • Bx = B in direction of slice at cell interface Output Arguments:
  • pFlux = pointer to fluxes of CONSERVED variables at cell interface

Definition at line 103 of file exact_sr.c.

References C, Prim1DS::d, Gamma, getP(), getShockVars(), getVb_Raref(), getVb_Shock(), getVelT_Raref(), getVelT_Shock(), getXi(), Prim1DS::P, RS, rtbis_xi(), setFluxes(), SR, Two_R, Two_S, Prim1DS::Vx, Prim1DS::Vy, Prim1DS::Vz, vz, and wave.

Here is the call graph for this function:

void gauleg ( double  x1,
double  x2,
Real  x[],
Real  w[],
int  n 
)

Given the lower and upper limits of integration x1 and x2, and the abscissas and weights of the Gauss-Legendre n-point quadrature formula.

Given the lower and upper limits of integration x1 and x2, and given n, this routine returns arrays x[1..n] and w[1..n] of length n, containing the abscissas and weights of the Gauss-Legendre n-point quadrature formula. See Numerical Recipes in C, Press et al.

Definition at line 826 of file exact_sr.c.

Referenced by integrateRaref().

Here is the caller graph for this function:

Real getDelVRel ( const Prim1DS  Wl,
const Prim1DS  Wr,
Real  p 
)

Determine vRel for the wave pattern indicated by wave.

Definition at line 467 of file exact_sr.c.

References getVRel_2R(), getVRel_2S(), getVRel_RS(), RS, SR, Two_R, Two_S, Prim1DS::Vx, and wave.

Referenced by getP().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getP ( const Prim1DS  Wl,
const Prim1DS  Wr 
)

Determine the pressure in the intermediate state using interval bisection.

Definition at line 492 of file exact_sr.c.

References getDelVRel(), getVlim_2S(), getVlim_RS(), Prim1DS::P, rtbis_vel(), tol, Prim1DS::Vx, and wave.

Referenced by fluxes().

Here is the call graph for this function:

Here is the caller graph for this function:

void getShockVars ( const Prim1DS  Wa,
Real  Pb,
char  dir,
Real pJ,
Real pV_shock,
Real pd 
)

Determine the mass flux, shock velocity and density across a shock wave.

Definition at line 336 of file exact_sr.c.

References ath_error(), C, Prim1DS::d, Gamma, J, Prim1DS::P, Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by fluxes(), and getVb_Shock().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getVb_Raref ( const Prim1DS  Wa,
Real  Pb,
char  dir 
)

Determine the normal velocity behind a rarefaction wave.

Definition at line 655 of file exact_sr.c.

References integrateRaref(), Prim1DS::P, and Prim1DS::Vx.

Referenced by fluxes(), getVlim_2R(), getVlim_RS(), getVRel_2R(), getVRel_RS(), and rtbis_xi().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getVb_Shock ( const Prim1DS  Wa,
Real  Pb,
char  dir 
)

Determine the normal velocity behind a shock wave.

Definition at line 632 of file exact_sr.c.

References Prim1DS::d, Gamma, getShockVars(), J, Prim1DS::P, Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by fluxes(), getVlim_2S(), getVRel_2S(), and getVRel_RS().

Here is the call graph for this function:

Here is the caller graph for this function:

void getVelT_Raref ( const Prim1DS  Wa,
Real  P,
Real  vxb,
Real pVy,
Real pVz 
)

Determine the tangential velocities vy and vz behind a rarefaction wave.

Definition at line 702 of file exact_sr.c.

References C, Prim1DS::d, Gamma, Prim1DS::P, Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by fluxes().

Here is the caller graph for this function:

void getVelT_Shock ( const Prim1DS  Wa,
Real  P,
Real  vxb,
Real pVy,
Real pVz 
)

Determine the tangential velocitiies vy and vz behind a shock wave.

Note that this function differs from Pons et al. (2000) equation 4.13, which is only valid for one of vz or vy equal to zero.

Definition at line 753 of file exact_sr.c.

References Prim1DS::d, Gamma, Prim1DS::P, Prim1DS::Vx, Prim1DS::Vy, Prim1DS::Vz, and vz.

Referenced by fluxes().

Here is the caller graph for this function:

Real getVlim_2R ( const Prim1DS  Wl,
const Prim1DS  Wr 
)

Determine vlim for two rarefactions (eq.

4.12 in RZP)

Definition at line 393 of file exact_sr.c.

References getVb_Raref(), and Prim1DS::Vx.

Referenced by rtbis_vel().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getVlim_2S ( const Prim1DS  Wl,
const Prim1DS  Wr 
)

Determine vlim for the case of two shocks (eq 4.5).

Definition at line 443 of file exact_sr.c.

References getVb_Shock(), Prim1DS::P, and Prim1DS::Vx.

Referenced by getP(), and rtbis_vel().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getVlim_RS ( const Prim1DS  Wl,
const Prim1DS  Wr 
)

Determine vlim for the case of rarefaction-shock (eq 4.10).

Definition at line 415 of file exact_sr.c.

References a, getVb_Raref(), Prim1DS::P, and Prim1DS::Vx.

Referenced by getP(), and rtbis_vel().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getVRel_2R ( const Prim1DS  Wl,
const Prim1DS  Wr,
Real  p 
)

Determine vRel for the case of two rarefactions.

Definition at line 548 of file exact_sr.c.

References getVb_Raref(), and Prim1DS::Vx.

Referenced by getDelVRel().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getVRel_2S ( const Prim1DS  Wl,
const Prim1DS  Wr,
Real  p 
)

Determine vRel for the case of two shocks.

Definition at line 609 of file exact_sr.c.

References ath_3d_fft_plan::dir, getVb_Shock(), J, and Prim1DS::Vx.

Referenced by getDelVRel().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getVRel_RS ( const Prim1DS  Wl,
const Prim1DS  Wr,
Real  p 
)

Determine vRel for the case of rarefaction-shock wave.

Definition at line 570 of file exact_sr.c.

References getVb_Raref(), getVb_Shock(), J, SR, Prim1DS::Vx, and wave.

Referenced by getDelVRel().

Here is the call graph for this function:

Here is the caller graph for this function:

Real getXi ( const Prim1DS  Wa,
Real  P,
Real  vxc,
char  dir 
)

Determine the self-similarity variable xi for rarefactions (eq 3.15).

Definition at line 671 of file exact_sr.c.

References Prim1DS::d, Gamma, Prim1DS::P, Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by fluxes().

Here is the caller graph for this function:

Real integrateRaref ( const Prim1DS  W,
Real  a,
Real  b 
)

Numerically integrate the integral for rarefactions (eq 3.22 in RZP) using Gaussian-Legendre quadrature.

Definition at line 284 of file exact_sr.c.

References Prim1DS::d, f, Gamma, gauleg(), n, Prim1DS::P, Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by getVb_Raref().

Here is the call graph for this function:

Here is the caller graph for this function:

Real rtbis_vel ( Real(*)(const Prim1DS Wl, const Prim1DS Wr, Real p)  func,
const Prim1DS  Wl,
const Prim1DS  Wr,
Real  x1,
Real  x2,
Real  xacc 
)

Implements bisection root finding algorithm to solve the velocity eqn.

Assumes func(x1) and func(x2) have opposite signs without a check

Definition at line 868 of file exact_sr.c.

References f, getVlim_2R(), getVlim_2S(), getVlim_RS(), RS, SR, Two_R, Two_S, Prim1DS::Vx, and wave.

Referenced by getP().

Here is the call graph for this function:

Here is the caller graph for this function:

Real rtbis_xi ( Real(*)(const Prim1DS Wa, Real P, Real vx, char)  func,
const Prim1DS  Wa,
char  dir,
Real  f_x1,
Real  f_x2,
Real  x1,
Real  x2,
Real  xacc 
)

Implements bisection root finding algorithm to find the rarefaction head and tail velocity.

Assumes func(x1) and func(x2) have opposite signs without a check

Definition at line 916 of file exact_sr.c.

References f, and getVb_Raref().

Referenced by fluxes().

Here is the call graph for this function:

Here is the caller graph for this function:

void setFluxes ( Real  vx,
Real  vy,
Real  vz,
Real  P,
Real  d,
Cons1DS pF 
)

Set the corresponding fluxes as the fields of pF.

Definition at line 796 of file exact_sr.c.

References ath_error(), Cons1DS::d, Cons1DS::E, Gamma, Cons1DS::Mx, Cons1DS::My, and Cons1DS::Mz.

Referenced by fluxes().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

enum WaveType wave [static]

Definition at line 46 of file exact_sr.c.

Referenced by fluxes(), getDelVRel(), getP(), getVRel_RS(), and rtbis_vel().