Skip to content

Commit

Permalink
specify Reuss, change adiabatic to isentropic
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmyhill committed Mar 24, 2024
1 parent 3291676 commit f7c6d6b
Show file tree
Hide file tree
Showing 36 changed files with 262 additions and 275 deletions.
22 changes: 10 additions & 12 deletions burnman/classes/anisotropicmineral.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def shear_modulus(self):
)

@material_property
def isothermal_bulk_modulus(self):
def K_T(self):
"""
Anisotropic minerals do not have a single isothermal bulk modulus.
This function returns a NotImplementedError. Users should instead
Expand All @@ -427,16 +427,16 @@ def isothermal_bulk_modulus(self):
or directly querying the elements in the isothermal_stiffness_tensor.
"""
raise NotImplementedError(
"isothermal_bulk_modulus is not "
"K_T is not "
"sufficiently explicit for an "
"anisotropic mineral. Did you mean "
"isothermal_bulk_modulus_reuss?"
)

isothermal_bulk_modulus_reuss = Mineral.isothermal_bulk_modulus
isothermal_bulk_modulus_reuss = Mineral.isothermal_bulk_modulus_reuss

@material_property
def isentropic_bulk_modulus(self):
def K_S(self):
"""
Anisotropic minerals do not have a single isentropic bulk modulus.
This function returns a NotImplementedError. Users should instead
Expand All @@ -445,16 +445,16 @@ def isentropic_bulk_modulus(self):
or directly querying the elements in the isentropic_stiffness_tensor.
"""
raise NotImplementedError(
"isentropic_bulk_modulus is not "
"K_S is not "
"sufficiently explicit for an "
"anisotropic mineral. Did you mean "
"isentropic_bulk_modulus_reuss?"
)

isentropic_bulk_modulus_reuss = Mineral.adiabatic_bulk_modulus
isentropic_bulk_modulus_reuss = Mineral.isentropic_bulk_modulus_reuss

@material_property
def isothermal_compressibility(self):
def beta_T(self):
"""
Anisotropic minerals do not have a single isentropic compressibility.
This function returns a NotImplementedError. Users should instead
Expand All @@ -463,14 +463,14 @@ def isothermal_compressibility(self):
or directly querying the elements in the isothermal_compliance_tensor.
"""
raise NotImplementedError(
"isothermal_compressibility is not "
"beta_T is not "
"sufficiently explicit for an "
"anisotropic mineral. Did you mean "
"isothermal_compressibility_reuss?"
)

@material_property
def isentropic_compressibility(self):
def beta_S(self):
"""
Anisotropic minerals do not have a single isentropic compressibility.
This function returns a NotImplementedError. Users should instead
Expand All @@ -479,7 +479,7 @@ def isentropic_compressibility(self):
or directly querying the elements in the isentropic_compliance_tensor.
"""
raise NotImplementedError(
"isentropic_compressibility is not "
"beta_S is not "
"sufficiently explicit for an "
"anisotropic mineral. Did you mean "
"isentropic_compressibility_reuss?"
Expand Down Expand Up @@ -519,8 +519,6 @@ def isentropic_compressibility_reuss(self):
"""
return 1.0 / self.isentropic_bulk_modulus_reuss

beta_S = isentropic_compressibility_reuss

@material_property
def isentropic_compressibility_voigt(self):
"""
Expand Down
26 changes: 13 additions & 13 deletions burnman/classes/combinedmineral.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ def molar_entropy(self):
return self.mixture.molar_entropy - self._property_modifiers["dGdT"]

@material_property
def isothermal_bulk_modulus(self):
def isothermal_bulk_modulus_reuss(self):
"""
Returns isothermal bulk modulus of the mineral [Pa]
Aliased with self.K_T
"""
K_T_orig = self.mixture.isothermal_bulk_modulus
K_T_orig = self.mixture.isothermal_bulk_modulus_reuss

return self.molar_volume / (
(self._molar_volume_unmodified / K_T_orig)
Expand Down Expand Up @@ -197,37 +197,37 @@ def molar_enthalpy(self):
return self.molar_gibbs + self.temperature * self.molar_entropy

@material_property
def adiabatic_bulk_modulus(self):
def isentropic_bulk_modulus_reuss(self):
"""
Returns adiabatic bulk modulus of the mineral [Pa]
Aliased with self.K_S
"""
if self.temperature < 1.0e-10:
return self.isothermal_bulk_modulus
return self.isothermal_bulk_modulus_reuss
else:
return (
self.isothermal_bulk_modulus
self.isothermal_bulk_modulus_reuss
* self.molar_heat_capacity_p
/ self.molar_heat_capacity_v
)

@material_property
def isothermal_compressibility(self):
def isothermal_compressibility_reuss(self):
"""
Returns isothermal compressibility of the mineral
(or inverse isothermal bulk modulus) [1/Pa]
Aliased with self.K_T
"""
return 1.0 / self.isothermal_bulk_modulus
return 1.0 / self.isothermal_bulk_modulus_reuss

@material_property
def adiabatic_compressibility(self):
def isentropic_compressibility_reuss(self):
"""
Returns adiabatic compressibility of the mineral
(or inverse adiabatic bulk modulus) [1/Pa]
Aliased with self.K_S
"""
return 1.0 / self.adiabatic_bulk_modulus
return 1.0 / self.isentropic_bulk_modulus_reuss

@material_property
def p_wave_velocity(self):
Expand All @@ -236,7 +236,7 @@ def p_wave_velocity(self):
Aliased with self.v_p
"""
return np.sqrt(
(self.adiabatic_bulk_modulus + 4.0 / 3.0 * self.shear_modulus)
(self.isentropic_bulk_modulus_reuss + 4.0 / 3.0 * self.shear_modulus)
/ self.density
)

Expand All @@ -246,7 +246,7 @@ def bulk_sound_velocity(self):
Returns bulk sound speed of the mineral [m/s]
Aliased with self.v_phi
"""
return np.sqrt(self.adiabatic_bulk_modulus / self.density)
return np.sqrt(self.isentropic_bulk_modulus_reuss / self.density)

@material_property
def shear_wave_velocity(self):
Expand All @@ -267,7 +267,7 @@ def grueneisen_parameter(self):
else:
return (
self.thermal_expansivity
* self.isothermal_bulk_modulus
* self.isothermal_bulk_modulus_reuss
* self.molar_volume
/ self.molar_heat_capacity_v
)
Expand All @@ -284,5 +284,5 @@ def molar_heat_capacity_v(self):
* self.temperature
* self.thermal_expansivity
* self.thermal_expansivity
* self.isothermal_bulk_modulus
* self.isothermal_bulk_modulus_reuss
)
24 changes: 12 additions & 12 deletions burnman/classes/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def molar_enthalpy(self):
return H

@material_property
def isothermal_bulk_modulus(self):
def isothermal_bulk_modulus_reuss(self):
"""
Returns isothermal bulk modulus of the composite [Pa]
Aliased with self.K_T
Expand All @@ -328,13 +328,13 @@ def isothermal_bulk_modulus(self):
for (phase, molar_fraction) in zip(self.phases, self.molar_fractions)
]
)
K_ph = np.array([phase.isothermal_bulk_modulus for phase in self.phases])
K_ph = np.array([phase.isothermal_bulk_modulus_reuss for phase in self.phases])
G_ph = np.array([phase.shear_modulus for phase in self.phases])

return self.averaging_scheme.average_bulk_moduli(V_frac, K_ph, G_ph)

@material_property
def adiabatic_bulk_modulus(self):
def isentropic_bulk_modulus_reuss(self):
"""
Returns adiabatic bulk modulus of the mineral [Pa]
Aliased with self.K_S
Expand All @@ -345,28 +345,28 @@ def adiabatic_bulk_modulus(self):
for (phase, molar_fraction) in zip(self.phases, self.molar_fractions)
]
)
K_ph = np.array([phase.adiabatic_bulk_modulus for phase in self.phases])
K_ph = np.array([phase.isentropic_bulk_modulus_reuss for phase in self.phases])
G_ph = np.array([phase.shear_modulus for phase in self.phases])

