modelPolytropicPerfectGas

Polytropic process, perfect gas

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_out twice yields an unbalanced model
  • Defining the outlet pressure p_out twice yields an unbalanced model
  • Defining the outlet temperature T_out, power P and mass flow rate m_flow yields 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:

  1. If the outlet state is set and the power is not an input, the model is balanced.
    In this case, the power P of a steady-flow open process is computed from the given specific enthalpy difference dh and mass flow rate m_flow: P = m_flow*dh. For a periodic closed process the power is computed from the given specific internal energy difference du and mean mass flow rate m_flow: P = m_flow*du,
  2. 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 power P and specific enthalpy difference dh or specific internal energy difference du: m_flow = P/dh or m_flow = P/du. To obtain an overall balanced system, a locally underdetermined component, such as Sink_free , must be connected.
  3. If the outlet state is not set and the power is an input, the model is balanced.
    In this case, the specific enthalpy difference dh or specific internal energy difference du is calculated from the given mass flow rate m_flow and power P: dh = P/m_flow or du = P/m_flow.
  4. If the outlet state is not set and the power is not an input, the model is not permissible.
    In this case, both the power P and the specific enthalpy difference dh (or the specific internal energy difference du) are unknown, and the equations P = m_flow*dh or P = m_flow*du cannot 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 exponent n or isentropic efficiency eta_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

TypeNameDefaultDescription
StringinstanceName (from DropOfCommonsPlus)getInstanceName()Instance name
BooleanisCyclesystemSpec == ThermofluidStream.Idealized.Types.SystemModel.Cycle= true, if systemSpec == Cycle; auxiliary variable
BooleaniconIsCompressioniconType == ThermofluidStream.Idealized.Types.Icons.PressureChange.Compression= true, if iconType == Compression; auxiliary variable
Layout
BooleandisplayInstanceName (from DropOfCommonsPlus)dropOfCommons.displayInstanceNames= true, if instance name is displayed
BooleandisplayParameters (from DropOfCommonsPlus)dropOfCommons.displayParameters= true, if displaying parameters is enabled
Advanced
BooleanconsiderInertance (from SISOFlow)dropOfCommons.considerInertance=true, if transient momentum (inertance) term is considered; disable only for advanced use
Utilities.Units.InertanceL (from SISOFlow)dropOfCommons.LInertance
StateSelectm_flowStateSelect (from SISOFlow)StateSelect.defaultState selection for mass flow rate
Booleanclip_p_out (from SISOFlow)= false, if dr_corr=0 (correction of inertial pressure difference)
Medium.AbsolutePressurep_min (from SISOFlow)dropOfCommons.p_minMinimum steady-state output pressure
Initialization › Mass flow rate
InitializationMethodsinitM_flow (from SISOFlow)ThermofluidStream.Utilities.Types.InitializationMethods.noneInitialization method for mass flow rate
SI.MassFlowRatem_flow_0 (from SISOFlow)0Initial value for mass flow rate
Utilities.Units.MassFlowAccelerationm_acceleration_0 (from SISOFlow)0Initial value for derivative of mass flow rate
Specification
IconTypeiconTypeThermofluidStream.Idealized.Types.Icons.PressureChange.CompressionDefines the initial icon prior to simulation
OutletSpecificationoutletSpecThermofluidStream.Idealized.Types.OutletSpecification.Polytropic.PressureDifferenceQuantity used to define the outlet state
ValueSpecificationoutletValueSpecThermofluidStream.Types.ValueSpecification.FixedSpecifies whether the quantity is fixed or prescribed
SI.PressureDifferencedp_fixed0Fixed pressure difference (dp = p_out - p_in)
RealpRatio_fixed1Fixed pressure ratio (pRatio = p_out/p_in)
Medium.AbsolutePressurep_out_fixedMedium.p_defaultFixed outlet pressure
Medium.TemperatureT_out_fixedMedium.T_defaultFixed outlet temperature
RealrhoRatio_fixed1Fixed compression ratio (rho_out/rho_in)
Medium.Densityrho_out_fixedMedium.density(Medium.setState_pTX(Medium.p_default, Medium.T_default, Medium.X_default))Fixed outlet density
SI.SpecificVolumev_out_fixed1/rho_out_fixedFixed outlet specific volume
ProcessSpecificationprocessSpecThermofluidStream.Idealized.Types.PolytropicProcessSpecification.PolytropicEfficiencyQuantity used to define the process
ValueSpecificationprocessValueSpecThermofluidStream.Types.ValueSpecification.FixedSpecifies whether the quantity is fixed or prescribed
SI.Efficiencyeta_pol_fixed1Fixed polytropic efficiency
Realn_fixedMedium.isentropicExponent(Medium.setState_pTX(Medium.p_default, Medium.T_default, Medium.X_default))Fixed polytropic exponent
SI.Efficiencyeta_is_fixed1Fixed isentropic efficiency
Advanced specification
PowerSignalpowerSignalThermofluidStream.Idealized.Types.EnergyFlowSignalMode.DisabledPower signal configuration
SystemSpecificationsystemSpecThermofluidStream.Idealized.Types.SystemModel.FlowSelect whether the system is steady-flow (open) or a closed cycle (periodic)
Layout › Display parameters
BooleanshowOutletSpecificationtrue= 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)
BooleanshowProcessSpecificationtrue= true to show the fixed process specification value (either eta_pol_fixed, n_fixed, eta_is_fixed, p_out_fixed or T_out_fixed)
BooleanshowPowerDirectiontrue= true to show the actual power direction
Closed cycle (periodic) process
SI.AbsolutePressurep_inf1e5Ambient pressure (cycle process)

