def test_entr_mol_phase_comp(m): for j in m.params.component_list: m.params.get_component(j).config.entr_mol_liq_comp = dummy_call m.params.get_component(j).config.entr_mol_ig_comp = dummy_call assert str(Ideal.entr_mol_phase_comp(m.props[1], "Liq", j)) == str(42) assert str(Ideal.entr_mol_phase_comp(m.props[1], "Vap", j)) == ( '42 - kg*m**2/J/s**2*(8.314462618*(J)/mol/K)' '*log(props[1].mole_frac_phase_comp' '[Vap,{}]*props[1].pressure/params.pressure_ref)'.format(j))
def test_entr_mol_phase_invalid_phase(m_sol): with pytest.raises(PropertyNotSupportedError): Ideal.entr_mol_phase_comp(m_sol.props[1], "Sol", "foo")
def test_entr_mol_phase_sol(m_sol): for j in m_sol.params.component_list: m_sol.params.get_component(j).config.entr_mol_sol_comp = dummy_call assert str(Ideal.entr_mol_phase_comp(m_sol.props[1], "Sol", j)) == str(42)