Buildings.Fluid.Storage.Ice.Validation
Package that validates the ice tank model
Information
This package contains examples that validate the ice tank from different data sources.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
Tank | Example that test the tank model |
ExperimentNIST | Validation from experimental data |
Buildings.Fluid.Storage.Ice.Validation.Tank
Example that test the tank model
Information
This example is to verify the ice tank model Buildings.Fluid.Storage.Ice.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Mass | SOC_start | 3/4 | Start value of ice mass in the tank [kg] |
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | 100000 | Pressure difference [Pa] |
Generic | per | per(mIce_max=1/4*2846.35, co... | Tank performance data |
Modelica definition
model Tank "Example that test the tank model"
extends Modelica.Icons.Example;
package Medium = Buildings.Media.Antifreeze.PropyleneGlycolWater (
property_T=293.15,
X_a=0.30) "Fluid medium";
parameter Modelica.Units.SI.Mass SOC_start=3/4
"Start value of ice mass in the tank";
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1
"Nominal mass flow rate";
parameter Modelica.Units.SI.PressureDifference dp_nominal=100000
"Pressure difference";
parameter Buildings.Fluid.Storage.Ice.Data.Tank.Generic per(
mIce_max=1/4*2846.35,
coeCha={1.76953858E-04,0,0,0,0,0},
dtCha=10,
coeDisCha={5.54E-05,-1.45679E-04,9.28E-05,1.126122E-03,-1.1012E-03,3.00544E-04},
dtDisCha=10)
"Tank performance data";
Buildings.Fluid.Storage.Ice.ControlledTank iceTan(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal,
SOC_start=SOC_start,
per=per,
energyDynamicsHex=Modelica.Fluid.Types.Dynamics.FixedInitial);
Buildings.Fluid.Sources.MassFlowSource_T sou(
redeclare package Medium = Medium,
m_flow=2*m_flow_nominal,
use_T_in=true,
nPorts=2);
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=2);
Buildings.Fluid.FixedResistances.PressureDrop res(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=500) "Flow resistance";
Modelica.Blocks.Sources.CombiTimeTable TSou(
table=[
0, 273.15 - 5;
3600*10, 273.15 - 5;
3600*10, 273.15 + 10;
3600*11, 273.15 + 10;
3600*18, 273.15 + 10;
3600*18, 273.15 - 5],
y(each unit="K",
each displayUnit="degC"))
"Source temperature";
Modelica.Blocks.Sources.TimeTable TSet(table=[
0,273.15 -10;
3600*10,273.15 + 8;
3600*11,273.15 + 6;
3600*20,273.15 -12;
3600*24,273.15 +10], y(unit="K", displayUnit="degC"))
"Table with set points for leaving water temperature which will be tracked subject to thermodynamic constraints";
Buildings.Fluid.Storage.Ice.Tank iceTanUnc(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal,
SOC_start=SOC_start,
per=per,
energyDynamicsHex=Modelica.Fluid.Types.Dynamics.FixedInitial)
"Uncontrolled ice tank";
FixedResistances.PressureDrop resUnc(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=500) "Flow resistance";
equation
connect(res.port_b, bou.ports[1]);
connect(TSou.y[1], sou.T_in);
connect(TSet.y, iceTan.TSet);
connect(resUnc.port_b, bou.ports[2]);
connect(iceTan.port_b, res.port_a);
connect(iceTanUnc.port_b, resUnc.port_a);
connect(iceTanUnc.port_a, sou.ports[1]);
connect(iceTan.port_a, sou.ports[2]);
end Tank;