#include <hadgas_eos.h>
A class to hold, compute and access tabulated EoS.
Definition at line 32 of file hadgas_eos.h.
Classes | |
struct | table_element |
Define the data structure for one element of the table. More... | |
Public Member Functions | |
EosTable (double de, double dnb, size_t n_e, size_t n_b) | |
Sets up a table p/T/muB/mus versus (e, nb), where e is energy density, nb is net baryon density, p - pressure, T - temperature, muB - net baryon chemical potential, muS - net strangeness potential. More... | |
void | compile_table (HadronGasEos &eos, const std::string &eos_savefile_name="hadgas_eos.dat") |
Computes the actual content of the table (for EosTable description see documentation of the constructor). More... | |
void | get (table_element &res, double e, double nb) const |
Obtain interpolated p/T/muB/muS from the tabulated equation of state given energy density and net baryon density. More... | |
Private Member Functions | |
size_t | index (size_t ie, size_t inb) const |
proper index in a 1d vector, where the 2d table is stored More... | |
Private Attributes | |
std::vector< table_element > | table_ |
Storage for the tabulated equation of state. More... | |
double | de_ |
Step in energy density. More... | |
double | dnb_ |
Step in net-baryon density. More... | |
size_t | n_e_ |
Number of steps in energy density. More... | |
size_t | n_nb_ |
Number of steos in net-baryon density. More... | |
smash::EosTable::EosTable | ( | double | de, |
double | dnb, | ||
size_t | n_e, | ||
size_t | n_b | ||
) |
Sets up a table p/T/muB/mus versus (e, nb), where e is energy density, nb is net baryon density, p - pressure, T - temperature, muB - net baryon chemical potential, muS - net strangeness potential.
Net strangeness density and isospin projection density are assumed to be 0 (Note that corresponding chemical potentials are still non-zero, because muB != 0).
After calling this constructor the table is allocated, but it is still empty. To compute values call compile_table.
[in] | de | step in energy density [GeV/fm^4] |
[in] | dnb | step in net baryon density [GeV/fm^3] |
[in] | n_e | number of steps in energy density |
[in] | n_b | number of steps in net baryon density |
Entry at (ie, inb) corresponds to energy density and net baryon density (e, nb) = (ie*de, inb*dnb) [GeV/fm^4, GeV/fm^3].
Definition at line 29 of file hadgas_eos.cc.
void smash::EosTable::compile_table | ( | HadronGasEos & | eos, |
const std::string & | eos_savefile_name = "hadgas_eos.dat" |
||
) |
Computes the actual content of the table (for EosTable description see documentation of the constructor).
[in] | eos | equation of state |
[in] | eos_savefile_name | name of the file to save tabulated equation of state |
Definition at line 34 of file hadgas_eos.cc.
void smash::EosTable::get | ( | EosTable::table_element & | res, |
double | e, | ||
double | nb | ||
) | const |
Obtain interpolated p/T/muB/muS from the tabulated equation of state given energy density and net baryon density.
[in] | e | energy density |
[in] | nb | net baryon density |
[out] | res | structure, that contains p/T/muB/muS |
Definition at line 136 of file hadgas_eos.cc.
|
inlineprivate |
proper index in a 1d vector, where the 2d table is stored
Definition at line 87 of file hadgas_eos.h.
|
private |
Storage for the tabulated equation of state.
Definition at line 89 of file hadgas_eos.h.
|
private |
Step in energy density.
Definition at line 91 of file hadgas_eos.h.
|
private |
Step in net-baryon density.
Definition at line 93 of file hadgas_eos.h.
|
private |
Number of steps in energy density.
Definition at line 95 of file hadgas_eos.h.
|
private |
Number of steos in net-baryon density.
Definition at line 97 of file hadgas_eos.h.