modelPrescribedOutletState

Component that assigns the outlet fluid property at port_a based on an input signal

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

TypeNameDefaultDescription
Modelica.SIunits.HeatFlowRateQ_flow_maxHeat (from PrescribedOutletStateParameters)Modelica.Constants.infMaximum heat flow rate for heating (positive)
Modelica.SIunits.HeatFlowRateQ_flow_maxCool (from PrescribedOutletStateParameters)-Modelica.Constants.infMaximum heat flow rate for cooling (negative)
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
Modelica.SIunits.PressureDifferencedp_start (from PartialTwoPortTransport)0Guess value of dp = port_a.p - port_b.p
Medium.MassFlowRatem_flow_start (from PartialTwoPortTransport)0Guess value of m_flow = port_a.m_flow
Medium.MassFlowRatem_flow_small (from PartialTwoPortTransport)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortTransport)true= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flow (from PartialTwoPortTransport)true= true, if volume flow rate at inflowing port is computed
Nominal condition
Modelica.SIunits.MassFlowRatem_flow_nominal (from PrescribedOutletStateParameters)Nominal mass flow rate, used for regularization near zero flow
Dynamics
Modelica.SIunits.Timetau (from PrescribedOutletStateParameters)10Time constant at nominal flow rate (used if energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState)
Dynamics › Initialization
Modelica.SIunits.TemperatureT_start (from PrescribedOutletStateParameters)Initial or guess value of set point
Dynamics › Equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from PrescribedOutletStateParameters)Modelica.Fluid.Types.Dynamics.SteadyStateType of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Blocks.Interfaces.RealInputTSetSet point temperature of the fluid that leaves port_b
Modelica.Blocks.Interfaces.RealOutputQ_flowHeat added to the fluid (if flow is from port_a to port_b)

Components

TypeNameDefaultDescription
Medium.MassFlowRatem_flow (from PartialTwoPortTransport)Mass flow rate in design flow direction
Modelica.SIunits.PressureDifferencedp (from PartialTwoPortTransport)Pressure difference between port_a and port_b (= port_a.p - port_b.p)
Modelica.SIunits.VolumeFlowRateV_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.Temperatureport_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.Temperatureport_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 in restrictCool and in restrictHeat as this is not allowed in Modelica.
  • November 10, 2014, by Michael Wetter:
    First implementation.