EOS library routines
Files
Input
Reading an EOS of unknown type - i.e. reading to an object of class (eos *) -
a word is read first, and compared against the name of each EOS class.
If a match is found, an object of that class is instantiated.
The data for that object is then read (see below for manuals on specific
classes).
In other words:
eos_type
eos_parameters
Software interface
eos.h defines a `state' class
and an abstract `eos' class.
State (`state') class
The `state' class is a primitive state
- its data members include only density (`rho') and
specific internal energy (`e').
A state instance can be created with a defined density and energy, e.g.
state a(rho,e);
Generic equation of state (`eos') class
Specific EOS types inherit from `eos'.
As `eos' is abstract, members can't be instantiated
- if you don't know what type an EOS will be
until run-time, only a pointer to an EOS
can be used in the program.
The `eos' class includes methods for calculating
thermodynamic quantities. All take a state
as argument. The methods are
- p: pressure
- t: temperature (default method returns -1 for `invalid'.
- dpdv and dpde: pressure derivatives
- csqv: square of sound speed
- cv: specific heat capacity at constant volume
- h: specific enthalpy (h = e + pv)
- s: specific entropy
- f_helmholtz: specific Helmholtz free energy (fh = e - Ts)
- f_gibbs: specific Gibbs free energy (fg = e + pv - Ts)
Specific EOS types