Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse

Package with examples that illustrate the use of the EnergyPlus objects

Information

This package contains example models that illustrate the use of the EnergyPlus objects. All example models use an EnergyPlus model for a single family house. The house has one conditioned zone, an unconditioned living room, and a garage.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.AirHeating AirHeating Example model with an air-based heating system that conditions a thermal zone in EnergyPlus
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.EquipmentSchedule EquipmentSchedule Example model with a schedule that overrides a schedule in EnergyPlus
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.HeatPumpRadiantHeatingGroundHeatTransfer HeatPumpRadiantHeatingGroundHeatTransfer Example model with one thermal zone with a radiant floor and ground heat transfer modeled in Modelica
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.LightsControl LightsControl Example model with one actuator that controls the lights in EnergyPlus
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TRoom RadiantHeatingCooling_TRoom Example model with one thermal zone with a radiant floor where the cooling is controlled based on the room air temperature
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TSurface RadiantHeatingCooling_TSurface Example model with one thermal zone with a radiant floor where the cooling is controlled based on the surface temperature set point
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Radiator Radiator Example model with an radiator that conditions a thermal zone in EnergyPlus
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.ShadeControl ShadeControl Example model with one actuator that controls a shade in EnergyPlus
Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned Unconditioned Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.AirHeating Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.AirHeating

Example model with an air-based heating system that conditions a thermal zone in EnergyPlus

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.AirHeating

Information

Example of one building with one thermal zone in which the room air temperature is controlled with a PI controller. Heating is provided through recirculated air. The control output is used to compute the set point for the supply air temperature, which is met by the heating coil. The setpoint for the room air temperature changes between day and night. The fan is either off, or operating on stage 1 or 2, depending on the output of the room temperature controller. The zone also has a constant air infiltration flow rate.

Note that for simplicity, the model has no cooling system. Therefore, in summer, the house overheats.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatemOut_flow_nominal0.3*VRoo*1.2/3600Outdoor air mass flow rate, assuming constant infiltration air flow rate [kg/s]
MassFlowRatemRec_flow_nominal8*VRoo*1.2/3600Nominal mass flow rate for recirculated air [kg/s]

Modelica definition

model AirHeating "Example model with an air-based heating system that conditions a thermal zone in EnergyPlus" extends Modelica.Icons.Example; package Medium=Buildings.Media.Air "Medium model"; inner Building building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse_TwoSpeed_ZoneAirBalance/SingleFamilyHouse_TwoSpeed_ZoneAirBalance.idf"), weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), epwName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"), computeWetBulbTemperature=false) "Building model"; constant Modelica.Units.SI.Volume VRoo=453.138 "Room volume"; constant Modelica.Units.SI.Area AFlo=185.834 "Floor area of the whole floor of the building"; parameter Modelica.Units.SI.MassFlowRate mOut_flow_nominal=0.3*VRoo*1.2/3600 "Outdoor air mass flow rate, assuming constant infiltration air flow rate"; parameter Modelica.Units.SI.MassFlowRate mRec_flow_nominal=8*VRoo*1.2/3600 "Nominal mass flow rate for recirculated air"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zon( redeclare package Medium=Medium, zoneName="LIVING ZONE", nPorts=4) "Thermal zone"; Fluid.Movers.FlowControlled_m_flow fan( redeclare package Medium=Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal=mRec_flow_nominal, nominalValuesDefineDefaultPressureCurve=true) "Fan"; Controls.OBC.CDL.Reals.Sources.Pulse TSet( shift( displayUnit="h")=21600, amplitude=6, period( displayUnit="d")=86400, offset=273.15+16, y(unit="K", displayUnit="degC")) "Setpoint for room air"; Controls.OBC.CDL.Reals.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, k=1, Ti( displayUnit="min")=1800, yMax=1, yMin=0, u_s( unit="K", displayUnit="degC"), u_m( unit="K", displayUnit="degC")) "Controller for heater"; Fluid.HeatExchangers.Heater_T hea( redeclare final package Medium=Medium, m_flow_nominal=mRec_flow_nominal, dp_nominal=200, tau=0, show_T=true) "Ideal heater"; Fluid.Sources.Boundary_pT pAtm( redeclare package Medium=Medium, nPorts=1) "Boundary condition"; Fluid.FixedResistances.PressureDrop duc( redeclare package Medium=Medium, allowFlowReversal=false, linearized=true, from_dp=true, dp_nominal=100, m_flow_nominal=mOut_flow_nominal) "Duct resistance (to decouple room and outside pressure)"; Fluid.Sources.MassFlowSource_WeatherData freshAir( redeclare package Medium=Medium, m_flow=mOut_flow_nominal, nPorts=1) "Outside air supply"; Controls.OBC.CDL.Reals.Hysteresis sta1( uLow=0.05, uHigh=0.5) "Hysteresis to switch on stage 1"; Controls.OBC.CDL.Conversions.BooleanToReal mSetFan1_flow( realTrue=mRec_flow_nominal/2) "Mass flow rate for 1st stage"; Controls.OBC.CDL.Reals.Hysteresis sta2( uLow=0.5, uHigh=0.75) "Hysteresis to switch on stage 2"; Controls.OBC.CDL.Conversions.BooleanToReal mSetFan2_flow( realTrue=mRec_flow_nominal/2) "Mass flow rate added for 2nd stage"; Controls.OBC.CDL.Reals.Add m_fan_set "Mass flow rate for fan"; Controls.OBC.CDL.Reals.Add TAirLvgSet "Set point temperature for air leaving the heater"; Controls.OBC.CDL.Reals.AddParameter TSupMin( p=2) "Minimum supply air temperature"; Modelica.Blocks.Sources.Constant qIntGai[3](each k=0) "Internal heat gains, set to zero because these are modeled in EnergyPlus"; Controls.OBC.CDL.Reals.MultiplyByParameter gai(final k=8) "Gain factor"; initial equation // Stop simulation if the hard-coded values differ from the ones computed by EnergyPlus. assert( abs( VRoo-zon.V) < 0.01, "Zone volume VRoo differs from volume returned by EnergyPlus."); assert( abs( AFlo-zon.AFlo) < 0.01, "Zone floor area AFlo differs from area returned by EnergyPlus."); equation connect(TSet.y,conPID.u_s); connect(conPID.u_m,zon.TAir); connect(fan.port_b,hea.port_a); connect(building.weaBus,freshAir.weaBus); connect(duc.port_a,zon.ports[1]); connect(freshAir.ports[1],zon.ports[2]); connect(fan.port_a,zon.ports[3]); connect(hea.port_b,zon.ports[4]); connect(duc.port_b,pAtm.ports[1]); connect(conPID.y,sta1.u); connect(sta1.y,mSetFan1_flow.u); connect(conPID.y,sta2.u); connect(sta2.y,mSetFan2_flow.u); connect(mSetFan2_flow.y,m_fan_set.u1); connect(mSetFan1_flow.y,m_fan_set.u2); connect(m_fan_set.y,fan.m_flow_in); connect(TAirLvgSet.y,hea.TSet); connect(zon.TAir,TSupMin.u); connect(TSupMin.y,TAirLvgSet.u2); connect(zon.qGai_flow, qIntGai.y); connect(conPID.y, gai.u); connect(gai.y, TAirLvgSet.u1); end AirHeating;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.EquipmentSchedule Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.EquipmentSchedule

Example model with a schedule that overrides a schedule in EnergyPlus

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.EquipmentSchedule

Information

Example model that demonstrates how to override a schedule in EnergyPlus. The model overrides the EnergyPlus schedule INTERMITTENT, which is used by EnergyPlus to control the equipment in the thermal zone.

Extends from Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned (Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus).

Parameters

TypeNameDefaultDescription
VolumeVRoo453.1Room volume [m3]
MassFlowRatem_flow_nominalVRoo*1.2*0.3/3600Nominal mass flow rate [kg/s]

