Package with base classes for Buildings.Fluid.Storage
This package contains base classes that are used to construct the models in Buildings.Fluid.Storage.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Name | Description |
---|---|
Buoyancy | Model to add buoyancy if there is a temperature inversion in the tank |
IndirectTankHeatExchanger | Heat exchanger typically submerged in a fluid with a second fluid circulating through it |
ThirdOrderStratifier | Model to reduce the numerical dissipation in a tank |
Examples | Examples for BaseClasses models |
Model to add buoyancy if there is a temperature inversion in the tank
This model outputs a heat flow rate that can be added to fluid volumes in order to emulate buoyancy during a temperature inversion. For simplicity, this model does not compute a buoyancy induced mass flow rate, but rather a heat flow that has the same magnitude as the enthalpy flow associated with the buoyancy induced mass flow rate.
Extends from Buildings.BaseClasses.BaseIcon (Base icon).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
Volume | V | Volume [m3] | |
Integer | nSeg | 2 | Number of volume segments |
Time | tau | Time constant for mixing [s] |
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model | |
HeatPort_a | heatPort[nSeg] | Heat input into the volumes |
Heat exchanger typically submerged in a fluid with a second fluid circulating through it
This model is a heat exchanger with a moving fluid on one side and a stagnant fluid on the other. It is intended for use when a heat exchanger is submerged in a stagnant fluid. For example, the heat exchanger in a storage tank which is part of a solar thermal system.
This component models the fluid in the heat exchanger, convection between the fluid and the heat exchanger, and convection from the heat exchanger to the surrounding fluid.
The model is based on Buildings.Fluid.HeatExchangers.BaseClasses.HACoilInside and Buildings.Fluid.HeatExchangers.BaseClasses.HANaturalCylinder.
The fluid ports are intended to be connected to a circulated heat transfer fluid while the heat port is intended to be connected to a stagnant fluid.
Extends from Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters (Parameters for flow resistance for models with two ports), Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes), Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).
Type | Name | Default | Description |
---|---|---|---|
replaceable package MediumHex | Modelica.Media.Interfaces.Pa... | Heat transfer fluid flowing through the heat exchanger | |
replaceable package MediumTan | Modelica.Media.Interfaces.Pa... | Heat transfer fluid inside the tank | |
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nSeg | Number of segments in the heat exchanger | |
HeatCapacity | CHex | Capacitance of the heat exchanger [J/K] | |
Volume | volHexFlu | Volume of heat transfer fluid in the heat exchanger [m3] | |
Diameter | dExtHex | Exterior diameter of the heat exchanger pipe [m] | |
Nominal condition | |||
PressureDifference | dp_nominal | Pressure difference [Pa] | |
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
HeatFlowRate | Q_flow_nominal | Heat transfer at nominal conditions [W] | |
Temperature | TTan_nominal | Temperature of fluid inside the tank at UA_nominal [K] | |
Temperature | THex_nominal | Temperature of fluid inside the heat exchanger at UA_nominal [K] | |
Real | r_nominal | 0.5 | Ratio between coil inside and outside convective heat transfer |
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] |
Flow resistance | |||
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 | |||
Equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Dynamics | massDynamics | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state |
Dynamics | energyDynamicsSolid | energyDynamics | Formulation of energy balance for heat exchanger solid mass |
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.) |
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] |
Boolean | homotopyInitialization | true | = true, use homotopy method |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Modeling detail | |||
Boolean | hA_flowDependent | true | Set to false to make the convective heat coefficient calculation of the fluid inside the coil independent of mass flow rate |
Boolean | hA_temperatureDependent | true | Set to false to make the convective heat coefficient calculation of the fluid inside the coil independent of temperature |
Type | Name | Description |
---|---|---|
replaceable package MediumHex | Heat transfer fluid flowing through the heat exchanger | |
replaceable package MediumTan | Heat transfer fluid inside the tank | |
replaceable package Medium | Medium in the component | |
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) |
HeatPort_a | port[nSeg] | Heat port connected to water inside the tank |
Model to reduce the numerical dissipation in a tank
This model reduces the numerical dissipation that is introduced by the standard first-order upwind discretization scheme which is created when connecting fluid volumes in series.
The model is used in conjunction with Buildings.Fluid.Storage.Stratified. It computes a heat flux that needs to be added to each volume of Buildings.Fluid.Storage.Stratified in order to give the results that a third-order upwind discretization scheme (QUICK) would give.
The QUICK method can cause oscillations in the tank temperatures since the high order method introduces numerical dispersion. There are two ways to reduce the oscillations:
alpha
when adding the heat flux into the volume.
hOut[2]
and hOut[nSeg]
. Note: Using it requires nSeg>=4
.
Both approaches are implemented in the model.
The model is used by Buildings.Fluid.Storage.StratifiedEnhanced.
The model requires at least 4 fluid segments. Hence, set nSeg
to 4 or higher.
Extends from Buildings.BaseClasses.BaseIcon (Base icon).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
MassFlowRate | m_flow_small | Small mass flow rate for regularization of zero flow [kg/s] | |
Integer | nSeg | Number of volume segments | |
Real | alpha | 0.5 | Under-relaxation coefficient (1: QUICK; 0: 1st order upwind) |
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model | |
HeatPort_a | heatPort[nSeg] | Heat input into the volumes |
input RealInput | m_flow | Mass flow rate from port a to port b |
input RealInput | H_flow[nSeg + 1] | Enthalpy flow between the volumes |
FluidPort_a | fluidPort[nSeg + 2] | Fluid port, needed to get pressure, temperature and species concentration |