modelHeaterCooler_T

Ideal heater or cooler with a prescribed outlet temperature

Extends from Annex60.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Annex60.Fluid.Interfaces.TwoPortFlowResistanceParameters (Parameters for flow resistance for models with two ports), Annex60.Fluid.Interfaces.PrescribedOutletStateParameters (Parameters for models with prescribed outlet state).

Information

Model for an ideal heater or cooler with a prescribed outlet temperature.

This model forces the outlet temperature at port_b to be equal to the temperature of the input signal TSet, subject to optional limits on the heating or cooling capacity Q_flow_max and Q_flow_min. For unlimited capacity, set Q_flow_maxHeat = Modelica.Constant.inf and Q_flow_maxCool=-Modelica.Constant.inf.

The output signal Q_flow is the heat added (for heating) or subtracted (for cooling) to the medium if the flow rate is from port_a to port_b. If the flow is reversed, then Q_flow=0. The outlet temperature at port_a is not affected by this model.

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.

Optionally, this model can have a flow resistance. If no flow resistance is requested, set dp_nominal=0.

For a model that uses a control signal u ∈ [0, 1] and multiplies this with the nominal heating or cooling power, use Annex60.Fluid.HeatExchangers.HeaterCooler_u

Limitations

This model only adds or removes heat for the flow from port_a to port_b. The enthalpy of the reverse flow is not affected by this model.

This model does not affect the humidity of the air. Therefore, if used to cool air below the dew point temperature, the water mass fraction will not change.

Validation

The model has been validated against the analytical solution in the examples Annex60.Fluid.HeatExchangers.Validation.HeaterCooler_T and Annex60.Fluid.HeatExchangers.Validation.HeaterCooler_T_dynamic.

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
Nominal condition
Modelica.SIunits.MassFlowRatem_flow_nominal (from PartialTwoPortInterface)Nominal mass flow rate
Modelica.SIunits.PressureDifferencedp_nominal (from TwoPortFlowResistanceParameters)Pressure difference
Advanced
Modelica.SIunits.MassFlowRatem_flow_small (from PartialTwoPortInterface)1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
BooleanhomotopyInitializationtrue= true, use homotopy method
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortInterface)false= true, if actual temperature at port is computed
Flow resistance
BooleancomputeFlowResistance (from TwoPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp (from TwoPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance (from TwoPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM (from TwoPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
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
Modelica.SIunits.MassFlowRatem_flow (from PartialTwoPortInterface)port_a.m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.SIunits.PressureDifferencedp (from PartialTwoPortInterface)port_a.p - port_b.pPressure difference between port_a and port_b
Medium.ThermodynamicStatesta_a (from PartialTwoPortInterface)Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow)))Medium properties in port_a
Medium.ThermodynamicStatesta_b (from PartialTwoPortInterface)Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow)))Medium properties in port_b

Revisions

  • December 1, 2016, by Michael Wetter:
    Updated model as use_dh is no longer a parameter in the pressure drop model.
    This is for #480.
  • November 11, 2014, by Michael Wetter:
    Revised implementation.
  • March 19, 2014, by Christoph Nytsch-Geusen:
    First implementation.