|
1 | 1 | import unittest |
2 | 2 | from util import BurnManTest |
3 | 3 |
|
4 | | -from burnman import Mineral |
| 4 | +from burnman import Mineral, Composite |
| 5 | +from burnman.minerals.SLB_2011 import forsterite as forsterite_slb |
5 | 6 | from burnman.utils.chemistry import dictionarize_formula, formula_mass |
6 | 7 | from burnman.eos.helper import create |
7 | 8 | from burnman.tools.eos import check_eos_consistency |
@@ -262,6 +263,21 @@ def test_SPOCK_isothermal_contribution(self): |
262 | 263 | ) |
263 | 264 | self.assertTrue(consistent) |
264 | 265 |
|
| 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 | + |
265 | 281 |
|
266 | 282 | if __name__ == "__main__": |
267 | 283 | unittest.main() |
0 commit comments