Connectors

TypeNameDefaultDescription
Inletinlet (from SISOFlow)
Outletoutlet (from SISOFlow)
Modelica.Blocks.Interfaces.RealInputoutletSpec_prescribedPrescribed outlet specification [SI-units]
Modelica.Blocks.Interfaces.RealInputprocessSpec_prescribedPrescribed process specification [SI-units]
EnergyFlow.Interfaces.EnergyFlowInputP_inPPower (dircted into the system) [W]
EnergyFlow.Interfaces.EnergyFlowOutputP_out-PPower (directed out of the system) [W]

Components

TypeNameDefaultDescription
SI.MassFlowRatem_flow (from SISOFlow)inlet.m_flowMass flow rate
SI.Pressuredr_corr (from SISOFlow)Correction of inertial pressure difference
SI.Pressuredp (from SISOFlow)Pressure difference
Medium.AbsolutePressurep_in (from SISOFlow)Medium.pressure(inlet.state)Inlet pressure
Medium.SpecificEnthalpyh_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.AbsolutePressurep_out (from SISOFlow)Outlet pressure
Medium.SpecificEnthalpyh_out (from SISOFlow)Outlet specific enthalpy
Medium.MassFraction[Medium.nXi]Xi_out (from SISOFlow)Outlet mass fractions
Medium.TemperatureT_inMedium.temperature(inlet.state)Inlet temperature
Medium.Densityrho_inMedium.density(inlet.state)Inlet density
SI.SpecificVolumev_in1/rho_inInlet specific volume
Medium.IsentropicExponentgammaMedium.isentropicExponent(inlet.state)Isentropic exponent
RealRModelica.Constants.R/Medium.molarMass(inlet.state)Specific gas constant
Medium.SpecificHeatCapacitycpMedium.specificHeatCapacityCp(inlet.state)Specific isobaric heat capacity
Medium.SpecificHeatCapacitycvcp - RSpecific isochoric heat capacity
Medium.TemperatureT_outOutlet temperature
SI.TemperatureT_out_isIsentropic outlet temperature
Medium.Densityrho_outOutlet density
SI.SpecificVolumev_out1/rho_outOutlet specific volume
SI.TemperatureDifferencedTT_out - T_inTemperature difference (T_out - T_in)
SI.TemperatureDifferencedT_isT_out_is - T_inIsentropic temperature difference (T_out_is - T_in)
SI.SpecificEnthalpydhcp*dTSpecific enthalpy difference (h_out - h_in)
SI.SpecificEnergyducv*dTSpecific internal energy difference (u2 - u1) for stationary flow representation of a polytropic cycle process
SI.Efficiencyeta_isIsentropic efficiency
SI.Efficiencyeta_polPolytropic efficiency
RealnPolytropic exponent
SI.SpecificEnthalpyw_sdhSpecific shaft work
SI.SpecificEnthalpyw_s_iscp*dT_isIsentropic specific shaft work
SI.SpecificEnthalpyw_pn_aux*R*dTSpecific pressure work
SI.SpecificEnergyw_iduSpecific internal work
SI.SpecificEnergyw_i_netdu - w_ambNet specific internal work
SI.SpecificEnergyw_i_iscv*dT_isSpecific isentropic internal work
SI.SpecificEnergyw_exp1/(n - 1)*R*dTSpecific expansion work
SI.SpecificEnergyw_amb-p_inf*(v_out - v_in)Specific ambient pressure work
SI.SpecificEnergyw_exp_netw_exp - w_ambNet specific expansion work
SI.SpecificEnthalpyw_fw_s - w_pSpecific friction work
SI.PowerPPower

Revisions

  • 2026-08, by Silvan Keim (silvan.keim@dlr.de):
    Improved icon.
  • 2026, by Raphael Gebhart (raphael.gebhart@dlr.de):
    Initial version.