return self.averaging_scheme.average_bulk_moduli(V_frac, K_ph, G_ph)

@material_property
def isothermal_compressibility(self):
def isothermal_compressibility_reuss(self):
"""
Returns isothermal compressibility of the composite
(or inverse isothermal bulk modulus) [1/Pa]
Aliased with self.beta_T
"""
return 1.0 / self.isothermal_bulk_modulus
return 1.0 / self.isothermal_bulk_modulus_reuss

@material_property
def adiabatic_compressibility(self):
def isentropic_compressibility_reuss(self):
"""
Returns isothermal compressibility of the composite
(or inverse isothermal bulk modulus) [1/Pa]
Aliased with self.beta_S
"""
return 1.0 / self.adiabatic_bulk_modulus
return 1.0 / self.isentropic_bulk_modulus_reuss

@material_property
def shear_modulus(self):
Expand All @@ -380,7 +380,7 @@ def shear_modulus(self):
for (phase, molar_fraction) in zip(self.phases, self.molar_fractions)
]
)
K_ph = np.array([phase.adiabatic_bulk_modulus for phase in self.phases])
K_ph = np.array([phase.isentropic_bulk_modulus_reuss for phase in self.phases])
G_ph = np.array([phase.shear_modulus for phase in self.phases])

return self.averaging_scheme.average_shear_moduli(V_frac, K_ph, G_ph)
Expand All @@ -392,7 +392,7 @@ def p_wave_velocity(self):
Aliased with self.v_p
"""
return np.sqrt(
(self.adiabatic_bulk_modulus + 4.0 / 3.0 * self.shear_modulus)
(self.isentropic_bulk_modulus_reuss + 4.0 / 3.0 * self.shear_modulus)
/ self.density
)

Expand All @@ -402,7 +402,7 @@ def bulk_sound_velocity(self):
Returns bulk sound speed of the composite [m/s]
Aliased with self.v_phi
"""
return np.sqrt(self.adiabatic_bulk_modulus / self.density)
return np.sqrt(self.isentropic_bulk_modulus_reuss / self.density)

@material_property
def shear_wave_velocity(self):
Expand All @@ -420,7 +420,7 @@ def grueneisen_parameter(self):
"""
return (
self.thermal_expansivity
* self.isothermal_bulk_modulus
* self.isothermal_bulk_modulus_reuss
* self.molar_volume
/ self.molar_heat_capacity_v
)
Expand Down

0 comments on commit f7c6d6b

Please sign in to comment.