PLUTO
pvte_law_template.c File Reference

Templeate file for the PVTE_LAW EoS. More...

#include "pluto.h"
Include dependency graph for pvte_law_template.c:

Go to the source code of this file.

Functions

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

Detailed Description

Templeate file for the PVTE_LAW EoS.

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

  • InternalEnergyFunc() defines the gas internal energy as a function temperature and ionization fractions (for non-equilibrium chemistry) or temperature and density (in Local Thermodynamic Equilibrium - LTE - or Collisional Ionization Equilibrium - CIE).
  • GetMu() computes the mean molecular weight (in LTE or CIE).
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

Definition in file pvte_law_template.c.

Function Documentation

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.

Definition at line 56 of file pvte_law_template.c.

90 {
91  return 1.6667;
92 }
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

Definition at line 42 of file pvte_law_template.c.

52 {
53 }
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.

Definition at line 24 of file pvte_law_template.c.

38 {
39 }