modelDiscretizedCounterFlowHEX

Discretized heat exchanger for single- or two-phase working fluids without pressure drop

Extends from Internal.PartialDiscretizedHEX (Base class for undirected discretized heat exchangers).

Information

The undirected counter-flow discretized heat exchanger uses a number of conduction elements (which is set by the parameter nCells) as discrete control volumes to exchange heat between two fluid streams.

For each side the elements are numbered 1 to nCells from rear to fore and the elements' heatports are connected via a thermal conductor that models the wall. The connections are ordered to result in a counter-flow configuration.

The conduction elements are computing a heat transfer coefficient between their heatport and the fluid contained. They are replaceable with a choice between a single-phase and a two-phase version, both can be further parametrized. Although the single-phase version works for two-phase media (not the other way around), using the two-phase one for two-phase media enables to set different heat transfer coefficients depending on the phase (liquid/gaseous/2-phase) state of the medium.

Note that since the model uses conductionElements as discrete control volumes that in turn assume quasi-stationary mass and therefore are part of a fluid stream rather than break it into two (like a full volume would), the same holds for both sides of the heat exchanger; they are part of a fluid stream and don't break it. The quasi-stationary mass assumption also implies that for (fast) changing masses/densities in any of the conduction elements the heat exchanger will (slightly) violate the conservation of energy.

The parameters A (heat transferring area), k_wall (heat transfer coefficient of the wall between the streams) and the heat transfer coefficients in the conduction elements scale the transferred heat (the middle only if the wall and the latter only of the heat transfer into a fluid is the choke of the heatflow).

The parameter V determines the amount of fluid in the heat exchanger and therefore the dynamic for non-steady states.

The initialization tab allows for a mass flow initialization for both paths, as well as to determine from which direction the enthalpy in the control volumes should be initialized (fore/rear), or if it should start with a given enthalpy. The other option is to initialize the enthalpy with a given value.

The Advanced tab allows to influence the mass flow regularization for near zero mass flow and has an option to enforce global conservation of energy. The latter is done by feeding back any energy the conduction elements accumulated over time, basically making it impossible to store energy in their fluid long-term. While this enforces long-term conservation of energy it changes the medium-/short-term dynamics of the system and is therefore disabled by default.

Parameters

TypeNameDefaultDescription
StringinstanceName (from DropOfCommonsPlus)getInstanceName()Instance name
IntegernCells (from PartialDiscretizedHEX)3Number of discretization elements
Booleancalculate_efficiency (from PartialDiscretizedHEX)false= true, if heat exchanger efficiency is calculated
Booleand1A (from PartialDiscretizedHEX)displayParameters and displayAreadisplayArea at position 1
Layout
BooleandisplayInstanceName (from DropOfCommonsPlus)dropOfCommons.displayInstanceNames= true, if instance name is displayed
BooleandisplayParameters (from DropOfCommonsPlus)dropOfCommons.displayParameters= true, if displaying parameters is enabled
Heat transfer parameters
SI.AreaA (from PartialDiscretizedHEX)10Heat transfer area
SI.VolumeV_Hex (from PartialDiscretizedHEX)0.001Volume for heat transfer calculation
SI.CoefficientOfHeatTransferk_wall (from PartialDiscretizedHEX)100Coefficient of heat transfer of pipe wall
Initialization › Mass flow rate
BooleaninitializeMassFlow (from PartialDiscretizedHEX)false= true, if inlet mass flow rates are initialized
SI.MassFlowRatem_flow_0_A (from PartialDiscretizedHEX)0Initial mass flow rate for side A
SI.MassFlowRatem_flow_0_B (from PartialDiscretizedHEX)0Initial mass flow rate for side B
Advanced
Booleanenforce_global_energy_conservation (from PartialDiscretizedHEX)false= true, if global conservation of energy is enforced
SI.MassFlowRatem_flow_reg (from PartialDiscretizedHEX)dropOfCommons.m_flow_regRegularization mass flow to switch between positive- and negative-massflow model
Initialization › Enthalpy
ThermofluidStream.Undirected.Processes.Internal.InitializationMethodsCondElementinit_A (from PartialDiscretizedHEX)ThermofluidStream.Undirected.Processes.Internal.InitializationMethodsCondElement.hInitialization method for h side A
MediumA.SpecificEnthalpyh0_A (from PartialDiscretizedHEX)MediumA.h_defaultStart value for specific enthalpy side A
ThermofluidStream.Undirected.Processes.Internal.InitializationMethodsCondElementinit_B (from PartialDiscretizedHEX)ThermofluidStream.Undirected.Processes.Internal.InitializationMethodsCondElement.hInitialization method for h side B
MediumB.SpecificEnthalpyh0_B (from PartialDiscretizedHEX)MediumB.h_defaultStart value for specific enthalpy side B
Layout › Display parameters
BooleandisplayArea (from PartialDiscretizedHEX)true= true, if heat transfer area A is displayed

Connectors

TypeNameDefaultDescription
Interfaces.RearrearA
Interfaces.ForeforeA
Interfaces.RearrearB
Interfaces.ForeforeB

Components

TypeNameDefaultDescription
SI.HeatFlowRateQ_flow_A (from PartialDiscretizedHEX)sum(thermalElementA.heatPort.Q_flow)Heat flow rate into medium A
SI.HeatFlowRateQ_flow_B (from PartialDiscretizedHEX)sum(thermalElementB.heatPort.Q_flow)Heat flow rate into medium B
SI.MassFlowRatem_flow_A (from PartialDiscretizedHEX)Mass flow rate on side A
SI.MassFlowRatem_flow_B (from PartialDiscretizedHEX)Mass flow rate on side B
SI.MassM_A (from PartialDiscretizedHEX)sum(thermalElementA.M)Mass on side A
SI.MassM_B (from PartialDiscretizedHEX)sum(thermalElementB.M)Mass on side B
SI.EnergydeltaE_system (from PartialDiscretizedHEX)sum(thermalElementA.deltaE_system) + sum(thermalElementB.deltaE_system)Error in global conservation of energy
ThermofluidStream.HeatExchangers.Internal.DiscretizedHEXSummarysummary (from PartialDiscretizedHEX)Summary record of quantities
Modelica.Thermal.HeatTransfer.Components.ThermalConductor[nCells]thermalConductor (from PartialDiscretizedHEX)
ConductionElementA[nCells]thermalElementA (from PartialDiscretizedHEX)
ConductionElementB[nCells]thermalElementB (from PartialDiscretizedHEX)