modelPrescribedOutletState
Extends from Annex60.Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy), Annex60.Fluid.Interfaces.PrescribedOutletStateParameters (Parameters for models with prescribed outlet state).
Information
This model sets the temperature of the medium that leaves port_a
to the value given by the input TSet, subject to optional
limitations on the heating and cooling capacity.
In case of reverse flow, the set point temperature is still applied to
the fluid that leaves port_b.
If the parameter energyDynamics is not equal to
Modelica.Fluid.Types.Dynamics.SteadyState,
the component models the dynamic response using a first order differential equation.
The time constant of the component is equal to the parameter tau.
This time constant is adjusted based on the mass flow rate using
τeff = τ |ṁ| ⁄ ṁnom
where τeff is the effective time constant for the given mass flow rate ṁ and τ is the time constant at the nominal mass flow rate ṁnom. This type of dynamics is equal to the dynamics that a completely mixed control volume would have.
This model has no pressure drop. See Annex60.Fluid.HeatExchangers.HeaterCooler_T for a model that instantiates this model and that has a pressure drop.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.SIunits.HeatFlowRate | Q_flow_maxHeat (from PrescribedOutletStateParameters) | Modelica.Constants.inf | Maximum heat flow rate for heating (positive) |
| Modelica.SIunits.HeatFlowRate | Q_flow_maxCool (from PrescribedOutletStateParameters) | -Modelica.Constants.inf | Maximum heat flow rate for cooling (negative) |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Advanced | |||
| Modelica.SIunits.PressureDifference | dp_start (from PartialTwoPortTransport) | 0 | Guess value of dp = port_a.p - port_b.p |
| Medium.MassFlowRate | m_flow_start (from PartialTwoPortTransport) | 0 | Guess value of m_flow = port_a.m_flow |
| Medium.MassFlowRate | m_flow_small (from PartialTwoPortTransport) | Small mass flow rate for regularization of zero flow | |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortTransport) | true | = true, if temperatures at port_a and port_b are computed |
| Boolean | show_V_flow (from PartialTwoPortTransport) | true | = true, if volume flow rate at inflowing port is computed |
| Nominal condition | |||
| Modelica.SIunits.MassFlowRate | m_flow_nominal (from PrescribedOutletStateParameters) | Nominal mass flow rate, used for regularization near zero flow | |
| Dynamics | |||
| Modelica.SIunits.Time | tau (from PrescribedOutletStateParameters) | 10 | Time constant at nominal flow rate (used if energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState) |
| Dynamics › Initialization | |||
| Modelica.SIunits.Temperature | T_start (from PrescribedOutletStateParameters) | Initial or guess value of set point | |
| Dynamics › Equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from PrescribedOutletStateParameters) | Modelica.Fluid.Types.Dynamics.SteadyState | Type of energy balance: dynamic (3 initialization options) or steady state |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Blocks.Interfaces.RealInput | TSet | Set point temperature of the fluid that leaves port_b | |
| Modelica.Blocks.Interfaces.RealOutput | Q_flow | Heat added to the fluid (if flow is from port_a to port_b) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium.MassFlowRate | m_flow (from PartialTwoPortTransport) | Mass flow rate in design flow direction | |
| Modelica.SIunits.PressureDifference | dp (from PartialTwoPortTransport) | Pressure difference between port_a and port_b (= port_a.p - port_b.p) | |
| Modelica.SIunits.VolumeFlowRate | V_flow (from PartialTwoPortTransport) | m_flow/Modelica.Fluid.Utilities.regStep(m_flow, Medium.density(Medium.setState_phX(p = port_a.p, h = inStream(port_a.h_outflow), X = inStream(port_a.Xi_outflow))), Medium.density(Medium.setState_phX(p = port_b.p, h = inStream(port_b.h_outflow), X = inStream(port_b.Xi_outflow))), m_flow_small) | Volume flow rate at inflowing port (positive when flow from port_a to port_b) |
| Medium.Temperature | port_a_T (from PartialTwoPortTransport) | Modelica.Fluid.Utilities.regStep(port_a.m_flow, Medium.temperature(Medium.setState_phX(p = port_a.p, h = inStream(port_a.h_outflow), X = inStream(port_a.Xi_outflow))), Medium.temperature(Medium.setState_phX(port_a.p, port_a.h_outflow, port_a.Xi_outflow)), m_flow_small) | Temperature close to port_a, if show_T = true |
| Medium.Temperature | port_b_T (from PartialTwoPortTransport) | Modelica.Fluid.Utilities.regStep(port_b.m_flow, Medium.temperature(Medium.setState_phX(p = port_b.p, h = inStream(port_b.h_outflow), X = inStream(port_b.Xi_outflow))), Medium.temperature(Medium.setState_phX(port_b.p, port_b.h_outflow, port_b.Xi_outflow)), m_flow_small) | Temperature close to port_b, if show_T = true |
Revisions
-
January 26, 2016, by Michael Wetter:
Removed inequality comparison of real numbers inrestrictCooland inrestrictHeatas this is not allowed in Modelica. -
November 10, 2014, by Michael Wetter:
First implementation.