Base classes for validation package
Information
This package contains base classes that are used to construct the models in
Buildings.Fluid.Storage.Ice.Validation.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name |
Description |
PartialChargingDischarging
|
Base example |
Base example
Information
Basic model that is used to validate the tank model.
The performance data record per
contains the data
obtained from experiments of Ojas et al., 2020, and used by Guowen et al., 2021.
Reference
Pradhan, Ojas, et.al. Development and Validation of a Simulation Testbed for the Intelligent Building Agents Laboratory (IBAL) using TRNSYS.
ASHRAE Transactions 126 (2020): 458-466.
Li, Guowen, et al. An Ice Storage Tank Modelica Model: Implementation and Validation. Modelica Conferences. 2021.
doi:10.3384/ecp21181177.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
String | fileName | | Calibration data file |
Real | SOC_start | 0.90996030 | Start value of state of charge |
MassFlowRate | m_flow_nominal | 1 | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | 100000 | Pressure difference [Pa] |
Generic | per | per(mIce_max=2846.35, coeCha... | Performance curve obtained from onsite experiment |
Modelica definition
partial model PartialChargingDischarging
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Antifreeze.PropyleneGlycolWater (
property_T=293.15,
X_a=0.30);
parameter String fileName ;
parameter Real SOC_start=0.90996030
;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=1
;
parameter Modelica.Units.SI.PressureDifference dp_nominal=100000
;
parameter Buildings.Fluid.Storage.Ice.Data.Tank.Generic per(
mIce_max = 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)
;
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,
use_m_flow_in=true,
use_T_in=true,
nPorts=1) ;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=1)
;
Buildings.Fluid.FixedResistances.PressureDrop res(
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
dp_nominal=500)
;
Modelica.Blocks.Sources.CombiTimeTable dat(
tableOnFile=true,
tableName="tab",
columns=2:5,
fileName=fileName)
;
Modelica.Thermal.HeatTransfer.Celsius.ToKelvin TIn
;
Modelica.Thermal.HeatTransfer.Celsius.ToKelvin TOutSet
;
Modelica.Blocks.Math.Add TSet ;
Modelica.Blocks.Sources.Constant offSet(k=0) ;
Sensors.TemperatureTwoPort TOut(
redeclare package Medium = Medium,
allowFlowReversal=false,
m_flow_nominal=m_flow_nominal,
tau=0) ;
equation
connect(sou.ports[1], iceTan.port_a);
connect(res.port_b, bou.ports[1]);
connect(dat.y[3], sou.m_flow_in);
connect(dat.y[1], TIn.Celsius);
connect(TIn.Kelvin, sou.T_in);
connect(dat.y[2], TOutSet.Celsius);
connect(TOutSet.Kelvin, TSet.u1);
connect(offSet.y, TSet.u2);
connect(TSet.y, iceTan.TSet);
connect(iceTan.port_b, TOut.port_a);
connect(TOut.port_b, res.port_a);
end PartialChargingDischarging;