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 |
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.
enum WaveType |
Definition at line 44 of file exact_sr.c.
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:
Computes 1D fluxes.
Compute 1D fluxes Input Arguments:
Computes 1D fluxes Input Arguments:
Computes 1D fluxes Input Arguments:
Computes 1D fluxes Input Arguments:
Computes 1D fluxes using exact special relativistic Riemann solver.
Computes fluxes of CONSERVES variables.
Input Arguments:
Input Arguments:
Input Arguments:
--------------------------------------------------------------------------
Output Arguments:
Input Arguments:
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.
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
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().
Definition at line 46 of file exact_sr.c.
Referenced by fluxes(), getDelVRel(), getP(), getVRel_RS(), and rtbis_vel().