[cig-commits] [commit] inversion, master, validate_MT_params: Added P, T attributes and calcgibbs to solid solution class (cdc75d9)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Dec 12 18:26:36 PST 2014
Repository : https://github.com/geodynamics/burnman
On branches: inversion,master,validate_MT_params
Link : https://github.com/geodynamics/burnman/compare/80c2a295c42dfdb38f83f6c1334bf7d8f97a8463...409647ff05dfad6a686198cac1481bd46b5e2e62
>---------------------------------------------------------------
commit cdc75d985b77f4bf1cd4691863000424b2efebeb
Author: Bob Myhill <myhill.bob at gmail.com>
Date: Mon Sep 8 00:12:43 2014 +0100
Added P,T attributes and calcgibbs to solid solution class
>---------------------------------------------------------------
cdc75d985b77f4bf1cd4691863000424b2efebeb
burnman/solidsolution.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/burnman/solidsolution.py b/burnman/solidsolution.py
index f24757d..0c0f19c 100644
--- a/burnman/solidsolution.py
+++ b/burnman/solidsolution.py
@@ -43,10 +43,10 @@ class SolidSolution(Mineral):
self.molar_fraction = molar_fraction
def set_state(self, pressure, temperature):
-
+ self.pressure=pressure
+ self.temperature=temperature
# Set the state of all the endmembers
for i in range(self.n_endmembers):
- self.base_material[i][0].method = self.method
self.base_material[i][0].set_state(pressure, temperature)
self.excess_gibbs = self.solution_model.excess_gibbs_free_energy( pressure, temperature, self.molar_fraction)
@@ -65,3 +65,7 @@ class SolidSolution(Mineral):
self.params[prop] = self.base_materials[0].params[prop]
Mineral.set_state(self, pressure, temperature)
'''
+
+
+ def calcgibbs(self, pressure, temperature, molar_fractions):
+ return sum([ self.base_material[i][0].calcgibbs(pressure, temperature) * molar_fractions[i] for i in range(self.n_endmembers) ]) + self.solution_model.excess_gibbs_free_energy( pressure, temperature, molar_fractions)
More information about the CIG-COMMITS
mailing list