PLUTO
4.4-patch2
|
HLLD Riemann solver for the relativistic MHD equations. More...
#include "pluto.h"
Macros | |
#define | COUNT_FAILURES NO |
Functions | |
static double | HLLD_Fstar (Riemann_State *, Riemann_State *, double) |
static int | HLLD_GetRiemannState (Riemann_State *, double, int) |
static void | HLLD_GetAState (Riemann_State *, double p) |
static void | HLLD_GetCState (Riemann_State *, Riemann_State *, double, double *) |
static double | HLLD_TotalPressure (double *) |
void | HLLD_Solver (const Sweep *sweep, int beg, int end, double *cmax, Grid *grid) |
Solve the Riemann problem for the relativistic MHD equations using the HLLD solver of Mignone, Ugliano & Bodo (2009). The solver requires the solution of a nonlinear equation (Eq. [48]) and the maximum number of iterations before convergence can be set using the macro MAX_ITER (default 20). A physical relevant solution is accepted if it satisfies the constraints by Eq. [54], implemented in the function HLLD_Fstar(). If this is not the case or if other failure conditions occur during the iteration loop, we switch to the HLL Riemann solver.
The macro COUNT_FAILURES can be set to YES if one wishes to count how many times the solver fails.
On input, it takes left and right primitive sweep vectors sweep->vL
and sweep->vR
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:
#define COUNT_FAILURES NO |
When set to YES, count number of failures and write the count to "hlld_fails.dat" (works in parallel as well). The number of failures is normalized to the total number of zones: nf/nz
where nz
is incremented during the main loop and nf
is incremented when a failure occur.
|
static |
Return the velocity difference across the contact mode as a function of the total pressure p.
|
static |
Compute states aL and aR behind fast waves.
|
static |
Compute states cL and cR across contact mode.
|
static |
Express the sweep behind a wave as function of the total pressure p and the right hand side on the other side of the wave.
On output, return 1 if succesful, 0 if w < 0 is encountered. side = -1 : means left side = 1 : means right
When computing Bx, By and Bz, we use Eq. [21] with vx, vy and vz replaced by by Eq. [23,24,25]. The following short MAPLE script is used to verify the correctness.
|
static |
Compute total pressure