Modelica definition

model EquipmentSchedule "Example model with a schedule that overrides a schedule in EnergyPlus" extends Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned; Buildings.ThermalZones.EnergyPlus_9_6_0.Schedule schInt( name="INTERMITTENT", unit=Buildings.ThermalZones.EnergyPlus_9_6_0.Types.Units.Normalized) "Block that writes to the EnergyPlus schedule INTERMITTENT"; Buildings.Controls.OBC.CDL.Reals.Sources.Pulse intLoaFra( shift( displayUnit="h")=25200, period( displayUnit="d")=86400) "Schedule for fraction of internal loads"; equation connect(schInt.u,intLoaFra.y); end EquipmentSchedule;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.HeatPumpRadiantHeatingGroundHeatTransfer Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.HeatPumpRadiantHeatingGroundHeatTransfer

Example model with one thermal zone with a radiant floor and ground heat transfer modeled in Modelica

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.HeatPumpRadiantHeatingGroundHeatTransfer

Information

Model that uses EnergyPlus for the simulation of a building with one thermal zone that has a radiant floor, used for heating. The EnergyPlus model has one conditioned zone that is above ground. This conditioned zone has an unconditioned attic. Heating is provided with a geothermal heat pump and a radiant floor. The heat pump is controlled to track a set point of the water temperature that leaves the radiant slab. Hence, the control is cascading: First, the set point temperature for the water that leaves the radiant slab is calculated based on the operative room temperature control error, and this set point is used to regulate the heat pump speed to track the water temperature that leaves the radiant slab. The heat pump system is switched off from 5:00 to 7:00, which illustrates how to block operation for example because electricity use needs to be reduced during these hours. However, the model does not preheat the slab prior to this period.

To the right of the thermal zone is a block that computes the operative room temperature. The operative temperature calculation uses as input the room air temperature and the radiative temperature of the zone. The radiative temperature is fed into a first order filter before it is used to compute the operative temperature. This is because the EnergyPlus coupling samples the radiative temperature. Without this filter, the operative temperature used in the controller would have a discrete jump at every EnergyPlus time step, and this jump would be propagated through the controller, which would yield jumps in the output of the controller.

This model has no cooling and hence will overheat in summer. See Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TRoom for a model that also has cooling.

The next section explains how the radiant floor is configured.

Coupling of radiant floor to EnergyPlus model

The radiant floor is modeled in the instance slaFlo at the bottom of the schematic model view, using the model Buildings.Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab. This instance models the heat transfer from surface of the floor to the lower surface of the slab. In this example, the construction is defined by the instance layFlo. (See the Buildings.Fluid.HeatExchangers.RadiantSlabs.UsersGuide for how to configure a radiant slab.) In this example, the surface slaFlo.surf_a is connected to the instance flo. This connection is made by measuring the surface temperture, sending this as an input to livFlo, and setting the heat flow rate at the surface from the instance livFlo to the surface slaFlo.surf_a.

The underside of the slab is connected to the heat conduction model soi which computes the heat transfer to the soil because this building has no basement.

Extends from Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned (Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus).

Parameters

