Functions

rsolvers/hllc_sr.c File Reference

Computes 1D fluxes using the relativistic HLLC Riemann solver. More...

Go to the source code of this file.

Functions

void flux_LR (Cons1DS U, Prim1DS W, Cons1DS *flux, Real Bx, Real *p)
 Calculate LR flux.
void getMaxSignalSpeeds_pluto (const Prim1DS Wl, const Prim1DS Wr, const Real Bx, Real *low, Real *high)
void getMaxSignalSpeeds_echo (const Prim1DS Wl, const Prim1DS Wr, const Real Bx, Real *low, Real *high)
void getVChar_pluto (const Prim1DS W, const Real Bx, Real *lml, Real *lmr)
void getVChar_echo (const Prim1DS W, const Real Bx, Real *lml, Real *lmr)
int QUARTIC (Real b, Real c, Real d, Real e, Real z[])
 Solve a quartic equation.
int CUBIC (Real b, Real c, Real d, Real z[])
 Solve a cubic equation.
void fluxes (const Cons1DS Ul, const Cons1DS Ur, const Prim1DS Wl, const Prim1DS Wr, const Real Bxi, Cons1DS *pFlux)
 Calculates fluxes of CONSERVED variables.
void entropy_flux (const Cons1DS Ul, const Cons1DS Ur, const Prim1DS Wl, const Prim1DS Wr, const Real Bx, Real *pFlux)
 Calculate entropy flux.

Detailed Description

Computes 1D fluxes using the relativistic HLLC Riemann solver.

PURPOSE: Computes 1D fluxes using the relativistic HLLC Riemann solver, an extension of the HLLE fluxes to include the contact wave. Currently only works for hydrodynamics. For an extension to MHD, see hlld_sr.c

REFERENCES:

HISTORY: Written by Jonathan FUlton, February 2009 Extended to MHD by Kris Beckwith, Spring 2010

CONTAINS PUBLIC FUNCTIONS:

Definition in file hllc_sr.c.


Function Documentation

int CUBIC ( Real  b,
Real  c,
Real  d,
Real  z[] 
)

Solve a cubic equation.

PURPOSE:

Solve a cubic equation in the form

  • z^3 + bz^2 + cz + d = 0

For its purpose, it is assumed that ALL roots are real. This makes things faster.

ARGUMENTS

  • b, c, d (IN) = coefficient of the cubic z^3 + bz^2 + cz + d = 0
  • z[] (OUT) = a vector containing the (real) roots of the cubic. Roots should be sorted in increasing order.

REFERENCE:

Definition at line 1132 of file hllc_sr.c.

References f, and n.

Referenced by QUARTIC().

Here is the caller graph for this function:

void entropy_flux ( const Cons1DS  Ul,
const Cons1DS  Ur,
const Prim1DS  Wl,
const Prim1DS  Wr,
const Real  Bx,
Real pFlux 
)

Calculate entropy flux.

Compute entropy flux.

Definition at line 614 of file hllc_sr.c.

Referenced by integrate_2d_vl(), and integrate_3d_vl().

Here is the caller graph for this function:

void flux_LR ( Cons1DS  U,
Prim1DS  W,
Cons1DS flux,
Real  Bx,
Real p 
)

Calculate LR flux.

Definition at line 721 of file hllc_sr.c.

References Cons1DS::By, Prim1DS::By, Cons1DS::Bz, Prim1DS::Bz, Cons1DS::d, Prim1DS::d, Cons1DS::E, Gamma, Gamma_1, Cons1DS::Mx, Cons1DS::My, Cons1DS::Mz, Prim1DS::P, theta, Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by fluxes().

Here is the caller graph for this function:

void fluxes ( const Cons1DS  Ul,
const Cons1DS  Ur,
const Prim1DS  Wl,
const Prim1DS  Wr,
const Real  Bxi,
Cons1DS pFlux 
)

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 259 of file hllc_sr.c.

References Cons1DS::By, Cons1DS::Bz, Cons1DS::d, Cons1DS::E, flux_LR(), getMaxSignalSpeeds_echo(), getMaxSignalSpeeds_pluto(), Cons1DS::Mx, Cons1DS::My, Cons1DS::Mz, Pl, Pr, Prim1DS::Vx, vxl, and vxr.

Here is the call graph for this function:

void getMaxSignalSpeeds_echo ( const Prim1DS  Wl,
const Prim1DS  Wr,
const Real  Bx,
Real low,
Real high 
)

Definition at line 930 of file hllc_sr.c.

References getVChar_echo().

Referenced by entropy_flux(), and fluxes().

Here is the call graph for this function:

Here is the caller graph for this function:

void getMaxSignalSpeeds_pluto ( const Prim1DS  Wl,
const Prim1DS  Wr,
const Real  Bx,
Real low,
Real high 
)

Definition at line 773 of file hllc_sr.c.

References getVChar_pluto().

Referenced by entropy_flux(), and fluxes().

Here is the call graph for this function:

Here is the caller graph for this function:

void getVChar_echo ( const Prim1DS  W,
const Real  Bx,
Real lml,
Real lmr 
)

Definition at line 948 of file hllc_sr.c.

References b0, Prim1DS::By, Prim1DS::Bz, Prim1DS::d, Gamma, Gamma_1, Prim1DS::P, Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by getMaxSignalSpeeds_echo().

Here is the caller graph for this function:

void getVChar_pluto ( const Prim1DS  W,
const Real  Bx,
Real lml,
Real lmr 
)

Definition at line 791 of file hllc_sr.c.

References b0, Prim1DS::By, Prim1DS::Bz, Prim1DS::d, Gamma, Gamma_1, lambda, Prim1DS::P, Q, QUARTIC(), Prim1DS::Vx, Prim1DS::Vy, and Prim1DS::Vz.

Referenced by getMaxSignalSpeeds_pluto().

Here is the call graph for this function:

Here is the caller graph for this function:

int QUARTIC ( Real  b,
Real  c,
Real  d,
Real  e,
Real  z[] 
)

Solve a quartic equation.

PURPOSE:

Solve a quartic equation in the form

  • z^4 + bz^3 + cz^2 + dz + e = 0

For its purpose, it is assumed that ALL roots are real. This makes things faster.

ARGUMENTS

  • b, c,
  • d, e (IN) = coefficient of the quartic z^4 + bz^3 + cz^2 + dz + e = 0
  • z[] (OUT) = a vector containing the (real) roots of the quartic

REFERENCE:

Definition at line 1032 of file hllc_sr.c.

References CUBIC(), f, n, q, r, and s.

Referenced by getVChar_pluto().

Here is the call graph for this function:

Here is the caller graph for this function: