Both codes run one identical engine — the same five turbomachinery maps, the same fuel model, the same map-interpolation scheme — and this page reports how far apart they land, why, and the design decisions behind PowerCycles.jl.
The reference is PyCycle's shipped example example_cycles/mixedflow_turbofan.py (clone
commit ee7e161). PowerCycles builds the same engine: a two-spool, mixed-flow turbofan —
two independently rotating shaft groups (spools), a cold bypass stream remixed with the hot core
before one common nozzle, seven total-pressure-loss ducts, and two turbine-cooling bleeds. A station
is a numbered location along the gas path; Tt is total (stagnation) temperature [K] and Pt
total pressure [Pa] — the state a flow reaches when brought to rest.
PyCycle evaluates gas properties two ways, and both appear on this page. CEA (chemical-equilibrium-with-applications) runs a Gibbs-energy-minimization Newton solve for the equilibrium species mix inside every property call — PyCycle's most accurate backend, and its slowest. TABULAR looks up precomputed property tables interpolated in total pressure, total temperature, and fuel-air ratio, with no per-call equilibrium solve — PyCycle's fastest backend. PowerCycles evaluates hot-gas properties from frozen-products polynomials (a fixed product composition set by the solved fuel-air ratio, then polynomial fits in temperature). Computationally that is the operation-for-operation analogue of TABULAR (table/polynomial lookup), not of CEA (an equilibrium solve inside every call), so the fair speed and accuracy comparison is PowerCycles vs PyCycle-TABULAR; CEA is kept throughout as PyCycle's accuracy reference and its own upper bound on thermo fidelity. Every number below that depends on the thermo backend is labeled CEA or TABULAR.
slinear) interpolation. PowerCycles has two interpolation backends; for the
like-for-like accuracy statement it runs its bilinear backend (interp=:bilinear), which
reproduces PyCycle's scheme. PowerCycles' production backend — a smooth bicubic-Hermite scheme
— is reported separately as a bounded, named deviation
(§3, the two arms).Three further modelling choices are re-parameterizations, recorded rather than tuned: the HPC-exit cooling bleed is set so its mass equals PyCycle's separate bleed element identically at every operating point; the deck's 250 hp high-pressure shaft offtake is wired inert in PyCycle (it drives nothing), so PowerCycles sets it to zero on both sides; and each cooling stream is credited with the shaft work of an isentropic expansion from its entry total pressure to the turbine exit at the turbine efficiency, matching PyCycle's turbine element — the cooling-work model, described in §5.
Both codes on the bilinear arm at the design point, on PyCycle's CEA thermodynamics backend (the accuracy reference; the TABULAR backend — PowerCycles' computational analogue, §1 — is compared at the end of this section). The cold-side gas path (up to and including the burner exit, plus the whole bypass) agrees to the printed precision; the hot (turbine) side agrees to within a few tenths of a percent. The table carries every shared station: PowerCycles, PyCycle, and the signed difference in Tt and Pt. Click a numeric header to sort; use the filter to isolate the cold or hot side.
| station | Tt ours [K] | Tt PyCycle [K] | ΔTt | Pt ours [Pa] | Pt PyCycle [Pa] | ΔPt |
|---|
Cold side: the gas is dry air and the two codes' air thermodynamics and the imposed compressor pressure ratios coincide, so the compression path carries no accumulated difference — every cold station agrees within (5–6 significant figures). Hot side: the low-pressure-turbine-exit total pressure Pt5 is the largest station-level difference, and it decomposes cleanly (below).
| quantity | ours | PyCycle | Δ | cause |
|---|
The one hot-side quantity worth isolating is the low-pressure-turbine-exit total pressure Pt5: 124 189 Pa (ours) vs 124 493 Pa (PyCycle), a difference of −304 Pa, −0.24% (PyCycle's CEA arm; −0.54% against its TABULAR arm, below). It is the compound of two same-sign per-turbine pressure-ratio residuals, each small because the coolant-work basis is matched between the codes:
Each per-turbine residual is the hot-gas thermodynamics class: the ratio of specific heats γ differs by under 1% between the two codes' gas models at matched temperatures, and the sign of that difference flips between the hot and cold ends of the expansion, so each turbine carries only a few tenths of a percent. A loop-closure check — expanding each turbine's ideal specific work through the PowerCycles thermodynamics from the measured inlet state — bounds the pure-thermodynamics contribution at ≤0.14% (HPT) and ≤0.09% (LPT) per turbine. Measured and attributed, not tuned.
Thrust-specific fuel consumption (TSFC, fuel mass flow per unit net thrust) is 1.9838×10−5 vs 2.0047×10−5 kg/(N·s), −1.04% (PyCycle's CEA arm; −0.82% against its TABULAR arm, below). With net thrust matched at the design target, TSFC is fuel-air ratio times air flow over a fixed thrust, so its relative difference is the sum of those two relative differences:
The fuel-air-ratio term (−0.86%) is the hot-gas and fuel thermodynamics — the fuel-air ratio each code needs to reach the imposed Tt4. The air-flow term (−0.18%) follows from the matched Pt5: with the mixed-exhaust total pressure in agreement, neither code needs excess air to make the fixed thrust. Net thrust itself is the imposed target and matches to round-off; bypass ratio is imposed directly on both.
PyCycle's own design answer moves when it switches thermodynamics backend from CEA to TABULAR — the table-interpolation backend PowerCycles' frozen-products polynomials are the computational analogue of (§1). The table below adds that TABULAR comparison next to the CEA comparison above, for the four quantities already discussed:
| quantity | PowerCycles − CEA | PowerCycles − TABULAR |
|---|---|---|
| LPT-exit total pressure Pt5 | −0.24% | −0.54% |
| fuel-air ratio FAR | −0.86% | −1.00% |
| thrust-specific fuel consumption TSFC | −1.04% | −0.82% |
| inlet air flow mdot_air | −0.18% | −0.49% |
Switching PyCycle itself from CEA to TABULAR moves its own design solution by up to about 1%: total pressure +0.30% at every station — traced to the freestream stagnation-pressure relation Pt0/Ps0, which the tabulated air properties evaluate slightly differently from CEA's equilibrium air at this flight condition, and that single offset then rides multiplicatively through every downstream station — and bypass ratio +0.96% (the value each backend solves to hold the mixer extraction-ratio target ER = 1.05, hit exactly by both). The PowerCycles-vs-PyCycle differences in the table above sit inside that band: the two codes disagree by about as much as PyCycle disagrees with itself across its two thermo backends.
Basis note: PowerCycles imposes PyCycle's CEA-solved bypass ratio (2.4133) at the design point (a stated limit, §7); PyCycle's TABULAR arm solves its own design bypass ratio, 2.4364 — the +0.96% difference above. So the PowerCycles-vs-TABULAR row carries that basis difference in addition to the thermodynamics difference; the PowerCycles-vs-CEA row does not, because PowerCycles imposes the CEA value directly.
Both codes ladder the burner-exit temperature Tt4 down in 50 °R steps with warm continuation (each point starts from the previous converged point). Pick a quantity and a flight condition; toggle any series; hover the chart to read exact values. The design point sits at the right (highest Tt4). PyCycle's CEA thermodynamics arm is charted here; a TABULAR-arm sweep is recorded in the physics doc (Sources) with the same trajectory shape and a smaller fuel-consumption offset.
Selecting TSFC on the chart above shows an interior minimum — the part-power "hook" a real engine has when reduced-power operation is more fuel-efficient per unit thrust than either the design point or deep throttle. On the 35 kft ladder ours bottoms at Tt4 ≈ 2700 °R (TSFC 1.9309×10−5 kg/(N·s)), PyCycle at ≈ 2750 °R (1.9522×10−5) — the minimum's location matches to within one 50 °R step. The level runs −1.0% to −1.3% below PyCycle across the ladder, the same hot-gas and cooling-work thermodynamics that set the design-point TSFC.
Condition B (30 kft / Mach 0.9) shows the same picture: bypass ratio tracks to within −1.2% at the deepest common point (2850 °R: ours 2.8147 vs PyCycle 2.8485), the extraction ratio straddles unity (crossing near 2950–3000 °R), and TSFC runs −1.1% to −1.2% below PyCycle throughout.
The accuracy statement above is the bilinear arm (matching PyCycle). PowerCycles' production backend resamples each map once onto a uniform grid and stores, per node, the value plus its partial derivatives as bicubic-Hermite patches, so Newton's method gets exact, smooth map partials instead of differentiating through an interpolant. That smoothness has a price: a small map-resample difference from PyCycle's linear scheme. The difference between the two arms is quantity-dependent, not one number — largest near the throttle floor where the operating line runs near a map edge.
When to use which. The bilinear arm reproduces PyCycle's map reads for a like-for-like validation
or where matching a linear-interpolation reference matters. The Hermite arm gives Newton's method a smooth
(C¹) map surface with analytic partials — steadier convergence and no differentiation through the
table — at a bounded, map-edge-localized deviation. Both are one keyword
(interp=:bilinear or :hermite) on the same engine.
Same machine (Apple M2 Pro), single-thread BLAS on all sides. PowerCycles times are medians of at least 7 runs; PyCycle's are medians of 3. Each phase is stated operation-for-operation — a warm re-solve against a warm re-solve, with what each cold start contains spelled out — because the cold and warm numbers are not comparable across codes without that framing. PyCycle is timed on both thermo backends: CEA (its slowest, an equilibrium solve inside every property call) and TABULAR (its fastest, and the operation-for-operation match to PowerCycles' frozen-products polynomials, §1). The thermo-like-for-like ratio is PowerCycles vs PyCycle-TABULAR; CEA is kept as the reference PyCycle's own published numbers use.
| phase | PowerCycles | PyCycle (CEA) | PyCycle (TABULAR) | vs CEA | vs TABULAR | what it is |
|---|
run_model that solves the design point
and a coupled off-design anchor point together (the reference deck cannot solve the design point
alone). Against PyCycle-TABULAR, PowerCycles is 5.96× slower cold (21.94 s vs
3.69 s): TABULAR skips both CEA's per-call equilibrium solves and PowerCycles' one-time Julia
compilation, so its cold start is import (0.54 s) plus build/setup/solve (3.15 s).Behaviours observed in both codes, recorded with the step sizes that produced them.
Both codes' floors are continuation-step-dependent, not a fixed property of the engine; a finer step would likely move both deeper. Recorded limit on solver-statistics parity. PyCycle reports Newton iteration counts (design 4–5, off-design 2–3 per point, up to 19 at one deep point) and final residual norms ~10−7 to 10−8. PowerCycles' result surfaces a convergence predicate but not the Newton iteration count — a limit of the result interface, recorded here.
PowerCycles compiles a declared engine to a residual program — a list of unknown columns and equations (each written left-hand side − right-hand side = 0) — solved by Newton's method through NonlinearSolve.jl. The decisions below are what let one authored description become both the design (sizing) solve and the off-design (running) solve, and let the same code that runs a single-spool turbojet run this two-spool turbofan. Each states the decision in one sentence, why it was made, and what it measurably buys — open each to read it.
One authored engine compiles to a design partition that solves the sizing scalars and an off-design partition that freezes them and solves the running engine — the same equations, read from two sides.
Lineage. Toggling a solved/frozen split between a design run and a running (off-design) run of
one engine model is standard cycle-matching practice, not new here. NPSS (Numerical Propulsion System
Simulation) does it with autoSetup: one model, with the solver's independent/dependent
variable list switched between design and off-design. PyCycle does it by building two separate OpenMDAO
Group instances of the same cycle class — pyc_add_pnt('DESIGN', MixedFlowTurbofan(design=True,
...)) and, per off-design point, pyc_add_pnt(pt, MixedFlowTurbofan(design=False, ...))
(example_cycles/mixedflow_turbofan.py:232,282) — then wiring the two instances with one
pyc_connect_des_od(...) call per transferred quantity (40 such calls in this deck: one per
map scale factor and per sized area).
What changes here. PowerCycles compiles one residual system; design and off-design are a row tag on that one system, not two model instances. There is no second model object to build and no per-quantity transfer call to author or keep in sync — the off-design freeze set is read directly off each component's own declarations (which of its columns are design-only) rather than wired quantity by quantity. Both partitions share the same kernels and the same sparsity pattern; only the frozen/solved column split changes between them. One consequence: PowerCycles' cold start has no separate off-design anchor solve to run, because there is only ever one compiled system, evaluated with a different column split — PyCycle's cold start, by contrast, already contains one off-design solve (§4).
Turning a declared cycle into its solvable form — emit each component's rows,
propagate the gas along the connections, merge wired stations into one column each, check the system is
square (raising on any mismatch), compile — happens once, in one module, producing an
AssembledCycle value whose manifest and compiled per-mode programs are publicly
reachable.
Why. Assemble once, solve many: a throttle sweep or optimization loop re-solves without
re-assembling, and tests read the assembled system through public handles rather than internal names.
Component emit! bodies are mostly equations because a flow port is a struct that owns its
boundary-variable block (ADR-0014: one call mints a port's Tt/Pt/mdot columns and returns the port),
collapsing the boundary bookkeeping that would otherwise run about nine lines per physics equation.
solve(cycle, cond) stays a one-call
convenience that assembles then solves.Every flow port declares its stream gas (ADR-0016: a flow port carries a gas descriptor — either a frozen fixed composition, or a combustion system paired with the solved fuel-air-ratio column, recomputed each kernel call), so the assembly propagates gas identity along connections instead of the author threading it component to component.
The capture rule (the three-place rule). Anything that depends on the current Newton iterate lives in exactly one of three places:
Why it matters. Storing a mole-fraction vector at a port would move composition from place 2 into place 3 — the solver would iterate the fuel-air ratio while the composition stayed frozen at the build-time guess, and it would sever the fuel-air-ratio derivative: during the Jacobian evaluation the fuel-air ratio enters kernels as a forward-mode dual number, so recomputing composition as products(system, FAR) carries the property sensitivity into the fuel-air-ratio column. Composition tracks the solved fuel-air ratio because gas properties are temperature-varying and formation-inclusive with hot composition coupled to the solved fuel-air ratio (ADR-0006).
Each turbine-cooling stream is credited with the shaft work of an isentropic expansion from its entry total pressure to the turbine exit, at the turbine efficiency, then mixes into the turbine exit (diluting and cooling it) — matching PyCycle's turbine element.
How it works. A cooling bleed is a small flow tapped from the compressor to cool a turbine. Its
entry total pressure is set by a fraction frac_P between the turbine inlet and exit; both
benchmark injections use frac_P = 1 (coolant enters at the turbine inlet pressure),
the deck's value. The coolant's work is
W = mdot·ηt·(h(coolant, Tt) − h(coolant, Tideal)),
with Tideal from the isentropic drop to the turbine exit pressure; it enters the turbine's
shaft-power balance. Setting the coolant flow or frac_P to zero recovers a zero-work
boundary exactly.
Why. PyCycle's turbine (EnthalpyAndPower/BleedPressure) credits the
coolant with exactly this expansion work; matching the semantics term-for-term is what makes the two
codes' turbine power balances comparable. From PyCycle's solved deck the cooling streams supply
129 528 W (cool3, 2.68% of HPT shaft power) and
151 701 W (cool1, 1.90% of LPT shaft power).
Each spool is one Shaft component owning that spool's torque balance (ADR-0013: a torque-summing Shaft with role-named ports and per-machine torque columns); machines expose a shaft port carrying (speed, torque), and wiring a machine to the Shaft is an ordinary merge connection.
How it closes. The spool speed merges to one column across the whole spool; each machine keeps
its thermodynamic shaft-power column and gains a torque column closed by the link row
torque·speed − Pshaft = 0. The Shaft's balance row is
ηmech·Σ(turbine torques) − Σ(compressor torques) −
Pextract/speed = 0.
Why torque, not power. Electric-machine maps are natively (speed, torque)-parameterized; the balance is one-to-one with PyCycle's Shaft element; and shaft transients integrate torque natively. Two spools of two or more machines each need a reusable Shaft, not a hand-written power-balance row per engine.
A component-local column id is generated as quantity_owner (ADR-0015: column
ids are generated from the (owner, quantity) pair, never authored), so the author writes the quantity
name and the concrete symbol is a build detail; everything outside the compiled program addresses the
pair (owner, quantity).
Why. Without generated ids, a component's column ids are hand-typed: one bypass-engine cycle spelled nine column-id keywords per compressor while its turbine exposed none, so two turbine instances collided at build time. Generated ids make "two of the same machine never collide" hold by construction — a fan and an HPC coexist in one cycle without their columns clashing.
des[:fan, :PR],
des[:hpc, :omega] — with no hand-spelled ids. The result type discovers its stations
and components from the assembled manifest, so the same accessors read any engine, not a hardcoded
turbojet station list.design_seed(asm, cond) walks the gas path once in topological order (ambient
onward, from the connection graph) and evaluates each component's rough design algebra — a
compressor its pressure ratio, the burner its Tt4 target, a turbine a work estimate, the nozzle an
expansion — filling a full-length starting guess with no Newton iteration.
Why. Any engine composed from the library then solves at its design point with no hand-written starting-guess table, whatever its pressure ratios or bypass ratio — needed per point by an optimization study that re-sizes the engine each evaluation.
On a multi-spool engine, a corrected-speed throttle names which machine's speed it fixes:
the Corrected throttle is qualified by (spool, station) — the industry NkcS label — so
N1c2 is spool 1 referred to station 2, the fan's corrected speed.
Why. Each machine's corrected speed is referred at its own inlet station, so one corrected speed is ambiguous across spools. The LPC rides the same LP spool as the fan but at a hotter inlet, so its corrected speed is a different number at the same physical shaft speed — the station has to qualify the handle.
The mixer closes its outlet total pressure from a momentum (impulse) balance — the
sum of the two inlet stream thrusts equals the outlet stream thrust, where stream thrust is
Ps·A + mdot·V (static pressure × area plus momentum flux) —
matching PyCycle's mixer, rather than a mass-flow-weighted total-pressure average.
The static-pressure-match row does two jobs. At the mixing plane the two streams share one
static pressure, enforced by the row Ps_hot = Ps_cold. At design it sizes the hot
inlet area (with the cold Mach pinned). Off-design, with both inlet areas frozen, the same row
instead drives the upstream splitter's split fraction — a solved off-design column — so the
bypass ratio redistributes as the engine throttles. This is the closure PyCycle balances
(splitter.BPR against the mixing-plane static pressures) and NPSS (Numerical Propulsion
System Simulation) uses (Mixer.int dep_errPs active off-design, Splitter ind_BPR
freed). A freed
splitter adds one off-design column; the active row adds one; they pair one-for-one, keeping the system
square.
Why. A real mixer conserves momentum; the mass-weighted average is exact only when the two inlet dynamic pressures are equal and grows wrong as the inlet Mach numbers diverge. And a fixed-geometry mixer physically redistributes flow between core and bypass as pressures shift with throttle — freezing the split would hold the bypass ratio at its design value everywhere.
The Afterburner is a second burn on the same fuel axis: it mints a new cumulative fuel-air-ratio column (fuel per kg of original air) and its energy balance carries the upstream and its own fuel-air ratio in one row, reducing exactly to the burner when the upstream fuel-air ratio is zero.
Why. This is the exemplar the stream-gas descriptor (ADR-0016, above) was designed for: a second combustor on one fuel axis needs no new machinery, only a new cumulative fuel-air-ratio column and an energy row that reads both. The mixer already rebases the fuel-air ratio to total air, so the outlet column is cumulative on the whole air flow and the performance leaf counts both burns.
The section below is optional reading. The rest of this page states the current measured comparison as plain fact; this one records the two model changes that produced it and what they taught — the only place the page looks backward.
The design point's imposed targets (thrust, burner-exit temperature, bypass ratio) matched by construction, and the cold-side stations matched to under 0.01%. But two things did not fit PyCycle. At the design point the low-pressure-turbine-exit total pressure Pt5 was −6.15% low (116 839 vs 124 493 Pa), and the mixer extraction ratio sat entirely below unity (0.985) while PyCycle's straddled it. Off-design, the throttle-sweep shapes diverged from PyCycle at every point: the bypass ratio stayed frozen at its design value 2.41334 while PyCycle's migrated to 2.972 (+23%), and the part-power fuel-consumption hook — PyCycle's interior TSFC minimum — was absent; the PowerCycles curve was monotone over the same range.
frac_P-interpolated entry total pressure to
the turbine exit, at the turbine efficiency — the tap-pressure expansion PyCycle's turbine element
performs. The former model gave the coolant no turbine work, so the main flow alone had to supply the
same shaft power and needed a larger pressure ratio to do it; that larger ratio compounded through both
turbines into the Pt5 difference. (Described as it works now in §5.)| quantity | before | current | PyCycle |
|---|---|---|---|
| LPT-exit total pressure Pt5 | −6.15% | −0.24% | reference |
| mixer extraction ratio ER (design) | 0.985 (below unity) | 1.0474 | 1.0500 |
| off-design bypass ratio (deep throttle) | frozen at 2.4133 | 2.9266 | 2.9722 |
| part-power TSFC hook | absent (monotone) | present, within one 50 °R step of PyCycle's | interior minimum |
| task | what | status / measured so far |
|---|---|---|
| POWCYC-030 | Afterburner lit cross-check: one afterburner-lit design point against PyCycle's wet example | in progress; the component assembles and reproduces the dry engine unfueled, the wet point is open |
| POWCYC-029 | A fan map with native design pressure ratio in the 3–4 class, so the fan's design-mode scale factors land near 1 | the reference fan already runs AXI5 (the map PyCycle scales) at scale factor 0.55; a higher-native-PR map is a fidelity improvement to scope or close |
| POWCYC-028 | Branch-free nozzle via a smoothed complementarity row, replacing the two swapped choked/unchoked programs | to do; a standalone spike reproduces both branches from one row |
| POWCYC-027 | Physical spool-speed units: the speed and torque columns are normalized auxiliaries today | to do; needed for shaft-inertia transients |
| POWCYC-026 | Restore an off-design convergence envelope narrowed by the shaft torque coupling on a single-spool branch-switch point | to do; a scaled-Jacobian path exists to test against the withdrawn point (the redistribution-enabled turbofan shows no floor to the probe bound) |
| POWCYC-025 | Compile-cost benchmark: the one-call design solve compiles all three programs (design + two nozzle branches) | to do; decide lazy vs eager compilation with a measured cost |
| result API | Surface Newton iteration count and final residual norm on the result value (solver-statistics parity with PyCycle) | recorded gap; the convergence predicate is surfaced, the iteration count is not |
docs/physics/turbofan_pycycle_comparison.md — the binding measured record: design
table, the Pt5 decomposition and TSFC identity, the off-design sweep tables, the convergence floors, the
Hermite-arm ranges, and the timing with its framing.sandbox/validation_turbofan/powercycles_mixedflow_dry_design.json — PowerCycles'
design point plus both throttle sweeps on both interpolation arms (regenerated at commit
8d1be15).sandbox/validation_turbofan/pycycle_mixedflow_dry_design.json,
...sweep_designcond.json, and ...sweep_30kft_MN0p9.json — PyCycle's design
point and its two throttle sweeps.sandbox/validation_turbofan/{pycycle,powercycles}_mixedflow_dry_timing.json — timing
with machine and provenance metadata.docs/physics/mixer_momentum.md §4 (the +19 Pa dry-air algorithm cross-check) and
§7 (the off-design split-redistribution closure).sandbox/validation_turbofan/nocooling/compare_nocooling_summary.json — the
turbine-cooling control experiment cited in §6.docs/adr/ 0006, 0011, 0013, 0014, 0015, 0016 — the design-decision records cited
above, each restated where cited.sandbox/walkthrough_build_v2/extract_data.py from the
JSON above; the data are embedded inline in this file (no external requests). The figure-to-source map is
sandbox/walkthrough_build_v2/SOURCES.md.PowerCycles.jl is pinned at commit a4311c3 (Julia 1.12.6); the PyCycle clone at
ee7e161 (imported version 4.4.1-dev; OpenMDAO 3.44.0, NumPy 1.26.4, SciPy 1.17.1); timing on an
Apple M2 Pro, single-thread BLAS on both sides. This page is a local artifact
(archive/walkthroughs/); it is not part of the shipped repository.