[cig-commits] [commit] master: This is now out of place, so remove it. This type of error checking should be done in validate_parameters() (d7cbf83)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 16:37:43 PST 2014
Repository : https://github.com/geodynamics/burnman
On branch : master
Link : https://github.com/geodynamics/burnman/compare/916ee6acd98bd253c534a4b858b8d86ec62c3fd5...5e9eb1c42d6dd00a30a59872a2b31d1c0f8bd09c
>---------------------------------------------------------------
commit d7cbf83ccc55de3fece7126514c97d051dc8f04a
Author: ian-r-rose <ian.r.rose at gmail.com>
Date: Mon Oct 13 19:25:13 2014 -0700
This is now out of place, so remove it. This type of error checking should be done in validate_parameters()
>---------------------------------------------------------------
d7cbf83ccc55de3fece7126514c97d051dc8f04a
burnman/mineral.py | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/burnman/mineral.py b/burnman/mineral.py
index 7a0d574..f1ece62 100644
--- a/burnman/mineral.py
+++ b/burnman/mineral.py
@@ -114,6 +114,7 @@ class Mineral(Material):
self.gr = self.method.grueneisen_parameter(self.pressure, self.temperature, self.V, self.params)
self.K_T = self.method.isothermal_bulk_modulus(self.pressure, self.temperature, self.V, self.params)
self.K_S = self.method.adiabatic_bulk_modulus(self.pressure, self.temperature, self.V, self.params)
+ self.G = self.method.shear_modulus(self.pressure, self.temperature, self.V, self.params)
self.C_v = self.method.heat_capacity_v(self.pressure, self.temperature, self.V, self.params)
self.C_p = self.method.heat_capacity_p(self.pressure, self.temperature, self.V, self.params)
self.alpha = self.method.thermal_expansivity(self.pressure, self.temperature, self.V, self.params)
@@ -137,12 +138,6 @@ class Mineral(Material):
except (KeyError, NotImplementedError):
self.H = float('nan')
- if (self.params.has_key('G_0') and self.params.has_key('Gprime_0')):
- self.G = self.method.shear_modulus(self.pressure, self.temperature, self.V, self.params)
- else:
- self.G = float('nan') #nan if there is no G, this should propagate through calculations to the end
- if self.params['equation_of_state'] != 'mtait':
- warnings.warn(('Warning: G_0 and or Gprime_0 are undefined for ' + self.to_string()))
# The following gibbs function avoids having to calculate a bunch of unnecessary parameters over P-T space. This will be useful for gibbs minimisation.
def calcgibbs(self, pressure, temperature):
More information about the CIG-COMMITS
mailing list