"Basic Rankine cycle example" "Given" P_cond = 10 P_boil = 10000 T_3 = 700 m_dot = 1 "Pump" W_dot_p = m_dot*(h_2-h_1) h_1= enthalpy(steam, P=P_cond, x=0) s_1= entropy(steam, P=P_cond, x=0) h_2= enthalpy(steam, P=P_boil, s=s_1) "Boiler" Q_dot_b = m_dot*(h_3 - h_2) h_3 = enthalpy(steam, T=T_3,P=P_boil) s_3= entropy(steam, T=T_3,P=P_boil) "Turbine" W_dot_T = m_dot*(h_3 - h_4) h_4= enthalpy(steam,P=P_cond, s=s_3) "Condensor" Q_dot_cond = m_dot*(h_4-h_1) eta_th = (W_dot_T-W_dot_p)/Q_dot_b