[cig-commits] [commit] add_thermodynamic_potentials: Update name of gibbs function (1c3ca5a)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Dec 9 09:54:27 PST 2014


Repository : https://github.com/geodynamics/burnman

On branch  : add_thermodynamic_potentials
Link       : https://github.com/geodynamics/burnman/compare/2e5646d93cedbbf8eae54cc37cffc14e0aa85180...d5ddad03ff9f30f5a4efaddb4e3ec585ea1a7c51

>---------------------------------------------------------------

commit 1c3ca5a705c028b4af053590cf62bd286305424e
Author: ian-r-rose <ian.r.rose at gmail.com>
Date:   Wed Aug 27 12:59:32 2014 -0700

    Update name of gibbs function


>---------------------------------------------------------------

1c3ca5a705c028b4af053590cf62bd286305424e
 burnman/mineral.py       | 10 ++++++++--
 burnman/modified_tait.py |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/burnman/mineral.py b/burnman/mineral.py
index 08c6458..440c0d8 100644
--- a/burnman/mineral.py
+++ b/burnman/mineral.py
@@ -126,7 +126,7 @@ class Mineral(Material):
         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)
         if (self.params.has_key('H_0') and self.params.has_key('S_0')):
-            self.gibbs = self.method.gibbs(self.pressure, self.temperature, self.params)
+            self.gibbs = self.method.gibbs_free_energy(self.pressure, self.temperature, self.params)
 
         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)
@@ -137,7 +137,7 @@ class Mineral(Material):
 
     # 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):
-        return self.method.gibbs(pressure, temperature, self.params)
+        return self.method.gibbs_free_energy(pressure, temperature, self.params)
 
     def molar_mass(self):
         """
@@ -208,3 +208,9 @@ class Mineral(Material):
         Returns bulk sound speed of the mineral [m/s]
         """
         return np.sqrt(self.adiabatic_bulk_modulus() / self.density())
+
+    def gibbs_free_energy(self):
+        """
+        Returns Gibbs free energy of the mineral [J]
+        """
+        return self.gibbs
diff --git a/burnman/modified_tait.py b/burnman/modified_tait.py
index 7fbb104..f5abbd1 100644
--- a/burnman/modified_tait.py
+++ b/burnman/modified_tait.py
@@ -207,7 +207,7 @@ class MTaitBase(eos.EquationOfState):
         #K_S = K_T*(1. + gr * alpha * temperature)
         return 0.
 
-    def gibbs(self,pressure,temperature,params):
+    def gibbs_free_energy(self,pressure,temperature,params):
         """
         Returns the gibbs free energy [J/mol] as a function of pressure [Pa]
         and temperature [K].



More information about the CIG-COMMITS mailing list