[cig-commits] [commit] add_gibbs_energy: Use burnman.constants (a5f1619)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Dec 11 17:12:39 PST 2014
Repository : https://github.com/geodynamics/burnman
On branch : add_gibbs_energy
Link : https://github.com/geodynamics/burnman/compare/0000000000000000000000000000000000000000...2148b324d3e8aa7b527f831eb397590942563008
>---------------------------------------------------------------
commit a5f1619fec8e7d30956e5f173592baee71a6008b
Author: Timo Heister <timo.heister at gmail.com>
Date: Thu Dec 11 15:43:42 2014 -0800
Use burnman.constants
Conflicts:
burnman/chemicalpotentials.py
>---------------------------------------------------------------
a5f1619fec8e7d30956e5f173592baee71a6008b
burnman/cork.py | 3 ++-
burnman/einstein.py | 3 ++-
burnman/modified_tait.py | 3 ++-
burnman/solidsolution.py | 3 ++-
burnman/solutionmodel.py | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/burnman/cork.py b/burnman/cork.py
index fde85ec..51eaa5d 100644
--- a/burnman/cork.py
+++ b/burnman/cork.py
@@ -9,10 +9,11 @@ import numpy as np
import scipy.optimize as opt
import burnman.equation_of_state as eos
+from burnman.constants import gas_constant
T_0=298.15 # Standard temperature = 25 C
P_0=1.e5 # Standard pressure = 1.e5 Pa
-R=8.31446 # J/K/mol
+R=gas_constant # J/K/mol
def cork_variables(cork, cork_P, cork_T, temperature):
a=cork[0][0]*cork_T**(2.5)/cork_P + cork[0][1]*cork_T**(1.5)/cork_P*temperature
diff --git a/burnman/einstein.py b/burnman/einstein.py
index a96b29d..59045df 100644
--- a/burnman/einstein.py
+++ b/burnman/einstein.py
@@ -3,12 +3,13 @@
# Released under GPL v2 or later.
import numpy as np
+from burnman.constants import gas_constant
"""
Functions for the Einstein model of a solid.
"""
-R = 8.314462175
+R = gas_constant
def thermal_energy(T, einstein_T, n):
"""
diff --git a/burnman/modified_tait.py b/burnman/modified_tait.py
index 499f7f2..985b597 100644
--- a/burnman/modified_tait.py
+++ b/burnman/modified_tait.py
@@ -10,10 +10,11 @@ import scipy.optimize as opt
import burnman.equation_of_state as eos
import burnman.einstein as einstein
+from burnman.constants import gas_constant
T_0=298.15 # Standard temperature = 25 C
P_0=1.e5 # Standard pressure = 1.e5 Pa
-R=8.31446 # J/K/mol
+R=gas_constant # J/K/mol
# see Holland and Powell, 2011
def einstein_temperature(S, n):
diff --git a/burnman/solidsolution.py b/burnman/solidsolution.py
index 5508b06..4f852e7 100644
--- a/burnman/solidsolution.py
+++ b/burnman/solidsolution.py
@@ -6,9 +6,10 @@ import numpy as np
from burnman.mineral import Mineral
from burnman.processchemistry import ProcessSolidSolutionChemistry
from burnman.solutionmodel import SolutionModel
+from burnman.constants import gas_constant
import warnings
-R = 8.3145 # J/K/mol
+R = gas_constant # J/K/mol
kd = lambda x,y : 1 if x==y else 0
class SolidSolution(Mineral):
diff --git a/burnman/solutionmodel.py b/burnman/solutionmodel.py
index 465eb34..f13ff1f 100644
--- a/burnman/solutionmodel.py
+++ b/burnman/solutionmodel.py
@@ -6,8 +6,9 @@ import numpy as np
import warnings
import burnman
from burnman.processchemistry import *
+from burnman.constants import gas_constant
-R = 8.31446 # J/K/mol
+R = gas_constant # J/K/mol
kd = lambda x,y : 1 if x==y else 0
class SolutionModel:
"""
More information about the CIG-COMMITS
mailing list