PLUTO
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
pvte_law_template.c
Go to the documentation of this file.
1
/* ///////////////////////////////////////////////////////////////////// */
2
/*!
3
\file
4
\brief Templeate file for the \c PVTE_LAW EoS.
5
6
Collect the basic set of functions required by the
7
\c PVTE_LAW equation of state:
8
9
- InternalEnergyFunc() defines the gas internal energy as a function
10
temperature and ionization fractions (for non-equilibrium chemistry)
11
or temperature and density (in Local Thermodynamic Equilibrium - LTE -
12
or Collisional Ionization Equilibrium - CIE).
13
- GetMu() computes the mean molecular weight (in LTE or CIE).
14
15
\author A. Mignone (mignone@ph.unito.it)\n
16
B. Vaidya
17
\date 20 June, 2014
18
19
*/
20
/* /////////////////////////////////////////////////////////////////// */
21
#include "
pluto.h
"
22
23
/* ***************************************************************** */
24
double
InternalEnergyFunc
(
double
*
v
,
double
T
)
25
/*!
26
* Compute the gas internal energy as a function of temperature
27
* and fractions (or density):
28
* - <tt> rhoe = rhoe(T,rho) </tt> in LTE or CIE;
29
* - <tt> rhoe = rhoe(T,X) </tt> in non-equilibrium chemistry.
30
*
31
* \param [in] v 1D Array of primitive variables containing
32
* density and species. Other variables are
33
* ignored.
34
* \param [in] T Gas temperature
35
*
36
* \return The gas internal energy (\c rhoe) in code units.
37
******************************************************************* */
38
{
39
}
40
41
/* ********************************************************************* */
42
void
GetMu
(
double
T
,
double
rho,
double
*mu)
43
/*!
44
* Calculate the mean molecular weight for the case in which
45
* hydrogen fractions are estimated using Saha Equations.
46
*
47
* \param [in] T Gas temperature in Kelvin.
48
* \param [in] rho Gas density (code units)
49
* \param [out] mu Mean molecular weight
50
*
51
*********************************************************************** */
52
{
53
}
54
55
/* ********************************************************************* */
56
double
Gamma1
(
double
*
v
)
57
/*!
58
* Calculate the value of the first adiabatic index:
59
* \f[
60
* \Gamma_1 = \frac{1}{c_V}\frac{p}{\rho T} \chi_T^2 + \chi_\rho^2
61
* \qquad{\rm where}\quad
62
* \chi_T = \left(\pd{\log p}{\log T}\right)_{\rho} =
63
* 1 - \pd{\log{\mu}}{\log T} \,;\quad
64
* \chi_\rho = \left(\pd{\log p}{\log\rho}\right)_{T} =
65
* 1 - \pd{\log{\mu}}{\log\rho} \,;\quad
66
* \f]
67
* where \c p and \c rho are in c.g.s units.
68
* Note that if species are evolved explicitly (non-equilibrium chemistry),
69
* we set \c chi=1.
70
*
71
* The heat capacity at constant volume, \c cV, is defined as the
72
* derivative of specific internal energy with respect to temperature:
73
* \f[
74
* c_V = \left.\pd{e}{T}\right|_V
75
* \f]
76
* and it is computed numerically using a centered derivative.
77
*
78
* This function is needed (at present) only when computing the
79
* sound speed in the Riemann solver.
80
* Since this is only needed for an approximated value, 5/3 (upper
81
* bound) should be ok.
82
*
83
* \b Reference
84
* - D'Angelo et. al ApJ 778, 2013 (Eq. [26-27])
85
*
86
* \param [in] v 1D array of primitive quantities
87
*
88
* \return Value of first adiabatic index Gamma1.
89
*********************************************************************** */
90
{
91
return
1.6667;
92
}
Sph_disk.T
tuple T
Definition:
Sph_disk.py:33
func_param::v
double v[NVAR]
Definition:
eos.h:106
GetMu
void GetMu(double T, double rho, double *mu)
Definition:
pvte_law_template.c:42
pluto.h
PLUTO main header file.
Gamma1
double Gamma1(double *v)
Definition:
pvte_law_template.c:56
InternalEnergyFunc
double InternalEnergyFunc(double *v, double T)
Definition:
pvte_law_template.c:24
Src
EOS
PVTE
pvte_law_template.c
Generated by
1.8.10