def test_work_rat(): test_turbine = Turbine(P_1=t_P_1, T_1=t_T_1, P_2=t_P_2, W=t_W, m_rat=t_m_rat) assert test_turbine.heat() == approx(t_Q, rel=1e-2) assert test_turbine.m_act == approx(t_m_act, rel=1e-2) assert test_turbine.efficiency_IS() == approx(t_eff_IS, rel=1e-2)
def test_heat_max(): test_turbine = Turbine(P_1=t_P_1, T_1=t_T_1, P_2=t_P_2, Q=t_Q, m_max=t_m_max) assert test_turbine.work() == approx(t_W, rel=1e-2) assert test_turbine.m_act == approx(t_m_act, rel=1e-2) assert test_turbine.efficiency_IS() == approx(t_eff_IS, rel=1e-2)
def test_work_full(): test_turbine = Turbine(P_1=tf_P_1, T_1=tf_T_1, P_2=tf_P_2, W=tf_W) assert test_turbine.heat() == approx(tf_Q, rel=1e-2) assert test_turbine.m_act == approx(tf_m_act, rel=1e-2) assert test_turbine.efficiency_IS() == approx(tf_eff_IS, rel=1e-2)
def test_heat_full(): test_turbine = Turbine(P_1=tf_P_1, T_1=tf_T_1, P_2=tf_P_2, Q=tf_Q) assert test_turbine.work() == approx(tf_W, rel=1e-2) assert test_turbine.m_act == approx(tf_m_act, rel=1e-2) assert test_turbine.efficiency_IS() == approx(tf_eff_IS, rel=1e-2)
def test_simple_full(): test_turbine = Turbine(P_1=tf_P_1, T_1=tf_T_1, P_2=tf_P_2, m_act=tf_m_act) assert test_turbine.work() == approx(tf_W, rel=1e-2) assert test_turbine.heat() == approx(tf_Q, rel=1e-2) assert test_turbine.efficiency_IS() == approx(tf_eff_IS, rel=1e-2)