PLUTO  4.4-patch2
Functions
rmhd_pressure_fix.c File Reference

Inversion scheme for RMHD using a pressure fix. More...

#include "pluto.h"

Functions

static double VelocitySquareFunc (double, void *)
 
int RMHD_PressureFix (Map_param *par)
 

Detailed Description

Fix p to a small value, solve for the square of velocity by using secant or bisection algorithm applied to Eq (A3). This step involved re-computing W at each step of the iteration. Once the root has been found, we recompute total energy E. Return 0 if succesful, 1 otherwise.

Authors
A. Mignone
C. Zanni
Date
June 27, 2019

Function Documentation

◆ RMHD_PressureFix()

int RMHD_PressureFix ( Map_param par)
Returns
Error codes are:
  • 0 = success
  • 1 = v^2 > 1
  • 2 = too many iterations

◆ VelocitySquareFunc()

double VelocitySquareFunc ( double  v2,
void *  par 
)
static

Implement Eq (A3) of Mignone & McKinney (2007).