Buildings.Fluid.Storage.Validation
Collection of models that validate the storage models
Information
This package contains models that validate the storage models. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
HeatExchangerDynamics | Test model for stratified tank with steady-state and dynamic heat exchanger balance |
HeatExchangerLocation | Test model for heat exchanger with hHex_a and hHex_b interchanged |
StratifiedLoadingUnloading | Test model for stratified tank |
StratifiedNonUniformInitial | Test model for stratified tank with non-uniform initial temperature |
Buildings.Fluid.Storage.Validation.HeatExchangerDynamics
Test model for stratified tank with steady-state and dynamic heat exchanger balance
Information
This validation model compares two tank models. The only difference between the two tank models is that one uses a dynamic energy balance, whereas the other uses a steady-state energy balance for the heat exchanger. The mass flow rate through the heat exchanger is varied from zero to the design flow rate and back to zero to test the model under conditions in which no water flows through the heat exchanger.Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
HeatFlowRate | QHex_flow_nominal | 2000 | Design heat flow rate of heat exchanger [W] |
MassFlowRate | m_flow_nominal | QHex_flow_nominal/4200/4 | [kg/s] |
Modelica definition
Buildings.Fluid.Storage.Validation.HeatExchangerLocation
Test model for heat exchanger with hHex_a and hHex_b interchanged
Information
This validation model compares two tank models. The only difference between
the two tank models is that tan_aTop
has the hot water inlet
for the heat exchanger above its outlet, whereas tan_bTop
has the hot water inlet below its outlet. In both models, the heat exchanger
extends from element 9 to element 11.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
HeatFlowRate | QHex_flow_nominal | 6000 | Design heat flow rate of heat exchanger [W] |
MassFlowRate | m_flow_nominal | QHex_flow_nominal/4200/4 | [kg/s] |
Modelica definition
Buildings.Fluid.Storage.Validation.StratifiedLoadingUnloading
Test model for stratified tank
Information
This test model compares two tank models. The only difference between the two tank models is that one uses the third order upwind discretization scheme that reduces numerical diffusion that is induced when connecting volumes in series.Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1*1000/3600/4 | [kg/s] |
Modelica definition
Buildings.Fluid.Storage.Validation.StratifiedNonUniformInitial
Test model for stratified tank with non-uniform initial temperature
Information
This test model validates Buildings.Fluid.Storage.Stratified by specifying a non-uniform initial temperature.Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
MassFlowRate | m_flow_nominal | 1*1000/3600/4 | [kg/s] |
Modelica definition
Buildings.Fluid.Storage.Validation.HeatExchangerDynamics.Tank
Tank with dynamic heat exchanger balance
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Volume | VTan | 0.3 | Tank volume [m3] |
Length | hTan | 2 | Height of tank (without insulation) [m] |
Length | dIns | 0.3 | Thickness of insulation [m] |
ThermalConductivity | kIns | 0.04 | Specific heat conductivity of insulation [W/(m.K)] |
Integer | nSeg | nSeg | Number of volume segments |
Time | tau | 1 | Time constant for mixing [s] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | m_flow_nominal | Nominal mass flow rate [kg/s] |
Heat exchanger | |||
replaceable package MediumHex | PartialMedium | Medium in the heat exchanger | |
Height | hHex_a | 1 | Height of portHex_a of the heat exchanger, measured from tank bottom [m] |
Height | hHex_b | 0.2 | Height of portHex_b of the heat exchanger, measured from tank bottom [m] |
Integer | hexSegMult | 2 | Number of heat exchanger segments in each tank segment |
Diameter | dExtHex | 0.025 | Exterior diameter of the heat exchanger pipe [m] |
HeatFlowRate | Q_flow_nominal | QHex_flow_nominal | Heat transfer at nominal conditions [W] |
Temperature | TTan_nominal | 313.15 | Temperature of fluid inside the tank at nominal heat transfer conditions [K] |
Temperature | THex_nominal | 333.15 | Temperature of fluid inside the heat exchanger at nominal heat transfer conditions [K] |
Real | r_nominal | 0.5 | Ratio between coil inside and outside convective heat transfer at nominal heat transfer conditions |
MassFlowRate | mHex_flow_nominal | m_flow_nominal | Nominal mass flow rate through the heat exchanger [kg/s] |
PressureDifference | dpHex_nominal | 2500 | Pressure drop across the heat exchanger at nominal conditions [Pa] |
Assumptions | |||
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Heat exchanger | |||
Boolean | allowFlowReversalHex | true | = true to allow flow reversal in heat exchanger, false restricts to design direction (portHex_a -> portHex_b) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | true | = true, if actual temperature at port is computed |
Dynamics | |||
Equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance |
Initialization | |||
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [K] |
Temperature | TFlu_start[nSeg] | T_start*ones(nSeg) | Initial temperature of the tank segments, with TFlu_start[1] being the top segment [K] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Flow resistance heat exchanger | |||
Boolean | computeFlowResistance | true | =true, compute flow resistance. Set to false to assume no friction |
Boolean | from_dp | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Dynamics heat exchanger | |||
Equations | |||
Dynamics | energyDynamicsHex | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance for heat exchanger internal fluid mass |
Dynamics | massDynamicsHex | energyDynamicsHex | Formulation of mass balance for heat exchanger |
Dynamics | energyDynamicsHexSolid | energyDynamicsHex | Formulation of energy balance for heat exchanger solid mass |
Length | lHex | rTan*abs(segHex_a - segHex_b... | Approximate length of the heat exchanger [m] |
Area | ACroHex | (dExtHex^2 - (0.8*dExtHex)^2... | Cross sectional area of the heat exchanger [m2] |
SpecificHeatCapacity | cHex | 490 | Specific heat capacity of the heat exchanger material [J/(kg.K)] |
Density | dHex | 8000 | Density of the heat exchanger material [kg/m3] |
HeatCapacity | CHex | ACroHex*lHex*dHex*cHex | Capacitance of the heat exchanger without the fluid [J/K] |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
output RealOutput | Ql_flow | Heat loss of tank (positive if heat flows from tank to ambient) |
HeatPort_a | heaPorVol[nSeg] | Heat port that connects to the control volumes of the tank |
HeatPort_a | heaPorSid | Heat port tank side (outside insulation) |
HeatPort_a | heaPorTop | Heat port tank top (outside insulation) |
HeatPort_a | heaPorBot | Heat port tank bottom (outside insulation). Leave unconnected for adiabatic condition |
FluidPort_a | portHex_a | Heat exchanger inlet |
FluidPort_b | portHex_b | Heat exchanger outlet |
Heat exchanger | ||
replaceable package MediumHex | Medium in the heat exchanger |
Modelica definition
Buildings.Fluid.Storage.Validation.HeatExchangerLocation.Tank
Tank
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Volume | VTan | 0.3 | Tank volume [m3] |
Length | hTan | 1.2 | Height of tank (without insulation) [m] |
Length | dIns | 0.04 | Thickness of insulation [m] |
ThermalConductivity | kIns | 0.034 | Specific heat conductivity of insulation [W/(m.K)] |
Integer | nSeg | 12 | Number of volume segments |
Time | tau | 1 | Time constant for mixing [s] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | m_flow_nominal | Nominal mass flow rate [kg/s] |
Heat exchanger | |||
replaceable package MediumHex | PartialMedium | Medium in the heat exchanger | |
Height | hHex_a | Height of portHex_a of the heat exchanger, measured from tank bottom [m] | |
Height | hHex_b | Height of portHex_b of the heat exchanger, measured from tank bottom [m] | |
Integer | hexSegMult | 2 | Number of heat exchanger segments in each tank segment |
Diameter | dExtHex | 0.025 | Exterior diameter of the heat exchanger pipe [m] |
HeatFlowRate | Q_flow_nominal | QHex_flow_nominal | Heat transfer at nominal conditions [W] |
Temperature | TTan_nominal | 293.15 | Temperature of fluid inside the tank at nominal heat transfer conditions [K] |
Temperature | THex_nominal | 273.15 + 60 | Temperature of fluid inside the heat exchanger at nominal heat transfer conditions [K] |
Real | r_nominal | 0.5 | Ratio between coil inside and outside convective heat transfer at nominal heat transfer conditions |
MassFlowRate | mHex_flow_nominal | m_flow_nominal | Nominal mass flow rate through the heat exchanger [kg/s] |
PressureDifference | dpHex_nominal | 2500 | Pressure drop across the heat exchanger at nominal conditions [Pa] |
Assumptions | |||
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Heat exchanger | |||
Boolean | allowFlowReversalHex | true | = true to allow flow reversal in heat exchanger, false restricts to design direction (portHex_a -> portHex_b) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Dynamics | |||
Equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance |
Initialization | |||
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [K] |
Temperature | TFlu_start[nSeg] | T_start*ones(nSeg) | Initial temperature of the tank segments, with TFlu_start[1] being the top segment [K] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Flow resistance heat exchanger | |||
Boolean | computeFlowResistance | false | =true, compute flow resistance. Set to false to assume no friction |
Boolean | from_dp | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Dynamics heat exchanger | |||
Equations | |||
Dynamics | energyDynamicsHex | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance for heat exchanger internal fluid mass |
Dynamics | massDynamicsHex | energyDynamicsHex | Formulation of mass balance for heat exchanger |
Dynamics | energyDynamicsHexSolid | energyDynamicsHex | Formulation of energy balance for heat exchanger solid mass |
Length | lHex | rTan*abs(segHex_a - segHex_b... | Approximate length of the heat exchanger [m] |
Area | ACroHex | (dExtHex^2 - (0.8*dExtHex)^2... | Cross sectional area of the heat exchanger [m2] |
SpecificHeatCapacity | cHex | 490 | Specific heat capacity of the heat exchanger material [J/(kg.K)] |
Density | dHex | 8000 | Density of the heat exchanger material [kg/m3] |
HeatCapacity | CHex | ACroHex*lHex*dHex*cHex | Capacitance of the heat exchanger without the fluid [J/K] |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
output RealOutput | Ql_flow | Heat loss of tank (positive if heat flows from tank to ambient) |
HeatPort_a | heaPorVol[nSeg] | Heat port that connects to the control volumes of the tank |
HeatPort_a | heaPorSid | Heat port tank side (outside insulation) |
HeatPort_a | heaPorTop | Heat port tank top (outside insulation) |
HeatPort_a | heaPorBot | Heat port tank bottom (outside insulation). Leave unconnected for adiabatic condition |
FluidPort_a | portHex_a | Heat exchanger inlet |
FluidPort_b | portHex_b | Heat exchanger outlet |
Heat exchanger | ||
replaceable package MediumHex | Medium in the heat exchanger |