PLUTO  4.4-patch2
Functions
pvte_law.c File Reference

Basic interface definition for the PVTE_LAW EoS. More...

#include "pluto.h"

Functions

void GetFuncDum (double, double *)
 
static void GetSahaHFracs (double, double, double *)
 
double InternalEnergyFunc (double *v, double T)
 
void GetMu (double T, double rho, double *mu)
 
double Gamma1 (double *v)
 

Detailed Description

Collect the basic set of functions required by the PVTE_LAW equation of state:

Auxiliary functions (needed by the the previous ones) are also included here.

The current version implements the EoS given by D'Angelo (2013).

Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
B. Vaidya
Date
20 June, 2014

Reference

Function Documentation

◆ Gamma1()

double Gamma1 ( double *  v)

Calculate the value of the first adiabatic index:

\[ \Gamma_1 = \frac{1}{c_V}\frac{p}{\rho T} \chi_T^2 + \chi_\rho^2 \qquad{\rm where}\quad \chi_T = \left(\pd{\log p}{\log T}\right)_{\rho} = 1 - \pd{\log{\mu}}{\log T} \,;\quad \chi_\rho = \left(\pd{\log p}{\log\rho}\right)_{T} = 1 - \pd{\log{\mu}}{\log\rho} \,;\quad \]

where p and rho are in c.g.s units. Note that if species are evolved explicitly (non-equilibrium chemistry), we set chi=1.

The heat capacity at constant volume, cV, is defined as the derivative of specific internal energy with respect to temperature:

\[ c_V = \left.\pd{e}{T}\right|_V \]

and it is computed numerically using a centered derivative.

This function is needed (at present) only when computing the sound speed in the Riemann solver. Since this is only needed for an approximated value, 5/3 (upper bound) should be ok.

Reference

  • D'Angelo et. al ApJ 778, 2013 (Eq. [26-27])
Parameters
[in]v1D array of primitive quantities
Returns
Value of first adiabatic index Gamma1.

◆ GetFuncDum()

void GetFuncDum ( double  T,
double *  funcdum_val 
)

Interpolate the value of a function of zetaR from the table that is used to estimate the value of EH2.

Parameters
[in]TValue of temperature in kelvin.
[out]*funcdum_valPointer to the value of function of zetaR
Returns
This function has no return value.

Reference: D'Angelo, G. et al, ApJ 778 2013.

◆ GetMu()

void GetMu ( double  T,
double  rho,
double *  mu 
)

Calculate the mean molecular weight for the case in which hydrogen fractions are estimated using Saha Equations.

Parameters
[in]TGas temperature in Kelvin.
[in]rhoGas density (code units)
[out]muMean molecular weight

Reference

  • Black and Bodenheimer, ApJ 199, 1975 (Eq. 8)
  • D'Angelo, G. et al ApJ 778, 2013 (Eqs. 15, 16.)

◆ GetSahaHFracs()

void GetSahaHFracs ( double  T,
double  rho,
double *  fdeg 
)
static

Compute degree of ionization and dissociation using Saha Equations. The quadratic equation ay^2 + by + c = 0 is solved using a = 1, c = -b (for hydrogen). A similar expression is used for Helium.

Parameters
[in]TGas temperature in Kelvin.
[in]rhoGas density (in code units)
[out]fdegarray of ionization/dissociation degrees.

Reference

  • D'Angelo, G. et al ApJ 778, 2013 (Eqs. 15, 16.)

◆ InternalEnergyFunc()

double InternalEnergyFunc ( double *  v,
double  T 
)

Compute the gas internal energy as a function of temperature and fractions (or density):

  • rhoe = rhoe(T,rho) in LTE or CIE;
  • rhoe = rhoe(T,X) in non-equilibrium chemistry.
Parameters
[in]v1D Array of primitive variables containing density and species. Other variables are ignored.
[in]TGas temperature
Returns
The gas internal energy (rhoe) in code units.