Buildings.Experimental.DHC.Loads.Validation

Collection of validation models

Information

This package contains validation models for the classes in Buildings.Experimental.DHC.Loads.

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

Package Content

Name Description
Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution1 BenchmarkFlowDistribution1 Performance benchmark of building heating water flow distribution modeling
Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution2 BenchmarkFlowDistribution2 Performance benchmark of building heating water flow distribution modeling
Buildings.Experimental.DHC.Loads.Validation.FlowDistributionPumpControl FlowDistributionPumpControl Validation of the pump head computation in FlowDistribution
Buildings.Experimental.DHC.Loads.Validation.SimpleRoomODE SimpleRoomODE Validation of the model SimpleRoomODE
Buildings.Experimental.DHC.Loads.Validation.TerminalUnitScaling TerminalUnitScaling Validation of the scaling factor of the terminal unit model
Buildings.Experimental.DHC.Loads.Validation.BaseClasses BaseClasses Package with base classes

Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution1 Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution1

Performance benchmark of building heating water flow distribution modeling

Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution1

Information

This model is part of a computational performance benchmark between

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

Parameters

TypeNameDefaultDescription
StringfilNam"modelica://Buildings/Resour...File name with thermal loads as time series
IntegernLoa5Number of served loads
PressureDifferencedp_nominalnLoa*1500*2 + 2*500 + 30000Nominal pressure drop in the distribution line [Pa]
Nominal condition
TemperatureT_aHeaWat_nominal273.15 + 40Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 5Heating water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 20Load side inlet temperature at nominal conditions in heating mode [K]
MassFlowRatemLoaHea_flow_nominal1Load side mass flow rate at nominal conditions in heating mode [kg/s]
Scaling
RealfacMul10Mulitplier factor for terminal units

Modelica definition

