modelStratifiedTankWithCommand

Stratified buffer tank model

Information

This is a four-port tank model based on Buildings.Fluid.Storage.Stratified which includes the following features.

  • The two fluid ports suffixed with Top are connected to the fluid volume at the top of the tank.
  • The two fluid ports suffixed with Bot are connected to the fluid volume at the bottom of the tank.
  • A unique heat port is exposed as an external connector. It is meant to provide a uniform temperature boundary condition at the external surface of the tank (outside insulation).
  • The model outputs the temperature of the fluid volumes at the top and at the bottom of the tank.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.VolumeVTanTank volume
Modelica.Units.SI.LengthhTanHeight of tank (without insulation)
Modelica.Units.SI.LengthdInsThickness of insulation
Modelica.Units.SI.ThermalConductivitykIns0.04Specific heat conductivity of insulation
IntegernSeg3Number of volume segments
BooleanisHotWatTrue if the tank supplies hot water, false for chilled water
Modelica.Units.SI.TemperatureDifferencedTOffSetif tanCha.isHotWat then +1 else -1Offset for set point to have a slightly higher (or lower) temperature than the required supply from the load
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominalNominal mass flow rate
Initialization
Medium.TemperatureT_startMedium.T_defaultTemperature start value

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_genTopTank top port on generation side
Modelica.Fluid.Interfaces.FluidPort_bport_genBotTank bottom port on generation side
Modelica.Fluid.Interfaces.FluidPort_aport_loaBotTank bottom port on load side
Modelica.Fluid.Interfaces.FluidPort_bport_loaTopTank top port on load side
Modelica.Blocks.Interfaces.RealOutputQl_flowHeat loss of tank (positive if heat flows from tank to ambient)
Modelica.Blocks.Interfaces.RealOutputTTopFluid temperature at tank top
Modelica.Blocks.Interfaces.RealOutputTBotFluid temperature at tank bottom
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheaPorAmbHeat port at interface with ambient (outside insulation)
Modelica.Blocks.Interfaces.RealInputTTanSetTank temperature set point, top for hot tank and bottom for cold tank
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutputchargeOutputs true if tank should be charged

Components

TypeNameDefaultDescription
Buildings.Fluid.Storage.StratifiedtanStratified tank
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorsenTBotTank bottom temperature
Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensorsenTTopTank top temperature
Buildings.DHC.ETS.Combined.Controls.TankChargingControllertanChaTank charging command
Buildings.Fluid.FixedResistances.JunctionjunTopFluid junction at top of tank
Buildings.Fluid.FixedResistances.JunctionjunBotFluid junction at bottom of tank

Contents

NameDescription
MediumMedium model

Revisions

  • November 14, 2025, by Michael Wetter:
    Added output for tank charge signal which is used in the ETS supervisory control.
    This is for #4354.
  • July 31, 2020, by Antoine Gautier:
    First implementation.