Repository navigation
Fix TurbineCooling rotor work order and row exit pressures - #123
Open
anushka-tahiliani wants to merge 2 commits into
Open
anushka-tahiliani wants to merge 2 commits into
anushka-tahiliani wants to merge 2 commits into
Conversation
CoolingCalcs subtracted the rotor's specific work dh/W_primary from the mixed primary and cooling flow, so each rotor removed dh*W_out/W_primary and the rows together extracted more than turb_pwr. A rotor now extracts its work from the primary flow before its coolant mixes in, as in the COOLIT subroutine of NASA TM-81453 (Gauntner, 1980) that the cooling correlation comes from. The rows remove exactly turb_pwr and rotor coolant does no work in its own row. The integer division in i_stage made the stage fraction 0 or 1, which put the first stage rows at the turbine exit pressure and the second stage rows at the inlet pressure. Stators now sit at their stage inlet pressure and rotors at their stage exit pressure. Update the test reference values, check energy conservation and row pressures, and check partials of all rows with complex step at 1e-8. Regenerate the N+3 benchmark values, which use TurbineCooling for the HPT; TSFC rises 0.03-0.07% at every point.
Reference the COOLIT subroutine (Gauntner, NASA TM-81453) as the source of the cooling flow correlation and of the order of rotor work extraction and coolant mixing, note that the row exit pressures are not part of COOLIT, and reword a formula comment in compute_partials that read like commented-out code.
anushka-tahiliani
marked this pull request as ready for review
November 17, 2026 15:53
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two problems in
CoolingCalcs, the per-row model behindTurbineCooling. The cooling-flow correlation itself (0.022 constant, 4/3 leakage factor, 0.30/0.13 pattern factors, 0.92 relative temperature, 150 R safety margin) is unchanged.This PR is needed for the physics-based initial guess method in
to work with pyCycle's turbine cooling. The method splits HPT coolant into a chargeable part (vane coolant, which mixes in before the rotor and does work) and a non-chargeable part (rotor coolant, which does no work in its own row). That split only holds if
TurbineCoolingcharges rotor coolant correctly, which is the first fix below.The method is implemented as a standalone package that provides initial guesses to pyCycle, robust-pycycle-engines. It is also used in an Aviary-compatible package for aircraft optimization, FINCH (ideas-um/FINCH#281; private for now, a public release is planned). robust-pycycle-engines carries this fix as a subclass of
CoolingCalcs(cycles/cooling.py), which it can drop once this is merged.1. Rotor coolant is charged for work it doesn't do
The correlation in
CoolingCalcscomes from the COOLIT subroutine inCOOLIT's listing (p. 14) subtracts each rotor's work from the primary flow and then mixes in that row's coolant:
The report gives the reason (p. 9): coolant "ejected into the gas stream downstream of the rotor is directly chargeable to the engine cycle since work cannot be extracted from it."
pyCycle does the two steps in the opposite order:
The specific work
dh/W_pis per unit of primary flow but is subtracted from the mixed stream. So each rotor removesdh*(W_p + W_c)/W_pinstead ofdh, and in the 2-stage test case the rows remove 2.4% more power thanturb_pwr. This PR uses COOLIT's order:The rows now remove exactly
turb_pwr. Stators are unchanged (dh = 0). The gas leaving each rotor is hotter, because rotor coolant no longer dilutes the flow before the work is taken out. In a cycle with fixed turbine polytropic efficiency, less flow does the work, so the turbine needs a larger pressure ratio for the same power and its overall adiabatic efficiency comes out lower.2. Row exit pressures are inverted
The last
//makesi_stage0 or 1 instead of a fraction. With thePt_stageformula, rows 0–1 of a 2-stage turbine sit at the turbine exit pressure and rows 2–3 at the inlet pressure.i_stageis now the fraction of the pressure drop still to come. Each stator sits at its stage inlet pressure and each rotor at its stage exit pressure: 1, ½, ½, 0 for a 2-stage turbine. The pressure only enters through the mixed-flow thermo, so the effect on temperature is small. COOLIT doesn't compute row pressures, so this is a fix to pyCycle's own addition.Effect on the test case (
test_cooling.test_turbine_cooling, x_factor = 0.9)turb_pwrThe reference values in this test came from a hand-calculation table that mixes the same way the old code did, so rows 1–3 no longer match it. I kept the table in the docstring with a note. The NPSS output in the same docstring has an HPT exit temperature (FS_45) of 2430.94 R. The new last-row value is 2430.26 R (0.03%); the old one was 2412.20 R (0.8%).
Effect on the N+3 example (
example_cycles/N+3ref)The N+3 reference engine uses
TurbineCoolingfor its HPT, so its benchmarks move. Across the TOC, RTO, SLS and CRZ points of all five benchmarks:I regenerated the asserted values in
benchmark_N3ref.py,benchmark_N3_SPD.py,benchmark_N3_MDP.py,benchmark_N3_MDP_verif.pyandbenchmark_N3_MDP_Opt.py. Only values whose relative change exceeded 1e-6 were rewritten, with their original number of decimals; nothing else in those files changed. All five benchmarks pass.Changes
pycycle/elements/cooling.py: COOLIT's work-then-mix order forht_outand its partials, and the correctedi_stage.pycycle/elements/test/test_cooling.py:turb_pwrand that row pressures are 1, ½, ½, 0 of the drop;atol=rtol=1e-8(before: finite difference on two rows atrtol=1e2).example_cycles/N+3ref/benchmark_N3*.py: regenerated reference values.No other test or benchmark uses
TurbineCooling. The full test suite passes, and so doesruff check . --select NPY201.