modelIndirectTankHeatExchanger
Extends from Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters (Parameters for flow resistance for models with two ports), Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model with two ports and declaration of quantities that are used by many models).
Information
This model is a heat exchanger with a moving fluid on one side and a stagnant fluid on the other. It is intended for use when a heat exchanger is submerged in a stagnant fluid. For example, the heat exchanger in a storage tank which is part of a solar thermal system.
This component models the fluid in the heat exchanger, convection between the fluid and the heat exchanger, and convection from the heat exchanger to the surrounding fluid.
The model is based on Buildings.Fluid.HeatExchangers.BaseClasses.HACoilInside and Buildings.Fluid.HeatExchangers.BaseClasses.HANaturalCylinder.
The fluid ports are intended to be connected to a circulated heat transfer fluid while the heat port is intended to be connected to a stagnant fluid.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization | true | = true, use homotopy method |
| Integer | nSeg | Number of segments in the heat exchanger | |
| Modelica.Units.SI.HeatCapacity | CHex | Capacitance of the heat exchanger | |
| Modelica.Units.SI.Volume | volHexFlu | Volume of heat transfer fluid in the heat exchanger | |
| Modelica.Units.SI.ThermalConductance | UA_nominal | abs(Q_flow_nominal/(THex_nominal - TTan_nominal)) | Nominal UA value for the heat exchanger |
| Modelica.Units.SI.Diameter | dExtHex | Exterior diameter of the heat exchanger pipe | |
| Flow resistance | |||
| Boolean | computeFlowResistance (from TwoPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp (from TwoPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n (from TwoPortFlowResistanceParameters) | 2 | Flow exponent, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance (from TwoPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM (from TwoPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Nominal condition | |||
| Modelica.Units.SI.PressureDifference | dp_nominal (from TwoPortFlowResistanceParameters) | Pressure difference | |
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from LumpedVolumeDeclarations) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | substanceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of independent mass fraction balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | traceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of trace substance balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | energyDynamicsSolid | energyDynamics | Formulation of energy balance for heat exchanger solid mass |
| Advanced › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | massDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from LumpedVolumeDeclarations) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from LumpedVolumeDeclarations) | Medium.T_default | Start value of temperature |
| Medium.MassFraction[Medium.nX] | X_start (from LumpedVolumeDeclarations) | Medium.X_default | Start value of mass fractions m_i/m |
| Medium.ExtraProperty[Medium.nC] | C_start (from LumpedVolumeDeclarations) | fill(0, Medium.nC) | Start value of trace substances |
| Medium.ExtraProperty[Medium.nC] | C_nominal (from LumpedVolumeDeclarations) | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
| Dynamics | |||
| Real | mSenFac (from LumpedVolumeDeclarations) | 1 | Factor for scaling the sensible thermal mass of the volume |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
| General › Nominal condition | |||
| Modelica.Units.SI.HeatFlowRate | Q_flow_nominal | Heat transfer at nominal conditions | |
| Modelica.Units.SI.Temperature | TTan_nominal | Temperature of fluid inside the tank at UA_nominal | |
| Modelica.Units.SI.Temperature | THex_nominal | Temperature of fluid inside the heat exchanger at UA_nominal | |
| Real | r_nominal | 0.5 | Ratio between coil inside and outside convective heat transfer |
| Advanced › Modeling detail | |||
| Boolean | hA_flowDependent | true | Set to false to make the convective heat coefficient calculation of the fluid inside the coil independent of mass flow rate |
| Boolean | hA_temperatureDependent | true | Set to false to make the convective heat coefficient calculation of the fluid inside the coil independent of temperature |
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.Thermal.HeatTransfer.Interfaces.HeatPort_a[nSeg] | port | Heat port connected to water inside the tank |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow (from PartialTwoPortInterface) | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_a (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow))) | Medium properties in port_a |
| Medium.ThermodynamicState | sta_b (from PartialTwoPortInterface) | if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow)) | Medium properties in port_b |
| Buildings.Fluid.FixedResistances.PressureDrop | res | Calculates the flow resistance and pressure drop through the heat exchanger | |
| Buildings.Fluid.MixingVolumes.MixingVolume[nSeg] | vol | Heat exchanger fluid | |
| Modelica.Thermal.HeatTransfer.Components.HeatCapacitor[nSeg] | cap | Thermal mass of the heat exchanger |
Contents
| Name | Description |
|---|---|
| Heat transfer fluid flowing through the heat exchanger | |
| Heat transfer fluid inside the tank |
Revisions
-
June 17, 2026, by Michael Wetter:
Updated implementation to allow a flow coefficientnthat is different from2. This allows use of the model for not fully turbulent flow.
This is for Buildings, #4620. -
March 7, 2022, by Michael Wetter:
Setfinal massDynamics=energyDynamics.
This is for #1542. -
April 9, 2021, by Michael Wetter:
Corrected placement ofeachkeyword.
See Buildings, PR #2440. -
April 14, 2020, by Michael Wetter:
ChangedhomotopyInitializationto a constant.
This is for IBPSA, #1341. -
June 7, 2018 by Filip Jorissen:
Copied model from Buildings and update the model accordingly. This is for #314. -
January 7, 2016, by Filip Jorissen:
PropagatedflowDependentandtemperatureDependentinhAPipIns. This is for issue #454. -
September 24, 2015 by Michael Wetter:
Setfixedattribute incap.Tto avoid unspecified initial conditions. -
July 2, 2015, by Michael Wetter:
SetprescribedHeatFlowRate=falsein control volume. -
July 1, 2015, by Filip Jorissen:
Added parameterenergyDynamicsSolid. This is for #434. -
March 28, 2015, by Filip Jorissen:
PropagatedallowFlowReversal. -
August 29, 2014, by Michael Wetter:
IntroducedMediumTanfor the tank medium, and assignedMediumto be equal toMediumHex. This is to correct issue #271. -
June 18, 2014, by Michael Wetter:
Set initial equations forcap, and renamed this instance fromCaptocap. This was done to avoid a warning during translation, and to comply with the coding convention. -
October 8, 2013, by Michael Wetter:
Removed parametershow_V_flow. -
January 29, 2013, by Peter Grant:
First implementation.