Ideal (constant gamma) EOS.
More...
Go to the source code of this file.
|
void | SoundSpeed2 (double **v, double *cs2, double *h, int beg, int end, int pos, Grid *grid) |
|
void | Enthalpy (double **v, real *h, int beg, int end) |
|
void | Entropy (double **v, double *s, int beg, int end) |
|
Ideal (constant gamma) EOS.
Implements essential functions for the constant-gamma law for hydro/MHD, relativistic hydro/relativistic MHD.
- Author
- A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
- Date
- April 14, 2014
Definition in file eos.c.
void Enthalpy |
( |
double ** |
v, |
|
|
real * |
h, |
|
|
int |
beg, |
|
|
int |
end |
|
) |
| |
Compute the enthalpy.
- Parameters
-
[in] | v | 1D array of primitive quantities |
[in] | h | 1D array of enthalpy values |
[in] | beg | initial index of computation |
[in] | end | final index of computation |
- Returns
- This function has no return value.
Definition at line 48 of file eos.c.
69 #if PHYSICS == HD || PHYSICS == MHD
70 for (i = beg; i <= end; i++) h[i] = gmmr*v[i][PRS]/v[i][
RHO];
71 #elif PHYSICS == RHD || PHYSICS == RMHD
72 for (i = beg; i <= end; i++) {
73 theta = v[
i][PRS]/v[
i][
RHO];
74 h[
i] = 1.0 + gmmr*theta;
void Entropy |
( |
double ** |
v, |
|
|
double * |
s, |
|
|
int |
beg, |
|
|
int |
end |
|
) |
| |
Compute the entropy.
- Parameters
-
[in] | v | 1D array of primitive quantities |
[in] | s | 1D array of entropy values |
[in] | is | initial index of computation |
[in] | ie | final index of computation |
- Returns
- This function has no return value.
Definition at line 80 of file eos.c.
95 #if PHYSICS == HD || PHYSICS == MHD
96 for (i = beg; i <= end; i++){
100 #elif PHYSICS == RHD || PHYSICS == RMHD
101 for (i = beg; i <= end; i++) {
void SoundSpeed2 |
( |
double ** |
v, |
|
|
double * |
cs2, |
|
|
double * |
h, |
|
|
int |
beg, |
|
|
int |
end, |
|
|
int |
pos, |
|
|
Grid * |
grid |
|
) |
| |
Define the square of the sound speed.
- Parameters
-
[in] | v | 1D array of primitive quantities |
[out] | cs2 | 1D array containing the square of the sound speed |
[in] | h | 1D array of enthalpy values |
[in] | beg | initial index of computation |
[in] | end | final index of computation |
[in] | pos | an integer specifying the spatial position inside the cell (only for spatially-dependent EOS) |
[in] | grid | pointer to an array of Grid structures |
- Returns
- This function has no return value.
Definition at line 16 of file eos.c.
35 #if PHYSICS == HD || PHYSICS == MHD
36 for (i = beg; i <= end; i++) cs2[i] =
g_gamma*v[i][PRS]/v[i][
RHO];
37 #elif PHYSICS == RHD || PHYSICS == RMHD
40 for (i = beg; i <= end; i++) {
41 theta = v[
i][PRS]/v[
i][
RHO];
void Enthalpy(double **v, real *h, int beg, int end)