PLUTO  4.4-patch2
Functions
rhd_energy_solve.c File Reference

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

#include "pluto.h"

Functions

int RHD_EnergySolve (double *u, double *v)
 

Detailed Description

Try to recover primitive variables by solving for the gas pressure using total energy density. We employ the algorithm outlined in Section 2 of Mignone, Plewa Bodo (2005). Specifically, we solve Eq. (12) using a Newton-Raphson root finder.

References

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
May 3, 2020

Function Documentation

◆ RHD_EnergySolve()

int RHD_EnergySolve ( double *  u,
double *  v 
)
Parameters
[in,out]uarray of conservative variables (entropy will be redefined)
[out]varray of primitive variables
Returns
Error codes:
  • 0 = success
  • 1 = solution does not exist
  • 2 = negative pressure
  • 3 = inaccurate solution (debug only)
  • 4 = NaN