IEA EBC Annex 60 EBC logo

Annex60.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
Annex60.Fluid.Storage.ExpansionVessel ExpansionVessel Expansion vessel with fixed pressure
Annex60.Fluid.Storage.Examples Examples Collection of models that illustrate model use and test models

Annex60.Fluid.Storage.ExpansionVessel Annex60.Fluid.Storage.ExpansionVessel

Expansion vessel with fixed pressure

Annex60.Fluid.Storage.ExpansionVessel

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 Annex60.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 Annex60.Fluid.Sources.FixedBoundary, any mass flow rate that flows out of the model will be at a user-specified temperature. Therefore, Annex60.Fluid.Sources.FixedBoundary leads to smaller systems of equations, which may result in faster simulation.

Extends from Annex60.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
VolumeV_start Volume of liquid stored in the vessel at the start of the simulation [m3]
PressurepMedium.p_defaultConstant pressure of the expansion vessel [Pa]
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsModelica.Fluid.Types.Dynamic...Type of mass balance: dynamic (3 initialization options) or steady state
RealmSenFac1Factor for scaling the sensible thermal mass of the volume
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_aFluid port

Modelica definition

model ExpansionVessel "Expansion vessel with fixed pressure" extends Annex60.Fluid.Interfaces.LumpedVolumeDeclarations( final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final mSenFac=1); parameter Modelica.SIunits.Volume V_start(start=1) "Volume of liquid stored in the vessel at the start of the simulation"; parameter Modelica.SIunits.Pressure p = Medium.p_default "Constant pressure of the expansion vessel"; Modelica.Fluid.Interfaces.FluidPort_a port_a( redeclare package Medium = Medium) "Fluid port"; Modelica.SIunits.Mass m "Mass of liquid in the vessel"; protected final parameter Medium.ThermodynamicState state_start = Medium.setState_pTX( T=T_start, p=p_start, X=X_start[1:Medium.nXi]) "Medium state at start values"; final parameter Modelica.SIunits.Density rho_start=Medium.density( state=state_start) "Density, used to compute start and guess values"; Modelica.SIunits.Energy H "Internal energy of fluid"; Modelica.SIunits.Mass[Medium.nXi] mXi "Masses of independent components in the fluid"; Modelica.SIunits.Mass[Medium.nC] mC "Masses of trace substances in the fluid"; Medium.ExtraProperty C[Medium.nC](nominal=C_nominal) "Trace substance mixture content"; initial equation m = V_start * rho_start; H = m*Medium.specificInternalEnergy( Medium.setState_pTX(p=p_start, T=T_start, X= X_start[1:Medium.nXi])); mXi = m*X_start[1:Medium.nXi]; mC = m*C_start[1:Medium.nC]; equation assert(m > 1.0E-8, "Expansion vessel is undersized. You need to increase the value of the parameter V_start."); // Conservation equations der(m) = port_a.m_flow; der(H) = port_a.m_flow * actualStream(port_a.h_outflow); der(mXi) = port_a.m_flow * actualStream(port_a.Xi_outflow); der(mC) = port_a.m_flow * actualStream(port_a.C_outflow); // Properties of outgoing flow. // The port pressure is set to a constant value. port_a.p = p_start; m*port_a.h_outflow = H; m*port_a.Xi_outflow = mXi; m*port_a.C_outflow = mC; end ExpansionVessel;

http://iea-annex60.org