Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
CaymanUnterborn committed Jan 5, 2016
1 parent cfcd96c commit be7f28b
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions burnman/eos/birch_murnaghan_4th.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def bulk_modulus_fourth(volume, params):
"""
compute the bulk modulus as per the third order
compute the bulk modulus as per the fourth order
birch-murnaghan equation of state. Returns bulk
modulus in the same units as the reference bulk
modulus. Pressure must be in :math:`[Pa]`.
Expand Down Expand Up @@ -57,9 +57,8 @@ def birch_murnaghan_fourth(x, params):

class BM4(eos.EquationOfState):
"""
Base class for the isothermal Birch Murnaghan equation of state. This is third order in strain, and
has no temperature dependence. However, the shear modulus is sometimes fit to a second order
function, so if this is the case, you should use that. For more see :class:`burnman.birch_murnaghan.BM2` and :class:`burnman.birch_murnaghan.BM3`.
Base class for the isothermal Birch Murnaghan equation of state. This is fourth order in strain, and
has no temperature dependence.
"""
def volume(self,pressure, temperature, params):
"""
Expand All @@ -82,7 +81,7 @@ def adiabatic_bulk_modulus(self,pressure, temperature, volume, params):
"""
Returns adiabatic bulk modulus :math:`K_s` of the mineral. :math:`[Pa]`.
"""
return bulk_modulus(volume,params)
return bulk_modulus_fourth(volume,params)

def shear_modulus(self,pressure, temperature, volume, params):
"""
Expand Down Expand Up @@ -130,7 +129,7 @@ def validate_parameters(self, params):
params['Gprime_0'] = float('nan')

# Check that all the required keys are in the dictionary
expected_keys = ['V_0', 'K_0', 'Kprime_0', 'G_0', 'Gprime_0']
expected_keys = ['V_0', 'K_0', 'Kprime_0']
for k in expected_keys:
if k not in params:
raise KeyError('params object missing parameter : ' + k)
Expand All @@ -144,7 +143,5 @@ def validate_parameters(self, params):
warnings.warn( 'Unusual value for K_0' , stacklevel=2)
if params['Kprime_0'] < 0. or params['Kprime_0'] > 10.:
warnings.warn( 'Unusual value for Kprime_0', stacklevel=2 )
if params['G_0'] < 0.0 or params['G_0'] > 1.e13:
warnings.warn( 'Unusual value for G_0', stacklevel=2 )
if params['Gprime_0'] < -5. or params['Gprime_0'] > 10.:
warnings.warn( 'Unusual value for Gprime_0', stacklevel=2 )
if params['Kprime_prime_0'] > 0. or params['Kprime_prime_0'] < -10.:
warnings.warn( 'Unusual value for Kprime_prime_0', stacklevel=2 )

0 comments on commit be7f28b

Please sign in to comment.