[cig-commits] [commit] master: Added geotherm tests (eb88de0)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Dec 12 16:47:09 PST 2014


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

On branch  : master
Link       : https://github.com/geodynamics/burnman/compare/498861c40268a2c440d99f9ba62ccc5ab2a79dfa...1d2396e3c9d632ea6c4c7f8cbc61788c9e87ff80

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

commit eb88de016e7e04e42b59962c3f7227fcc2f2e27f
Author: I <kmanunterborn at gmail.com>
Date:   Fri Dec 12 14:07:20 2014 -0800

    Added geotherm tests
    
    Goetherm tests added


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

eb88de016e7e04e42b59962c3f7227fcc2f2e27f
 tests/test_geotherm.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/tests/test_geotherm.py b/tests/test_geotherm.py
new file mode 100644
index 0000000..e96ec7e
--- /dev/null
+++ b/tests/test_geotherm.py
@@ -0,0 +1,47 @@
+import unittest
+import os, sys
+
+sys.path.insert(1, os.path.abspath('..'))
+import warnings
+
+import burnman
+from burnman import minerals
+
+from util import BurnManTest
+
+
+class mypericlase(burnman.Mineral):
+    """
+    Stixrude & Lithgow-Bertelloni 2005 and references therein 
+    """
+
+    def __init__(self):
+        self.params = {
+            'equation_of_state': 'slb3',
+            'V_0': 11.24e-6,
+            'K_0': 161.0e9,
+            'Kprime_0': 3.8,
+            'G_0': 131.0e9,
+            'Gprime_0': 2.1,
+            'molar_mass': .0403,
+            'n': 2,
+            'Debye_0': 773.,
+            'grueneisen_0': 1.5,
+            'q_0': 1.5,
+            'eta_s_0': 2.8}
+
+
+class geotherm(BurnManTest):
+    def test_adiabat(self):
+        rock = mypericlase()
+        rock.params['K_0'] = 0.
+        pressure = [10e9]
+        T0 = 300.
+        test_K_adiabat = burnman.geotherm.adiabatic(pressure,T0,rock.params)
+        self.assertFloatEqual(test_K_adiabat,T0)
+
+
+
+
+if __name__ == '__main__':
+    unittest.main()



More information about the CIG-COMMITS mailing list