Buildings.ThermalZones.Detailed.Validation.BaseClasses

Package with base classes for Buildings.ThermalZones.Detailed.Validation

Information

This package contains base classes that are used to construct the models in Buildings.ThermalZones.Detailed.Validation.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloor SingleZoneFloor Model of a building floor as a single zone
Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloorHeater SingleZoneFloorHeater A model with an ideal heater, a fan, a PI controller and an integrator

Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloor Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloor

Model of a building floor as a single zone

Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloor

Information

This model assumes a mid-floor of a building as a single zone with a homogeneous temperature; i.e., the air in the whole floor is assumed to be fully mixed.

The geometry, materials and constructions of the model are consistent with those of Buildings.Examples.VAVReheat.BaseClasses.Floor, which models the same mid-floor as five zones: a core zone and four perimeter zones.

The internal partition walls in the five-zone floor model are considered as thermal mass in this single-zone floor model. The doors in the five-zone floor model have been removed in the single-zone floor model.

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model for air
Anglelat Latitude [rad]
VolumeVRoo4555.7Room volum [m3]
HeighthRoo2.74Room height [m]
LengthhWin1.5Height of windows [m]
RealwinWalRat0.33Window to wall ratio for exterior walls
PlywoodmatWoomatWoo(x=0.01, k=0.11, d=544...Wood for exterior construction
ConcretematConmatCon(x=0.1, k=1.311, c=836...Concrete
GenericmatInsmatIns(x=0.087, k=0.049, c=8...Steelframe construction with insulation
GypsumBoardmatGypmatGyp(x=0.0127, k=0.16, c=8...Gypsum board
GypsumBoardmatGyp2matGyp2(x=0.025, k=0.16, c=8...Gypsum board
PlywoodmatFurmatFur(x=0.15, nStaRef=5)Material for furniture
PlywoodmatCarTramatCarTra(x=0.215/0.11, k=0....Wood for floor
CarpetmatCar Carpet
DoubleClearAir13ClearglaSysglaSys(UFra=2, shade=Buildin...Data record for the glazing system
GenericconExtWalconExtWal(final nLay=3, mate...Exterior construction
GenericconIntWalconIntWal(final nLay=1, mate...Interior wall construction
GenericconFloconFlo(final nLay=1, materia...Floor construction (opa_a is carpet)
GenericconFurconFur(final nLay=1, materia...Construction for internal mass of furniture
Booleanuse_windPressuretrueSet to true to enable wind pressure

Connectors

TypeNameDescription
replaceable package MediumMedium model for air
VesselFluidPorts_bports[2]Fluid inlets and outlets
output RealOutputTRooAirRoom air temperature [K]
output RealOutputp_relRelative pressure signal of building static pressure
BusweaBusWeather data bus

Modelica definition

model SingleZoneFloor "Model of a building floor as a single zone" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium model for air"; parameter Modelica.SIunits.Angle lat "Latitude"; parameter Modelica.SIunits.Volume VRoo = 4555.7 "Room volum"; parameter Modelica.SIunits.Height hRoo = 2.74 "Room height"; parameter Modelica.SIunits.Length hWin = 1.5 "Height of windows"; parameter Real winWalRat(min=0.01,max=0.99) = 0.33 "Window to wall ratio for exterior walls"; parameter Buildings.HeatTransfer.Data.Solids.Plywood matWoo( x=0.01, k=0.11, d=544, nStaRef=1) "Wood for exterior construction"; parameter Buildings.HeatTransfer.Data.Solids.Concrete matCon( x=0.1, k=1.311, c=836, nStaRef=5) "Concrete"; parameter Buildings.HeatTransfer.Data.Solids.Generic matIns( x=0.087, k=0.049, c=836.8, d=265, nStaRef=5) "Steelframe construction with insulation"; parameter Buildings.HeatTransfer.Data.Solids.GypsumBoard matGyp( x=0.0127, k=0.16, c=830, d=784, nStaRef=2) "Gypsum board"; parameter Buildings.HeatTransfer.Data.Solids.GypsumBoard matGyp2( x=0.025, k=0.16, c=830, d=784, nStaRef=2) "Gypsum board"; parameter Buildings.HeatTransfer.Data.Solids.Plywood matFur(x=0.15, nStaRef=5) "Material for furniture"; parameter Buildings.HeatTransfer.Data.Solids.Plywood matCarTra( x=0.215/0.11, k=0.11, d=544, nStaRef=1) "Wood for floor"; parameter Buildings.HeatTransfer.Data.Resistances.Carpet matCar "Carpet"; parameter Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys( UFra=2, shade=Buildings.HeatTransfer.Data.Shades.Gray(), haveInteriorShade=false, haveExteriorShade=false) "Data record for the glazing system"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic conExtWal( final nLay=3, material={matWoo,matIns,matGyp}) "Exterior construction"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic conIntWal( final nLay=1, material={matGyp2}) "Interior wall construction"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic conFlo( final nLay=1, material={matCon}) "Floor construction (opa_a is carpet)"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic conFur( final nLay=1, material={matFur}) "Construction for internal mass of furniture"; parameter Boolean use_windPressure=true "Set to true to enable wind pressure"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b ports[2]( redeclare package Medium = Medium) "Fluid inlets and outlets"; Modelica.Blocks.Interfaces.RealOutput TRooAir( unit="K", displayUnit="degC") "Room air temperature"; Modelica.Blocks.Interfaces.RealOutput p_rel "Relative pressure signal of building static pressure"; Buildings.ThermalZones.Detailed.MixedAir flo( redeclare package Medium = Medium, lat=lat, AFlo=AFlo, hRoo=hRoo, nConExt=0, nConExtWin=4, datConExtWin( layers={conExtWal,conExtWal,conExtWal,conExtWal}, A={49.91*hRoo,49.91*hRoo,33.27*hRoo,33.27*hRoo}, glaSys={glaSys,glaSys,glaSys,glaSys}, wWin={winWalRat/hWin*49.91*hRoo,winWalRat/hWin*49.91*hRoo,winWalRat/hWin*33.27 *hRoo,winWalRat/hWin*33.27*hRoo}, each hWin=hWin, fFra={0.1,0.1,0.1,0.1}, til={Z_,Z_,Z_,Z_}, azi={N_,S_,W_,E_}), nConPar=3, datConPar( layers={conFlo,conFur,conIntWal}, A={AFlo,AFlo*2,(6.47*2 + 40.76 + 24.13)*2*hRoo}, til={F_,Z_,Z_}), nConBou=0, nSurBou=0, nPorts=7, intConMod=Buildings.HeatTransfer.Types.InteriorConvection.Temperature, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Floor"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAir "Air temperature sensor"; Buildings.Fluid.Sensors.RelativePressure senRelPre( redeclare package Medium = Medium) "Building pressure measurement"; Buildings.Fluid.Sources.Outside out( nPorts=1, redeclare package Medium = Medium) "Outdoor air"; Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaSou( redeclare package Medium = Medium, VRoo=568.77, s=49.91/33.27, azi=S_, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaEas( redeclare package Medium = Medium, VRoo=360.0785, s=33.27/49.91, azi=E_, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaNor( redeclare package Medium = Medium, VRoo=568.77, s=49.91/33.27, azi=N_, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaWes( redeclare package Medium = Medium, VRoo=360.0785, s=33.27/49.91, azi=W_, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Modelica.Blocks.Sources.CombiTimeTable intGaiFra( table=[0,0.05; 8,0.05; 9,0.9; 12,0.9; 12,0.8; 13,0.8; 13,1; 17,1; 19,0.1; 24,0.05], timeScale=3600, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) "Fraction of internal heat gain"; Modelica.Blocks.Math.MatrixGain gai(K=10*[0.4; 0.4; 0.2]) "Matrix gain to split up heat gain in radiant, convective and latent gain"; Modelica.Blocks.Sources.Constant uSha(k=0) "Control signal for the shading device"; Modelica.Blocks.Routing.Replicator replicator(nout=1) "Shading signals for all windows"; protected parameter Modelica.SIunits.Angle S_= Buildings.Types.Azimuth.S "Azimuth for south walls"; parameter Modelica.SIunits.Angle E_= Buildings.Types.Azimuth.E "Azimuth for east walls"; parameter Modelica.SIunits.Angle W_= Buildings.Types.Azimuth.W "Azimuth for west walls"; parameter Modelica.SIunits.Angle N_= Buildings.Types.Azimuth.N "Azimuth for north walls"; parameter Modelica.SIunits.Angle F_= Buildings.Types.Tilt.Floor "Tilt for floor"; parameter Modelica.SIunits.Angle Z_= Buildings.Types.Tilt.Wall "Tilt for wall"; parameter Modelica.SIunits.Area AFlo = VRoo/hRoo "Floor area"; equation connect(flo.weaBus, weaBus); connect(flo.heaPorAir, temAir.port); connect(out.weaBus, weaBus); connect(out.ports[1], senRelPre.port_b); connect(temAir.T, TRooAir); connect(weaBus, leaSou.weaBus); connect(weaBus, leaEas.weaBus); connect(leaNor.weaBus, weaBus); connect(leaSou.port_b, flo.ports[1]); connect(leaEas.port_b, flo.ports[2]); connect(leaNor.port_b, flo.ports[3]); connect(leaWes.port_b, flo.ports[4]); connect(senRelPre.port_a, flo.ports[5]); connect(weaBus, leaWes.weaBus); connect(senRelPre.p_rel, p_rel); connect(intGaiFra.y, gai.u); connect(gai.y, flo.qGai_flow); connect(uSha.y, replicator.u); connect(replicator.y, flo.uSha); connect(ports[1], flo.ports[6]); connect(ports[2], flo.ports[7]); end SingleZoneFloor;

Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloorHeater Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloorHeater

A model with an ideal heater, a fan, a PI controller and an integrator

Buildings.ThermalZones.Detailed.Validation.BaseClasses.SingleZoneFloorHeater

Information

This model includes an ideal heater, a fan, a PI controller and an integrator for the heating energy. It is used in the validation model Buildings.ThermalZones.Detailed.Validation.SingleZoneFloorWithHeating.

Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
VolumeVRoo Room air volume [m3]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
replaceable package MediumMedium model for air
input RealInputTSetRooRoom setpoint temperature [K]
output RealOutputyEHeaHeating energy [J]
input RealInputTRooMeaMeasured room temperature [K]

Modelica definition

model SingleZoneFloorHeater "A model with an ideal heater, a fan, a PI controller and an integrator" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium model for air"; parameter Modelica.SIunits.Volume VRoo "Room air volume"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal "Nominal mass flowrate"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSetRoo( unit="K", displayUnit="degC") "Room setpoint temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput yEHea( unit="J") "Heating energy"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TRooMea( unit="K", displayUnit="degC") "Measured room temperature"; Buildings.Controls.OBC.CDL.Continuous.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, Ti=900, u_s(unit="K", displayUnit="degC"), u_m(unit="K", displayUnit="degC")) "Controller for heater"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar( p=273.15 + 10, k=20, y(unit="K", displayUnit="degC")) "Compute the leaving water setpoint temperature"; Fluid.HeatExchangers.Heater_T hea( redeclare final package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=200, show_T=true) "Ideal heater"; Fluid.Movers.FlowControlled_m_flow fan( redeclare package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal=m_flow_nominal, inputType=Buildings.Fluid.Types.InputType.Constant, nominalValuesDefineDefaultPressureCurve=true) "Fan"; Modelica.Blocks.Continuous.Integrator EHea "Heating energy"; equation connect(hea.Q_flow, EHea.u); connect(addPar.y, hea.TSet); connect(conPID.y, addPar.u); connect(fan.port_b, hea.port_a); connect(TRooMea, conPID.u_m); connect(TSetRoo, conPID.u_s); connect(EHea.y, yEHea); connect(port_a, fan.port_a); connect(hea.port_b, port_b); end SingleZoneFloorHeater;