Buildings.Templates.Components.Tanks

Tank models

Information

This package contains models for storage and buffer tanks.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Templates.Components.Tanks.Buffer Buffer Buffer tank

Buildings.Templates.Components.Tanks.Buffer Buildings.Templates.Components.Tanks.Buffer

Buffer tank

Buildings.Templates.Components.Tanks.Buffer

Information

Model of a buffer tank based on the instantaneously mixed volume model Buildings.Fluid.MixingVolumes.MixingVolume. Manufacturers recommend tank designs that promote mixing (e.g., with inside baffle plates) because a fully mixed tank yields an effective buffer time greater than a stratified tank. The validation model Buildings.Templates.Components.Validation.Tanks shows that achieving the supply temperature at the tank outlet requires circulating a fluid volume several times greater than the tank's actual volume.

Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model with two ports and declaration of quantities that are used by many models).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
VolumeV Volume [m3]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Configuration
Booleanhave_tantrueSet to true for tank, false for direct pass through
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Dynamics
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Graphics
IntegrationPointicon_pipeBuildings.Templates.Componen...Pipe symbol

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

model Buffer "Buffer tank" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface; parameter Boolean have_tan=true "Set to true for tank, false for direct pass through"; parameter Modelica.Units.SI.Volume V( start=0) "Volume"; // Assumptions parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; parameter Buildings.Templates.Components.Types.IntegrationPoint icon_pipe= Buildings.Templates.Components.Types.IntegrationPoint.None "Pipe symbol"; Buildings.Fluid.MixingVolumes.MixingVolume vol( redeclare final package Medium=Medium, final V=V, final m_flow_nominal=m_flow_nominal, final m_flow_small=m_flow_small, final energyDynamics=energyDynamics, final massDynamics=energyDynamics, final mSenFac=1, final allowFlowReversal=allowFlowReversal, nPorts=2) if have_tan "Tank"; Buildings.Templates.Components.Routing.PassThroughFluid pas( redeclare final package Medium=Medium, final allowFlowReversal=allowFlowReversal) if not have_tan "Direct pass through"; equation connect(port_a, vol.ports[1]); connect(vol.ports[2], port_b); connect(port_a, pas.port_a); connect(pas.port_b, port_b); end Buffer;