Buildings.Fluid.DXSystems.Heating.AirSource.Validation.BaseClasses
Baseclasses for validation models
Information
This package contains base classes that are used in the validation models.Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
![]() |
Baseclass for validation models for single speed DX heating coil |
Buildings.Fluid.DXSystems.Heating.AirSource.Validation.BaseClasses.SingleSpeedHeating
Baseclass for validation models for single speed DX heating coil
Information
This is a baseclass component for the following validation models:
- Buildings.Fluid.DXSystems.Heating.AirSource.Validation.SingleSpeed_OnDemandResistiveDefrost
- Buildings.Fluid.DXSystems.Heating.AirSource.Validation.SingleSpeed_OnDemandReverseCycleDefrost
- Buildings.Fluid.DXSystems.Heating.AirSource.Validation.SingleSpeed_TimedResistiveDefrost
- Buildings.Fluid.DXSystems.Heating.AirSource.Validation.SingleSpeed_TimedReverseCycleDefrost
Parameters
Type | Name | Default | Description |
---|---|---|---|
SingleSpeedHeating | datCoi | Heating coil data record |
Modelica definition
model SingleSpeedHeating
"Baseclass for validation models for single speed DX heating coil"
package Medium = Buildings.Media.Air "Medium model";
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
final p(displayUnit="Pa") = 101325,
final nPorts=1,
final T=294.15)
"Sink";
Buildings.Fluid.DXSystems.Heating.AirSource.SingleSpeed sinSpeDX(
redeclare package Medium = Medium,
final dp_nominal=1141,
final datCoi=datCoi,
final T_start=datCoi.sta[1].nomVal.TEvaIn_nominal,
final from_dp=true,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final dTHys=1e-6) "Single speed DX heating coil";
Buildings.Utilities.IO.BCVTB.From_degC TEvaIn_K
"Converts degC to K";
Buildings.Utilities.IO.BCVTB.From_degC TConIn_K
"Converts degC to K";
Modelica.Blocks.Math.Mean TOutMea(
final f=1/3600)
"Mean of measured outlet air temperature";
Buildings.Utilities.IO.BCVTB.To_degC TOutDegC
"Convert measured outlet air temperature to deg C";
Modelica.Blocks.Sources.RealExpression TOut(
final y=sinSpeDX.vol.T)
"Measured temperature of outlet air";
Modelica.Blocks.Math.Mean XConOutMea(
final f=1/3600)
"Mean of measured outlet air humidity ratio per kg total air";
Modelica.Blocks.Sources.RealExpression XConOut(
final y=sum(sinSpeDX.vol.Xi))
"Measured humidity ratio of outlet air";
Modelica.Blocks.Math.Mean Q_flowMea(
final f=1/3600)
"Mean of cooling rate";
Modelica.Blocks.Math.Mean PMea(
final f=1/3600)
"Mean of power";
Buildings.Controls.OBC.CDL.Discrete.UnitDelay PEPlu(
final samplePeriod=3600)
"Total power consumption from EnergyPlus";
Buildings.Controls.OBC.CDL.Discrete.UnitDelay Q_flowEPlu(
final samplePeriod=3600)
"Heat transfer to airloop from EnergyPlus";
Buildings.Controls.OBC.CDL.Discrete.UnitDelay TOutEPlu(
final samplePeriod=3600)
"Outlet temperature from EnergyPlus";
Buildings.Controls.OBC.CDL.Discrete.UnitDelay XConOutEPlu(
final samplePeriod=3600)
"Outlet air humidity ratio from EnergyPlus";
Buildings.Utilities.Psychrometrics.ToTotalAir toTotAirOut
"Convert humidity ratio per kg dry air to humidity ratio per kg total air for outdoor air";
Buildings.Utilities.Psychrometrics.ToTotalAir toTotAirEPlu
"Convert humidity ratio per kg dry air from EnergyPlus to humidity ratio per kg total air";
Buildings.Controls.OBC.CDL.Discrete.UnitDelay PDefEPlu(
final samplePeriod=3600)
"Defrost power from EnergyPlus";
Buildings.Controls.OBC.CDL.Discrete.UnitDelay PCraEPlu(
final samplePeriod=3600)
"Cranckcase heater power from EnergyPlus";
Modelica.Blocks.Sources.CombiTimeTable datRea(
final tableOnFile=true,
final columns=2:18,
final tableName="EnergyPlus",
final smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments)
"Reader for EnergyPlus example results";
Buildings.Fluid.Sources.MassFlowSource_T boundary(
redeclare package Medium = Medium,
final use_Xi_in=true,
final use_m_flow_in=true,
final use_T_in=true,
final nPorts=1)
"Mass flow source for coil inlet air";
Buildings.Utilities.Psychrometrics.ToTotalAir toTotAirIn
"Convert humidity ratio per kg dry air to humidity ratio per kg total air for coil inlet air";
parameter Buildings.Fluid.DXSystems.Heating.AirSource.Validation.Data.SingleSpeedHeating
datCoi
"Heating coil data record";
Buildings.Utilities.Psychrometrics.Phi_pTX phi
"Conversion to relative humidity";
Modelica.Blocks.Sources.Constant pAtm(final k=101325) "Atmospheric pressure";
Controls.OBC.CDL.Logical.VariablePulse plrToPul(period=3600)
"Convert part load ratio to pulse signal";
equation
connect(sinSpeDX.port_b, sin.ports[1]);
connect(TEvaIn_K.Kelvin, sinSpeDX.TOut);
connect(TOut.y, TOutMea.u);
connect(TOutMea.y, TOutDegC.Kelvin);
connect(XConOut.y,XConOutMea. u);
connect(sinSpeDX.QSen_flow, Q_flowMea.u);
connect(toTotAirEPlu.XiTotalAir, XConOutEPlu.u);
connect(sinSpeDX.P, PMea.u);
connect(datRea.y[1], TEvaIn_K.Celsius);
connect(datRea.y[9], toTotAirOut.XiDry);
connect(datRea.y[17], boundary.m_flow_in);
connect(TConIn_K.Kelvin, boundary.T_in);
connect(toTotAirIn.XiTotalAir, boundary.Xi_in[1]);
connect(datRea.y[5], TConIn_K.Celsius);
connect(datRea.y[6], toTotAirIn.XiDry);
connect(boundary.ports[1], sinSpeDX.port_a);
connect(datRea.y[7], TOutEPlu.u);
connect(datRea.y[8], toTotAirEPlu.XiDry);
connect(datRea.y[3], PEPlu.u);
connect(datRea.y[2], Q_flowEPlu.u);
connect(datRea.y[15], PDefEPlu.u);
connect(datRea.y[16], PCraEPlu.u);
connect(phi.X_w, toTotAirOut.XiTotalAir);
connect(TEvaIn_K.Kelvin, phi.T);
connect(pAtm.y, phi.p);
connect(sinSpeDX.phi, phi.phi);
connect(plrToPul.u, datRea.y[14]);
connect(plrToPul.y, sinSpeDX.on);
end SingleSpeedHeating;