Buildings.Fluid.Storage
Package with thermal energy storage models
Information
This package contains thermal energy storage models.Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Package Content
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 |
Ice | Ice tank model |
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 |
Buildings.Fluid.Storage.ExpansionVessel
Expansion vessel with fixed pressure
Information
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.Boundary_pT 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.Boundary_pT, any mass flow rate that flows out of the model will be at a user-specified temperature. Therefore, Buildings.Fluid.Sources.Boundary_pT leads to smaller systems of equations, which may result in faster simulation.
Extends from Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes).
Parameters
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] | |
Dynamics | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Real | mSenFac | 1 | Factor for scaling the sensible thermal mass of the volume |
Advanced | |||
Dynamics | |||
Dynamics | massDynamics | Modelica.Fluid.Types.Dynamic... | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
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.) |
Connectors
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid port |
Modelica definition
Buildings.Fluid.Storage.Stratified
Model of a stratified tank for thermal energy storage
Information
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.Storage.BaseClasses.PartialStratified (Partial model of a stratified tank for thermal energy storage).
Parameters
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] | |
Assumptions | |||
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
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 | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy 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 |
Connectors
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 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 | fluPorVol[nSeg] | Fluid port that connects to the control volumes of the tank |
Modelica definition
Buildings.Fluid.Storage.StratifiedEnhanced
Stratified tank model with enhanced discretization
Information
This is a model of a stratified storage tank for thermal energy storage.
See the Buildings.Fluid.Storage.UsersGuide for more information.
Limitations
The model requires at least 4 fluid segments. Hence, set nSeg
to 4 or higher.
Extends from BaseClasses.PartialStratified (Partial model of a stratified tank for thermal energy storage).
Parameters
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] | |
Assumptions | |||
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
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 | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy 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 |
Connectors
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 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 |
Modelica definition
Buildings.Fluid.Storage.StratifiedEnhancedInternalHex
A model of a water storage tank with a secondary loop and intenral heat exchanger
Information
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.
Limitations
The model requires at least 4 fluid segments. Hence, set nSeg
to 4 or higher.
Extends from StratifiedEnhanced (Stratified tank model with enhanced discretization).
Parameters
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] | |
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 | = 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 | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy 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 | |||
Conservation equations | |||
Dynamics | energyDynamicsHex | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance for heat exchanger internal fluid mass |
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 |
---|---|---|
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 |