Buildings.Fluid.Storage.Ice.BaseClasses
Base classes for ice tank models
Information
This package contains base classes that are used to construct the models in Buildings.Fluid.Storage.Ice.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
LMTDStar | Normalized log mean temperature difference across the ice storage unit |
NormalizedHeatFlowRate | Charging or discharging rate based on the curves |
QStar | Calculator for q* under charging mode |
StateOfCharge | Mass of ice remaining in the tank |
Tank | Block to compute the tank heat transfer |
calculateLMTDStar | This function calculates the log mean temperature difference for the ice storage unit |
Examples | Examples that test models in the base classes |
Buildings.Fluid.Storage.Ice.BaseClasses.LMTDStar
Normalized log mean temperature difference across the ice storage unit
Information
This subroutine calculates the log mean temperature difference for the detailed ice storage unit using the function Buildings.Fluid.Storage.Ice.BaseClasses.calculateLMTDStar.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Temperature | TFre | 273.15 | Freezing temperature of water or the latent energy storage material [K] |
TemperatureDifference | dT_nominal | 10 | Nominal temperature difference [K] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TIn | Inlet temperature [K] |
input RealInput | TOut | Outlet temperature [K] |
output RealOutput | lmtdSta | Normalized LMTD |
Modelica definition
Buildings.Fluid.Storage.Ice.BaseClasses.NormalizedHeatFlowRate
Charging or discharging rate based on the curves
Information
This blocks calculate the normalized heat transfer rate for the ice tank in charging or discharging mode.
The module use the following logic:
- If
canFreeze
andcanMelt
are bothfalse
: the heat transfer rate is 0 - If
canMelt = true
: the heat transfer rate is the discharging rate calculated using Buildings.Fluid.Storage.Ice.BaseClasses.QStar with coefficients for discharing mode. - If
canFreeze = true
: the heat transfer rate is the charging rate calculated using Buildings.Fluid.Storage.Ice.BaseClasses.QStar with coefficients for charging mode.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | coeCha[6] | Coefficients for charging curve | |
Real | dtCha | Time step of curve fitting data | |
Real | coeDisCha[6] | Coefficients for discharging curve | |
Real | dtDisCha | Time step of curve fitting data |
Connectors
Type | Name | Description |
---|---|---|
output RealOutput | qNor | Normalized heat transfer rate: charging when postive, discharge when negative |
input RealInput | SOC | State of charge |
input RealInput | lmtdSta | LMTD star |
input BooleanInput | canFreeze | Set to true if tank can be charged |
input BooleanInput | canMelt | Set to true if tank can be melted |
Modelica definition
Buildings.Fluid.Storage.Ice.BaseClasses.QStar
Calculator for q* under charging mode
Information
This block calculates the normalized heat transfer rate q* between the chilled water and the ice in the thermal storage tank using
q* Δt = C1 + C2x + C3 x2 + [C4 + C5x + C6 x2]ΔTlmtd*
where Δt is the time step of the data samples used for the curve fitting, C1-6 are the curve fit coefficients, x is the fraction of charging, also known as the state-of-charge, and Tlmtd* is the normalized LMTD calculated using Buildings.Fluid.Storage.Ice.BaseClasses.calculateLMTDStar.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | coeff[6] | Coefficients for qstar curve | |
Real | dt | Time step of curve fitting data |
Connectors
Type | Name | Description |
---|---|---|
input BooleanInput | active | Set to true if this tank mode can be active |
input RealInput | x | SOC for charging, or 1-SOC for discharging [1] |
input RealInput | lmtdSta | Normalized LMTD [1] |
output RealOutput | qNor | Normalized heat transfer rate |
Modelica definition
Buildings.Fluid.Storage.Ice.BaseClasses.StateOfCharge
Mass of ice remaining in the tank
Information
This block calculates the state of charge using
d SOC/dt = Q̇eff/(Hf mice,max)
where SOC is the state of charge, Q̇ is the heat transfer rate of the ice tank, positive for charging and negative for discharging, Hf is the fusion of heat of ice and mice,max is the nominal mass of ice in the storage tank.
The model sets Q̇eff = Q̇, unless the state of charge is 0 or 1, in which case Q̇eff is set to zero if it were to lead to over- or under-charging.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Real | SOC_start | Start value for state of charge [1] | |
Energy | E_nominal | Storage capacity [J] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | Q_flow | Heat transfer rate: positive for charging, negative for discharging [W] |
output RealOutput | QEff_flow | Actual heat flow rate, taking into account 0 ≤ SOC ≤ 1 [W] |
output RealOutput | SOC | State of charge [1] |
Modelica definition
Buildings.Fluid.Storage.Ice.BaseClasses.Tank
Block to compute the tank heat transfer
Information
Model that implements the heat transfer rate between the working fluid and the ice, and that computes the state of charge of the tank.
See Buildings.Fluid.Storage.Ice.Tank for the implemented equations.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Generic | per | redeclare parameter Building... | Performance data |
SpecificHeatCapacity | cp | Specific heat capacity of working fluid [J/(kg.K)] | |
Initialization | |||
Real | SOC_start | Start value for state of charge [1] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TIn | Inlet temperature [K] |
input RealInput | TOut | Outlet temperature [K] |
output RealOutput | Q_flow | Actual heat flow rate, taking into account 0 ≤ SOC ≤ 1 [W] |
output RealOutput | SOC | state of charge [1] |
output RealOutput | mIce | Mass of remaining ice [kg] |
input RealInput | QLim_flow | Limit on heat flow rate due to temperatures and mass flow rate [W] |
Modelica definition
Buildings.Fluid.Storage.Ice.BaseClasses.calculateLMTDStar
This function calculates the log mean temperature difference for the ice storage unit
Information
This subroutine calculates the log mean temperature difference for the detailed ice storage unit. The temperature difference is non-dimensionalized using a nominal temperature difference of 10 Kelvin. This value must be used when obtaining the curve fit coefficients.
The log mean temperature difference is calculated using
Tlmtd* = Tlmtd/Tnom
Tlmtd = (Tin - Tout)/ln((Tin - Tfre)/(Tout - Tfre))
where Tin is the inlet temperature, Tout is the outlet temperature, Tfre is the freezing temperature and Tnom is a nominal temperature difference of 10 Kelvin.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Temperature | TIn | Inlet temperature [K] | |
Temperature | TOut | Outlet temperature [K] | |
Temperature | TFre | 273.15 | Freezing temperature of water or the latent energy storage material [K] |
TemperatureDifference | dT_nominal | 10 | Nominal temperature difference [K] |
Outputs
Type | Name | Description |
---|---|---|
Real | lmtd | Normalized LMTD |