Name | Description |
---|---|
DuctManifoldFixedResistance | Manifold for a heat exchanger air duct connection |
DuctManifoldNoResistance | Duct manifold without resistance |
Examples | Collection of models that illustrate model use and test models |
HASensibleCoil | Sensible convective heat transfer model for air to water coil |
HASensibleCoilConstant | Constant convective heat transfer model |
PartialDuctManifold | Partial manifold for heat exchanger duct connection |
PartialDuctPipeManifold | Partial heat exchanger duct and pipe manifold |
PartialHA | Partial model for convective heat transfer coefficients |
PartialPipeManifold | Partial pipe manifold for a heat exchanger |
PipeManifoldFixedResistance | Pipe manifold for a heat exchanger connection |
PipeManifoldNoResistance | Manifold for heat exchanger register |
RegisterHeader | Header for a heat exchanger register |
SensibleCoilRegister | Register for a heat exchanger |
SensibleHexElement | Element of a heat exchanger |
Duct manifold with a fixed flow resistance.
This model causes the flow to be distributed equally into each flow path by using a fixed flow resistance for each flow path.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Integer | nPipSeg | Number of pipe segments per register used for discretization | |
Length | dh | 1 | Hydraulic diameter for duct [m] |
Real | ReC | 4000 | Reynolds number where transition to laminar starts |
Nominal Condition | |||
MassFlowRate | m0_flow | Mass flow rate at port_a [kg/s] | |
Pressure | dp0 | Pressure [Pa] | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPipPar, nPipSeg] | Fluid connector b for medium (positive design flow direction is from port_a to port_b) |
model DuctManifoldFixedResistance "Manifold for a heat exchanger air duct connection" extends PartialDuctManifold; parameter Modelica.SIunits.MassFlowRate m0_flow "Mass flow rate at port_a"; parameter Modelica.SIunits.Pressure dp0(min=0) "Pressure"; parameter Modelica.SIunits.Length dh=1 "Hydraulic diameter for duct"; parameter Real ReC=4000 "Reynolds number where transition to laminar starts"; Fluids.FixedResistances.FixedResistanceDpM[nPipPar,nPipSeg] fixRes( redeclare each package Medium = Medium, each m0_flow=m0_flow/nPipPar/nPipSeg, each dp0=dp0, each dh=dh/sqrt(nPipPar*nPipSeg), each from_dp=true) "Fixed resistance for each duct"; equation for i in 1:nPipPar loop for j in 1:nPipSeg loop connect(port_a, fixRes[i, j].port_a); end for; end for; connect(fixRes.port_b, port_b); end DuctManifoldFixedResistance;
Duct manifold without flow resistance.
This model connects the flows between the ports without modeling flow friction. The model is used in conjunction with a manifold which contains pressure drop elements and that is added to the other side of the heat exchanger registers.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Integer | nPipSeg | Number of pipe segments per register used for discretization | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPipPar, nPipSeg] | Fluid connector b for medium (positive design flow direction is from port_a to port_b) |
model DuctManifoldNoResistance "Duct manifold without resistance" extends PartialDuctManifold; equation for i in 1:nPipPar loop for j in 1:nPipSeg loop connect(port_a, port_b[i, j]); end for; end for; end DuctManifoldNoResistance;
Model for sensible convective heat transfer coefficients for an air to water coil.
This model computes the convective heat transfer coefficient for an air to water coil. The parameters allow a user to enable or disable, individually for each medium, the mass flow and/or the temperature dependence of the convective heat transfer coefficients. For a detailed explanation of the equation, see the references below.
Type | Name | Default | Description |
---|---|---|---|
Real | r | 0.5 | Ratio between air-side and water-side convective heat transfer coefficient |
Real | n_w | 0.85 | Water-side exponent for convective heat transfer coefficient, h~m_flow^n |
Real | n_a | 0.8 | Air-side exponent for convective heat transfer coefficient, h~m_flow^n |
Nominal condition | |||
ThermalConductance | UA0 | Thermal conductance at nominal flow [W/K] | |
MassFlowRate | m0_flow_w | Water mass flow rate [kg/s] | |
MassFlowRate | m0_flow_a | Air mass flow rate [kg/s] | |
ThermalConductance | hA0_w | UA0*(r + 1)/r | Water side convective heat transfer coefficient [W/K] |
ThermalConductance | hA0_a | r*hA0_w | Air side convective heat transfer coefficient, including fin resistance [W/K] |
Temperature | T0_w | Modelica.SIunits.Conversions... | Water temperature [K] |
Temperature | T0_a | Modelica.SIunits.Conversions... | Air temperature [K] |
Advanced | |||
Modeling detail | |||
Boolean | waterSideFlowDependent | true | Set to false to make water-side hA independent of mass flow rate |
Boolean | airSideFlowDependent | true | Set to false to make air-side hA independent of mass flow rate |
Boolean | waterSideTemperatureDependent | true | Set to false to make water-side hA independent of temperature |
Boolean | airSideTemperatureDependent | true | Set to false to make air-side hA independent of temperature |
Type | Name | Description |
---|---|---|
RealSignal | m_flow_1 | Mass flow rate medium 1 |
RealSignal | m_flow_2 | Mass flow rate medium 2 |
RealSignal | hA_1 | Convective heat transfer medium 1 |
RealSignal | hA_2 | Convective heat transfer medium 2 |
RealSignal | T_1 | Temperature medium 1 |
RealSignal | T_2 | Temperature medium 2 |
model HASensibleCoil "Sensible convective heat transfer model for air to water coil" extends PartialHA; parameter Real r(min=0, max=1)=0.5 "Ratio between air-side and water-side convective heat transfer coefficient"; parameter Modelica.SIunits.ThermalConductance hA0_w(min=0)=UA0 * (r+1)/r "Water side convective heat transfer coefficient"; parameter Modelica.SIunits.ThermalConductance hA0_a(min=0)=r * hA0_w "Air side convective heat transfer coefficient, including fin resistance"; parameter Real n_w(min=0, max=1)=0.85 "Water-side exponent for convective heat transfer coefficient, h~m_flow^n"; parameter Real n_a(min=0, max=1)=0.8 "Air-side exponent for convective heat transfer coefficient, h~m_flow^n"; parameter Modelica.SIunits.Temperature T0_w= Modelica.SIunits.Conversions.from_degC(20) "Water temperature"; parameter Modelica.SIunits.Temperature T0_a= Modelica.SIunits.Conversions.from_degC(20) "Air temperature"; parameter Boolean waterSideFlowDependent = true "Set to false to make water-side hA independent of mass flow rate"; parameter Boolean airSideFlowDependent = true "Set to false to make air-side hA independent of mass flow rate"; parameter Boolean waterSideTemperatureDependent = true "Set to false to make water-side hA independent of temperature"; parameter Boolean airSideTemperatureDependent = true "Set to false to make air-side hA independent of temperature"; protected Real x_a(min=0) "Factor for air side temperature dependent variation of heat transfer coefficient"; Real x_w(min=0) "Factor for water side temperature dependent variation of heat transfer coefficient"; Real s_w(min=0, nominal=0.01) "Coefficient for temperature dependence of water side heat transfer coefficient"; Real fm_w "Fraction of actual to nominal mass flow rate"; Real fm_a "Fraction of actual to nominal mass flow rate"; equation fm_w = if waterSideFlowDependent then m_flow_1 / m0_flow_w else 1; fm_a = if airSideFlowDependent then m_flow_2 / m0_flow_a else 1; s_w = if waterSideTemperatureDependent then 0.014/(1+0.014*Modelica.SIunits.Conversions.to_degC(T_1)) else 1; x_w = if waterSideTemperatureDependent then 1 + s_w * (T_1-T0_w) else 1; x_a = if airSideTemperatureDependent then 1 + 4.769E-3 * (T_2-T0_a) else 1; hA_1 = x_w * Buildings.Utilities.Math.regNonZeroPower(fm_w, n_w, 0.1) * hA0_w; hA_2 = x_a * Buildings.Utilities.Math.regNonZeroPower(fm_a, n_a, 0.1) * hA0_a; end HASensibleCoil;
Model for constant sensible convective heat transfer coefficients.
Type | Name | Default | Description |
---|---|---|---|
Real | r | 0.5 | Ratio between air-side and water-side convective heat transfer coefficient |
Nominal condition | |||
ThermalConductance | UA0 | Thermal conductance at nominal flow [W/K] | |
MassFlowRate | m0_flow_w | Water mass flow rate [kg/s] | |
MassFlowRate | m0_flow_a | Air mass flow rate [kg/s] | |
ThermalConductance | hA0_w | UA0*(r + 1)/r | Water side convective heat transfer coefficient [W/K] |
ThermalConductance | hA0_a | r*hA0_w | Air side convective heat transfer coefficient, including fin resistance [W/K] |
Type | Name | Description |
---|---|---|
RealSignal | m_flow_1 | Mass flow rate medium 1 |
RealSignal | m_flow_2 | Mass flow rate medium 2 |
RealSignal | hA_1 | Convective heat transfer medium 1 |
RealSignal | hA_2 | Convective heat transfer medium 2 |
RealSignal | T_1 | Temperature medium 1 |
RealSignal | T_2 | Temperature medium 2 |
model HASensibleCoilConstant "Constant convective heat transfer model" extends PartialHA; parameter Real r(min=0, max=1)=0.5 "Ratio between air-side and water-side convective heat transfer coefficient"; parameter Modelica.SIunits.ThermalConductance hA0_w(min=0)=UA0 * (r+1)/r "Water side convective heat transfer coefficient"; parameter Modelica.SIunits.ThermalConductance hA0_a(min=0)=r * hA0_w "Air side convective heat transfer coefficient, including fin resistance"; equation hA_1 = hA0_w; hA_2 = hA0_a; end HASensibleCoilConstant;
Partial duct manifold for a heat exchanger.
This model defines the duct connection to a heat exchanger. It is extended by other models that model the flow connection between the ports with and without flow friction.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Integer | nPipSeg | Number of pipe segments per register used for discretization | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPipPar, nPipSeg] | Fluid connector b for medium (positive design flow direction is from port_a to port_b) |
partial model PartialDuctManifold "Partial manifold for heat exchanger duct connection" extends PartialDuctPipeManifold; parameter Integer nPipSeg(min=1) "Number of pipe segments per register used for discretization"; Modelica_Fluid.Interfaces.FluidPort_b[nPipPar,nPipSeg] port_b( redeclare each package Medium = Medium, each m_flow(start=0, max=if allowFlowReversal then +Modelica.Constants.inf else 0)) "Fluid connector b for medium (positive design flow direction is from port_a to port_b)"; end PartialDuctManifold;
Partial heat exchanger manifold. This partial model defines ports and parameters that are used for air-side and water-side heat exchanger manifolds.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
partial model PartialDuctPipeManifold "Partial heat exchanger duct and pipe manifold" extends Buildings.BaseClasses.BaseIcon; extends Buildings.Fluids.Interfaces.PartialSingleFluidParameters; parameter Integer nPipPar(min=1) "Number of parallel pipes in each register"; Modelica_Fluid.Interfaces.FluidPort_a port_a( redeclare package Medium = Medium, m_flow(start=0, min=if allowFlowReversal then -Modelica.Constants.inf else 0)) "Fluid connector a for medium (positive design flow direction is from port_a to port_b)"; end PartialDuctPipeManifold;
Partial model for sensible convective heat transfer coefficients.
Type | Name | Default | Description |
---|---|---|---|
Nominal condition | |||
ThermalConductance | UA0 | Thermal conductance at nominal flow [W/K] | |
MassFlowRate | m0_flow_w | Water mass flow rate [kg/s] | |
MassFlowRate | m0_flow_a | Air mass flow rate [kg/s] |
Type | Name | Description |
---|---|---|
RealSignal | m_flow_1 | Mass flow rate medium 1 |
RealSignal | m_flow_2 | Mass flow rate medium 2 |
RealSignal | hA_1 | Convective heat transfer medium 1 |
RealSignal | hA_2 | Convective heat transfer medium 2 |
RealSignal | T_1 | Temperature medium 1 |
RealSignal | T_2 | Temperature medium 2 |
partial model PartialHA "Partial model for convective heat transfer coefficients" extends Buildings.BaseClasses.BaseIcon; parameter Modelica.SIunits.ThermalConductance UA0(min=0) "Thermal conductance at nominal flow"; parameter Modelica.SIunits.MassFlowRate m0_flow_w "Water mass flow rate"; parameter Modelica.SIunits.MassFlowRate m0_flow_a "Air mass flow rate"; Modelica.Blocks.Interfaces.RealSignal m_flow_1(redeclare type SignalType = Modelica.SIunits.MassFlowRate) "Mass flow rate medium 1"; Modelica.Blocks.Interfaces.RealSignal m_flow_2(redeclare type SignalType = Modelica.SIunits.MassFlowRate) "Mass flow rate medium 2"; Modelica.Blocks.Interfaces.RealSignal hA_1(redeclare type SignalType = Modelica.SIunits.ThermalConductance) "Convective heat transfer medium 1"; Modelica.Blocks.Interfaces.RealSignal hA_2(redeclare type SignalType = Modelica.SIunits.ThermalConductance) "Convective heat transfer medium 2"; Modelica.Blocks.Interfaces.RealSignal T_1(redeclare type SignalType = Modelica.SIunits.Temperature) "Temperature medium 1"; Modelica.Blocks.Interfaces.RealSignal T_2(redeclare type SignalType = Modelica.SIunits.Temperature) "Temperature medium 2"; end PartialHA;
Partial pipe manifold for a heat exchanger.
This model defines the pipe connection to a heat exchanger. It is extended by other models that model the flow connection between the ports with and without flow friction.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPipPar] | Fluid connector b for medium (positive design flow direction is from port_a to port_b) |
partial model PartialPipeManifold "Partial pipe manifold for a heat exchanger" extends PartialDuctPipeManifold; Modelica_Fluid.Interfaces.FluidPort_b[nPipPar] port_b( redeclare each package Medium = Medium, each m_flow(start=0, max=if allowFlowReversal then +Modelica.Constants.inf else 0)) "Fluid connector b for medium (positive design flow direction is from port_a to port_b)"; end PartialPipeManifold;
Pipe manifold with a fixed flow resistance.
This model causes the flow to be distributed equally into each flow path by using a fixed flow resistance for each flow path.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Length | dh | 1 | Hydraulic diameter for each pipe [m] |
Real | ReC | 4000 | Reynolds number where transition to laminar starts |
Nominal Condition | |||
MassFlowRate | m0_flow | Mass flow rate at port_a [kg/s] | |
Pressure | dp0 | Pressure [Pa] | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPipPar] | Fluid connector b for medium (positive design flow direction is from port_a to port_b) |
model PipeManifoldFixedResistance "Pipe manifold for a heat exchanger connection" extends PartialPipeManifold; parameter Modelica.SIunits.MassFlowRate m0_flow "Mass flow rate at port_a"; parameter Modelica.SIunits.Pressure dp0(min=0) "Pressure"; parameter Modelica.SIunits.Length dh=1 "Hydraulic diameter for each pipe"; parameter Real ReC=4000 "Reynolds number where transition to laminar starts"; Fluids.FixedResistances.FixedResistanceDpM[nPipPar] fixRes( redeclare each package Medium = Medium, each m0_flow=m0_flow/nPipPar, each dp0=dp0, each dh=dh, each from_dp=true) "Fixed resistance for each duct"; equation for i in 1:nPipPar loop connect(port_a, fixRes[i].port_a); connect(fixRes[i].port_b, port_b[i]); end for; end PipeManifoldFixedResistance;
Pipe manifold without flow resistance.
This model connects the flows between the ports without modeling flow friction. The model is used in conjunction with a manifold which contains pressure drop elements and that is added to the other side of the heat exchanger registers.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPipPar] | Fluid connector b for medium (positive design flow direction is from port_a to port_b) |
model PipeManifoldNoResistance "Manifold for heat exchanger register" extends PartialPipeManifold; equation for i in 1:nPipPar loop connect(port_a, port_b[i]); end for; end PipeManifoldNoResistance;
Header for a heat exchanger register.
This model connects the flow between its ports without modeling flow friction. Currently, the ports are connected without redistributing the flow. In latter versions, the model may be changed to define different flow reroutings in the heat exchanger header.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPipPar | Number of parallel pipes in each register | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a[nPipPar] | Fluid connector a for medium (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPipPar] | Fluid connector b for medium (positive design flow direction is from port_a to port_b) |
model RegisterHeader "Header for a heat exchanger register" extends Buildings.BaseClasses.BaseIcon; extends Buildings.Fluids.Interfaces.PartialSingleFluidParameters; parameter Integer nPipPar(min=1) "Number of parallel pipes in each register"; Modelica_Fluid.Interfaces.FluidPort_a port_a[nPipPar]( redeclare each final package Medium = Medium, each m_flow(start=0, min=if allowFlowReversal then -Modelica.Constants.inf else 0)) "Fluid connector a for medium (positive design flow direction is from port_a to port_b)"; Modelica_Fluid.Interfaces.FluidPort_b port_b[nPipPar]( redeclare each final package Medium = Medium, each m_flow(start=0, max=if allowFlowReversal then +Modelica.Constants.inf else 0)) "Fluid connector b for medium (positive design flow direction is from port_a to port_b)"; equation connect(port_a, port_b); end RegisterHeader;
Register of a heat exchanger with dynamics on the fluids and the solid. The register represents one array of pipes that are perpendicular to the air stream. The hA value for both fluids is an input. The driving force for the heat transfer is the temperature difference between the fluid volumes and the solid in each heat exchanger element.
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowFlowReversal_1 | flowDirection_1 == Modelica_... | = false, if flow only from port_a to port_b, otherwise reversing flow allowed |
Boolean | allowFlowReversal_2 | flowDirection_2 == Modelica_... | = false, if flow only from port_a to port_b, otherwise reversing flow allowed |
Integer | nPipPar | 2 | Number of parallel pipes in each register |
Integer | nPipSeg | 3 | Number of pipe segments per register used for discretization |
Fluid 1 | |||
replaceable package Medium_1 | PartialMedium | Fluid 1 | |
Fluid 2 | |||
replaceable package Medium_2 | PartialMedium | Fluid 2 | |
Nominal condition | |||
HeatFlowRate | UA0 | Thermal conductance at nominal flow, used to compute time constant [W] | |
MassFlowRate | m0_flow_1 | Mass flow rate medim 1 [kg/s] | |
MassFlowRate | m0_flow_2 | Mass flow rate medium 2 [kg/s] | |
Time | tau_1 | 60 | Time constant at nominal flow for medium 1 [s] |
Time | tau_2 | 60 | Time constant at nominal flow for medium 2 [s] |
Time | tau_m | 60 | Time constant of metal at nominal UA value [s] |
Advanced | |||
Temp | flowDirection_1 | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Temp | flowDirection_2 | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a1[nPipPar] | Fluid connector a for medium 1 (positive design flow direction is from port_a1 to port_b1) |
FluidPort_b | port_b1[nPipPar] | Fluid connector b for medium 1 (positive design flow direction is from port_a to port_b) |
FluidPort_a | port_a2[nPipPar, nPipSeg] | Fluid connector a for medium 2 (positive design flow direction is from port_a2 to port_b2) |
FluidPort_b | port_b2[nPipPar, nPipSeg] | Fluid connector b for medium 2 (positive design flow direction is from port_a to port_b) |
input RealInput | Gc_2 | Signal representing the convective thermal conductance medium 2 in [W/K] |
input RealInput | Gc_1 | Signal representing the convective thermal conductance medium 1 in [W/K] |
model SensibleCoilRegister "Register for a heat exchanger" extends Buildings.BaseClasses.BaseIcon; extends Buildings.Fluids.Interfaces.PartialDoubleFluidParameters; import Modelica.Constants; parameter Integer nPipPar(min=1)=2 "Number of parallel pipes in each register"; parameter Integer nPipSeg(min=1)=3 "Number of pipe segments per register used for discretization"; final parameter Integer nEle = nPipPar * nPipSeg "Number of heat exchanger elements"; Buildings.HeatExchangers.BaseClasses.SensibleHexElement[ nPipPar, nPipSeg] ele( redeclare each package Medium_1 = Medium_1, redeclare each package Medium_2 = Medium_2, each flowDirection_1=flowDirection_1, each flowDirection_2=flowDirection_2, each tau_1=tau_1/nPipSeg, each m0_flow_1=m0_flow_1/nPipPar, each tau_2=tau_2, each m0_flow_2=m0_flow_2/nPipPar/nPipSeg, each tau_m=tau_m, each UA0=UA0/nPipPar/nPipSeg) "Element of a heat exchanger"; Modelica_Fluid.Interfaces.FluidPort_a[nPipPar] port_a1( redeclare each package Medium = Medium_1, each m_flow(start=0, min=if allowFlowReversal_1 then -Constants.inf else 0)) "Fluid connector a for medium 1 (positive design flow direction is from port_a1 to port_b1)"; Modelica_Fluid.Interfaces.FluidPort_b[nPipPar] port_b1( redeclare each package Medium = Medium_1, each m_flow(start=0, max=if allowFlowReversal_1 then +Constants.inf else 0)) "Fluid connector b for medium 1 (positive design flow direction is from port_a to port_b)"; Modelica_Fluid.Interfaces.FluidPort_a[nPipPar,nPipSeg] port_a2( redeclare each package Medium = Medium_2, each m_flow(start=0, min=if allowFlowReversal_2 then -Constants.inf else 0)) "Fluid connector a for medium 2 (positive design flow direction is from port_a2 to port_b2)"; Modelica_Fluid.Interfaces.FluidPort_b[nPipPar,nPipSeg] port_b2( redeclare each package Medium = Medium_2, each m_flow(start=0, max=if allowFlowReversal_2 then +Constants.inf else 0)) "Fluid connector b for medium 2 (positive design flow direction is from port_a to port_b)"; parameter Modelica.SIunits.HeatFlowRate UA0 "Thermal conductance at nominal flow, used to compute time constant"; parameter Modelica.SIunits.MassFlowRate m0_flow_1 "Mass flow rate medim 1"; parameter Modelica.SIunits.MassFlowRate m0_flow_2 "Mass flow rate medium 2"; parameter Modelica.SIunits.Time tau_1=60 "Time constant at nominal flow for medium 1"; parameter Modelica.SIunits.Time tau_2=60 "Time constant at nominal flow for medium 2"; Modelica.SIunits.HeatFlowRate Q_flow_1 "Heat transfered from solid into medium 1"; Modelica.SIunits.HeatFlowRate Q_flow_2 "Heat transfered from solid into medium 2"; parameter Modelica.SIunits.Time tau_m=60 "Time constant of metal at nominal UA value"; Modelica.Blocks.Interfaces.RealInput Gc_2(redeclare type SignalType = Modelica.SIunits.ThermalConductance) "Signal representing the convective thermal conductance medium 2 in [W/K]"; Modelica.Blocks.Interfaces.RealInput Gc_1(redeclare type SignalType = Modelica.SIunits.ThermalConductance) "Signal representing the convective thermal conductance medium 1 in [W/K]"; protected Modelica.Blocks.Math.Gain gai_1(k=1/nEle) "Gain medium-side 1 to take discretization into account"; Modelica.Blocks.Math.Gain gai_2(k=1/nEle) "Gain medium-side 2 to take discretization into account"; equation Q_flow_1 = sum(ele[i,j].Q_flow_1 for i in 1:nPipPar, j in 1:nPipSeg); Q_flow_2 = sum(ele[i,j].Q_flow_2 for i in 1:nPipPar, j in 1:nPipSeg); for i in 1:nPipPar loop // liquid side (pipes) connect(ele[i,1].port_a1, port_a1[i]); connect(ele[i,nPipSeg].port_b1, port_b1[i]); for j in 1:nPipSeg-1 loop connect(ele[i,j].port_b1, ele[i,j+1].port_a1); end for; // gas side (duct) //water connections for j in 1:nPipSeg loop connect(ele[i,j].port_a2, port_a2[i,j]); connect(ele[i,j].port_b2, port_b2[i,j]); end for; end for; connect(Gc_1, gai_1.u); connect(Gc_2, gai_2.u); for i in 1:nPipPar loop for j in 1:nPipSeg loop connect(gai_1.y, ele[i,j].Gc_1); connect(gai_2.y, ele[i,j].Gc_2); end for; end for; end SensibleCoilRegister;
Element of a heat exchanger with dynamics on the fluids and the solid. The hA value for both fluids is an input. The driving force for the heat transfer is the temperature difference between the fluid volumes and the solid.
The heat capacity C of the metal is assigned as follows. Suppose the metal temperature is governed by
dT C ---- = hA_1 (T_1 - T) + hA_2 (T_2 - T) dtwhere hA are the convective heat transfer coefficients that also take into account heat conduction in the heat exchanger fins and T_1 and T_2 are the medium temperatures. Assuming hA_1=hA_2, this equation can be rewritten as
C dT ------ ---- = (T_1 - T) + (T_2 - T) 2 UA0 dtwhere UA0 is the UA value at nominal condition. Hence we set the heat capacity of the metal to C = 2 * UA0 * tau_m.
Type | Name | Default | Description |
---|---|---|---|
Boolean | allowFlowReversal_1 | flowDirection_1 == Modelica_... | = false, if flow only from port_a to port_b, otherwise reversing flow allowed |
Boolean | allowFlowReversal_2 | flowDirection_2 == Modelica_... | = false, if flow only from port_a to port_b, otherwise reversing flow allowed |
Fluid 1 | |||
replaceable package Medium_1 | PartialMedium | Fluid 1 | |
Fluid 2 | |||
replaceable package Medium_2 | PartialMedium | Fluid 2 | |
Initialization | |||
MassFlowRate | m_flow_1 | Mass flow rate from port_a1 to port_b1 (m_flow_1 > 0 is design flow direction) [kg/s] | |
MassFlowRate | m_flow_2 | Mass flow rate from port_a2 to port_b2 (m_flow_2 > 0 is design flow direction) [kg/s] | |
Pressure | dp_1 | Pressure difference between port_a1 and port_b1 [Pa] | |
Pressure | dp_2 | Pressure difference between port_a2 and port_b2 [Pa] | |
Nominal condition | |||
Time | tau_1 | 60 | Time constant at nominal flow [s] |
MassFlowRate | m0_flow_1 | Mass flow rate [kg/s] | |
Time | tau_2 | 60 | Time constant at nominal flow [s] |
MassFlowRate | m0_flow_2 | Mass flow rate [kg/s] | |
HeatFlowRate | UA0 | Thermal conductance at nominal flow, used to compute time constant [W] | |
Time | tau_m | 60 | Time constant of metal at nominal UA value [s] |
Advanced | |||
Temp | flowDirection_1 | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Temp | flowDirection_2 | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a1 | Fluid connector a for medium 1 (positive design flow direction is from port_a1 to port_b1) |
FluidPort_b | port_b1 | Fluid connector b for medium 1 (positive design flow direction is from port_a to port_b) |
FluidPort_a | port_a2 | Fluid connector a for medium 2 (positive design flow direction is from port_a2 to port_b2) |
FluidPort_b | port_b2 | Fluid connector b for medium 2 (positive design flow direction is from port_a to port_b) |
input RealInput | Gc_1 | Signal representing the convective thermal conductance medium 1 in [W/K] |
input RealInput | Gc_2 | Signal representing the convective thermal conductance medium 2 in [W/K] |
model SensibleHexElement "Element of a heat exchanger" extends Fluids.Interfaces.PartialDynamicFourPortTransformer(final C=2*UA0*tau_m, mas(steadyStateStart=true), vol_1(use_T_start=true, initType=Modelica_Fluid.Types.Init.SteadyState), vol_2(use_T_start=true, initType=Modelica_Fluid.Types.Init.SteadyState)); extends Buildings.BaseClasses.BaseIcon; parameter Modelica.SIunits.HeatFlowRate UA0 "Thermal conductance at nominal flow, used to compute time constant"; parameter Modelica.SIunits.Time tau_m(min=0) = 60 "Time constant of metal at nominal UA value"; Modelica.Blocks.Interfaces.RealInput Gc_1(redeclare type SignalType = Modelica.SIunits.ThermalConductance) "Signal representing the convective thermal conductance medium 1 in [W/K]"; Modelica.Blocks.Interfaces.RealInput Gc_2(redeclare type SignalType = Modelica.SIunits.ThermalConductance) "Signal representing the convective thermal conductance medium 2 in [W/K]"; equation connect(Gc_1, con1.Gc); connect(Gc_2, con2.Gc); end SensibleHexElement;