"EXAMPLE: Air-standard Brayton cycle An air-standard Brayton cycle operates under the following conditions: compressor inlet: 100 kPa, 300 K; turbine inlet, 1 MPa, 1300 K. (a) Find the heat transfer rate and power (per unit mass flow rate) for each device in the cycle. (b) Find the cycle efficiency. (c) What is the pressure ratio for the cycle?" T_1 = 300 [K] P_1 = 100 [kPa] P_3 = 1000 [kPa] T_3 = 1300 [K] "CoE, (1)-->(2)" w_12_in = h_2 - h_1 h_1 = enthalpy(Air,T=T_1) s_1 = entropy(Air,T=T_1,P=P_1) P_2 = P_3 s_2 = s_1 h_2 = enthalpy(Air,P=P_2,s=s_2) "CoE, (2)-->(3)" q_23_in = h_3 - h_2 h_3 = enthalpy(Air,T=T_3) "CoE, (3)-->(4)" w_34_out = h_3 - h_4 s_3 = entropy(Air,T=T_3,P=P_3) P_4 = P_1 s_4 = s_3 h_4 = enthalpy(Air,P=P_4,s=s_4) "CoE, (4)-->(1)" q_41_out = h_4 - h_1 "Cycle effficiency" eta = (w_34_out-w_12_in)/q_23_in