def test_fug_phase_comp_vap_eq(m): for j in m.params.component_list: assert (str( Ideal.fug_phase_comp_eq( m.props[1], "Vap", j, ("Vap", "Liq"))) == str( m.props[1].mole_frac_phase_comp["Vap", j] * m.props[1].pressure))
def test_fug_phase_comp_liq_eq(m): for j in m.params.component_list: m.params.get_component(j).config.pressure_sat_comp = dummy_call assert (str( Ideal.fug_phase_comp_eq( m.props[1], "Liq", j, ("Vap", "Liq"))) == str( m.props[1].mole_frac_phase_comp["Liq", j] * 42))
def test_fug_phase_comp_invalid_phase_eq(m_sol): with pytest.raises(PropertyNotSupportedError): Ideal.fug_phase_comp_eq(m_sol.props[1], "Sol", "a", ("Vap", "Liq"))