TypeNameDefaultDescription
VolumeVRoo453.1Room volume [m3]
MassFlowRatem_flow_nominalVRoo*1.2*0.3/3600Nominal mass flow rate [kg/s]
HeatFlowRateQHea_flow_nominal12000Nominal heat flow rate for heating [W]
MassFlowRatemHea_flow_nominalQHea_flow_nominal/4200/5Design water mass flow rate for heating [kg/s]
MassFlowRatemBor_flow_nominalmHea_flow_nominal*(1 - 1/4)*...Design water mass flow rate for heating [kg/s]
GenericlayFlolayFlo(nLay=3, material={Bui...Material layers from surface a to b (8cm concrete, 20 cm insulation, 20 cm concrete)
Genericsoilsoil(x=2, k=1.3, c=800, d=15...Soil properties

Modelica definition

model HeatPumpRadiantHeatingGroundHeatTransfer "Example model with one thermal zone with a radiant floor and ground heat transfer modeled in Modelica" extends Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned; package MediumW=Buildings.Media.Water "Water medium"; package MediumG=Buildings.Media.Antifreeze.EthyleneGlycolWater(property_T=293.15, X_a=0.40) "Water glycol"; constant Modelica.Units.SI.Area AFlo=185.8 "Floor area"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal=12000 "Nominal heat flow rate for heating"; parameter Modelica.Units.SI.MassFlowRate mHea_flow_nominal=QHea_flow_nominal/ 4200/5 "Design water mass flow rate for heating"; parameter Modelica.Units.SI.MassFlowRate mBor_flow_nominal=mHea_flow_nominal*(1-1/4)*4200/3500 "Design water mass flow rate for heating"; parameter HeatTransfer.Data.OpaqueConstructions.Generic layFlo( nLay=3, material={ Buildings.HeatTransfer.Data.Solids.Concrete(x=0.08), Buildings.HeatTransfer.Data.Solids.InsulationBoard(x=0.20), Buildings.HeatTransfer.Data.Solids.Concrete(x=0.2)}) "Material layers from surface a to b (8cm concrete, 20 cm insulation, 20 cm concrete)"; parameter HeatTransfer.Data.Solids.Generic soil( x=2, k=1.3, c=800, d=1500) "Soil properties"; Buildings.ThermalZones.EnergyPlus_9_6_0.ZoneSurface livFlo( surfaceName="Living:Floor") "Surface of living room floor"; Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab slaFlo( redeclare package Medium=MediumW, allowFlowReversal=false, layers=layFlo, iLayPip=1, pipe=Fluid.Data.Pipes.PEX_DN_15(), sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor, disPip=0.15, nCir=3, A=AFlo, m_flow_nominal=mHea_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, from_dp=true, show_T=true) "Slab for floor with embedded pipes, connected to soil"; Fluid.Sources.Boundary_ph pre( redeclare package Medium=MediumW, p(displayUnit="Pa")=300000, nPorts=1) "Pressure boundary condition"; HeatTransfer.Sources.PrescribedHeatFlow preHeaLivFlo "Surface heat flow rate"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TSurLivFlo "Surface temperature for floor of living room"; Controls.OBC.CDL.Reals.Sources.Constant TSetRooHea(k( final unit="K", displayUnit="degC") = 293.15, y(final unit="K", displayUnit="degC")) "Room temperture set point for heating"; Fluid.Movers.SpeedControlled_y pum( redeclare package Medium=MediumW, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, per( pressure( V_flow=2*{0,mHea_flow_nominal}/1000, dp=2*{14000,0}), speed_nominal, constantSpeed, speeds), inputType=Buildings.Fluid.Types.InputType.Continuous) "Pump"; HeatTransfer.Conduction.SingleLayer soi( A=AFlo, material=soil, steadyStateInitial=true, stateAtSurface_a=false, stateAtSurface_b=false, T_a_start=283.15, T_b_start=283.75) "2m deep soil (per definition on p.4 of ASHRAE 140-2007)"; Modelica.Thermal.HeatTransfer.Sources.FixedTemperature TSoi( T=293.15) "Boundary condition for construction"; Controls.OBC.RadiantSystems.Heating.HighMassSupplyTemperature_TRoom conHea( TSupSet_max=328.15, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.P, k=2, Ti=7200, Td=600) "Controller for radiant heating system"; Controls.OBC.CDL.Reals.PIDWithReset conSup( final controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, k=4, Ti(displayUnit="min") = 60, r=10, final yMax=1, final yMin=0.2, final reverseActing=true, y_reset=0.2) "Controller for heat pump"; Controls.OBC.CDL.Reals.Switch swiHeaPum "Switch for heat pump signal"; Controls.OBC.CDL.Reals.Sources.Constant off( final k = 0) "Output 0 to switch heater off"; Fluid.HeatPumps.ScrollWaterToWater heaPum( redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumG, allowFlowReversal1=false, allowFlowReversal2=false, m1_flow_nominal=mHea_flow_nominal, m2_flow_nominal=mBor_flow_nominal, show_T=true, dp1_nominal=10000, dp2_nominal=10000, scaling_factor=1.3*QHea_flow_nominal/12000, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, enable_temperature_protection=true, TEvaMin=268.15, datHeaPum= Buildings.Fluid.HeatPumps.Data.ScrollWaterToWater.Heating.ClimateMaster_TMW036_12kW_4_90COP_R410A()) "Heat pump"; Fluid.Movers.SpeedControlled_y pumBor( redeclare package Medium = MediumG, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, per( pressure(V_flow=2*{0,mBor_flow_nominal}/1000, dp=2*{60000+10000,0}), speed_nominal, constantSpeed, speeds), inputType=Buildings.Fluid.Types.InputType.Continuous) "Pump"; Fluid.Geothermal.Boreholes.UTube borHol( redeclare package Medium = MediumG, hBor=200, dp_nominal=60000, dT_dz=0.0015, samplePeriod=604800, m_flow_nominal=mBor_flow_nominal, redeclare parameter HeatTransfer.Data.BoreholeFillings.Bentonite matFil, redeclare parameter HeatTransfer.Data.Soil.Sandstone matSoi, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Borehole heat exchanger"; Fluid.Sources.Boundary_ph pre1( redeclare package Medium = MediumG, p(displayUnit="Pa") = 300000, nPorts=1) "Pressure boundary condition"; Modelica.Blocks.Math.Add TOpe( k1=0.5, k2=0.5, u1(final unit="K", displayUnit="degC"), u2(final unit="K", displayUnit="degC"), y(final unit="K", displayUnit="degC")) "Operative temperature"; Modelica.Blocks.Sources.RealExpression QCon(y=heaPum.QCon_flow) "Condenser heat flow rate"; Modelica.Blocks.Sources.RealExpression PEle1(y=heaPum.P + pum.P + pumBor.P) "Electricity use"; Modelica.Blocks.Continuous.Integrator EHea( k(final unit="1/m2")=1/AFlo, initType=Modelica.Blocks.Types.Init.InitialState, y_start=0, u(final unit="W"), y(final unit="J/m2", displayUnit="kW.h/m2")) "Produced heat per unit area of floor"; Modelica.Blocks.Continuous.Integrator EEle( k(final unit="1/m2")=1/AFlo, initType=Modelica.Blocks.Types.Init.InitialState, y_start=1E-10, u(final unit="W"), y(final unit="J/m2", displayUnit="kW.h/m2")) "Electricity use per floor area"; Controls.OBC.CDL.Reals.Divide COP "Coefficient of performance"; Controls.OBC.CDL.Logical.Sources.Pulse ava( width=22/24, period=24*3600, shift=7*3600) "Availability schedule to block heat pump operation in early morning (assuming grid is at capacity)"; Controls.OBC.CDL.Reals.Switch swiPum "Switch for circulation pumps"; Controls.OBC.CDL.Logical.And onHeaPum "On/off signal for heat pump"; Fluid.Sensors.TemperatureTwoPort senTemSup( redeclare package Medium = MediumW, allowFlowReversal=false, m_flow_nominal=mHea_flow_nominal, tau=0, transferHeat=true) "Water supply temperature"; Modelica.Blocks.Continuous.FirstOrder firOrdTRad( T(displayUnit="min") = 600, initType=Modelica.Blocks.Types.Init.SteadyState, y_start( unit="K", displayUnit="degC") = 293.15, u( final unit="K", displayUnit="degC"), y(final unit="K", displayUnit="degC")) "First order filter to avoid step change in radiative temperature after EnergyPlus sampling"; initial equation // The floor area can be obtained from EnergyPlus, but it is a structural parameter used to // size the system and therefore we hard-code it here. assert( abs( AFlo-zon.AFlo) < 0.1, "Floor area AFlo differs from EnergyPlus floor area."); equation connect(livFlo.Q_flow,preHeaLivFlo.Q_flow); connect(preHeaLivFlo.port,slaFlo.surf_a); connect(TSurLivFlo.port,slaFlo.surf_a); connect(TSurLivFlo.T,livFlo.T); connect(TSoi.port,soi.port_a); connect(soi.port_b,slaFlo.surf_b); connect(conHea.TSupSet, conSup.u_s); connect(conSup.y, swiHeaPum.u1); connect(off.y, swiHeaPum.u3); connect(pum.port_b, heaPum.port_a1); connect(swiHeaPum.y, heaPum.y); connect(borHol.port_b, pumBor.port_a); connect(pumBor.port_b, heaPum.port_a2); connect(heaPum.port_b2, borHol.port_a); connect(pre1.ports[1], borHol.port_a); connect(slaFlo.port_b, pre.ports[1]); connect(zon.TAir, TOpe.u1); connect(EHea.u, QCon.y); connect(EEle.u, PEle1.y); connect(EEle.y, COP.u2); connect(EHea.y, COP.u1); connect(conHea.yPum, swiPum.u1); connect(ava.y, swiPum.u2); connect(swiPum.y, pum.y); connect(swiPum.y, pumBor.y); connect(conHea.on, onHeaPum.u1); connect(onHeaPum.y, swiHeaPum.u2); connect(ava.y, onHeaPum.u2); connect(swiPum.u3, off.y); connect(onHeaPum.y, conSup.trigger); connect(slaFlo.port_a, senTemSup.port_b); connect(senTemSup.port_a, heaPum.port_b1); connect(senTemSup.T, conSup.u_m); connect(TSetRooHea.y, conHea.TRooSet); connect(TOpe.u2, firOrdTRad.y); connect(zon.TRad, firOrdTRad.u); connect(TOpe.y, conHea.TRoo); connect(slaFlo.port_b, pum.port_a); end HeatPumpRadiantHeatingGroundHeatTransfer;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.LightsControl Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.LightsControl

Example model with one actuator that controls the lights in EnergyPlus

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.LightsControl

Information

Example of a building that uses an EMS actuator to assign the lighting power in EnergyPlus. The lights are on 30 minutes before sunset, and remain on until 22:00.

Extends from Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned (Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus).

Parameters

TypeNameDefaultDescription
VolumeVRoo453.1Room volume [m3]
MassFlowRatem_flow_nominalVRoo*1.2*0.3/3600Nominal mass flow rate [kg/s]

Modelica definition

model LightsControl "Example model with one actuator that controls the lights in EnergyPlus" extends Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned; Buildings.ThermalZones.EnergyPlus_9_6_0.Actuator actLig( unit=Buildings.ThermalZones.EnergyPlus_9_6_0.Types.Units.Power, variableName="LIVING ZONE Lights", componentType="Lights", controlType="Electricity Rate") "Actuator for lights"; Buildings.ThermalZones.EnergyPlus_9_6_0.OutputVariable ligPow( name="Lights Electricity Rate", key="LIVING ZONE Lights", isDirectDependent=true, y(final unit="W")) "Block that reads the lighting power consumption from EnergyPlus"; Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSet( lat=0.73268921998722, lon=-1.5344934783534, timZon=-21600) "Block that computes sunrise and sunset"; Controls.OBC.CDL.Reals.Modulo mod1 "Output time of day"; Controls.OBC.CDL.Reals.Sources.Constant day( k=24*3600) "Outputs one day"; Controls.OBC.CDL.Reals.Sources.ModelTime modTim "Model time"; Controls.OBC.CDL.Reals.LessThreshold lesEquThr( t=22*3600) "Check whether time is earlier than 22:00"; Controls.OBC.CDL.Reals.Subtract timToSunSet "Time to next sunset"; Controls.OBC.CDL.Reals.LessThreshold lesEquThr1( t=1800) "Block that outputs true if sun sets in less than 30 minutes"; Controls.OBC.CDL.Logical.Or or2 "Output true if the lights should be on based on sun position"; Controls.OBC.CDL.Logical.And and2 "Output true if the lights should be on"; Controls.OBC.CDL.Conversions.BooleanToReal PLig( realTrue=1000) "Lighting power"; Controls.OBC.CDL.Logical.Not not1 "Output true if the sun is down"; Controls.OBC.CDL.Reals.GreaterThreshold greEquThr( t=12*3600) "Output true after noon"; Controls.OBC.CDL.Logical.And and1 "Output true if time of day allows lights to be on"; equation connect(day.y,mod1.u2); connect(mod1.u1,modTim.y); connect(mod1.y,lesEquThr.u); connect(sunRiseSet.nextSunSet,timToSunSet.u1); connect(modTim.y,timToSunSet.u2); connect(lesEquThr1.u,timToSunSet.y); connect(lesEquThr1.y,or2.u1); connect(or2.y,and2.u1); connect(and2.y,PLig.u); connect(actLig.u,PLig.y); connect(not1.y,or2.u2); connect(not1.u,sunRiseSet.sunUp); connect(greEquThr.u,mod1.y); connect(greEquThr.y,and1.u2); connect(and1.u1,lesEquThr.y); connect(and1.y,and2.u2); connect(actLig.y,ligPow.directDependency); end LightsControl;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TRoom Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TRoom

Example model with one thermal zone with a radiant floor where the cooling is controlled based on the room air temperature

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TRoom

Information

Model that uses EnergyPlus for the simulation of a building with one thermal zone that has a radiant ceiling, used for cooling, and a radiant floor, used for heating. The EnergyPlus model has one conditioned zone that is above ground. This conditioned zone has an unconditioned attic. The model is constructed by extending Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.HeatPumpRadiantHeatingGroundHeatTransfer and adding the radiant ceiling. For simplicity, this model provide heating with an idealized heater.

The next section explains how the radiant ceiling is configured.

Coupling of radiant ceiling to EnergyPlus model

The radiant ceiling is modeled in the instance slaCei at the top of the schematic model view, using the model Buildings.Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab. This instance models the heat transfer from the surface of the attic floor to the ceiling of the living room. In this example, the construction is defined by the instance layCei. (See the Buildings.Fluid.HeatExchangers.RadiantSlabs.UsersGuide for how to configure a radiant slab.) In this example, the surfaces slaCei.surf_a (upward-facing) and slaCei.surf_a (downward-facing) are connected to the instance attFlo. Because attFlo models the floor of the attic, rather than the ceiling of the living room, the heat port slaCei.surf_a is connected to attFlo.heaPorFro, which is the front-facing surface, e.g., the floor. Similarly, slaCei.surf_b is connected to attFlo.heaPorBac, which is the back-facing surface, e.g., the ceiling of the living room.

The mass flow rate of the slab is constant if the cooling is operating. A P controller computes the control signal to track a set point for the room temperature. The controller uses a hysteresis to switch the mass flow rate on or off. The control signal is also used to set the set point for the water supply temperature to the slab. This temperature is limited by the dew point of the zone air to avoid condensation.

See also the model Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TSurface which is controlled to track a set point for the surface temperature.

Coupling of radiant floor to EnergyPlus model

The radiant floor is modeled in the instance slaFlo at the bottom of the schematic model view, using the model Buildings.Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab. This instance models the heat transfer from surface of the floor to the lower surface of the slab. In this example, the construction is defined by the instance layFloSoi. (See the Buildings.Fluid.HeatExchangers.RadiantSlabs.UsersGuide for how to configure a radiant slab.) In this example, the surfaces slaFlo.surf_a and slaFlo.surf_b are connected to the instance flo. In EnergyPlus, the surface flo.heaPorBac is connected to the boundary condition of the soil because this building has no basement.

Note that the floor construction is modeled with 2 m of soil because the soil temperature in EnergyPlus is assumed to be undisturbed.

Extends from Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned (Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus).

Parameters

TypeNameDefaultDescription
VolumeVRoo453.1Room volume [m3]
MassFlowRatem_flow_nominalVRoo*1.2*0.3/3600Nominal mass flow rate [kg/s]
HeatFlowRateQHea_flow_nominal7500Nominal heat flow rate for heating [W]
MassFlowRatemHea_flow_nominalQHea_flow_nominal/4200/10Design water mass flow rate for heating [kg/s]
HeatFlowRateQCoo_flow_nominal-5000Nominal heat flow rate for cooling [W]
MassFlowRatemCoo_flow_nominal-QCoo_flow_nominal/4200/5Design water mass flow rate for heating [kg/s]
GenericlayFloSoilayFloSoi(nLay=4, material={...Material layers from surface a to b (8cm concrete, 20 cm insulation, 20 cm concrete, 200 cm soil, below which is the undisturbed soil assumed)
GenericlayCeilayCei(nLay=4, material={Bui...Material layers from surface a to b (8cm concrete, 10 cm insulation, 18+2 cm concrete)

Modelica definition

model RadiantHeatingCooling_TRoom "Example model with one thermal zone with a radiant floor where the cooling is controlled based on the room air temperature" extends Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned ( building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse_TwoSpeed_ZoneAirBalance/SingleFamilyHouse_TwoSpeed_ZoneAirBalance_aboveSoil.idf"))); package MediumW=Buildings.Media.Water "Water medium"; constant Modelica.Units.SI.Area AFlo=185.8 "Floor area"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal=7500 "Nominal heat flow rate for heating"; parameter Modelica.Units.SI.MassFlowRate mHea_flow_nominal=QHea_flow_nominal/ 4200/10 "Design water mass flow rate for heating"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal=-5000 "Nominal heat flow rate for cooling"; parameter Modelica.Units.SI.MassFlowRate mCoo_flow_nominal=-QCoo_flow_nominal /4200/5 "Design water mass flow rate for heating"; parameter HeatTransfer.Data.OpaqueConstructions.Generic layFloSoi(nLay=4, material={Buildings.HeatTransfer.Data.Solids.Concrete(x=0.08), Buildings.HeatTransfer.Data.Solids.InsulationBoard(x=0.20), Buildings.HeatTransfer.Data.Solids.Concrete(x=0.2), HeatTransfer.Data.Solids.Generic( x=2, k=1.3, c=800, d=1500)}) "Material layers from surface a to b (8cm concrete, 20 cm insulation, 20 cm concrete, 200 cm soil, below which is the undisturbed soil assumed)"; parameter HeatTransfer.Data.OpaqueConstructions.Generic layCei( nLay=4, material={ Buildings.HeatTransfer.Data.Solids.Concrete(x=0.08), Buildings.HeatTransfer.Data.Solids.InsulationBoard(x=0.10), Buildings.HeatTransfer.Data.Solids.Concrete(x=0.18), Buildings.HeatTransfer.Data.Solids.Concrete(x=0.02)}) "Material layers from surface a to b (8cm concrete, 10 cm insulation, 18+2 cm concrete)"; // Floor slab Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab slaFlo( redeclare package Medium = MediumW, allowFlowReversal=false, layers=layFloSoi, iLayPip=1, pipe=Fluid.Data.Pipes.PEX_DN_15(), sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor, disPip=0.15, nCir=3, A=AFlo, m_flow_nominal=mHea_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, from_dp=true, show_T=true) "Slab for floor with embedded pipes, connected to soil"; Fluid.Sources.Boundary_ph pre( redeclare package Medium=MediumW, p(displayUnit="Pa")=300000, nPorts=1) "Pressure boundary condition"; Controls.OBC.CDL.Reals.Sources.Constant TSetRooHea( k(final unit="K", displayUnit="degC")=293.15, y(final unit="K", displayUnit="degC")) "Room temperture set point for heating"; Fluid.Movers.SpeedControlled_y pum( redeclare package Medium=MediumW, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, per( pressure( V_flow=2*{0,mHea_flow_nominal}/1000, dp=2*{14000,0}), speed_nominal, constantSpeed, speeds), inputType=Buildings.Fluid.Types.InputType.Continuous) "Pump"; Fluid.HeatExchangers.Heater_T hea( redeclare final package Medium=MediumW, allowFlowReversal=false, m_flow_nominal=mHea_flow_nominal, dp_nominal=10000, show_T=true, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Ideal heater"; // Ceiling slab Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab slaCei( redeclare package Medium=MediumW, allowFlowReversal=false, layers=layCei, iLayPip=3, pipe=Fluid.Data.Pipes.PEX_DN_15(), sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Ceiling_Wall_or_Capillary, disPip=0.2, nCir=4, A=AFlo, m_flow_nominal=mCoo_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, show_T=true) "Slab for ceiling with embedded pipes"; Fluid.Sources.Boundary_ph prePre( redeclare package Medium=MediumW, nPorts=1, p(displayUnit="Pa")=300000) "Pressure boundary condition"; Fluid.Sources.MassFlowSource_T masFloSouCoo( redeclare package Medium=MediumW, use_m_flow_in=true, use_T_in=true, nPorts=1) "Mass flow source for cooling water at prescribed temperature"; Controls.OBC.CDL.Reals.Sources.Constant TSetRooCoo( k(final unit="K", displayUnit="degC")=299.15, y(final unit="K", displayUnit="degC")) "Room temperture set point for cooling"; Controls.OBC.CDL.Conversions.BooleanToReal booToRea( realTrue=mCoo_flow_nominal) "Cooling water mass flow rate"; Buildings.ThermalZones.EnergyPlus_9_6_0.OpaqueConstruction attFlo( surfaceName="Attic:LivingFloor") "Floor of the attic above the living room"; Buildings.ThermalZones.EnergyPlus_9_6_0.OpaqueConstruction livFlo(surfaceName="Living:Floor") "Floor of the living room"; Controls.OBC.RadiantSystems.Heating.HighMassSupplyTemperature_TRoom conHea( TSupSet_max=318.15) "Controller for radiant heating system"; Controls.OBC.RadiantSystems.Cooling.HighMassSupplyTemperature_TRoomRelHum conCoo(TSupSet_min=289.15) "Controller for radiant cooling"; initial equation // The floor area can be obtained from EnergyPlus, but it is a structural parameter used to // size the system and therefore we hard-code it here. assert( abs( AFlo-zon.AFlo) < 0.1, "Floor area AFlo differs from EnergyPlus floor area."); equation connect(masFloSouCoo.ports[1],slaCei.port_a); connect(prePre.ports[1],slaCei.port_b); connect(booToRea.y,masFloSouCoo.m_flow_in); connect(attFlo.heaPorFro,slaCei.surf_a); connect(slaCei.surf_b,attFlo.heaPorBac); connect(TSetRooHea.y, conHea.TRooSet); connect(pum.y, conHea.yPum); connect(pum.port_b,hea.port_a); connect(hea.port_b,slaFlo.port_a); connect(livFlo.heaPorFro, slaFlo.surf_a); connect(slaFlo.surf_b, livFlo.heaPorBac); connect(zon.TAir, conHea.TRoo); connect(slaFlo.port_b,pum.port_a); connect(slaFlo.port_b,pre.ports[1]); connect(conHea.TSupSet, hea.TSet); connect(conCoo.on, booToRea.u); connect(conCoo.TRooSet, TSetRooCoo.y); connect(zon.TAir, conCoo.TRoo); connect(conCoo.phiRoo, zon.phi); connect(conCoo.TSupSet, masFloSouCoo.T_in); end RadiantHeatingCooling_TRoom;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TSurface Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TSurface

Example model with one thermal zone with a radiant floor where the cooling is controlled based on the surface temperature set point

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TSurface

Information

Model that uses EnergyPlus for the simulation of a building with one thermal zone that has a radiant ceiling, used for cooling, and a radiant floor, used for heating. The EnergyPlus model has one conditioned zone that is above ground. This conditioned zone has an unconditioned attic. The model is constructed by extending Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.HeatPumpRadiantHeatingGroundHeatTransfer and adding the radiant ceiling. For simplicity, this model provide heating with an idealized heater.

The next section explains how the radiant ceiling is configured.

Coupling of radiant ceiling to EnergyPlus model

The radiant ceiling is modeled in the instance slaCei at the top of the schematic model view, using the model Buildings.Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab. This instance models the heat transfer from the surface of the attic floor to the ceiling of the living room. In this example, the construction is defined by the instance layCei. (See the Buildings.Fluid.HeatExchangers.RadiantSlabs.UsersGuide for how to configure a radiant slab.) In this example, the surfaces slaCei.surf_a (upward-facing) and slaCei.surf_a (downward-facing) are connected to the instance attFlo. Because attFlo models the floor of the attic, rather than the ceiling of the living room, the heat port slaCei.surf_a is connected to attFlo.heaPorFro, which is the front-facing surface, e.g., the floor. Similarly, slaCei.surf_b is connected to attFlo.heaPorBac, which is the back-facing surface, e.g., the ceiling of the living room.

Cooling is enabled if the room temperature is a certain value above the heating set point temperature. (Note that for simplicity this model has no night set back. If night set back where enabled, one needs to guard against switchin on the cooling if the heating set point is reset.) The mass flow rate of the slab is constant if the cooling is operating. A P controller computes the control signal to maintain a set point for the surface temperature. The controller uses a hysteresis to switch the mass flow rate on or off. The control signal is also used to set the set point for the water supply temperature to the slab. This temperature is limited by the dew point of the zone air to avoid condensation.

See also the model Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.RadiantHeatingCooling_TRoom which is controlled to track a set point for the room temperature.

Coupling of radiant floor to EnergyPlus model

The radiant floor is modeled in the instance slaFlo at the bottom of the schematic model view, using the model Buildings.Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab. This instance models the heat transfer from surface of the floor to the lower surface of the slab. In this example, the construction is defined by the instance layFloSoi. (See the Buildings.Fluid.HeatExchangers.RadiantSlabs.UsersGuide for how to configure a radiant slab.) In this example, the surfaces slaFlo.surf_a and slaFlo.surf_b are connected to the instance flo. In EnergyPlus, the surface flo.heaPorBac is connected to the boundary condition of the soil because this building has no basement.

Note that the floor construction is modeled with 2 m of soil because the soil temperature in EnergyPlus is assumed to be undisturbed.

Extends from Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned (Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus).

Parameters

TypeNameDefaultDescription
VolumeVRoo453.1Room volume [m3]
MassFlowRatem_flow_nominalVRoo*1.2*0.3/3600Nominal mass flow rate [kg/s]
HeatFlowRateQHea_flow_nominal7500Nominal heat flow rate for heating [W]
MassFlowRatemHea_flow_nominalQHea_flow_nominal/4200/10Design water mass flow rate for heating [kg/s]
HeatFlowRateQCoo_flow_nominal-5000Nominal heat flow rate for cooling [W]
MassFlowRatemCoo_flow_nominal-QCoo_flow_nominal/4200/5Design water mass flow rate for heating [kg/s]
GenericlayFloSoilayFloSoi(nLay=4, material={...Material layers from surface a to b (8cm concrete, 20 cm insulation, 20 cm concrete, 200 cm soil, below which is the undisturbed soil assumed)
GenericlayCeilayCei(nLay=4, material={Bui...Material layers from surface a to b (8cm concrete, 10 cm insulation, 18+2 cm concrete)

Modelica definition

model RadiantHeatingCooling_TSurface "Example model with one thermal zone with a radiant floor where the cooling is controlled based on the surface temperature set point" extends Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned ( building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse_TwoSpeed_ZoneAirBalance/SingleFamilyHouse_TwoSpeed_ZoneAirBalance_aboveSoil.idf"))); package MediumW=Buildings.Media.Water "Water medium"; constant Modelica.Units.SI.Area AFlo=185.8 "Floor area"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal=7500 "Nominal heat flow rate for heating"; parameter Modelica.Units.SI.MassFlowRate mHea_flow_nominal=QHea_flow_nominal/ 4200/10 "Design water mass flow rate for heating"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal=-5000 "Nominal heat flow rate for cooling"; parameter Modelica.Units.SI.MassFlowRate mCoo_flow_nominal=-QCoo_flow_nominal /4200/5 "Design water mass flow rate for heating"; parameter HeatTransfer.Data.OpaqueConstructions.Generic layFloSoi(nLay=4, material={Buildings.HeatTransfer.Data.Solids.Concrete(x=0.08), Buildings.HeatTransfer.Data.Solids.InsulationBoard(x=0.20), Buildings.HeatTransfer.Data.Solids.Concrete(x=0.2), HeatTransfer.Data.Solids.Generic( x=2, k=1.3, c=800, d=1500)}) "Material layers from surface a to b (8cm concrete, 20 cm insulation, 20 cm concrete, 200 cm soil, below which is the undisturbed soil assumed)"; parameter HeatTransfer.Data.OpaqueConstructions.Generic layCei( nLay=4, material={ Buildings.HeatTransfer.Data.Solids.Concrete(x=0.08), Buildings.HeatTransfer.Data.Solids.InsulationBoard(x=0.10), Buildings.HeatTransfer.Data.Solids.Concrete(x=0.18), Buildings.HeatTransfer.Data.Solids.Concrete(x=0.02)}) "Material layers from surface a to b (8cm concrete, 10 cm insulation, 18+2 cm concrete)"; // Floor slab Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab slaFlo( redeclare package Medium = MediumW, allowFlowReversal=false, layers=layFloSoi, iLayPip=1, pipe=Fluid.Data.Pipes.PEX_DN_15(), sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Floor, disPip=0.15, nCir=3, A=AFlo, m_flow_nominal=mHea_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, from_dp=true, show_T=true) "Slab for floor with embedded pipes, connected to soil"; Fluid.Sources.Boundary_ph pre( redeclare package Medium=MediumW, p(displayUnit="Pa")=300000, nPorts=1) "Pressure boundary condition"; Controls.OBC.CDL.Reals.Sources.Constant TSetRooHea( k(final unit="K", displayUnit="degC")=293.15, y(final unit="K", displayUnit="degC")) "Room temperture set point for heating"; Fluid.Movers.SpeedControlled_y pum( redeclare package Medium=MediumW, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, per( pressure( V_flow=2*{0,mHea_flow_nominal}/1000, dp=2*{14000,0}), speed_nominal, constantSpeed, speeds), inputType=Buildings.Fluid.Types.InputType.Continuous) "Pump"; Fluid.HeatExchangers.Heater_T hea( redeclare final package Medium=MediumW, allowFlowReversal=false, m_flow_nominal=mHea_flow_nominal, dp_nominal=10000, show_T=true, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Ideal heater"; // Ceiling slab Fluid.HeatExchangers.RadiantSlabs.ParallelCircuitsSlab slaCei( redeclare package Medium=MediumW, allowFlowReversal=false, layers=layCei, iLayPip=3, pipe=Fluid.Data.Pipes.PEX_DN_15(), sysTyp=Buildings.Fluid.HeatExchangers.RadiantSlabs.Types.SystemType.Ceiling_Wall_or_Capillary, disPip=0.2, nCir=4, A=AFlo, m_flow_nominal=mCoo_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, show_T=true) "Slab for ceiling with embedded pipes"; Fluid.Sources.Boundary_ph prePre( redeclare package Medium=MediumW, nPorts=1, p(displayUnit="Pa")=300000) "Pressure boundary condition"; Fluid.Sources.MassFlowSource_T masFloSouCoo( redeclare package Medium=MediumW, use_m_flow_in=true, use_T_in=true, nPorts=1) "Mass flow source for cooling water at prescribed temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetSurCooOn(k( final unit="K", displayUnit="degC") = 293.15, y(final unit="K", displayUnit="degC")) "Surface temperture set point for cooling"; Controls.OBC.CDL.Conversions.BooleanToReal booToRea( realTrue=mCoo_flow_nominal) "Cooling water mass flow rate"; Buildings.ThermalZones.EnergyPlus_9_6_0.OpaqueConstruction attFlo( surfaceName="Attic:LivingFloor") "Floor of the attic above the living room"; Buildings.ThermalZones.EnergyPlus_9_6_0.OpaqueConstruction livFlo(surfaceName="Living:Floor") "Floor of the living room"; Controls.OBC.RadiantSystems.Heating.HighMassSupplyTemperature_TRoom conHea( TSupSet_max=318.15) "Controller for radiant heating system"; Controls.OBC.RadiantSystems.Cooling.HighMassSupplyTemperature_TSurRelHum conCoo(TSupSet_min=289.15) "Controller for radiant cooling"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TSur "Surface temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetSurOff(k( final unit="K", displayUnit="degC") = 303.15, y(final unit="K", displayUnit="degC")) "Surface temperture set point to switch system off"; Controls.OBC.CDL.Reals.Greater enaCoo(h=1) "Switch to enable and disable cooling"; Buildings.Controls.OBC.CDL.Reals.Switch TSetSurCoo "Set point for surface temperature for cooling system"; Controls.OBC.CDL.Reals.AddParameter TOffSet(p=3) "Off set before switching on the cooling system"; initial equation // The floor area can be obtained from EnergyPlus, but it is a structural parameter used to // size the system and therefore we hard-code it here. assert( abs( AFlo-zon.AFlo) < 0.1, "Floor area AFlo differs from EnergyPlus floor area."); equation connect(masFloSouCoo.ports[1],slaCei.port_a); connect(prePre.ports[1],slaCei.port_b); connect(booToRea.y,masFloSouCoo.m_flow_in); connect(attFlo.heaPorFro,slaCei.surf_a); connect(slaCei.surf_b,attFlo.heaPorBac); connect(TSetRooHea.y, conHea.TRooSet); connect(pum.y, conHea.yPum); connect(pum.port_b,hea.port_a); connect(hea.port_b,slaFlo.port_a); connect(livFlo.heaPorFro, slaFlo.surf_a); connect(slaFlo.surf_b, livFlo.heaPorBac); connect(slaFlo.port_b,pum.port_a); connect(zon.TAir, conHea.TRoo); connect(slaFlo.port_b,pre.ports[1]); connect(conHea.TSupSet, hea.TSet); connect(conCoo.on, booToRea.u); connect(zon.TAir, conCoo.TRoo); connect(conCoo.phiRoo, zon.phi); connect(conCoo.TSupSet, masFloSouCoo.T_in); connect(attFlo.heaPorBac, TSur.port); connect(TSur.T, conCoo.TSur); connect(zon.TAir, enaCoo.u1); connect(TSetSurCooOn.y, TSetSurCoo.u1); connect(TSetSurOff.y, TSetSurCoo.u3); connect(enaCoo.y, TSetSurCoo.u2); connect(TSetSurCoo.y, conCoo.TSurSet); connect(enaCoo.u2, TOffSet.y); connect(TOffSet.u, TSetRooHea.y); end RadiantHeatingCooling_TSurface;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Radiator Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Radiator

Example model with an radiator that conditions a thermal zone in EnergyPlus

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Radiator

Information

Example of one building with one thermal zone in which the room air temperature is controlled with a PI controller. Heating is provided through a radiator. The control output is used to regulate the water flow rate through the radiator. The setpoint for the room air temperature changes between day and night. The zone also has a constant air infiltration flow rate.

Note that for simplicity, the model has no cooling system. Therefore, in summer, the house overheats. Also note that the surface temperature of the radiator is not taken into account when computing the radiative temperature of the thermal zone.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatemOut_flow_nominal0.3*VRoo*1.2/3600Outdoor air mass flow rate, assuming constant infiltration air flow rate [kg/s]
MassFlowRatemRec_flow_nominal8*VRoo*1.2/3600Nominal mass flow rate for recirculated air [kg/s]
HeatFlowRateQRad_flow_nominal15000Radiator design heat flow rate (at 50/40) [W]
TemperatureTSup_nominal323.15Water supply temperature [K]
TemperatureTRet_nominal313.15Water return temperature [K]
MassFlowRatemRad_flow_nominalQRad_flow_nominal/4200/(TSup...Radiator design water flow rate [kg/s]
PressureDifferencedpVal_nominal6000Pressure difference of valve [Pa]

Connectors

TypeNameDescription
BusweaBusWeather data bus

Modelica definition

model Radiator "Example model with an radiator that conditions a thermal zone in EnergyPlus" extends Modelica.Icons.Example; package MediumA=Buildings.Media.Air "Medium model for air"; package MediumW=Buildings.Media.Water "Medium model for water"; inner Building building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse_TwoSpeed_ZoneAirBalance/SingleFamilyHouse_TwoSpeed_ZoneAirBalance.idf"), weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), epwName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"), computeWetBulbTemperature=false) "Building model"; constant Modelica.Units.SI.Volume VRoo=453.138 "Room volume"; constant Modelica.Units.SI.Area AFlo=185.834 "Floor area of the whole floor of the building"; parameter Modelica.Units.SI.MassFlowRate mOut_flow_nominal=0.3*VRoo*1.2/3600 "Outdoor air mass flow rate, assuming constant infiltration air flow rate"; parameter Modelica.Units.SI.MassFlowRate mRec_flow_nominal=8*VRoo*1.2/3600 "Nominal mass flow rate for recirculated air"; parameter Modelica.Units.SI.HeatFlowRate QRad_flow_nominal = 15000 "Radiator design heat flow rate (at 50/40)"; parameter Modelica.Units.SI.Temperature TSup_nominal = 323.15 "Water supply temperature"; parameter Modelica.Units.SI.Temperature TRet_nominal = 313.15 "Water return temperature"; parameter Modelica.Units.SI.MassFlowRate mRad_flow_nominal = QRad_flow_nominal/4200/(TSup_nominal-TRet_nominal) "Radiator design water flow rate"; parameter Modelica.Units.SI.PressureDifference dpVal_nominal=6000 "Pressure difference of valve"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zon( redeclare package Medium=MediumA, zoneName="LIVING ZONE", nPorts=2) "Thermal zone"; Controls.OBC.CDL.Reals.Sources.Pulse TSet( shift( displayUnit="h")=21600, amplitude=6, period( displayUnit="d")=86400, offset=273.15+16, y(unit="K", displayUnit="degC")) "Setpoint for room air"; Controls.OBC.CDL.Reals.PID conPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, k=0.2, Ti(displayUnit="min") = 600, yMax=1, yMin=0, u_s( unit="K", displayUnit="degC"), u_m( unit="K", displayUnit="degC")) "Controller for heater"; Fluid.Sources.Boundary_pT pAtm( redeclare package Medium=MediumA, nPorts=1) "Boundary condition"; Fluid.FixedResistances.PressureDrop duc( redeclare package Medium=MediumA, allowFlowReversal=false, linearized=true, from_dp=true, dp_nominal=100, m_flow_nominal=mOut_flow_nominal) "Duct resistance (to decouple room and outside pressure)"; Fluid.Sources.MassFlowSource_WeatherData freshAir( redeclare package Medium=MediumA, m_flow=mOut_flow_nominal, nPorts=1) "Outside air supply"; Modelica.Blocks.Sources.Constant qIntGai[3](each k=0) "Internal heat gains, set to zero because these are modeled in EnergyPlus"; Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad( redeclare package Medium = MediumW, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, Q_flow_nominal=QRad_flow_nominal, T_a_nominal=TSup_nominal, T_b_nominal=TRet_nominal) "Radiator"; Fluid.Sources.Boundary_pT sin( redeclare package Medium = MediumW, p=200000, T=TRet_nominal, nPorts=1) "Pressure source for sink"; Fluid.Sources.Boundary_pT sou( redeclare package Medium = MediumW, p(displayUnit="Pa") = 2E5 + dpVal_nominal + 1000, use_T_in=true, nPorts=1) "Pressure source for sink"; Fluid.Actuators.Valves.TwoWayEqualPercentage val( redeclare package Medium = MediumW, m_flow_nominal=mRad_flow_nominal, dpValve_nominal(displayUnit="Pa") = dpVal_nominal, dpFixed_nominal=1000, from_dp=true, use_inputFilter=false) "Radiator valve"; Controls.OBC.Utilities.SetPoints.SupplyReturnTemperatureReset watRes( TSup_nominal=TSup_nominal, TRet_nominal=TRet_nominal, TOut_nominal=253.15); BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"; initial equation // Stop simulation if the hard-coded values differ from the ones computed by EnergyPlus. assert( abs( VRoo-zon.V) < 0.01, "Zone volume VRoo differs from volume returned by EnergyPlus."); assert( abs( AFlo-zon.AFlo) < 0.01, "Zone floor area AFlo differs from area returned by EnergyPlus."); equation connect(TSet.y,conPID.u_s); connect(conPID.u_m,zon.TAir); connect(duc.port_a,zon.ports[1]); connect(freshAir.ports[1],zon.ports[2]); connect(duc.port_b,pAtm.ports[1]); connect(zon.qGai_flow, qIntGai.y); connect(rad.heatPortCon, zon.heaPorAir); connect(rad.heatPortRad, zon.heaPorRad); connect(sou.ports[1], val.port_a); connect(val.port_b, rad.port_a); connect(conPID.y, val.y); connect(sou.T_in, watRes.TSup); connect(building.weaBus, weaBus); connect(freshAir.weaBus, weaBus); connect(weaBus.TDryBul, watRes.TOut); connect(watRes.TSetZon, TSet.y); connect(sin.ports[1], rad.port_b); end Radiator;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.ShadeControl Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.ShadeControl

Example model with one actuator that controls a shade in EnergyPlus

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.ShadeControl

Information

Example of a building that uses an EMS actuator. The building has three thermal zones that are simulated in EnergyPlus. In the EnergyPlus model, the west-facing thermal zone has a window blind that is open if its control signal is 0 or closed if it is 6. The control sequence obtains the room air temperature of the west-facing zone from the Modelica instance zonWes, and connects it to a hysteresis block that switches its output to true if the zone temperature is above 24°C, and to false if it drops below 23°C. The instance incBeaSou obtains from EnergyPlus the incident solar beam radiation on the outside of the window, and feeds it into a hysteresis block that outputs true if its input exceeds 200 W/m2, and switches to false if it drops below 10 W/m2. The instance actSha connects to the EMS actuator in EnergyPlus that activates this shade. If both outputs of the hysteresis blocks are true, then the EnergyPlus shade actuator is deployed by setting the input of actSha to 6. Otherwise, the input is set to 0.

To the right of the model, there are three idealized cooling systems that keep the room air temperature below 25°C in each of the three zones. Also, each zone is connected to a constant, unconditioned outside air supply.

The internal heat gains are set to zero in Modelica because these are specified in the EnergyPlus model.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal[:]0.3*1.2/3600*{113.3,113.3,16...Design mass flow rate [kg/s]

Connectors

TypeNameDescription
BusweaBusWeather data bus

Modelica definition

model ShadeControl "Example model with one actuator that controls a shade in EnergyPlus" extends Modelica.Icons.Example; package Medium=Buildings.Media.Air "Medium model"; inner Building building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/EMSWindowShadeControl/EMSWindowShadeControl.idf"), epwName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"), weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos")) "Building model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal[:]=0.3*1.2/3600*{ 113.3,113.3,169.9} "Design mass flow rate"; Modelica.Blocks.Sources.Constant qIntGai[3]( each k=0) "Internal heat gains"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zonWes( redeclare package Medium=Medium, zoneName="West Zone", nPorts=2) "West zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zonEas( redeclare package Medium=Medium, zoneName="EAST ZONE", nPorts=2) "East zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zonNor( redeclare package Medium=Medium, zoneName="NORTH ZONE", nPorts=2) "North zone"; Buildings.ThermalZones.EnergyPlus_9_6_0.Actuator actSha( unit=Buildings.ThermalZones.EnergyPlus_9_6_0.Types.Units.Normalized, variableName="Zn001:Wall001:Win001", componentType="Window Shading Control", controlType="Control Status") "Actuator for window shade"; Buildings.ThermalZones.EnergyPlus_9_6_0.OutputVariable incBeaSou( name="Surface Outside Face Incident Beam Solar Radiation Rate per Area", key="Zn001:Wall001:Win001", y(final unit="W/m2")) "Block that reads incident beam solar radiation on south window from EnergyPlus"; Buildings.Controls.OBC.Shade.Shade_T shaT( THigh=297.15, TLow=295.15) "Shade control signal based on room air temperature"; Buildings.Controls.OBC.Shade.Shade_H shaH( HHigh=200, HLow=10) "Shade control decision based on direct solar irradiation"; Buildings.Controls.OBC.CDL.Logical.And and2; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greEquT( t=0.5) "Output conversion"; Buildings.Controls.OBC.CDL.Reals.GreaterThreshold greEquH( t=0.5) "Output conversion"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea( realTrue=6) "Type conversion (6 meaning shade is deployed)"; Buildings.Fluid.Sources.MassFlowSource_WeatherData bou[3]( redeclare each package Medium=Medium, m_flow=m_flow_nominal, each nPorts=1) "Infiltration, used to avoid that the absolute humidity is continuously increasing"; Buildings.Fluid.Sources.Outside out( redeclare package Medium=Medium, nPorts=1) "Outside condition"; Buildings.Fluid.FixedResistances.PressureDrop res( redeclare package Medium=Medium, m_flow_nominal=sum(m_flow_nominal), dp_nominal=10, linearized=true); Buildings.Fluid.FixedResistances.PressureDrop res1[3]( redeclare each package Medium=Medium, m_flow_nominal=m_flow_nominal, each dp_nominal=10, each linearized=true) "Small flow resistance for inlet"; Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"; Cooling cooNor "Idealized cooling system"; Cooling cooWes "Idealized cooling system"; Cooling cooEas "Idealized cooling system"; equation connect(qIntGai.y,zonNor.qGai_flow); connect(qIntGai.y,zonEas.qGai_flow); connect(qIntGai.y,zonWes.qGai_flow); connect(shaT.y,greEquT.u); connect(shaH.y,greEquH.u); connect(greEquT.y,and2.u1); connect(greEquH.y,and2.u2); connect(and2.y,booToRea.u); connect(actSha.u,booToRea.y); connect(shaT.T,zonWes.TAir); connect(shaH.H,incBeaSou.y); connect(weaBus,out.weaBus); connect(bou[:].ports[1],res1[:].port_a); connect(weaBus,bou[1].weaBus); connect(weaBus,bou[2].weaBus); connect(weaBus,bou[3].weaBus); connect(building.weaBus,weaBus); connect(res1[1].port_b,zonNor.ports[1]); connect(res1[2].port_b,zonWes.ports[1]); connect(res1[3].port_b,zonEas.ports[1]); connect(out.ports[1],res.port_b); connect(res.port_a,zonNor.ports[2]); connect(res.port_a,zonWes.ports[2]); connect(res.port_a,zonEas.ports[2]); protected model Cooling extends Modelica.Blocks.Icons.Block; HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo "Prescribed heat flow rate"; Controls.OBC.CDL.Reals.MultiplyByParameter gai(k=-5000) "Gain"; Controls.OBC.CDL.Reals.PID conPID( Ti=120, reverseActing=false); Controls.OBC.CDL.Reals.Sources.Constant TSet( k=273.15+25) "Set point temperature"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heaPor "Heat port"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen "Temperature sensor"; equation connect(TSet.y,conPID.u_s); connect(gai.u,conPID.y); connect(gai.y,preHeaFlo.Q_flow); connect(preHeaFlo.port,heaPor); connect(temSen.T,conPID.u_m); connect(temSen.port,preHeaFlo.port); end Cooling; equation connect(cooNor.heaPor,zonNor.heaPorAir); connect(cooWes.heaPor,zonWes.heaPorAir); connect(cooEas.heaPor,zonEas.heaPorAir); end ShadeControl;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned

Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.Unconditioned

Information

This example models the living room as an unconditioned zone in Modelica. The living room is connected to a fresh air supply and exhaust. The heat balance of the air of the other two thermal zones, i.e., the attic and the garage, are modeled in EnergyPlus.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
VolumeVRoo453.1Room volume [m3]
MassFlowRatem_flow_nominalVRoo*1.2*0.3/3600Nominal mass flow rate [kg/s]

Modelica definition

model Unconditioned "Example model with one unconditoned zone simulated in Modelica, and the other two unconditioned zones simulated in EnergyPlus" extends Modelica.Icons.Example; package Medium=Buildings.Media.Air "Medium model"; inner Buildings.ThermalZones.EnergyPlus_9_6_0.Building building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse_TwoSpeed_ZoneAirBalance/SingleFamilyHouse_TwoSpeed_ZoneAirBalance.idf"), epwName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw"), weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), usePrecompiledFMU=false, computeWetBulbTemperature=false) "Building model"; parameter Modelica.Units.SI.Volume VRoo=453.1 "Room volume"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=VRoo*1.2*0.3/3600 "Nominal mass flow rate"; Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone zon( redeclare package Medium=Medium, zoneName="LIVING ZONE", nPorts=2) "Thermal zone"; Buildings.Fluid.FixedResistances.PressureDrop duc( redeclare package Medium=Medium, allowFlowReversal=false, linearized=true, from_dp=true, dp_nominal=100, m_flow_nominal=m_flow_nominal) "Duct resistance (to decouple room and outside pressure)"; Buildings.Fluid.Sources.MassFlowSource_WeatherData bou( redeclare package Medium=Medium, nPorts=1, m_flow=m_flow_nominal) "Boundary condition"; Buildings.Fluid.Sources.Boundary_pT freshAir( redeclare package Medium=Medium, nPorts=1) "Boundary condition"; Modelica.Blocks.Sources.Constant qIntGai[3]( each k=0) "Internal heat gains, set to zero because these are modeled in EnergyPlus"; equation connect(freshAir.ports[1],duc.port_b); connect(duc.port_a,zon.ports[1]); connect(bou.ports[1],zon.ports[2]); connect(zon.qGai_flow,qIntGai.y); connect(building.weaBus,bou.weaBus); end Unconditioned;

Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.ShadeControl.Cooling Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.ShadeControl.Cooling


Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SingleFamilyHouse.ShadeControl.Cooling

Information

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
HeatPort_bheaPorHeat port

Modelica definition

model Cooling extends Modelica.Blocks.Icons.Block; HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo "Prescribed heat flow rate"; Controls.OBC.CDL.Reals.MultiplyByParameter gai(k=-5000) "Gain"; Controls.OBC.CDL.Reals.PID conPID( Ti=120, reverseActing=false); Controls.OBC.CDL.Reals.Sources.Constant TSet( k=273.15+25) "Set point temperature"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heaPor "Heat port"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temSen "Temperature sensor"; equation connect(TSet.y,conPID.u_s); connect(gai.u,conPID.y); connect(gai.y,preHeaFlo.Q_flow); connect(preHeaFlo.port,heaPor); connect(temSen.T,conPID.u_m); connect(temSen.port,preHeaFlo.port); end Cooling;