modelMultiStageTurbine_Test
Extends from TRANSFORM.Icons.Example (Icon for runnable examples).
Information
Unit test for TRANSFORM.Fluid.Machines.MultiStageTurbine.
What it asserts
A 3-stage machine is given a design ladder — boundary pressures {6.0, 2.0, 0.5, 0.01} MPa and per-stage through-flows {100, 90, 75} kg/s, so the two extractions are 10 and 15 kg/s. Only the two end pressures are imposed, together with the design extraction at each tap. The two tap pressures and all three stage flows are therefore emergent: each depends on the Stodola coefficients of both adjacent stages and on the flow split being mutually consistent. All five are asserted as (actual/design), reference 1.
Measured at the time of writing (Dassl, tol 1e-6, t = 200 s):
tap 1 −3.6 %, tap 2 −6.9 %, stage flows +0.44 / +0.49 /
+0.58 %; RMS 0.045. errorExpected = 0.06 sits just above that.
It is a regression gate with real teeth rather than a tight correctness proof: the
two failure modes below throw it out by orders of magnitude, not
percent.
Why this property
It is the one the component exists to protect, and it has been broken twice in
practice: sizing a stage's Kt to the total throughput rather
than the flow that stage actually carries, and evaluating the nominal density on
the liquid side of saturation (Tsat(p)−5, where IF97
returns ~950 kg/m³ and Kt comes out ~30× too small).
Either leaves the downstream pressure ladder low and looks like a deep structural
problem rather than one calibration line. Asserting a chain rather than a
single stage is what makes the check non-circular — a lone stage handed its
own design boundaries would reproduce them trivially.
VALIDITY ENVELOPE — near-saturated inlets only
This component's Kt derivation assumes the expansion stays
near saturation, and it is not documented on the component itself. Stage 1
is sized at the user's T_in_nominal, but stages 2..n are sized at a
hardcoded Tsat(p)+5 — so if the real expansion lands far from
saturation, those stages are sized on the wrong density and the ladder walks.
Measured while building this test. With the inlet at 773 K / 6 MPa (~224 K superheat) instead of the 570 K used here, stage 2 actually sees 642 K — still 151 K superheated — against a nominal 490.5 K. Density 8.08 vs 9.87 kg/m³, 18 % low; Stodola goes as √ρ, so the stage passes ~90 % of design flow, backs up, and tap 1 lands at 2.30 MPa — +15.2 % off the ladder.
So: fine for saturated-steam (nuclear) cycles, which is what it was written for.
A high-superheat (fossil) user needs T_nominal to be settable per
stage rather than assumed. Until that exists, keep T_in near
saturation in this test — a failure here means either a real regression or
someone widened the inlet superheat.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nStages | 3 | Expansion stages |
| Modelica.Units.SI.Pressure[nStages + 1] | p_ladder | {6.0e6, 2.0e6, 5.0e5, 1.0e4} | Boundary pressures {inlet, tap_1, tap_2, outlet} |
| Modelica.Units.SI.MassFlowRate[nStages] | m_ladder | {100, 90, 75} | Per-stage through-flow; the differences are the extractions |
| Modelica.Units.SI.Temperature | T_in | 570.0 | Inlet temperature. MUST be near saturation — see the Documentation's validity-envelope note. Tsat(6 MPa) = 548.7 K, so this is ~21 K superheat, representative of a saturated-steam (nuclear) cycle. |
| Real | eta | 0.85 | Isentropic efficiency, all stages |
| Modelica.Units.SI.MassFlowRate[nStages - 1] | m_extract | {m_ladder[i] - m_ladder[i + 1] for i in 1:nStages - 1} | = {10, 15} kg/s |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.System | system | ||
| TRANSFORM.Fluid.SystemTF | systemTF | ||
| TRANSFORM.Fluid.Machines.MultiStageTurbine | turbine | ||
| TRANSFORM.Fluid.BoundaryConditions.Boundary_pT | source | ||
| TRANSFORM.Fluid.BoundaryConditions.Boundary_pT | sink | ||
| TRANSFORM.Fluid.BoundaryConditions.MassFlowSource_h[nStages - 1] | extraction | ||
| Modelica.Mechanics.Rotational.Sources.ConstantSpeed | constantSpeed | ||
| TRANSFORM.Utilities.ErrorAnalysis.UnitTests | unitTests |
Contents
| Name | Description |
|---|---|
| Working fluid |