Skip to content

Commit 290b661

Browse files
committed
test Modular_MGD clone of SLB
1 parent bd4a3f6 commit 290b661

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/test_modular_mgd.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import unittest
22
from util import BurnManTest
33

4-
from burnman import Mineral
4+
from burnman import Mineral, Composite
5+
from burnman.minerals.SLB_2011 import forsterite as forsterite_slb
56
from burnman.utils.chemistry import dictionarize_formula, formula_mass
67
from burnman.eos.helper import create
78
from burnman.tools.eos import check_eos_consistency
@@ -262,6 +263,21 @@ def test_SPOCK_isothermal_contribution(self):
262263
)
263264
self.assertTrue(consistent)
264265

266+
def test_SLB_is_same_as_MGD(self):
267+
fo_slb = forsterite_slb()
268+
params = fo_slb.params.copy()
269+
params["equation_of_state"] = "modular_mgd"
270+
params["reference_eos"] = create("bm3")
271+
params["debye_temperature_model"] = theta_SLB()
272+
fo_mgd = Mineral(params)
273+
274+
minerals = Composite([fo_slb, fo_mgd])
275+
minerals.set_state(1.0e5, 298.15)
276+
self.assertAlmostEqual(fo_slb.helmholtz, fo_mgd.helmholtz, places=3)
277+
278+
minerals.set_state(1.0e9, 2000.0)
279+
self.assertAlmostEqual(fo_slb.helmholtz, fo_mgd.helmholtz, places=3)
280+
265281

266282
if __name__ == "__main__":
267283
unittest.main()

0 commit comments

Comments
 (0)