modelPolytropicPerfectGas
Extends from ThermofluidStream.Interfaces.SISOFlow (Base Model with basic flow eqautions for SISO).
Information
Polytropic process (p*v^n = const.) of a perfect gas (p*v = R*T, cp = const.) suitable for modeling
compressors, blowers, fans, and turbines. The model can be used for a steady-flow open process or for a periodic closed cycle process.
The following outlet quantities can be specified either as parameters or as time-varying input signals:
- Pressure difference:
dp = p_out - p_in - Pressure ratio:
pRatio = p_out / p_in - Outlet pressure:
p_out - Outlet temperature:
T_out - Compression ratio:
rhoRatio = rho_out / rho_in - Outlet density:
rho_out - Outlet specific volume:
v_out
The following process quantities can be specified either as parameters or as time-varying input signals:
- Polytropic efficiency:
eta_pol - Polytropic exponent:
n - Isentropic efficiency:
eta_is - Outlet pressure:
p_out - Outlet temperature:
T_out
Relevant specific works for a steady-flow open process are:
- shaft:
w_s (+ q) = dh = cp*dT - pressure:
w_p + w_r = w_s, w_p = n/(n-1)*R*dT - friction:
w_f
Relevant specific works for a periodic closed cycle process are:
- internal:
w_i (+ q) = du = cv*dT - expansion:
w_exp + w_r = w_i, w_exp = 1/(n-1)*R*dT - ambient pressure:
w_amb = - p_inf*dv - net expansion:
w_exp_net = w_exp - w_amb - friction:
w_f
Note:
- Defining the outlet temperature
T_outtwice yields an unbalanced model - Defining the outlet pressure
p_outtwice yields an unbalanced model - Defining the outlet temperature
T_out, powerPand mass flow ratem_flowyields an unbalanced model
The power can optionally be an EnergyFlowInput or an
EnergyFlowOutput; see
UsersGuide.EnergyFlow
for details.
During simulation, the physical positive direction of power is visualized on the icon layer
by an orange arrow.
The model supports four possible operating modes:
-
If the outlet state is set and the power is not an input,
the model is balanced.
In this case, the powerPof a steady-flow open process is computed from the given specific enthalpy differencedhand mass flow ratem_flow:P = m_flow*dh. For a periodic closed process the power is computed from the given specific internal energy differenceduand mean mass flow ratem_flow:P = m_flow*du, -
If the outlet state is set and the power is an input,
the model is locally overdetermined.
This condition is indicated by a plus symbol on the icon layer. The mass flow rate is then computed from the given powerPand specific enthalpy differencedhor specific internal energy differencedu:m_flow = P/dhorm_flow = P/du. To obtain an overall balanced system, a locally underdetermined component, such as Sink_free , must be connected. -
If the outlet state is not set and the power is an input,
the model is balanced.
In this case, the specific enthalpy differencedhor specific internal energy differenceduis calculated from the given mass flow ratem_flowand powerP:dh = P/m_flowordu = P/m_flow. -
If the outlet state is not set and the power is not an input,
the model is not permissible.
In this case, both the powerPand the specific enthalpy differencedh(or the specific internal energy differencedu) are unknown, and the equationsP = m_flow*dhorP = m_flow*ducannot be balanced. This condition is indicated by a prominent red lightning symbol.
Further assumptions for the polytropic process:
-
Steady-state conditions:
dE_sys/dt = 0, dm_sys/dt = 0 -
No heat transfer:
Q_flow = 0 -
Losses accounted for via polytropic efficiency
eta_pol, polytropic exponentnor isentropic efficiencyeta_is -
No net external forces on the system: The control volume is not subject to acceleration as a rigid body, i.e.
\sum F_external = 0. -
Rigid boundary, no expansion work:
w_exp = 0 -
Negligible kinetic and potential energy changes: Differences between inlet and outlet are neglected, i.e.
g*z_2 + 1/2*c_2^2 ≈ g*z_1 + 1/2*c_1^2. -
Constant composition: No change in species mass fractions across the control volume, i.e.
X_in = X_out.
The heat flow rate can be accounted for as P → P + Q_flow, w_s → w_s + q, w_i → w_i + q, w_r → w_r + q.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| String | instanceName (from DropOfCommonsPlus) | getInstanceName() | Instance name |
| Boolean | isCycle | systemSpec == ThermofluidStream.Idealized.Types.SystemModel.Cycle | = true, if systemSpec == Cycle; auxiliary variable |
| Boolean | iconIsCompression | iconType == ThermofluidStream.Idealized.Types.Icons.PressureChange.Compression | = true, if iconType == Compression; auxiliary variable |
| Layout | |||
| Boolean | displayInstanceName (from DropOfCommonsPlus) | dropOfCommons.displayInstanceNames | = true, if instance name is displayed |
| Boolean | displayParameters (from DropOfCommonsPlus) | dropOfCommons.displayParameters | = true, if displaying parameters is enabled |
| Advanced | |||
| Boolean | considerInertance (from SISOFlow) | dropOfCommons.considerInertance | =true, if transient momentum (inertance) term is considered; disable only for advanced use |
| Utilities.Units.Inertance | L (from SISOFlow) | dropOfCommons.L | Inertance |
| StateSelect | m_flowStateSelect (from SISOFlow) | StateSelect.default | State selection for mass flow rate |
| Boolean | clip_p_out (from SISOFlow) | = false, if dr_corr=0 (correction of inertial pressure difference) | |
| Medium.AbsolutePressure | p_min (from SISOFlow) | dropOfCommons.p_min | Minimum steady-state output pressure |
| Initialization › Mass flow rate | |||
| InitializationMethods | initM_flow (from SISOFlow) | ThermofluidStream.Utilities.Types.InitializationMethods.none | Initialization method for mass flow rate |
| SI.MassFlowRate | m_flow_0 (from SISOFlow) | 0 | Initial value for mass flow rate |
| Utilities.Units.MassFlowAcceleration | m_acceleration_0 (from SISOFlow) | 0 | Initial value for derivative of mass flow rate |
| Specification | |||
| IconType | iconType | ThermofluidStream.Idealized.Types.Icons.PressureChange.Compression | Defines the initial icon prior to simulation |
| OutletSpecification | outletSpec | ThermofluidStream.Idealized.Types.OutletSpecification.Polytropic.PressureDifference | Quantity used to define the outlet state |
| ValueSpecification | outletValueSpec | ThermofluidStream.Types.ValueSpecification.Fixed | Specifies whether the quantity is fixed or prescribed |
| SI.PressureDifference | dp_fixed | 0 | Fixed pressure difference (dp = p_out - p_in) |
| Real | pRatio_fixed | 1 | Fixed pressure ratio (pRatio = p_out/p_in) |
| Medium.AbsolutePressure | p_out_fixed | Medium.p_default | Fixed outlet pressure |
| Medium.Temperature | T_out_fixed | Medium.T_default | Fixed outlet temperature |
| Real | rhoRatio_fixed | 1 | Fixed compression ratio (rho_out/rho_in) |
| Medium.Density | rho_out_fixed | Medium.density(Medium.setState_pTX(Medium.p_default, Medium.T_default, Medium.X_default)) | Fixed outlet density |
| SI.SpecificVolume | v_out_fixed | 1/rho_out_fixed | Fixed outlet specific volume |
| ProcessSpecification | processSpec | ThermofluidStream.Idealized.Types.PolytropicProcessSpecification.PolytropicEfficiency | Quantity used to define the process |
| ValueSpecification | processValueSpec | ThermofluidStream.Types.ValueSpecification.Fixed | Specifies whether the quantity is fixed or prescribed |
| SI.Efficiency | eta_pol_fixed | 1 | Fixed polytropic efficiency |
| Real | n_fixed | Medium.isentropicExponent(Medium.setState_pTX(Medium.p_default, Medium.T_default, Medium.X_default)) | Fixed polytropic exponent |
| SI.Efficiency | eta_is_fixed | 1 | Fixed isentropic efficiency |
| Advanced specification | |||
| PowerSignal | powerSignal | ThermofluidStream.Idealized.Types.EnergyFlowSignalMode.Disabled | Power signal configuration |
| SystemSpecification | systemSpec | ThermofluidStream.Idealized.Types.SystemModel.Flow | Select whether the system is steady-flow (open) or a closed cycle (periodic) |
| Layout › Display parameters | |||
| Boolean | showOutletSpecification | true | = true to show the fixed outlet specification value (either dp_fixed, pRatio_fixed, p_out_fixed, T_out_fixed, rhoRatio_fixed, rho_out_fixed or v_out_fixed) |
| Boolean | showProcessSpecification | true | = true to show the fixed process specification value (either eta_pol_fixed, n_fixed, eta_is_fixed, p_out_fixed or T_out_fixed) |
| Boolean | showPowerDirection | true | = true to show the actual power direction |
| Closed cycle (periodic) process | |||
| SI.AbsolutePressure | p_inf | 1e5 | Ambient pressure (cycle process) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Inlet | inlet (from SISOFlow) | ||
| Outlet | outlet (from SISOFlow) | ||
| Modelica.Blocks.Interfaces.RealInput | outletSpec_prescribed | Prescribed outlet specification [SI-units] | |
| Modelica.Blocks.Interfaces.RealInput | processSpec_prescribed | Prescribed process specification [SI-units] | |
| EnergyFlow.Interfaces.EnergyFlowInput | P_in | P | Power (dircted into the system) [W] |
| EnergyFlow.Interfaces.EnergyFlowOutput | P_out | -P | Power (directed out of the system) [W] |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.MassFlowRate | m_flow (from SISOFlow) | inlet.m_flow | Mass flow rate |
| SI.Pressure | dr_corr (from SISOFlow) | Correction of inertial pressure difference | |
| SI.Pressure | dp (from SISOFlow) | Pressure difference | |
| Medium.AbsolutePressure | p_in (from SISOFlow) | Medium.pressure(inlet.state) | Inlet pressure |
| Medium.SpecificEnthalpy | h_in (from SISOFlow) | Medium.specificEnthalpy(inlet.state) | Inlet specific enthalpy |
| Medium.MassFraction[Medium.nXi] | Xi_in (from SISOFlow) | Medium.massFraction(inlet.state) | Inlet mass fractions |
| Medium.AbsolutePressure | p_out (from SISOFlow) | Outlet pressure | |
| Medium.SpecificEnthalpy | h_out (from SISOFlow) | Outlet specific enthalpy | |
| Medium.MassFraction[Medium.nXi] | Xi_out (from SISOFlow) | Outlet mass fractions | |
| Medium.Temperature | T_in | Medium.temperature(inlet.state) | Inlet temperature |
| Medium.Density | rho_in | Medium.density(inlet.state) | Inlet density |
| SI.SpecificVolume | v_in | 1/rho_in | Inlet specific volume |
| Medium.IsentropicExponent | gamma | Medium.isentropicExponent(inlet.state) | Isentropic exponent |
| Real | R | Modelica.Constants.R/Medium.molarMass(inlet.state) | Specific gas constant |
| Medium.SpecificHeatCapacity | cp | Medium.specificHeatCapacityCp(inlet.state) | Specific isobaric heat capacity |
| Medium.SpecificHeatCapacity | cv | cp - R | Specific isochoric heat capacity |
| Medium.Temperature | T_out | Outlet temperature | |
| SI.Temperature | T_out_is | Isentropic outlet temperature | |
| Medium.Density | rho_out | Outlet density | |
| SI.SpecificVolume | v_out | 1/rho_out | Outlet specific volume |
| SI.TemperatureDifference | dT | T_out - T_in | Temperature difference (T_out - T_in) |
| SI.TemperatureDifference | dT_is | T_out_is - T_in | Isentropic temperature difference (T_out_is - T_in) |
| SI.SpecificEnthalpy | dh | cp*dT | Specific enthalpy difference (h_out - h_in) |
| SI.SpecificEnergy | du | cv*dT | Specific internal energy difference (u2 - u1) for stationary flow representation of a polytropic cycle process |
| SI.Efficiency | eta_is | Isentropic efficiency | |
| SI.Efficiency | eta_pol | Polytropic efficiency | |
| Real | n | Polytropic exponent | |
| SI.SpecificEnthalpy | w_s | dh | Specific shaft work |
| SI.SpecificEnthalpy | w_s_is | cp*dT_is | Isentropic specific shaft work |
| SI.SpecificEnthalpy | w_p | n_aux*R*dT | Specific pressure work |
| SI.SpecificEnergy | w_i | du | Specific internal work |
| SI.SpecificEnergy | w_i_net | du - w_amb | Net specific internal work |
| SI.SpecificEnergy | w_i_is | cv*dT_is | Specific isentropic internal work |
| SI.SpecificEnergy | w_exp | 1/(n - 1)*R*dT | Specific expansion work |
| SI.SpecificEnergy | w_amb | -p_inf*(v_out - v_in) | Specific ambient pressure work |
| SI.SpecificEnergy | w_exp_net | w_exp - w_amb | Net specific expansion work |
| SI.SpecificEnthalpy | w_f | w_s - w_p | Specific friction work |
| SI.Power | P | Power |
Revisions
-
2026-08, by Silvan Keim (silvan.keim@dlr.de):
Improved icon. -
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):
Initial version.