PLUTO  4.4-patch2
Functions
rmhd_energy_solve.c File Reference

Inversion scheme for RMHD using total energy density. More...

#include "pluto.h"

Functions

int RMHD_EnergySolve (Map_param *par)
 

Detailed Description

Try to recover gas pressure from conserved variables {D, m, E, B} using the algorithm outlined in Section A3 of Mignone & McKinney (2007). Specifically, we solve Eq. (A4) or (A6) (depending on the value of RMHD_REDUCED_ENERGY) using a Newton-Raphson scheme. Here W = rho*h*lorentz^2, E, D, etc... have the same meaning as in the mentioned paper.

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
June 29, 2019

References

Function Documentation

◆ RMHD_EnergySolve()

int RMHD_EnergySolve ( Map_param par)

Solve f(W) = 0, where f(W) is Equation (A4) or (A6).

Returns
Error codes:
  • 0 = success
  • 1 = negative energy
  • 2 = negative pressure
  • 3 = inaccurate solution (debug only)
  • 4 = NaN