model BenchmarkFlowDistribution1 "Performance benchmark of building heating water flow distribution modeling" extends Modelica.Icons.Example; package Medium1=Buildings.Media.Water "Source side medium"; package Medium2=Buildings.Media.Air "Load side medium"; parameter String filNam="modelica://Buildings/Resources/Data/Experimental/DHC/Loads/Examples/SwissResidential_20190916.mos" "File name with thermal loads as time series"; parameter Integer nLoa=5 "Number of served loads"; parameter Modelica.SIunits.Temperature T_aHeaWat_nominal( min=273.15, displayUnit="degC")=273.15+40 "Heating water inlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_bHeaWat_nominal( min=273.15, displayUnit="degC")=T_aHeaWat_nominal-5 "Heating water outlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_aLoaHea_nominal( min=273.15, displayUnit="degC")=273.15+20 "Load side inlet temperature at nominal conditions in heating mode"; parameter Modelica.SIunits.MassFlowRate mLoaHea_flow_nominal( min=0)=1 "Load side mass flow rate at nominal conditions in heating mode"; parameter Modelica.SIunits.PressureDifference dp_nominal=nLoa*1500*2+2*500+30000 "Nominal pressure drop in the distribution line"; parameter Real facMul=10 "Mulitplier factor for terminal units"; final parameter Modelica.SIunits.MassFlowRate m_flow_nominal=sum( ter.mHeaWat_flow_nominal)*facMul "Nominal mass flow rate in the distribution line"; final parameter Modelica.SIunits.HeatFlowRate QHea_flow_nominal( min=Modelica.Constants.eps)=Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad( string="#Peak space heating load", filNam=Modelica.Utilities.Files.loadResource(filNam))/facMul "Design heating heat flow rate (>=0)"; Buildings.Experimental.DHC.Loads.FlowDistribution disFloHea( redeclare package Medium=Medium1, m_flow_nominal=m_flow_nominal, have_pum=true, dp_nominal=dp_nominal, nPorts_a1=nLoa, nPorts_b1=nLoa) "Heating water distribution system"; BaseClasses.FanCoil2PipeHeating ter[nLoa]( each final facMul=facMul, redeclare each final package Medium1=Medium1, redeclare each final package Medium2=Medium2, each final QHea_flow_nominal=QHea_flow_nominal, each final mLoaHea_flow_nominal=mLoaHea_flow_nominal, each final T_aHeaWat_nominal=T_aHeaWat_nominal, each final T_bHeaWat_nominal=T_bHeaWat_nominal, each final T_aLoaHea_nominal=T_aLoaHea_nominal) "Heating terminal unit"; Modelica.Blocks.Sources.CombiTimeTable loa( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( filNam), extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, y(each unit="W"), offset={0,0,0}, columns={2,3,4}, smoothness=Modelica.Blocks.Types.Smoothness.MonotoneContinuousDerivative1) "Reader for thermal loads (y[1] is cooling load, y[2] is heating load)"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet( k=293.15, y(final unit="K", displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep( nout=nLoa) "Repeat input to output an array"; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep1( nout=nLoa) "Repeat input to output an array"; Fluid.Sources.Boundary_pT supHeaWat( redeclare package Medium=Medium1, use_T_in=true, nPorts=1) "Heating water supply"; Fluid.Sources.Boundary_pT sinHeaWat( redeclare package Medium=Medium1, p=300000, nPorts=1) "Sink for heating water"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant THeaWatSup( k=max( ter.T_aHeaWat_nominal)) "Supply temperature"; equation connect(ter.port_bHeaWat,disFloHea.ports_a1); connect(disFloHea.ports_b1,ter.port_aHeaWat); connect(reaRep.y,ter.TSetHea); connect(loa.y[2],reaRep1.u); connect(reaRep1.y,ter.QReqHea_flow); connect(supHeaWat.ports[1],disFloHea.port_a); connect(disFloHea.port_b,sinHeaWat.ports[1]); connect(ter.mReqHeaWat_flow,disFloHea.mReq_flow); connect(THeaWatSup.y,supHeaWat.T_in); connect(minTSet.y,reaRep.u); end BenchmarkFlowDistribution1;

Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution2 Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution2

Performance benchmark of building heating water flow distribution modeling

Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution2

Information

This model is part of a computational performance benchmark between

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

Parameters

TypeNameDefaultDescription
StringfilNam"modelica://Buildings/Resour...File name with thermal loads as time series
IntegernLoa5Number of served loads
Nominal condition
TemperatureT_aHeaWat_nominal273.15 + 40Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 5Heating water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 20Load side inlet temperature at nominal conditions in heating mode [K]
MassFlowRatemLoaHea_flow_nominal1Load side mass flow rate at nominal conditions in heating mode [kg/s]
Scaling
RealfacMul10Mulitplier factor for terminal units
Dynamics
Nominal condition
Timetau120Time constant of fluid temperature variation at nominal flow rate [s]

Modelica definition

model BenchmarkFlowDistribution2 "Performance benchmark of building heating water flow distribution modeling" extends Modelica.Icons.Example; package Medium1=Buildings.Media.Water "Source side medium"; package Medium2=Buildings.Media.Air "Load side medium"; parameter String filNam="modelica://Buildings/Resources/Data/Experimental/DHC/Loads/Examples/SwissResidential_20190916.mos" "File name with thermal loads as time series"; parameter Integer nLoa=5 "Number of served loads"; parameter Modelica.SIunits.Temperature T_aHeaWat_nominal=273.15+40 "Heating water inlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_bHeaWat_nominal( min=273.15, displayUnit="degC")=T_aHeaWat_nominal-5 "Heating water outlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_aLoaHea_nominal=273.15+20 "Load side inlet temperature at nominal conditions in heating mode"; parameter Modelica.SIunits.MassFlowRate mLoaHea_flow_nominal=1 "Load side mass flow rate at nominal conditions in heating mode"; parameter Modelica.SIunits.Time tau=120 "Time constant of fluid temperature variation at nominal flow rate"; parameter Real facMul=10 "Mulitplier factor for terminal units"; final parameter Modelica.SIunits.MassFlowRate mCon_flow_nominal[nLoa]=ter.mHeaWat_flow_nominal*facMul "Nominal mass flow rate in each connection line"; final parameter Modelica.SIunits.MassFlowRate m_flow_nominal=sum( mCon_flow_nominal) "Nominal mass flow rate in the distribution line"; final parameter Modelica.SIunits.PressureDifference dp_nominal=sum( dis.con.pipDisSup.dp_nominal)+sum( dis.con.pipDisRet.dp_nominal)+max( ter.dpSou_nominal) "Nominal pressure drop in the distribution line"; final parameter Modelica.SIunits.HeatFlowRate QHea_flow_nominal=Loads.BaseClasses.getPeakLoad( string="#Peak space heating load", filNam=Modelica.Utilities.Files.loadResource(filNam))/facMul "Design heating heat flow rate (>=0)"; BaseClasses.FanCoil2PipeHeatingValve ter[nLoa]( each final facMul=facMul, redeclare each final package Medium1=Medium1, redeclare each final package Medium2=Medium2, each final QHea_flow_nominal=QHea_flow_nominal, each final mLoaHea_flow_nominal=mLoaHea_flow_nominal, each final T_aHeaWat_nominal=T_aHeaWat_nominal, each final T_bHeaWat_nominal=T_bHeaWat_nominal, each final T_aLoaHea_nominal=T_aLoaHea_nominal) "Heating terminal unit"; Modelica.Blocks.Sources.CombiTimeTable loa( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( filNam), extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, y(each unit="W"), offset={0,0,0}, columns={2,3,4}, smoothness=Modelica.Blocks.Types.Smoothness.MonotoneContinuousDerivative1) "Reader for thermal loads (y[1] is cooling load, y[2] is heating load)"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet( k=293.15, y(final unit="K", displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep( nout=nLoa) "Repeat input to output an array"; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep1( nout=nLoa) "Repeat input to output an array"; Fluid.Sources.Boundary_pT supHeaWat( redeclare package Medium=Medium1, use_T_in=true, nPorts=2) "Heating water supply"; BaseClasses.Distribution2Pipe dis( redeclare final package Medium=Medium1, nCon=nLoa, allowFlowReversal=false, mDis_flow_nominal=m_flow_nominal, mCon_flow_nominal=mCon_flow_nominal, dpDis_nominal=fill( 1500, nLoa)); Fluid.Movers.FlowControlled_dp pum( redeclare package Medium=Medium1, per( final motorCooledByFluid=false), energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal=m_flow_nominal, addPowerToMedium=false, nominalValuesDefineDefaultPressureCurve=true, use_inputFilter=false, dp_nominal=dp_nominal); Fluid.MixingVolumes.MixingVolume vol( final prescribedHeatFlowRate=true, redeclare final package Medium=Medium1, V=m_flow_nominal*tau/rho_default, final mSenFac=1, final m_flow_nominal=m_flow_nominal, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nPorts=2) "Volume for fluid stream"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant dpPum( k=dp_nominal) "Prescribed head"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant THeaWatSup( k=max( ter.T_aHeaWat_nominal)) "Supply temperature"; protected parameter Medium1.ThermodynamicState sta_default=Medium1.setState_pTX( T=Medium1.T_default, p=Medium1.p_default, X=Medium1.X_default); parameter Modelica.SIunits.Density rho_default=Medium1.density( sta_default) "Density, used to compute fluid volume"; equation connect(loa.y[2],reaRep1.u); connect(reaRep.y,ter.TSetHea); connect(reaRep1.y,ter.QReqHea_flow); connect(ter.port_bHeaWat,dis.ports_aCon); connect(dis.ports_bCon,ter.port_aHeaWat); connect(pum.port_b,dis.port_aDisSup); connect(dis.port_bDisRet,supHeaWat.ports[1]); connect(vol.ports[1],pum.port_a); connect(supHeaWat.ports[2],vol.ports[2]); connect(THeaWatSup.y,supHeaWat.T_in); connect(dpPum.y,pum.dp_in); connect(reaRep.u,minTSet.y); end BenchmarkFlowDistribution2;

Buildings.Experimental.DHC.Loads.Validation.FlowDistributionPumpControl Buildings.Experimental.DHC.Loads.Validation.FlowDistributionPumpControl

Validation of the pump head computation in FlowDistribution

Buildings.Experimental.DHC.Loads.Validation.FlowDistributionPumpControl

Information

This model validates the pump head computation algorithm implemented in Buildings.Experimental.DHC.Loads.FlowDistribution.

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

Parameters

TypeNameDefaultDescription
StringfilNam"modelica://Buildings/Resour...File name with thermal loads as time series
IntegernLoa5Number of served loads
PressureDifferencedpDis_nominal[nLoa]1/2 .* cat(1, {dp_nominal*0....Pressure drop between each connected unit at nominal conditions (supply line) [Pa]
PressureDifferencedpSetmax(terUniHea.dpSou_nominal)Pressure difference set point [Pa]
Scaling
RealfacMul10Scaling factor for terminal units
Nominal condition
MassFlowRatemLoaHea_flow_nominal1Load side mass flow rate at nominal conditions in heating mode [kg/s]
TemperatureT_aHeaWat_nominal273.15 + 40Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 5Heating water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 20Load side inlet temperature at nominal conditions in heating mode [K]
Dynamics
Nominal condition
Timetau120Time constant of fluid temperature variation at nominal flow rate [s]

Modelica definition

model FlowDistributionPumpControl "Validation of the pump head computation in FlowDistribution" extends Modelica.Icons.Example; package Medium1=Buildings.Media.Water "Source side medium"; package Medium2=Buildings.Media.Air "Load side medium"; parameter String filNam="modelica://Buildings/Resources/Data/Experimental/DHC/Loads/Examples/SwissResidential_20190916.mos" "File name with thermal loads as time series"; parameter Integer nLoa=5 "Number of served loads"; parameter Real facMul=10 "Scaling factor for terminal units"; parameter Modelica.SIunits.MassFlowRate mLoaHea_flow_nominal=1 "Load side mass flow rate at nominal conditions in heating mode"; parameter Modelica.SIunits.Temperature T_aHeaWat_nominal=273.15+40 "Heating water inlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_bHeaWat_nominal( min=273.15, displayUnit="degC")=T_aHeaWat_nominal-5 "Heating water outlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_aLoaHea_nominal=273.15+20 "Load side inlet temperature at nominal conditions in heating mode"; parameter Modelica.SIunits.Time tau=120 "Time constant of fluid temperature variation at nominal flow rate"; parameter Modelica.SIunits.PressureDifference dpDis_nominal[nLoa]( each min=0, each displayUnit="Pa")=1/2 .* cat( 1, {dp_nominal*0.2}, fill( dp_nominal*0.8/(nLoa-1), nLoa-1)) "Pressure drop between each connected unit at nominal conditions (supply line)"; parameter Modelica.SIunits.PressureDifference dpSet=max( terUniHea.dpSou_nominal) "Pressure difference set point"; final parameter Modelica.SIunits.MassFlowRate mCon_flow_nominal[nLoa]= terUniHea.mHeaWat_flow_nominal*facMul "Nominal mass flow rate in each connection line"; final parameter Modelica.SIunits.MassFlowRate m_flow_nominal=sum( mCon_flow_nominal) "Nominal mass flow rate in the distribution line"; final parameter Modelica.SIunits.PressureDifference dp_nominal=max( terUniHea.dpSou_nominal)+2*nLoa*5000 "Nominal pressure drop in the distribution line"; final parameter Modelica.SIunits.HeatFlowRate QHea_flow_nominal=Loads.BaseClasses.getPeakLoad( string="#Peak space heating load", filNam=Modelica.Utilities.Files.loadResource(filNam))/facMul "Design heating heat flow rate (>=0)"; BaseClasses.FanCoil2PipeHeatingValve terUniHea[nLoa]( redeclare each final package Medium1=Medium1, redeclare each final package Medium2=Medium2, each final facMul=facMul, each final QHea_flow_nominal=QHea_flow_nominal, each final mLoaHea_flow_nominal=mLoaHea_flow_nominal, each final T_aHeaWat_nominal=T_aHeaWat_nominal, each final T_bHeaWat_nominal=T_bHeaWat_nominal, each final T_aLoaHea_nominal=T_aLoaHea_nominal, each final have_speVar=false) "Heating terminal unit"; Modelica.Blocks.Sources.CombiTimeTable loa( tableOnFile=true, tableName="tab1", fileName=Modelica.Utilities.Files.loadResource( filNam), extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, y(each unit="W"), offset={0,0,0}, columns={2,3,4}, smoothness=Modelica.Blocks.Types.Smoothness.MonotoneContinuousDerivative1) "Reader for thermal loads (y[1] is cooling load, y[2] is heating load)"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet( k=20+273.15, y(final unit="K", displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep( nout=nLoa) "Repeat input to output an array"; Buildings.Controls.OBC.CDL.Routing.RealReplicator reaRep1( nout=nLoa) "Repeat input to output an array"; BaseClasses.Distribution2Pipe dis( redeclare final package Medium=Medium1, final nCon=nLoa, final allowFlowReversal=false, final iConDpSen=nLoa, final mDis_flow_nominal=m_flow_nominal, final mCon_flow_nominal=mCon_flow_nominal, final dpDis_nominal=dpDis_nominal) "Distribution network"; Fluid.Movers.FlowControlled_dp pumCstDp( redeclare package Medium=Medium1, per( final motorCooledByFluid=false), energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal=m_flow_nominal, addPowerToMedium=false, nominalValuesDefineDefaultPressureCurve=true, use_inputFilter=false, dp_nominal=dp_nominal, prescribeSystemPressure=true) "Pump controlled to track a pressure drop over the last connected load"; Fluid.MixingVolumes.MixingVolume vol( final prescribedHeatFlowRate=true, redeclare final package Medium=Medium1, V=m_flow_nominal*tau/rho_default, final mSenFac=1, final m_flow_nominal=m_flow_nominal, final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, nPorts=2) "Volume for fluid stream"; Fluid.Sources.Boundary_pT supHeaWat1( redeclare package Medium=Medium1, use_T_in=true, nPorts=3) "Heating water source"; Buildings.Experimental.DHC.Loads.FlowDistribution disCstDp( redeclare package Medium=Medium1, m_flow_nominal=m_flow_nominal, have_pum=true, typCtr=Buildings.Experimental.DHC.Loads.Types.PumpControlType.ConstantDp, dp_nominal=dp_nominal, dpDis_nominal=dpDis_nominal, dpMin=dpSet, mUni_flow_nominal=mCon_flow_nominal, nPorts_a1=nLoa, nPorts_b1=nLoa) "Distribution system with pump controlled to track a pressure drop over the last connected unit"; Fluid.Sources.Boundary_pT sinHeaWat( redeclare package Medium=Medium1, p=300000, nPorts=3) "Sink for heating water"; BaseClasses.FanCoil2PipeHeating terUniHea1[nLoa]( redeclare each final package Medium1=Medium1, redeclare each final package Medium2=Medium2, each final facMul=facMul, each final QHea_flow_nominal=QHea_flow_nominal, each final mLoaHea_flow_nominal=mLoaHea_flow_nominal, each final T_aHeaWat_nominal=T_aHeaWat_nominal, each final T_bHeaWat_nominal=T_bHeaWat_nominal, each final T_aLoaHea_nominal=T_aLoaHea_nominal, each final have_speVar=false) "Heating terminal unit"; Fluid.Movers.SpeedControlled_y pumCstSpe( redeclare package Medium=Medium1, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, per( pressure( V_flow=m_flow_nominal/rho_default .* {0,1,2}, dp=dp_nominal .* {1.5,1,0.5})), addPowerToMedium=false, use_inputFilter=false) "Pump controlled at constant speed"; Fluid.Movers.BaseClasses.IdealSource pipPre( redeclare final package Medium=Medium1, dp_start=dp_nominal, m_flow_start=m_flow_nominal, m_flow_small=1E-4*m_flow_nominal, final show_T=false, final show_V_flow=false, final control_m_flow=true, final control_dp=false) "Fictitious pipe used to prescribe pump flow rate"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant one1( k=1) "Constant one"; BaseClasses.FanCoil2PipeHeating terUniHea2[nLoa]( redeclare each final package Medium1=Medium1, redeclare each final package Medium2=Medium2, each final facMul=facMul, each final QHea_flow_nominal=QHea_flow_nominal, each final mLoaHea_flow_nominal=mLoaHea_flow_nominal, each final T_aHeaWat_nominal=T_aHeaWat_nominal, each final T_bHeaWat_nominal=T_bHeaWat_nominal, each final T_aLoaHea_nominal=T_aLoaHea_nominal, each final have_speVar=false) "Heating terminal unit"; Buildings.Experimental.DHC.Loads.FlowDistribution disCstSpe( redeclare package Medium=Medium1, m_flow_nominal=m_flow_nominal, have_pum=true, typCtr=Buildings.Experimental.DHC.Loads.Types.PumpControlType.ConstantSpeed, dp_nominal=dp_nominal, dpDis_nominal=dpDis_nominal, dpMin=dpSet, mUni_flow_nominal=mCon_flow_nominal, nPorts_a1=5, nPorts_b1=5) "Distribution system with pump controlled at constant speed"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant THeaWatSup( k=T_aHeaWat_nominal) "Heating water supply temperature"; Fluid.Sources.Boundary_pT supHeaWat( redeclare package Medium=Medium1, use_T_in=true, nPorts=2) "Heating water source"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant setDp( k=dpSet) "Pressure difference set-point"; protected parameter Medium1.ThermodynamicState sta_default=Medium1.setState_pTX( T=Medium1.T_default, p=Medium1.p_default, X=Medium1.X_default); parameter Modelica.SIunits.Density rho_default=Medium1.density( sta_default) "Density, used to compute fluid volume"; equation connect(loa.y[2],reaRep1.u); connect(reaRep.y,terUniHea.TSetHea); connect(reaRep1.y,terUniHea.QReqHea_flow); connect(terUniHea.port_bHeaWat,dis.ports_aCon); connect(dis.ports_bCon,terUniHea.port_aHeaWat); connect(pumCstDp.port_b,dis.port_aDisSup); connect(vol.ports[1],pumCstDp.port_a); connect(disCstDp.port_b,sinHeaWat.ports[1]); connect(supHeaWat1.ports[1],disCstDp.port_a); connect(terUniHea1.port_bHeaWat,disCstDp.ports_a1); connect(disCstDp.ports_b1,terUniHea1.port_aHeaWat); connect(reaRep.y,terUniHea1.TSetHea); connect(reaRep1.y,terUniHea1.QReqHea_flow); connect(terUniHea1.mReqHeaWat_flow,disCstDp.mReq_flow); connect(supHeaWat1.ports[2],pumCstSpe.port_a); connect(pumCstSpe.port_b,pipPre.port_a); connect(pipPre.port_b,sinHeaWat.ports[2]); connect(one1.y,pumCstSpe.y); connect(supHeaWat1.ports[3],disCstSpe.port_a); connect(disCstSpe.port_b,sinHeaWat.ports[3]); connect(disCstSpe.ports_b1[1:5],terUniHea2.port_aHeaWat); connect(terUniHea2.port_bHeaWat,disCstSpe.ports_a1[1:5]); connect(terUniHea2.mReqHeaWat_flow,disCstSpe.mReq_flow); connect(reaRep.y,terUniHea2.TSetHea); connect(reaRep1.y,terUniHea2.QReqHea_flow); connect(disCstSpe.mReqTot_flow,pipPre.m_flow_in); connect(THeaWatSup.y,supHeaWat1.T_in); connect(dis.port_bDisRet,supHeaWat.ports[1]); connect(supHeaWat.ports[2],vol.ports[2]); connect(THeaWatSup.y,supHeaWat.T_in); connect(minTSet.y,reaRep.u); connect(dis.dp,pumCstDp.dpMea); connect(setDp.y,pumCstDp.dp_in); end FlowDistributionPumpControl;

Buildings.Experimental.DHC.Loads.Validation.SimpleRoomODE Buildings.Experimental.DHC.Loads.Validation.SimpleRoomODE

Validation of the model SimpleRoomODE

Buildings.Experimental.DHC.Loads.Validation.SimpleRoomODE

Information


This example validates Buildings.Experimental.DHC.Loads.SimpleRoomODE by comparison with Buildings.ThermalZones.ReducedOrder.RC.TwoElements.

A first instance of the reduced order model is used to assess the heating and cooling loads. A second instance is used to assess the indoor air temperature variation when the rate at which heating or cooling is provided is lower than the load. That second instance is used as a reference for the validation.

Eventually the validation is performed with two sets of ambient conditions, one requiring heating, and the second requiring cooling.

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

Parameters

TypeNameDefaultDescription
Timetau1800Time constant of the indoor temperature [s]
Nominal condition
HeatFlowRateQHea_flow_nominal112000Design heating heat flow rate (for TInd=TIndHea_nominal, TOut=TOutHea_nominal, with no internal gains, no solar radiation) [W]
HeatFlowRateQCoo_flow_nominal-200000Design cooling heat flow rate [W]

Modelica definition

model SimpleRoomODE "Validation of the model SimpleRoomODE" extends Modelica.Icons.Example; package Medium1=Buildings.Media.Water "Source side medium"; package Medium2=Buildings.Media.Air "Load side medium"; parameter Modelica.SIunits.HeatFlowRate QHea_flow_nominal=112000 "Design heating heat flow rate (for TInd=TIndHea_nominal, TOut=TOutHea_nominal, with no internal gains, no solar radiation)"; parameter Modelica.SIunits.HeatFlowRate QCoo_flow_nominal=-200000 "Design cooling heat flow rate"; parameter Modelica.SIunits.Time tau=1800 "Time constant of the indoor temperature"; Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Office romHeaMet "ROM where the heating load is always met"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat( TDryBulSou=Buildings.BoundaryConditions.Types.DataSource.Parameter, TDryBul=276.15, calTSky=Buildings.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation, computeWetBulbTemperature=false, filNam=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")) "Weather data reader"; Buildings.Controls.Continuous.LimPID conHea( controllerType=Modelica.Blocks.Types.SimpleController.PI, Ti=10); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant minTSet( k=293.15, y(final unit="K", displayUnit="degC")) "Minimum temperature set point"; Buildings.Controls.OBC.CDL.Continuous.Gain gai( k=QHea_flow_nominal) "Scaling"; HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow "Prescribed heat flow rate"; Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Office romHeaUnm "ROM where the heating load is not met"; Buildings.Controls.OBC.CDL.Continuous.Gain gai1( k=0.7) "Scaling "; HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow1 "Prescribed heat flow rate"; Buildings.Experimental.DHC.Loads.SimpleRoomODE rooOdeHea( TOutHea_nominal=273.15, TIndHea_nominal=293.15, QHea_flow_nominal=QHea_flow_nominal, tau=tau) "ODE heated room model"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant maxTSet( k=297.15, y(final unit="K", displayUnit="degC")) "Maximum temperature set point"; Buildings.Controls.Continuous.LimPID conCoo( controllerType=Modelica.Blocks.Types.SimpleController.PI, Ti=10, reverseActing=false) "PI controller tracking the room maximum temperature"; Buildings.Controls.OBC.CDL.Continuous.Gain gai2( k=QCoo_flow_nominal) "Scaling"; Buildings.Experimental.DHC.Loads.SimpleRoomODE rooOdeCoo( TOutHea_nominal=273.15, TIndHea_nominal=293.15, QHea_flow_nominal=QHea_flow_nominal, tau=tau) "ODE cooled room model"; Buildings.Controls.OBC.CDL.Continuous.Gain gai3( k=0.8) "Scaling"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat1( TDryBulSou=Buildings.BoundaryConditions.Types.DataSource.Parameter, TDryBul=293.15, calTSky=Buildings.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation, computeWetBulbTemperature=false, filNam=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")) "Weather data reader"; Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Office romCooMet "ROM where the cooling load is always met"; Examples.BaseClasses.GeojsonExportRC.OfficeBuilding.Office romCooUnm "ROM where the cooling load is not met"; HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow2 "Prescribed heat flow rate"; HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow3 "Prescribed heat flow rate"; equation connect(weaDat.weaBus,romHeaMet.weaBus); connect(romHeaMet.TAir,conHea.u_m); connect(conHea.y,gai.u); connect(gai.y,prescribedHeatFlow.Q_flow); connect(prescribedHeatFlow.port,romHeaMet.port_a); connect(conCoo.y,gai2.u); connect(gai1.y,prescribedHeatFlow1.Q_flow); connect(gai1.y,rooOdeHea.QAct_flow); connect(gai2.y,rooOdeCoo.QReq_flow); connect(prescribedHeatFlow1.port,romHeaUnm.port_a); connect(gai2.y,gai3.u); connect(gai3.y,rooOdeCoo.QAct_flow); connect(weaDat.weaBus,romHeaUnm.weaBus); connect(weaDat1.weaBus,romCooMet.weaBus); connect(weaDat1.weaBus,romCooUnm.weaBus); connect(romCooMet.TAir,conCoo.u_m); connect(gai.y,gai1.u); connect(gai.y,rooOdeHea.QReq_flow); connect(gai3.y,prescribedHeatFlow2.Q_flow); connect(prescribedHeatFlow2.port,romCooUnm.port_a); connect(gai2.y,prescribedHeatFlow3.Q_flow); connect(prescribedHeatFlow3.port,romCooMet.port_a); connect(minTSet.y,conHea.u_s); connect(minTSet.y,rooOdeHea.TSet); connect(maxTSet.y,conCoo.u_s); connect(maxTSet.y,rooOdeCoo.TSet); end SimpleRoomODE;

Buildings.Experimental.DHC.Loads.Validation.TerminalUnitScaling Buildings.Experimental.DHC.Loads.Validation.TerminalUnitScaling

Validation of the scaling factor of the terminal unit model

Buildings.Experimental.DHC.Loads.Validation.TerminalUnitScaling

Information

This example validates the use of the unit multiplier and zone multiplier factors for models of terminal units inheriting from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit.

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

Parameters

TypeNameDefaultDescription
RealfacMul2Multiplier factor
Nominal condition
TemperatureT_aHeaWat_nominal273.15 + 40Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 5Heating water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 20Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_bLoaHea_nominalT_aLoaHea_nominal + 12Load side ourtlet temperature at nominal conditions in heating mode [K]
MassFlowRatemLoaHeaUni_flow_nominalQHeaUni_flow_nominal/(T_bLoa...Load side mass flow rate at nominal conditions for 1 unit [kg/s]
HeatFlowRateQHeaUni_flow_nominal1000Design heating heat flow rate (>=0) for 1 unit [W]

Modelica definition

model TerminalUnitScaling "Validation of the scaling factor of the terminal unit model" extends Modelica.Icons.Example; package Medium1=Buildings.Media.Water "Source side medium"; package Medium2=Buildings.Media.Air "Load side medium"; parameter Real facMul=2 "Multiplier factor"; parameter Modelica.SIunits.Temperature T_aHeaWat_nominal( min=273.15, displayUnit="degC")=273.15+40 "Heating water inlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_bHeaWat_nominal( min=273.15, displayUnit="degC")=T_aHeaWat_nominal-5 "Heating water outlet temperature at nominal conditions"; parameter Modelica.SIunits.Temperature T_aLoaHea_nominal( min=273.15, displayUnit="degC")=273.15+20 "Load side inlet temperature at nominal conditions in heating mode"; parameter Modelica.SIunits.Temperature T_bLoaHea_nominal( min=273.15, displayUnit="degC")=T_aLoaHea_nominal+12 "Load side ourtlet temperature at nominal conditions in heating mode"; parameter Modelica.SIunits.MassFlowRate mLoaHeaUni_flow_nominal( min=0)=QHeaUni_flow_nominal/(T_bLoaHea_nominal-T_aLoaHea_nominal)/Medium2.specificHeatCapacityCp( Medium2.setState_pTX( Medium2.p_default, T_aLoaHea_nominal)) "Load side mass flow rate at nominal conditions for 1 unit"; final parameter Modelica.SIunits.MassFlowRate mLoaHea_flow_nominal( min=0)=mLoaHeaUni_flow_nominal*facMul "Load side mass flow rate at nominal conditions"; parameter Modelica.SIunits.HeatFlowRate QHeaUni_flow_nominal( min=0)=1000 "Design heating heat flow rate (>=0) for 1 unit"; final parameter Modelica.SIunits.HeatFlowRate QHea_flow_nominal=QHeaUni_flow_nominal*facMul "Design heating heat flow rate (>=0)"; Buildings.Fluid.Sources.MassFlowSource_T supHeaWat( use_m_flow_in=true, redeclare package Medium=Medium1, use_T_in=false, T=T_aHeaWat_nominal, nPorts=1) "Heating water supply"; Buildings.Fluid.Sources.Boundary_pT sinHeaWat( redeclare package Medium=Medium1, p=300000, nPorts=3) "Sink for heating water"; BaseClasses.FanCoil2PipeHeating ter( have_speVar=false, redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, final QHea_flow_nominal=QHea_flow_nominal, final mLoaHea_flow_nominal=mLoaHea_flow_nominal, final T_aHeaWat_nominal=T_aHeaWat_nominal, final T_bHeaWat_nominal=T_bHeaWat_nominal, final T_aLoaHea_nominal=T_aLoaHea_nominal) "Terminal unit with no multiplier"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSet(k=293.15, y( final unit="K", displayUnit="degC")) "Temperature set point"; BaseClasses.FanCoil2PipeHeating terUniMul( have_speVar=false, redeclare package Medium1=Medium1, redeclare package Medium2=Medium2, final QHea_flow_nominal=QHeaUni_flow_nominal, final facMul=facMul, final mLoaHea_flow_nominal=mLoaHeaUni_flow_nominal, final T_aHeaWat_nominal=T_aHeaWat_nominal, final T_bHeaWat_nominal=T_bHeaWat_nominal, final T_aLoaHea_nominal=T_aLoaHea_nominal) "Terminal unit with unit multiplier"; Fluid.Sources.MassFlowSource_T supHeaWat1( use_m_flow_in=true, redeclare package Medium=Medium1, use_T_in=false, T=T_aHeaWat_nominal, nPorts=1) "Heating water supply"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ram( height=1.2*QHea_flow_nominal, duration=500) "Required heat flow rate"; BaseClasses.FanCoil2PipeHeating terUniMulZonMul( facMulZon=facMul, have_speVar=false, redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, final QHea_flow_nominal=QHeaUni_flow_nominal, final facMul=facMul, final mLoaHea_flow_nominal=mLoaHeaUni_flow_nominal, final T_aHeaWat_nominal=T_aHeaWat_nominal, final T_bHeaWat_nominal=T_bHeaWat_nominal, final T_aLoaHea_nominal=T_aLoaHea_nominal) "Terminal unit with unit multiplier and zone multiplier"; Fluid.Sources.MassFlowSource_T supHeaWat2( use_m_flow_in=true, redeclare package Medium = Medium1, use_T_in=false, T=T_aHeaWat_nominal, nPorts=1) "Heating water supply"; equation connect(ter.mReqHeaWat_flow, supHeaWat.m_flow_in); connect(supHeaWat.ports[1], ter.port_aHeaWat); connect(ter.port_bHeaWat, sinHeaWat.ports[1]); connect(terUniMul.port_bHeaWat,sinHeaWat.ports[2]); connect(supHeaWat1.ports[1],terUniMul.port_aHeaWat); connect(terUniMul.mReqHeaWat_flow,supHeaWat1.m_flow_in); connect(ram.y, ter.QReqHea_flow); connect(ram.y,terUniMul.QReqHea_flow); connect(TSet.y, ter.TSetHea); connect(TSet.y, terUniMul.TSetHea); connect(terUniMulZonMul.port_bHeaWat, sinHeaWat.ports[3]); connect(supHeaWat2.ports[1], terUniMulZonMul.port_aHeaWat); connect(TSet.y, terUniMulZonMul.TSetHea); connect(ram.y, terUniMulZonMul.QReqHea_flow); connect(terUniMulZonMul.mReqHeaWat_flow, supHeaWat2.m_flow_in); end TerminalUnitScaling;