modelFixed3
Extends from ThermofluidStream.Idealized.Tests.Processes.PolytropicPerfectGas.PartialFixed (Parameter definition), Modelica.Icons.Example (Icon for runnable examples).
Information
This example illustrates several variants of using the PolytropicPerfectGas process defined by parameters (mass flow rate and power given).
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Medium.AbsolutePressure | p_in (from PartialFixed) | 100000 | Inlet pressure |
| Medium.Temperature | T_in (from PartialFixed) | 293.15 | Inlet temperature |
| Real | pRatio (from PartialFixed) | 2 | Fixed pressure ratio (pRatio = p_out/p_in) |
| SI.Efficiency | eta_is (from PartialFixed) | 0.9 | Fixed isentropic efficiency |
| SI.MassFlowRate | m_flow (from PartialFixed) | 1 | Fixed mass flow rate |
| Medium.ThermodynamicState | state_in (from PartialFixed) | Medium.setState_pTX(p_in, T_in, Medium.X_default) | Inlet state |
| Medium.Density | rho_in (from PartialFixed) | Medium.density(state_in) | Inlet density |
| SI.SpecificVolume | v_in (from PartialFixed) | 1/rho_in | Inlet specific volume |
| Medium.IsentropicExponent | gamma (from PartialFixed) | Medium.isentropicExponent(state_in) | Isentropic exponent |
| Real | R (from PartialFixed) | Modelica.Constants.R/Medium.molarMass(state_in) | Specific gas constant |
| Medium.SpecificHeatCapacity | cp (from PartialFixed) | Medium.specificHeatCapacityCp(state_in) | Specific heat capacity at constant pressure |
| Medium.AbsolutePressure | p_out (from PartialFixed) | p_in*pRatio | Fixed outlet pressure |
| SI.PressureDifference | dp (from PartialFixed) | p_out - p_in | Fixed pressure difference (dp = p_out - p_in) |
| Medium.Temperature | T_out_is (from PartialFixed) | T_in*(p_out/p_in)^((gamma - 1)/gamma) | |
| Medium.Temperature | T_out (from PartialFixed) | if pRatio >= 1 then T_in + 1/eta_is*(T_out_is - T_in) else T_in + eta_is*(T_out_is - T_in) | Fixed outlet temperature |
| Medium.Density | rho_out (from PartialFixed) | p_out/(R*T_out) | Fixed outlet density |
| Real | rhoRatio (from PartialFixed) | rho_out/rho_in | Fixed compression ratio |
| SI.SpecificVolume | v_out (from PartialFixed) | 1/rho_out | Fixed outlet specific volume |
| Real | gamma_aux (from PartialFixed) | gamma/(gamma - 1) | |
| Real | n_aux (from PartialFixed) | if abs(pRatio - 1) > Modelica.Constants.eps then log(pRatio)/log(T_out/T_in) else gamma_aux | |
| Real | n (from PartialFixed) | n_aux/(n_aux - 1) | Fixed polytropic exponent |
| Real | eta_pol (from PartialFixed) | if pRatio >= 1 then n_aux/gamma_aux else gamma_aux/n_aux | Fixed polytropic efficiency |
| SI.SpecificEnthalpy | w_t (from PartialFixed) | cp*(T_out - T_in) | Fixed specific technical work |
| SI.Power | P (from PartialFixed) | m_flow*w_t | Fixed power |
Components
Revisions
-
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):
Initial version.