Package with thermal energy storage models
Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Name | Description |
---|---|
UsersGuide | User's Guide |
ExpansionVessel | Expansion vessel with fixed pressure |
Stratified | Model of a stratified tank for thermal energy storage |
StratifiedEnhanced | Stratified tank model with enhanced discretization |
StratifiedEnhancedInternalHex | A model of a water storage tank with a secondary loop and intenral heat exchanger |
Examples | Collection of models that illustrate model use and test models |
Validation | Collection of models that validate the storage models |
BaseClasses | Package with base classes for Buildings.Fluid.Storage |
Expansion vessel with fixed pressure
This is a model of a pressure expansion vessel. The vessel has a constant pressure
that is equal to the value of the parameter p_start
.
The model takes into account the energy and mass balance of the medium.
It has no heat exchange with the ambient.
The expansion vessel needs to be used in closed loops that contain water to set a reference pressure and, for liquids where the density is modeled as a function of temperature, to allow for the thermal expansion of the liquid.
Note that alternatively, the model Buildings.Fluid.Sources.FixedBoundary may be used to set a reference pressure. The main difference between these two models is that in this model, there is an energy and mass balance for the volume. In contrast, for Buildings.Fluid.Sources.FixedBoundary, any mass flow rate that flows out of the model will be at a user-specified temperature. Therefore, Buildings.Fluid.Sources.FixedBoundary leads to smaller systems of equations, which may result in faster simulation.
Extends from Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Volume | V_start | Volume of liquid stored in the vessel at the start of the simulation [m3] | |
Pressure | p | Medium.p_default | Constant pressure of the expansion vessel [Pa] |
Dynamics | |||
Equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Dynamics | massDynamics | Modelica.Fluid.Types.Dynamic... | Type of mass balance: dynamic (3 initialization options) or steady state |
Real | mSenFac | 1 | Factor for scaling the sensible thermal mass of the volume |
Initialization | |||
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [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 |
ExtraProperty | C_nominal[Medium.nC] | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid port |
Model of a stratified tank for thermal energy storage
This is a model of a stratified storage tank.
See the Buildings.Fluid.Storage.UsersGuide for more information.
For a model with enhanced stratification, use Buildings.Fluid.Storage.StratifiedEnhanced.
Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Volume | VTan | Tank volume [m3] | |
Length | hTan | Height of tank (without insulation) [m] | |
Length | dIns | Thickness of insulation [m] | |
ThermalConductivity | kIns | 0.04 | Specific heat conductivity of insulation [W/(m.K)] |
Integer | nSeg | 2 | Number of volume segments |
Time | tau | 1 | Time constant for mixing [s] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
PressureDifference | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Assumptions | |||
Boolean | allowFlowReversal | true | = true to allow flow reversal, false restricts to design direction (port_a -> port_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] |
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 |
Type | Name | Description |
---|---|---|
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) |
replaceable package Medium | ||
output RealOutput | Ql_flow | Heat loss of tank (positive if heat flows from tank to ambient) |
HeatPort_a | heaPorVol[nSeg] | Heat port of fluid volumes |
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 |
Stratified tank model with enhanced discretization
This is a model of a stratified storage tank for thermal energy storage.
See the Buildings.Fluid.Storage.UsersGuide for more information.
The model requires at least 4 fluid segments. Hence, set nSeg
to 4 or higher.
Extends from Stratified (Model of a stratified tank for thermal energy storage).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Volume | VTan | Tank volume [m3] | |
Length | hTan | Height of tank (without insulation) [m] | |
Length | dIns | Thickness of insulation [m] | |
ThermalConductivity | kIns | 0.04 | Specific heat conductivity of insulation [W/(m.K)] |
Integer | nSeg | 4 | Number of volume segments |
Time | tau | 1 | Time constant for mixing [s] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
PressureDifference | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Assumptions | |||
Boolean | allowFlowReversal | true | = true to allow flow reversal, false restricts to design direction (port_a -> port_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] |
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 |
Type | Name | Description |
---|---|---|
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 of fluid volumes |
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 |
A model of a water storage tank with a secondary loop and intenral heat exchanger
This is a model of a stratified storage tank for thermal energy storage with built-in heat exchanger.
See the Buildings.Fluid.Storage.UsersGuide for more information.
The model requires at least 4 fluid segments. Hence, set nSeg
to 4 or higher.
Extends from StratifiedEnhanced (Stratified tank model with enhanced discretization).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Volume | VTan | Tank volume [m3] | |
Length | hTan | Height of tank (without insulation) [m] | |
Length | dIns | Thickness of insulation [m] | |
ThermalConductivity | kIns | 0.04 | Specific heat conductivity of insulation [W/(m.K)] |
Integer | nSeg | 4 | Number of volume segments |
Time | tau | 1 | Time constant for mixing [s] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
PressureDifference | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Heat exchanger | |||
replaceable package MediumHex | Modelica.Media.Interfaces.Pa... | 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 | Heat transfer at nominal conditions [W] | |
Temperature | TTan_nominal | Temperature of fluid inside the tank at nominal heat transfer conditions [K] | |
Temperature | THex_nominal | 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 | 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 | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
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] |
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] |
Type | Name | Description |
---|---|---|
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 of fluid volumes |
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 |