Skip to content
Snippets Groups Projects
Commit b153f18f authored by Jacob Kegerreis's avatar Jacob Kegerreis
Browse files

Tidy EoS table format and documentation

parent e329b722
No related branches found
No related tags found
1 merge request!1353Draft: Subtask speedup - Still requires work
SWIFT Documentation SWIFT Documentation
=================== ===================
This is the main documentation for SWIFT that can be found on ReadTheDocs. This is the main documentation for SWIFT that can be found on ReadTheDocs
or at `swiftsim.com/docs`.
You will need the `sphinx` and `sphinx-autobuild` python packages (pip install You will need the `sphinx` and `sphinx-autobuild` python packages (pip install
them!) to build the documentation to html, as well as the `sphinx_rtd_theme` them!) to build the documentation to html, as well as the `sphinx_rtd_theme`
package which is used as the theme. package which is used as the theme.
To build the documentation, `make html` and then it is available in To build the documentation (from this directory), `make html` and the output
`build/html`. files will be created in `build/html/`.
Please consider adding documentation when you add code! Please consider adding documentation when you add code!
.. Planetary EoS .. Planetary EoS
Jacob Kegerreis, 13th March 2020 Jacob Kegerreis, 14th July 2022
.. _planetary_eos: .. _planetary_eos:
Planetary Equations of State Planetary Equations of State
============================ ============================
Configuring SWIFT with the ``--with-equation-of-state=planetary`` and Configuring SWIFT with the ``--with-equation-of-state=planetary`` and
``--with-hydro=planetary`` options enables the use of multiple ``--with-hydro=planetary`` options enables the use of multiple
equations of state (EoS). equations of state (EoS).
Every SPH particle then requires and carries the additional ``MaterialID`` flag Every SPH particle then requires and carries the additional ``MaterialID`` flag
from the initial conditions file. This flag indicates the particle's material from the initial conditions file. This flag indicates the particle's material
and which EoS it should use. and which EoS it should use.
It is important to check that the EoS you use are appropriate It is important to check that the EoS you use are appropriate
for the conditions in the simulation that you run. for the conditions in the simulation that you run.
Please follow the original sources of these EoS for more information and Please follow the original sources of these EoS for more information and
to check the regions of validity. If an EoS sets particles to have a pressure to check the regions of validity. If an EoS sets particles to have a pressure
of zero, then particles may end up overlapping, especially if the gravitational of zero, then particles may end up overlapping, especially if the gravitational
softening is very small. softening is very small.
So far, we have implemented several Tillotson, ANEOS, SESAME, So far, we have implemented several Tillotson, ANEOS, SESAME,
and Hubbard \& MacFarlane (1980) materials, with more on the way. and Hubbard \& MacFarlane (1980) materials, with more on the way.
The material's ID is set by a somewhat arbitrary base type ID The material's ID is set by a somewhat arbitrary base type ID
(multiplied by 100) plus an individual value: (multiplied by 100) plus an individual value:
+ Ideal gas: ``0`` + Ideal gas: ``0``
...@@ -45,32 +45,56 @@ The material's ID is set by a somewhat arbitrary base type ID ...@@ -45,32 +45,56 @@ The material's ID is set by a somewhat arbitrary base type ID
+ Forsterite (Stewart et al. 2019): ``400`` + Forsterite (Stewart et al. 2019): ``400``
+ Iron (Stewart, zenodo.org/record/3866507): ``401`` + Iron (Stewart, zenodo.org/record/3866507): ``401``
+ Fe85Si15 (Stewart, zenodo.org/record/3866550): ``402`` + Fe85Si15 (Stewart, zenodo.org/record/3866550): ``402``
The data files for the tabulated EoS can be downloaded using The data files for the tabulated EoS can be downloaded using
the ``examples/Planetary/EoSTables/get_eos_tables.sh`` script. the ``examples/Planetary/EoSTables/get_eos_tables.sh`` script.
To enable one or multiple EoS, the corresponding ``planetary_use_*:`` To enable one or multiple EoS, the corresponding ``planetary_use_*:``
flag(s) must be set to ``1`` in the parameter file for a simulation, flag(s) must be set to ``1`` in the parameter file for a simulation,
along with the path to any table files, which are set by the along with the path to any table files, which are set by the
``planetary_*_table_file:`` parameters, ``planetary_*_table_file:`` parameters,
as detailed in :ref:`Parameters_eos` and ``examples/parameter_example.yml``. as detailed in :ref:`Parameters_eos` and ``examples/parameter_example.yml``.
The data files for the tabulated EoS can be downloaded using Unlike the EoS for an ideal or isothermal gas, these more complicated materials
the ``examples/EoSTables/get_eos_tables.sh`` script. do not always include transformations between the internal energy,
temperature, and entropy. At the moment, we have implemented
Unlike the EoS for an ideal or isothermal gas, these more complicated materials \\(P(\\rho, u)\\) and \\(c_s(\\rho, u)\\) (and more in some cases),
do not always include transformations between the internal energy, which is sufficient for the :ref:`planetary_sph` hydro scheme,
temperature, and entropy. At the moment, we have implemented but some materials may thus currently be incompatible with
\\(P(\\rho, u)\\) and \\(c_s(\\rho, u)\\), e.g. entropy-based schemes.
which is sufficient for the :ref:`planetary_sph` hydro scheme,
but makes most materials currently incompatible with e.g. entropy-based schemes.
The Tillotson sound speed was derived using The Tillotson sound speed was derived using
\\(c_s^2 = \\left. ( \\partial P / \\partial \\rho ) \\right|_S \\) \\(c_s^2 = \\left. ( \\partial P / \\partial \\rho ) \\right|_S \\)
as described in as described in
`Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_. `Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_.
Note that there is a typo in the sign of Note that there is a typo in the sign of
\\(du = T dS - P dV = T dS + (P / \\rho^2) d\\rho \\) in the appendix; \\(du = T dS - P dV = T dS + (P / \\rho^2) d\\rho \\) in the appendix;
the correct version was used in the derivation. the correct version was used in the actual derivation.
The ideal gas uses the same equations detailed in :ref:`equation_of_state`. The ideal gas uses the same equations detailed in :ref:`equation_of_state`.
The data files for the tabulated EoS can be downloaded using
the ``examples/EoSTables/get_eos_tables.sh`` script.
The format of the data files for SESAME, ANEOS, and similar-EoS tables
is similar to the SESAME 301 (etc) style. The file contents are:
.. code-block:: python
# header (12 lines)
version_date (YYYYMMDD)
num_rho num_T
rho[0] rho[1] ... rho[num_rho] (kg/m^3)
T[0] T[1] ... T[num_T] (K)
u[0, 0] P[0, 0] c[0, 0] s[0, 0] (J/kg, Pa, m/s, J/K/kg)
u[1, 0] ... ... ...
... ... ... ...
u[num_rho-1, 0] ... ... ...
u[0, 1] ... ... ...
... ... ... ...
u[num_rho-1, num_T-1] ... ... s[num_rho-1, num_T-1]
The ``version_date`` must match the value in the ``sesame.h`` ``SESAME_params``
objects, so we can ensure that any version updates work with the git repository.
The header contains a first line that gives the material name, followed by the
same 11 lines printed here to describe the contents.
...@@ -6,12 +6,15 @@ ...@@ -6,12 +6,15 @@
Planetary Hydro Scheme Planetary Hydro Scheme
====================== ======================
This scheme is based on :ref:`minimal` but also allows multiple materials, This scheme is based on :ref:`minimal` but also allows multiple materials,
meaning that different SPH particles can be assigned different meaning that different SPH particles can be assigned different
`equations of state <equations_of_state.html>`_ (EoS). `equations of state <equations_of_state.html>`_ (EoS).
Every SPH particle then requires and carries the additional ``MaterialID`` flag Every SPH particle then requires and carries the additional ``MaterialID`` flag
from the initial conditions file. This flag indicates the particle's material from the initial conditions file. This flag indicates the particle's material
and which EoS it should use. and which EoS it should use.
The Balsara viscosity switch is used by default, but can be disabled by The Balsara viscosity switch is used by default, but can be disabled by
compiling SWIFT with ``make CFLAGS=-DPLANETARY_SPH_NO_BALSARA``. compiling SWIFT with ``make CFLAGS=-DPLANETARY_SPH_NO_BALSARA``.
Note: the boundary-improvement methods presented in Ruiz-Bonilla+2022 are
in the process of being improved for release with better documentation etc soon.
.. Planetary Simulations .. Planetary Simulations
Jacob Kegerreis, 3rd October 2020 Jacob Kegerreis, 14th July 2022
.. _planetary: .. _planetary:
Planetary Simulations Planetary Simulations
===================== =====================
SWIFT is also designed for running planetary simulations SWIFT is also designed for running planetary simulations
with a current focus on giant impacts, as introduced in such as of giant impacts, as introduced in Kegerreis+2019,
`Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_, MNRAS 487:4. and any other types of simulations with more complicated equations of state
and/or multiple materials, etc.
Active development is ongoing of more features and examples for planetary Active development is ongoing of more features and examples,
simulations, so please let us know if you are interested in using SWIFT so please let us know if you are interested in using SWIFT
or have any implementation requests. or have any implementation requests.
You can find an example simulation in ``swiftsim/examples/Planetary/`` You can find an example simulation in ``swiftsim/examples/Planetary/``
under ``EarthImpact/``, as well as some hydro tests for comparison with other under ``EarthImpact/``, as well as some hydro tests for comparison with other
schemes. The tabulated equation of state files can be downloaded using schemes. The tabulated equation of state files can be downloaded using
``EoSTables/get_eos_tables.sh``. ``EoSTables/get_eos_tables.sh``.
Planetary simulations are currently intended to be run with Planetary simulations are currently intended to be run with
SWIFT configured to use the planetary hydrodynamics scheme and equations of state: SWIFT configured to use the planetary hydrodynamics scheme and equations of state:
``--with-hydro=planetary`` and ``--with-equation-of-state=planetary``. ``--with-hydro=planetary`` and ``--with-equation-of-state=planetary``.
These allow for multiple materials to be used, These allow for multiple materials to be used,
...@@ -28,7 +29,7 @@ chosen from the several available equations of state. ...@@ -28,7 +29,7 @@ chosen from the several available equations of state.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:caption: More information: :caption: More information:
Hydro Scheme <hydro_scheme> Hydro Scheme <hydro_scheme>
Equations of State <equations_of_state> Equations of State <equations_of_state>
Initial Conditions <initial_conditions> Initial Conditions <initial_conditions>
......
.. Planetary Initial Conditions .. Planetary Initial Conditions
Jacob Kegerreis, 13th March 2020 Jacob Kegerreis, 14th July 2022
.. _planetary_initial_conditions: .. _planetary_initial_conditions:
Initial Conditions Initial Conditions
================== ==================
Tools for the creation of initial conditions are available via Tools for the creation of initial conditions are available via the
the `WoMa <https://github.com/srbonilla/WoMa>`_ and
`WoMa <https://github.com/srbonilla/WoMa>`_ and `SEAGen <https://github.com/jkeger/seagen>`_ open-source python packages,
`SEAGen <https://github.com/jkeger/seagen>`_ open-source python packages,
including: creating spherical or spinning planetary (or similar) profiles; including: creating spherical or spinning planetary (or similar) profiles;
placing particles to match arbitrary profiles with precise SPH densities; placing particles to match arbitrary profiles with precise SPH densities;
and setting the initial target and impactor positions and velocities, and setting the initial target and impactor positions and velocities,
as presented in as presented in
`Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_ and `Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_ and
Ruiz-Bonilla et al. (2020). `Ruiz-Bonilla et al. (2020) <https://doi.org/10.1093/mnras/staa3385>`_ .
They are available with documentation and examples at They are available with documentation and examples at
https://github.com/srbonilla/WoMa and https://github.com/jkeger/seagen, https://github.com/srbonilla/WoMa and https://github.com/jkeger/seagen,
or can be installed directly with ``pip`` or can be installed directly with ``pip``
(https://pypi.org/project/woma/, https://pypi.org/project/seagen/). (https://pypi.org/project/woma/, https://pypi.org/project/seagen/).
...@@ -26,13 +25,13 @@ or can be installed directly with ``pip`` ...@@ -26,13 +25,13 @@ or can be installed directly with ``pip``
Settling initial conditions with fixed entropies Settling initial conditions with fixed entropies
------------------------------------------------ ------------------------------------------------
If the particles' equations of state include specific entropies, If the particles' equations of state include specific entropies,
and the initial conditions file includes specific entropies for each particle and the initial conditions file includes specific entropies for each particle
(in ``PartType0/Entropies``), (in ``PartType0/Entropies``),
then configuring SWIFT with ``--enable-planetary-fixed-entropy`` then configuring SWIFT with ``--enable-planetary-fixed-entropy``
will override the internal energy of each particle each step such that its will override the internal energy of each particle each step such that its
specific entropy remains constant. specific entropy remains constant.
This should be used with caution, but may be a convenient way to maintain an This should be used with caution, but may be a convenient way to maintain an
entropy profile while initial conditions settle to equilibrium with their entropy profile while initial conditions settle to equilibrium with their
slightly different SPH densities. slightly different SPH densities.
...@@ -15,7 +15,7 @@ InitialConditions: ...@@ -15,7 +15,7 @@ InitialConditions:
TimeIntegration: TimeIntegration:
time_begin: 0 # The starting time of the simulation (in internal units). time_begin: 0 # The starting time of the simulation (in internal units).
time_end: 36000 # The end time of the simulation (in internal units). time_end: 36000 # The end time of the simulation (in internal units).
dt_min: 0.0001 # The minimal time-step size of the simulation (in internal units). dt_min: 0.000001 # The minimal time-step size of the simulation (in internal units).
dt_max: 1000 # The maximal time-step size of the simulation (in internal units). dt_max: 1000 # The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots # Parameters governing the snapshots
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
* *
* Contains the SESAME and ANEOS-in-SESAME-style EOS functions for * Contains the SESAME and ANEOS-in-SESAME-style EOS functions for
* equation_of_state/planetary/equation_of_state.h * equation_of_state/planetary/equation_of_state.h
*
*/ */
/* Some standard headers. */ /* Some standard headers. */
...@@ -48,56 +47,98 @@ struct SESAME_params { ...@@ -48,56 +47,98 @@ struct SESAME_params {
float *table_P_rho_T; float *table_P_rho_T;
float *table_c_rho_T; float *table_c_rho_T;
float *table_log_s_rho_T; float *table_log_s_rho_T;
int date, num_rho, num_T; int version_date, num_rho, num_T;
float u_tiny, P_tiny, c_tiny, s_tiny; float u_tiny, P_tiny, c_tiny, s_tiny;
enum eos_planetary_material_id mat_id; enum eos_planetary_material_id mat_id;
}; };
// Parameter values for each material (cgs units) // Parameter values for each material
INLINE static void set_SESAME_iron(struct SESAME_params *mat, INLINE static void set_SESAME_iron(struct SESAME_params *mat,
enum eos_planetary_material_id mat_id) { enum eos_planetary_material_id mat_id) {
// SESAME 2140 // SESAME 2140
mat->mat_id = mat_id; mat->mat_id = mat_id;
mat->date = 20201003; mat->version_date = 20220714;
} }
INLINE static void set_SESAME_basalt(struct SESAME_params *mat, INLINE static void set_SESAME_basalt(struct SESAME_params *mat,
enum eos_planetary_material_id mat_id) { enum eos_planetary_material_id mat_id) {
// SESAME 7530 // SESAME 7530
mat->mat_id = mat_id; mat->mat_id = mat_id;
mat->date = 20201003; mat->version_date = 20220714;
} }
INLINE static void set_SESAME_water(struct SESAME_params *mat, INLINE static void set_SESAME_water(struct SESAME_params *mat,
enum eos_planetary_material_id mat_id) { enum eos_planetary_material_id mat_id) {
// SESAME 7154 // SESAME 7154
mat->mat_id = mat_id; mat->mat_id = mat_id;
mat->date = 20201003; mat->version_date = 20220714;
} }
INLINE static void set_SS08_water(struct SESAME_params *mat, INLINE static void set_SS08_water(struct SESAME_params *mat,
enum eos_planetary_material_id mat_id) { enum eos_planetary_material_id mat_id) {
// Senft & Stewart (2008) // Senft & Stewart (2008)
mat->mat_id = mat_id; mat->mat_id = mat_id;
mat->date = 20201003; mat->version_date = 20220714;
} }
INLINE static void set_ANEOS_forsterite(struct SESAME_params *mat, INLINE static void set_ANEOS_forsterite(struct SESAME_params *mat,
enum eos_planetary_material_id mat_id) { enum eos_planetary_material_id mat_id) {
// Stewart et al. (2019) // Stewart et al. (2019)
mat->mat_id = mat_id; mat->mat_id = mat_id;
mat->date = 20201104; mat->version_date = 20220714;
} }
INLINE static void set_ANEOS_iron(struct SESAME_params *mat, INLINE static void set_ANEOS_iron(struct SESAME_params *mat,
enum eos_planetary_material_id mat_id) { enum eos_planetary_material_id mat_id) {
// Stewart (2020) // Stewart (2020)
mat->mat_id = mat_id; mat->mat_id = mat_id;
mat->date = 20201104; mat->version_date = 20220714;
} }
INLINE static void set_ANEOS_Fe85Si15(struct SESAME_params *mat, INLINE static void set_ANEOS_Fe85Si15(struct SESAME_params *mat,
enum eos_planetary_material_id mat_id) { enum eos_planetary_material_id mat_id) {
// Stewart (2020) // Stewart (2020)
mat->mat_id = mat_id; mat->mat_id = mat_id;
mat->date = 20201104; mat->version_date = 20220714;
}
/*
Skip a line while reading a file.
*/
INLINE static int skip_line(FILE* f) {
int c;
// Read each character until reaching the end of the line or file
do {
c = fgetc(f);
} while ((c != '\n') && (c != EOF));
return c;
}
/*
Skip n lines while reading a file.
*/
INLINE static int skip_lines(FILE* f, int n) {
int c;
for (int i = 0; i < n; i++) c = skip_line(f);
return c;
} }
// Read the tables from file /*
Read the data from the table file.
File contents (SESAME-like format plus header info etc)
-------------
# header (12 lines)
version_date (YYYYMMDD)
num_rho num_T
rho[0] rho[1] ... rho[num_rho] (kg/m^3)
T[0] T[1] ... T[num_T] (K)
u[0, 0] P[0, 0] c[0, 0] s[0, 0] (J/kg, Pa, m/s, J/K/kg)
u[1, 0] ... ... ...
... ... ... ...
u[num_rho-1, 0] ... ... ...
u[0, 1] ... ... ...
... ... ... ...
u[num_rho-1, num_T-1] ... ... s[num_rho-1, num_T-1]
*/
INLINE static void load_table_SESAME(struct SESAME_params *mat, INLINE static void load_table_SESAME(struct SESAME_params *mat,
char *table_file) { char *table_file) {
...@@ -105,30 +146,26 @@ INLINE static void load_table_SESAME(struct SESAME_params *mat, ...@@ -105,30 +146,26 @@ INLINE static void load_table_SESAME(struct SESAME_params *mat,
FILE *f = fopen(table_file, "r"); FILE *f = fopen(table_file, "r");
if (f == NULL) error("Failed to open the SESAME EoS file '%s'", table_file); if (f == NULL) error("Failed to open the SESAME EoS file '%s'", table_file);
// Ignore header lines // Skip header lines
char buffer[100]; skip_lines(f, 12);
for (int i = 0; i < 6; i++) {
if (fgets(buffer, 100, f) == NULL)
error("Failed to read the SESAME EoS file header %s", table_file);
}
float ignore;
// Table properties // Table properties
int date; int version_date;
int c = fscanf(f, "%d", &date); int c = fscanf(f, "%d", &version_date);
if (c != 1) error("Failed to read the SESAME EoS table %s", table_file); if (c != 1) error("Failed to read the SESAME EoS table %s", table_file);
if (date != mat->date) if (version_date != mat->version_date)
error( error(
"EoS file %s date %d does not match expected %d" "EoS file %s version_date %d does not match expected %d (YYYYMMDD)."
"\nPlease download the file using " "\nPlease download the file using "
"examples/Planetary/EoSTables/get_eos_tables.sh", "examples/Planetary/EoSTables/get_eos_tables.sh",
table_file, date, mat->date); table_file, version_date, mat->version_date);
c = fscanf(f, "%d %d", &mat->num_rho, &mat->num_T); c = fscanf(f, "%d %d", &mat->num_rho, &mat->num_T);
if (c != 2) error("Failed to read the SESAME EoS table %s", table_file); if (c != 2) error("Failed to read the SESAME EoS table %s", table_file);
// Ignore the first elements of rho = 0, T = 0 // Ignore the first elements of rho = 0, T = 0
mat->num_rho--; mat->num_rho--;
mat->num_T--; mat->num_T--;
float ignore;
// Allocate table memory // Allocate table memory
mat->table_log_rho = (float *)malloc(mat->num_rho * sizeof(float)); mat->table_log_rho = (float *)malloc(mat->num_rho * sizeof(float));
...@@ -206,8 +243,8 @@ INLINE static void prepare_table_SESAME(struct SESAME_params *mat) { ...@@ -206,8 +243,8 @@ INLINE static void prepare_table_SESAME(struct SESAME_params *mat) {
mat->table_log_u_rho_T[i_rho * mat->num_T + i_T - 1]) { mat->table_log_u_rho_T[i_rho * mat->num_T + i_T - 1]) {
// Replace it and all elements below it with that value // Replace it and all elements below it with that value
for (int j_u = 0; j_u < i_T; j_u++) { for (int j_T = 0; j_T < i_T; j_T++) {
mat->table_log_u_rho_T[i_rho * mat->num_T + j_u] = mat->table_log_u_rho_T[i_rho * mat->num_T + j_T] =
mat->table_log_u_rho_T[i_rho * mat->num_T + i_T]; mat->table_log_u_rho_T[i_rho * mat->num_T + i_T];
} }
break; break;
...@@ -264,10 +301,10 @@ INLINE static void prepare_table_SESAME(struct SESAME_params *mat) { ...@@ -264,10 +301,10 @@ INLINE static void prepare_table_SESAME(struct SESAME_params *mat) {
INLINE static void convert_units_SESAME(struct SESAME_params *mat, INLINE static void convert_units_SESAME(struct SESAME_params *mat,
const struct unit_system *us) { const struct unit_system *us) {
// Convert input table values from all-SI to internal units
struct unit_system si; struct unit_system si;
units_init_si(&si); units_init_si(&si);
// All table values in SI, apart from sound speeds in km/s
// Densities (log) // Densities (log)
for (int i_rho = 0; i_rho < mat->num_rho; i_rho++) { for (int i_rho = 0; i_rho < mat->num_rho; i_rho++) {
mat->table_log_rho[i_rho] += mat->table_log_rho[i_rho] +=
...@@ -285,7 +322,7 @@ INLINE static void convert_units_SESAME(struct SESAME_params *mat, ...@@ -285,7 +322,7 @@ INLINE static void convert_units_SESAME(struct SESAME_params *mat,
units_cgs_conversion_factor(&si, UNIT_CONV_PRESSURE) / units_cgs_conversion_factor(&si, UNIT_CONV_PRESSURE) /
units_cgs_conversion_factor(us, UNIT_CONV_PRESSURE); units_cgs_conversion_factor(us, UNIT_CONV_PRESSURE);
mat->table_c_rho_T[i_rho * mat->num_T + i_T] *= mat->table_c_rho_T[i_rho * mat->num_T + i_T] *=
1e3f * units_cgs_conversion_factor(&si, UNIT_CONV_SPEED) / units_cgs_conversion_factor(&si, UNIT_CONV_SPEED) /
units_cgs_conversion_factor(us, UNIT_CONV_SPEED); units_cgs_conversion_factor(us, UNIT_CONV_SPEED);
mat->table_log_s_rho_T[i_rho * mat->num_T + i_T] += mat->table_log_s_rho_T[i_rho * mat->num_T + i_T] +=
logf(units_cgs_conversion_factor( logf(units_cgs_conversion_factor(
...@@ -301,7 +338,7 @@ INLINE static void convert_units_SESAME(struct SESAME_params *mat, ...@@ -301,7 +338,7 @@ INLINE static void convert_units_SESAME(struct SESAME_params *mat,
units_cgs_conversion_factor(us, UNIT_CONV_ENERGY_PER_UNIT_MASS); units_cgs_conversion_factor(us, UNIT_CONV_ENERGY_PER_UNIT_MASS);
mat->P_tiny *= units_cgs_conversion_factor(&si, UNIT_CONV_PRESSURE) / mat->P_tiny *= units_cgs_conversion_factor(&si, UNIT_CONV_PRESSURE) /
units_cgs_conversion_factor(us, UNIT_CONV_PRESSURE); units_cgs_conversion_factor(us, UNIT_CONV_PRESSURE);
mat->c_tiny *= 1e3f * units_cgs_conversion_factor(&si, UNIT_CONV_SPEED) / mat->c_tiny *= units_cgs_conversion_factor(&si, UNIT_CONV_SPEED) /
units_cgs_conversion_factor(us, UNIT_CONV_SPEED); units_cgs_conversion_factor(us, UNIT_CONV_SPEED);
mat->s_tiny *= mat->s_tiny *=
units_cgs_conversion_factor(&si, units_cgs_conversion_factor(&si,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment