vancesteven / PlanetProfile

Construct 1D interior structure models based on planetary properties. Self-consistent thermodynamics are used for fluid, rock, and mineral phases. Sound speeds, attenuation, and electrical conductivities are computed as outputs.
https://vancesteven.github.io/PlanetProfile/
Other
18 stars 13 forks source link

Extrapolating ocean EOS to apply to pore spaces in rocks gives invalid results #48

Open itsmoosh opened 2 years ago

itsmoosh commented 2 years ago

Using SeaFreeze and GSW, the ocean water EOS calculations return garbage values, e.g. negative densities, when pressures and temperatures relevant to pore spaces in the silicate layers are supplied. This causes problems with calculating the properties in porous silicate layers, because the bulk properties of each layer depend on both the matrix material and the material filling the pore space.

To fix, we will probably need to define the boundaries of valid results in constructing the EOS functions, and set a fill value for the extrapolation. Unfortunately, RectBivariateSpline in python does not have a fill_value kwarg, unlike interp2d. We are using RectBivariateSpline because it is much, much faster, so we will have to make some kind of compromise here.