Commit c1edeb60 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'more_eos' into 'master'

More EoS

See merge request !1109
parents c927e524 90a5816d
......@@ -7,39 +7,51 @@ Planetary Equations of State
============================
Configuring SWIFT with the ``--with-equation-of-state=planetary`` and
``--with-hydro=planetary`` options enables the use of multiple EoS.
``--with-hydro=planetary`` options enables the use of multiple
equations of state (EoS).
Every SPH particle then requires and carries the additional ``MaterialID`` flag
from the initial conditions file. This flag indicates the particle's material
and which EoS it should use.
So far, we have implemented several Tillotson, SESAME, and Hubbard \& MacFarlane
(1980) materials, with more on their way.
The material's ID is set by a base type ID (multiplied by 100), plus a minor
type:
It is important to check that the EoS you use are appropriate
for the conditions in the simulation that you run.
+ Tillotson (Melosh, 2007): Base type ``1``
So far, we have implemented several Tillotson, ANEOS, SESAME,
and Hubbard \& MacFarlane (1980) materials, with more on the way.
The material's ID is set by a base type ID (multiplied by 100),
plus a minor type:
+ Tillotson (Melosh, 2007): ``1``
+ Iron: ``100``
+ Granite: ``101``
+ Water: ``102``
+ Hubbard \& MacFarlane (1980): Base type ``2``
+ Hubbard \& MacFarlane (1980): ``2``
+ Hydrogen-helium atmosphere: ``200``
+ Ice H20-CH4-NH3 mix: ``201``
+ Rock SiO2-MgO-FeS-FeO mix: ``202``
+ SESAME (and similar): Base type ``3``
+ SESAME (and similar): ``3``
+ Iron (2140): ``300``
+ Basalt (7530): ``301``
+ Water (7154): ``302``
+ Senft \& Stewart (2008) water (in a SESAME-style table): ``303``
+ Senft \& Stewart (2008) water in a SESAME-style table: ``303``
+ ANEOS (in SESAME-style tables): ``4``
+ Forsterite (Stewart et al. 2019): ``400``
+ Iron (Stewart, zenodo.org/record/3866507): ``401``
+ Fe85Si15 (Stewart, zenodo.org/record/3866550): ``402``
Unlike the EoS for an ideal or isothermal gas, these more complicated materials
do not always include transformations between the internal energy,
temperature, and entropy. At the moment, we have only implemented
\\(P(\\rho, u)\\) and \\(c_s(\\rho, u)\\).
This is sufficient for the simple :ref:`planetary_sph` hydrodynamics scheme,
temperature, and entropy. At the moment, we have implemented
\\(P(\\rho, u)\\) and \\(c_s(\\rho, u)\\),
which is sufficient for the :ref:`planetary_sph` hydrodynamics scheme,
but makes these materials currently incompatible with entropy-based schemes.
The data files for the tabulated EoS can be downloaded using
the ``examples/EoSTables/get_eos_tables.sh`` script.
The Tillotson sound speed was derived using
\\(c_s^2 = \\left. \\dfrac{\\partial P}{\\partial \\rho} \\right|_S \\)
as described in `Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_.
The table files for the HM80 and SESAME-style EoS can be downloaded using
the ``swiftsim/examples/EoSTables/get_eos_tables.sh`` script.
\\(c_s^2 = \\left. ( \\partial P / \\partial \\rho ) \\right|_S \\)
as described in Kegerreis et al. (2019).
Note that there is a typo in the sign of
\\(du = T dS - P dV = T dS + (P / \\rho^2) d\\rho \\),
which was not used in the derivation.
......@@ -7,24 +7,24 @@ Planetary Simulations
=====================
SWIFT is also designed for running planetary simulations
with a focus on giant impacts, as presented in
with a current focus on giant impacts, as presented in
`Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_, MNRAS 487:4.
New features for planetary simulations are in active development
More features for planetary simulations are in active development
so please let us know if you are interested in using SWIFT
or have any implementation requests. For example a new equation of state
or extensions to the tools for creating initial conditions.
You can find an example simulation in ``swiftsim/examples/Planetary/``
under ``EarthImpact/``.
The tabulated equations of state files can be downloaded using
The tabulated equation of state files can be downloaded using
``EoSTables/get_eos_tables.sh``.
Planetary simulations are currently intended to be run with
SWIFT configured to use the planetary hydrodynamics scheme and equations of state:
``--with-hydro=planetary`` and ``--with-equation-of-state=planetary``.
These allow for multiple materials to be used,
chosen from the several available equations of state (more coming soon!).
chosen from the several available equations of state.
.. toctree::
:maxdepth: 2
......
.. Planetary Initial Conditions
Jacob Kegerreis, 13th March 2020
.. _planetary_initial_conditions:
Initial Conditions
==================
(Full documentation coming soon!)
See `Kegerreis et al. (2019) <https://doi.org/10.1093/mnras/stz1606>`_
and `SEAGen <https://github.com/jkeger/seagen>`_.
\ No newline at end of file
......@@ -7,3 +7,7 @@ wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/EoS/SESAME_basalt_7530.txt
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/EoS/SESAME_iron_2140.txt
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/EoS/SESAME_water_7154.txt
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/EoS/SS08_water.txt
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/EoS/ANEOS_forsterite_S19.txt
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/EoS/ANEOS_iron_S20.txt
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/EoS/ANEOS_Fe85Si15_S20.txt
\ No newline at end of file
......@@ -246,25 +246,28 @@ LineOfSight:
EoS:
isothermal_internal_energy: 20.26784 # Thermal energy per unit mass for the case of isothermal equation of state (in internal units).
planetary_use_Til: 1 # (Optional) Whether to prepare the Tillotson EOS
planetary_use_HM80: 0 # (Optional) Whether to prepare the Hubbard & MacFarlane (1980) EOS
planetary_use_ANEOS: 0 # (Optional) Whether to prepare the ANEOS EOS
planetary_use_SESAME: 0 # (Optional) Whether to prepare the SESAME EOS
planetary_use_Til: 1 # (Optional) Whether to prepare the Tillotson EoS
planetary_use_HM80: 0 # (Optional) Whether to prepare the Hubbard & MacFarlane (1980) EoS
planetary_use_SESAME: 0 # (Optional) Whether to prepare the SESAME EoS
planetary_use_ANEOS: 0 # (Optional) Whether to prepare the ANEOS EoS
# (Optional) Table file paths
planetary_HM80_HHe_table_file: ./EoSTables/planetary_HM80_HHe.txt
planetary_HM80_ice_table_file: ./EoSTables/planetary_HM80_ice.txt
planetary_HM80_rock_table_file: ./EoSTables/planetary_HM80_rock.txt
planetary_SESAME_iron_table_file: ./EoSTables/planetary_SESAME_iron_2140.txt
planetary_SESAME_basalt_table_file: ./EoSTables/planetary_SESAME_basalt_7530.txt
planetary_SESAME_water_table_file: ./EoSTables/planetary_SESAME_water_7154.txt
planetary_SS08_water_table_file: ./EoSTables/planetary_SS08_water.txt
planetary_HM80_HHe_table_file: ./EoSTables/HM80_HHe.txt
planetary_HM80_ice_table_file: ./EoSTables/HM80_ice.txt
planetary_HM80_rock_table_file: ./EoSTables/HM80_rock.txt
planetary_SESAME_iron_table_file: ./EoSTables/SESAME_iron_2140.txt
planetary_SESAME_basalt_table_file: ./EoSTables/SESAME_basalt_7530.txt
planetary_SESAME_water_table_file: ./EoSTables/SESAME_water_7154.txt
planetary_SS08_water_table_file: ./EoSTables/SS08_water.txt
planetary_ANEOS_forsterite_table_file: ./EoSTables/ANEOS_forsterite_S19.txt
planetary_ANEOS_iron_table_file: ./EoSTables/ANEOS_iron_S20.txt
planetary_ANEOS_Fe85Si15_table_file: ./EoSTables/ANEOS_Fe85Si15_S20.txt
# Parameters related to external potentials --------------------------------------------
# Point mass external potentials
PointMassPotential:
useabspos: 0 # 0 -> positions based on centre, 1 -> absolute positions
position: [50.,50.0,50.] # location of external point mass (internal units)
position: [50.,50.,50.] # location of external point mass (internal units)
mass: 1e10 # mass of external point mass (internal units)
timestep_mult: 0.03 # Dimensionless pre-factor for the time-step condition
softening: 0.05 # For point-mass-softened option
......@@ -419,9 +422,9 @@ GEARChemistry:
# EAGLE star formation model (Schaye and Dalla Vecchia 2008)
EAGLEStarFormation:
EOS_density_norm_H_p_cm3: 0.1 # Physical density used for the normalisation of the EOS assumed for the star-forming gas in Hydrogen atoms per cm^3.
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin.
EOS_gamma_effective: 1.3333333 # Slope the of the polytropic EOS assumed for the star-forming gas.
EOS_density_norm_H_p_cm3: 0.1 # Physical density used for the normalisation of the EoS assumed for the star-forming gas in Hydrogen atoms per cm^3.
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EoS assumed for star-forming gas at the density normalisation in Kelvin.
EOS_gamma_effective: 1.3333333 # Slope the of the polytropic EoS assumed for the star-forming gas.
gas_fraction: 0.25 # (Optional) The gas fraction used internally by the model (Defaults to 1).
KS_normalisation: 1.515e-4 # Normalization of the Kennicutt-Schmidt law in Msun / kpc^2 / yr.
KS_exponent: 1.4 # Exponent of the Kennicutt-Schmidt law.
......@@ -429,7 +432,7 @@ EAGLEStarFormation:
KS_high_density_threshold_H_p_cm3: 1e3 # Hydrogen number density above which the Kennicut-Schmidt law changes slope in Hydrogen atoms per cm^3.
KS_high_density_exponent: 2.0 # Slope of the Kennicut-Schmidt law above the high-density threshold.
KS_max_density_threshold_H_p_cm3: 1e5 # (Optional) Density above which a gas particle gets automatically turned into a star in Hydrogen atoms per cm^3 (Defaults to FLT_MAX).
EOS_entropy_margin_dex: 0.5 # (Optional) Logarithm base 10 of the maximal entropy above the EOS at which stars can form.
EOS_entropy_margin_dex: 0.5 # (Optional) Logarithm base 10 of the maximal entropy above the EoS at which stars can form.
threshold_norm_H_p_cm3: 0.1 # Normalisation of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
threshold_Z0: 0.002 # Reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation.
threshold_slope: -0.64 # Slope of the metal-dependant star formation threshold
......
......@@ -60,6 +60,9 @@ enum eos_planetary_type_id {
/*! SESAME */
eos_planetary_type_SESAME = 3,
/*! ANEOS */
eos_planetary_type_ANEOS = 4,
};
/**
......@@ -81,6 +84,10 @@ enum eos_planetary_material_id {
eos_planetary_id_Til_water =
eos_planetary_type_Til * eos_planetary_type_factor + 2,
/*! Tillotson basalt */
eos_planetary_id_Til_basalt =
eos_planetary_type_Til * eos_planetary_type_factor + 3,
/* Hubbard & MacFarlane (1980) Uranus/Neptune */
/*! Hydrogen-helium atmosphere */
......@@ -112,6 +119,20 @@ enum eos_planetary_material_id {
/*! Senft & Stewart (2008) SESAME-like water */
eos_planetary_id_SS08_water =
eos_planetary_type_SESAME * eos_planetary_type_factor + 3,
/* ANEOS */
/*! ANEOS forsterite (Stewart et al. 2019) -- in SESAME-style tables */
eos_planetary_id_ANEOS_forsterite =
eos_planetary_type_ANEOS * eos_planetary_type_factor,
/*! ANEOS iron (Stewart 2020) -- in SESAME-style tables */
eos_planetary_id_ANEOS_iron =
eos_planetary_type_ANEOS * eos_planetary_type_factor + 1,
/*! ANEOS Fe85Si15 (Stewart 2020) -- in SESAME-style tables */
eos_planetary_id_ANEOS_Fe85Si15 =
eos_planetary_type_ANEOS * eos_planetary_type_factor + 2,
};
/* Individual EOS function headers. */
......@@ -123,9 +144,10 @@ enum eos_planetary_material_id {
* @brief The parameters of the equation of state.
*/
struct eos_parameters {
struct Til_params Til_iron, Til_granite, Til_water;
struct Til_params Til_iron, Til_granite, Til_water, Til_basalt;
struct HM80_params HM80_HHe, HM80_ice, HM80_rock;
struct SESAME_params SESAME_iron, SESAME_basalt, SESAME_water, SS08_water;
struct SESAME_params ANEOS_forsterite, ANEOS_iron, ANEOS_Fe85Si15;
};
/**
......@@ -164,6 +186,11 @@ gas_internal_energy_from_entropy(float density, float entropy,
&eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_internal_energy_from_entropy(density, entropy,
&eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -227,6 +254,32 @@ gas_internal_energy_from_entropy(float density, float entropy,
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_internal_energy_from_entropy(density, entropy,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_internal_energy_from_entropy(density, entropy,
&eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_internal_energy_from_entropy(density, entropy,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -265,6 +318,10 @@ __attribute__((always_inline)) INLINE static float gas_pressure_from_entropy(
return Til_pressure_from_entropy(density, entropy, &eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_pressure_from_entropy(density, entropy, &eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -325,6 +382,32 @@ __attribute__((always_inline)) INLINE static float gas_pressure_from_entropy(
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_pressure_from_entropy(density, entropy,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_pressure_from_entropy(density, entropy,
&eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_pressure_from_entropy(density, entropy,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -364,6 +447,10 @@ __attribute__((always_inline)) INLINE static float gas_entropy_from_pressure(
return Til_entropy_from_pressure(density, P, &eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_entropy_from_pressure(density, P, &eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -420,6 +507,30 @@ __attribute__((always_inline)) INLINE static float gas_entropy_from_pressure(
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_entropy_from_pressure(density, P,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_entropy_from_pressure(density, P, &eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_entropy_from_pressure(density, P, &eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -459,6 +570,10 @@ __attribute__((always_inline)) INLINE static float gas_soundspeed_from_entropy(
return Til_soundspeed_from_entropy(density, entropy, &eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_soundspeed_from_entropy(density, entropy, &eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -519,6 +634,32 @@ __attribute__((always_inline)) INLINE static float gas_soundspeed_from_entropy(
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_soundspeed_from_entropy(density, entropy,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_soundspeed_from_entropy(density, entropy,
&eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_soundspeed_from_entropy(density, entropy,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -557,6 +698,10 @@ gas_entropy_from_internal_energy(float density, float u,
return Til_entropy_from_internal_energy(density, u, &eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_entropy_from_internal_energy(density, u, &eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -617,6 +762,32 @@ gas_entropy_from_internal_energy(float density, float u,
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_entropy_from_internal_energy(density, u,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_entropy_from_internal_energy(density, u,
&eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_entropy_from_internal_energy(density, u,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -657,6 +828,10 @@ gas_pressure_from_internal_energy(float density, float u,
return Til_pressure_from_internal_energy(density, u, &eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_pressure_from_internal_energy(density, u, &eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -717,6 +892,32 @@ gas_pressure_from_internal_energy(float density, float u,
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_pressure_from_internal_energy(density, u,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_pressure_from_internal_energy(density, u,
&eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_pressure_from_internal_energy(density, u,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -760,6 +961,10 @@ gas_internal_energy_from_pressure(float density, float P,
return Til_internal_energy_from_pressure(density, P, &eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_internal_energy_from_pressure(density, P, &eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -820,6 +1025,32 @@ gas_internal_energy_from_pressure(float density, float P,
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_internal_energy_from_pressure(density, P,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_internal_energy_from_pressure(density, P,
&eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_internal_energy_from_pressure(density, P,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -861,6 +1092,11 @@ gas_soundspeed_from_internal_energy(float density, float u,
&eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_soundspeed_from_internal_energy(density, u,
&eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -924,6 +1160,32 @@ gas_soundspeed_from_internal_energy(float density, float u,
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_soundspeed_from_internal_energy(density, u,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_soundspeed_from_internal_energy(density, u,
&eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_soundspeed_from_internal_energy(density, u,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;
default:
error("Unknown material type! mat_id = %d", mat_id);
return 0.f;
......@@ -962,6 +1224,10 @@ __attribute__((always_inline)) INLINE static float gas_soundspeed_from_pressure(
return Til_soundspeed_from_pressure(density, P, &eos.Til_water);
break;
case eos_planetary_id_Til_basalt:
return Til_soundspeed_from_pressure(density, P, &eos.Til_basalt);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
......@@ -1019,6 +1285,31 @@ __attribute__((always_inline)) INLINE static float gas_soundspeed_from_pressure(
};
break;
/* ANEOS -- using SESAME-style tables */
case eos_planetary_type_ANEOS:;
/* Select the material */
switch (mat_id) {
case eos_planetary_id_ANEOS_forsterite:
return SESAME_soundspeed_from_pressure(density, P,
&eos.ANEOS_forsterite);
break;
case eos_planetary_id_ANEOS_iron:
return SESAME_soundspeed_from_pressure(density, P, &eos.ANEOS_iron);
break;
case eos_planetary_id_ANEOS_Fe85Si15:
return SESAME_soundspeed_from_pressure(density, P,
&eos.ANEOS_Fe85Si15);
break;
default:
error("Unknown material ID! mat_id = %d", mat_id);
return 0.f;
};
break;