Model the ideal and real gas-turbine cycle and optimize the pressure ratio.
Build a Brayton-cycle analyzer: compute the state around the cycle, the thermal efficiency, and the specific work, for both the ideal cycle and one with real component efficiencies.
Brayton cycleIsentropic relationsThermal efficiencyOptimal pressure ratio
Objective
Write brayton(pr, T_in, T_max, eta_c, eta_t) returning thermal efficiency and specific work. Then sweep the pressure ratio to find the ratio that maximizes specific work, and plot efficiency & work vs pressure ratio.