Example #1
0
def test_heat_rat():
    test_turbine = Turbine(P_1=t_P_1, T_1=t_T_1, P_2=t_P_2,
                           Q=t_Q, m_rat=t_m_rat)

    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)
Example #2
0
def test_simple_max():
    test_turbine = Turbine(P_1=t_P_1, T_1=t_T_1, P_2=t_P_2,
                           m_act=t_m_act, m_max=t_m_max)

    assert test_turbine.work() == approx(t_W, rel=1e-2)
    assert test_turbine.heat() == approx(t_Q, rel=1e-2)
    assert test_turbine.efficiency_IS() == approx(t_eff_IS, rel=1e-2)
Example #3
0
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)