def test_properties_substance_from_reaction(self): reacLit2 = '''{ "TPMethods":[ { "dr_ryzhenko_coeffs":{ "values":[ 3.61, 1.563, -193.7 ] }, "method":{ "10":"solute_eos_ryzhenko_gems" } } ], "datasources":"Migdisov et al., 2016", "equation":"LaSO4+_mi = La+3 + SO4-2", "symbol":"LaSO4+_mi" }''' substLit2 = '''{ "symbol": "LaSO4+_mi", "formula": "LaSO4+", "reaction": "LaSO4+_mi" }''' db = thermofun.Database('pytests/mines16-sub-thermofun.json') db.addReaction(reacLit2) db.addSubstance(substLit2) engine3 = thermofun.ThermoEngine(db) assert engine3.thermoPropertiesSubstance(473.15, 0, "LaSO4+_mi").gibbs_energy.val == pytest.approx(-1426099.716850813, 1e-5, 1e-14) assert engine3.thermoPropertiesSubstance(473.15, 0, "LaSO4+_mi").volume.val == pytest.approx(-1.883700250726727, 1e-5, 1e-14) assert engine3.thermoPropertiesSubstance(473.15, 0, "LaSO4+_mi").entropy.val == pytest.approx(-168.47492835119232, 1e-5, 1e-14)
def setUp(self): self.engine = thermofun.ThermoEngine( 'pytests/Substances/Solute/test-hkf-thermofun.json') self.tolRel = { 'G': 1e-14, 'H': 1e-14, 'S': 1e-14, 'Cp': 1e-14, 'V': 1e-14 }
def setUp(self): self.engine = thermofun.ThermoEngine('pytests/Reactions/Co_Cu_aq-thermofun.json')
def setUp(self): self.engine = thermofun.ThermoEngine('pytests/test-thermoengine-thermofun.json') self.engine2 = thermofun.ThermoEngine('pytests/test-aq17-gem-lma-thermofun.json')
def setUp(self): self.engine = thermofun.ThermoEngine('pytests/Substances/Gases/mines16-thermofun.json')
def setUp(self): self.engine = thermofun.ThermoEngine('pytests/Substances/Solids/Mo(s).json')
def setUp(self): self.engine = thermofun.ThermoEngine( 'pytests/Reactions/test-logKfT-thermofun.json')
def setUp(self): self.engine = thermofun.ThermoEngine( 'pytests/test-thermoengine-thermofun.json')