... | ... | @@ -57,7 +57,7 @@ In each EOS type's header, e.g. Tillotson in `src/equation_of_state/planetary/ti |
|
|
* Define a function to set these parameters' values for each specific material, e.g. `INLINE static void set_Til_iron(struct Til_params *mat, int mat_id)` for Tillotson iron. This also sets the material ID when the function is called by `eos_init()` (see below).
|
|
|
* Similarly, define a function to convert the parameter values into internal units, e.g. `INLINE static void convert_units_Til(struct Til_params *mat, const struct unit_system* us)`
|
|
|
* Now define the actual EOS functions, one for each in the main `equation_of_state.h`. Add a prefix to the name, e.g. `Til_` for Tillotson. Instead of taking the `mat_id` flag as the third argument, take (a pointer to) the actual material parameter struct, e.g. `INLINE static float Til_internal_energy_from_entropy(float density, float entropy, struct Til_params *mat)`.
|
|
|
* Some EOS do not support all of the functions, e.g. Tillotson does not include entropy, so must be used with an appropriate hydro scheme. Set these functions to raise an error.
|
|
|
* Some EOS do not support all of the functions, e.g. Tillotson does not include entropy, so must be used with an appropriate hydro scheme. Set these functions to raise an error. `gas_entropy_from_internal_energy()` is always called at setup and for snapshots, so should just return zero if it is not in this EOS.
|
|
|
|
|
|
In `src/equation_of_state/planetary/equation_of_state.h`:
|
|
|
* `eos_parameters`: Declare the parameter structures for each material of each EOS type, e.g. `struct Til_params Til_iron;`.
|
... | ... | |