Buildings.Experimental.DHC.Loads.BaseClasses.Validation

Collection of validation models

Information

This package contains models that validate the base classes in Buildings.Experimental.DHC.Loads.BaseClasses.

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

Package Content

Name Description
Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BuildingWithETS BuildingWithETS Validation of the base class PartialBuildingWithPartialETS
Buildings.Experimental.DHC.Loads.BaseClasses.Validation.GetPeakLoad GetPeakLoad Model that validates the getPeakLoad function
Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses BaseClasses Package with base classes

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BuildingWithETS Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BuildingWithETS

Validation of the base class PartialBuildingWithPartialETS

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BuildingWithETS

Information

This model validates Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuildingWithPartialETS for various types of district system.

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

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal1Nominal mass flow rate [kg/s]
HeatFlowRateQHeaWat_flow_nominal1E4Nominal mass flow rate [W]
HeatFlowRateQChiWat_flow_nominal-1E4Nominal mass flow rate [W]

Modelica definition

model BuildingWithETS "Validation of the base class PartialBuildingWithPartialETS" extends Modelica.Icons.Example; import TypDisSys=Buildings.Experimental.DHC.Types.DistrictSystemType "District system type enumeration"; package MediumW=Buildings.Media.Water "Water"; package MediumS=Modelica.Media.Water.WaterIF97_ph ( h_default=2770E3) "Steam"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal=1 "Nominal mass flow rate"; parameter Modelica.SIunits.HeatFlowRate QHeaWat_flow_nominal=1E4 "Nominal mass flow rate"; parameter Modelica.SIunits.HeatFlowRate QChiWat_flow_nominal=-1E4 "Nominal mass flow rate"; BaseClasses.BuildingWithETS buiHeaGen1( redeclare final package MediumSerHea_a=MediumS, redeclare final package MediumSer=MediumW, redeclare final package MediumBui=MediumW, nPorts_heaWat=1, bui( final have_heaWat=true), ets( final typ=TypDisSys.HeatingGeneration1, final m_flow_nominal=m_flow_nominal, final have_heaWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal)) "Building and ETS component - Heating only (steam)"; Fluid.Sources.MassFlowSource_T souDisSup( redeclare final package Medium=MediumS, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet( redeclare final package Medium=MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo( redeclare final package Medium1=MediumS, redeclare final package Medium2=MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; BaseClasses.BuildingWithETS buiComGen1( redeclare final package MediumSerHea_a=MediumS, redeclare final package MediumSer=MediumW, redeclare final package MediumBui=MediumW, nPorts_heaWat=1, nPorts_chiWat=1, bui( final have_heaWat=true, final have_chiWat=true), ets( final typ=TypDisSys.CombinedGeneration1, final m_flow_nominal=m_flow_nominal, final have_heaWat=true, final have_chiWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal, QChiWat_flow_nominal=QChiWat_flow_nominal)) "Building and ETS component - Combined heating (steam) and cooling"; Fluid.Sources.MassFlowSource_T souDisSup1( redeclare final package Medium=MediumS, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet1( redeclare final package Medium=MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo1( redeclare final package Medium1=MediumS, redeclare final package Medium2 = Media.Water, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; Fluid.Sources.MassFlowSource_T souDisSup2( redeclare final package Medium=MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet2( redeclare final package Medium=MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo2( redeclare final package Medium1=MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; Fluid.Sources.MassFlowSource_T souDisSup3( redeclare final package Medium=MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet3( redeclare final package Medium=MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo3( redeclare final package Medium1=MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; BaseClasses.BuildingWithETS buiCoo( redeclare final package MediumSer=MediumW, redeclare final package MediumBui=MediumW, nPorts_chiWat=1, bui( final have_chiWat=true), ets( final typ=TypDisSys.Cooling, final m_flow_nominal=m_flow_nominal, final have_chiWat=true, QChiWat_flow_nominal=QChiWat_flow_nominal)) "Building and ETS component - Cooling only"; BaseClasses.BuildingWithETS buiComGen2to4( redeclare final package MediumSer = MediumW, redeclare final package MediumBui = MediumW, nPorts_heaWat=1, nPorts_chiWat=1, bui( final have_heaWat=true, final have_chiWat=true), ets( final typ=TypDisSys.CombinedGeneration2to4, final m_flow_nominal=m_flow_nominal, final have_heaWat=true, final have_chiWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal, QChiWat_flow_nominal=QChiWat_flow_nominal)) "Building and ETS component - Combined heating and cooling"; Fluid.Sources.MassFlowSource_T souDisSup5( redeclare final package Medium = MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet5( redeclare final package Medium = MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo5( redeclare final package Medium1 = MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; Fluid.Sources.MassFlowSource_T souDisSup6( redeclare final package Medium =MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet6( redeclare final package Medium = MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo6( redeclare final package Medium1 = MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; BaseClasses.BuildingWithETS buiHeaGen2to4( redeclare final package MediumSer = MediumW, redeclare final package MediumBui = MediumW, nPorts_heaWat=1, bui( final have_heaWat=true), ets( final typ=TypDisSys.HeatingGeneration2to4, final m_flow_nominal= m_flow_nominal, final have_heaWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal)) "Building and ETS component - Heating only"; Fluid.Sources.MassFlowSource_T souDisSup7( redeclare final package Medium = MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet7( redeclare final package Medium = MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo7( redeclare final package Medium1 = MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; Fluid.Sources.MassFlowSource_T souDisSup4( redeclare final package Medium = MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet4(redeclare final package Medium = MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo4(redeclare final package Medium1 = MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; BaseClasses.BuildingWithETS buiComGen5( redeclare final package MediumSer = MediumW, redeclare final package MediumBui = MediumW, nPorts_heaWat=1, nPorts_chiWat=1, bui(final have_heaWat=true, final have_chiWat=true), ets( final typ=TypDisSys.CombinedGeneration5, final m_flow_nominal=m_flow_nominal, final have_heaWat=true, final have_chiWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal, QChiWat_flow_nominal=QChiWat_flow_nominal)) "Building and ETS component - Combined heating and cooling (ambient)"; Fluid.Sources.MassFlowSource_T souDisSup8( redeclare final package Medium = MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet8(redeclare final package Medium = MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo8(redeclare final package Medium1 = MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; BaseClasses.BuildingWithETS buiTesOutETS( redeclare final package MediumSer = MediumW, redeclare final package MediumBui = MediumW, nPorts_heaWat=1, nPorts_chiWat=1, bui(final have_heaWat=true, final have_chiWat=true), ets( final typ=TypDisSys.CombinedGeneration5, final m_flow_nominal=m_flow_nominal, final have_heaWat=true, final have_chiWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal, QChiWat_flow_nominal=QChiWat_flow_nominal, final have_fan=true, final have_pum=true, final have_eleHea=true, final have_eleCoo=true)) "Building and ETS component - Testing ETS output connectors"; Fluid.Sources.MassFlowSource_T souDisSup9( redeclare final package Medium = MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet9(redeclare final package Medium = MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo9(redeclare final package Medium1 = MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; BaseClasses.BuildingWithETS buiTesOutETSBui( redeclare final package MediumSer = MediumW, redeclare final package MediumBui = MediumW, nPorts_heaWat=1, nPorts_chiWat=1, bui( final have_heaWat=true, final have_chiWat=true, final have_fan=true, final have_pum=true, final have_eleHea=true, final have_eleCoo=true), ets( final typ=TypDisSys.CombinedGeneration5, final m_flow_nominal=m_flow_nominal, final have_heaWat=true, final have_chiWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal, QChiWat_flow_nominal=QChiWat_flow_nominal, final have_fan=true, final have_pum=true, final have_eleHea=true, final have_eleCoo=true)) "Building and ETS component - Testing ETS and building output connectors"; Fluid.Sources.MassFlowSource_T souDisSup10( redeclare final package Medium = MediumW, m_flow=m_flow_nominal, nPorts=1) "Source for district supply"; Fluid.Sources.Boundary_pT sinDisRet10(redeclare final package Medium = MediumW, nPorts=1) "Sink for district return"; Networks.BaseClasses.DifferenceEnthalpyFlowRate senDifEntFlo10(redeclare final package Medium1 = MediumW, final m_flow_nominal=m_flow_nominal) "Change in enthalpy flow rate "; BaseClasses.BuildingWithETS buiTesFacMul( redeclare final package MediumSer = MediumW, redeclare final package MediumBui = MediumW, nPorts_heaWat=1, nPorts_chiWat=1, facMul=2, bui( final have_heaWat=true, final have_chiWat=true, final have_fan=true, final have_pum=true, final have_eleHea=true, final have_eleCoo=true), ets( final typ=TypDisSys.CombinedGeneration5, final m_flow_nominal=m_flow_nominal, final have_heaWat=true, final have_chiWat=true, QHeaWat_flow_nominal=QHeaWat_flow_nominal, QChiWat_flow_nominal=QChiWat_flow_nominal, final have_fan=true, final have_pum=true, final have_eleHea=true, final have_eleCoo=true)) "Building and ETS component - Testing scaling factor"; equation connect(souDisSup.ports[1],senDifEntFlo.port_a1); connect(senDifEntFlo.port_b2,sinDisRet.ports[1]); connect(souDisSup1.ports[1],senDifEntFlo1.port_a1); connect(senDifEntFlo1.port_b2,sinDisRet1.ports[1]); connect(souDisSup2.ports[1],senDifEntFlo2.port_a1); connect(senDifEntFlo2.port_b2,sinDisRet2.ports[1]); connect(souDisSup3.ports[1],senDifEntFlo3.port_a1); connect(sinDisRet3.ports[1],senDifEntFlo3.port_b2); connect(senDifEntFlo.port_b1, buiHeaGen1.port_aSerHea); connect(senDifEntFlo.port_a2, buiHeaGen1.port_bSerHea); connect(senDifEntFlo1.port_b1, buiComGen1.port_aSerHea); connect(buiComGen1.port_bSerHea, senDifEntFlo1.port_a2); connect(senDifEntFlo2.port_b1, buiComGen1.port_aSerCoo); connect(buiComGen1.port_bSerCoo, senDifEntFlo2.port_a2); connect(senDifEntFlo3.port_b1, buiCoo.port_aSerCoo); connect(buiCoo.port_bSerCoo, senDifEntFlo3.port_a2); connect(souDisSup5.ports[1],senDifEntFlo5.port_a1); connect(senDifEntFlo5.port_b2,sinDisRet5.ports[1]); connect(souDisSup6.ports[1],senDifEntFlo6.port_a1); connect(senDifEntFlo6.port_b2,sinDisRet6.ports[1]); connect(senDifEntFlo5.port_b1, buiComGen2to4.port_aSerHea); connect(buiComGen2to4.port_bSerHea, senDifEntFlo5.port_a2); connect(senDifEntFlo6.port_b1, buiComGen2to4.port_aSerCoo); connect(buiComGen2to4.port_bSerCoo, senDifEntFlo6.port_a2); connect(souDisSup7.ports[1], senDifEntFlo7.port_a1); connect(senDifEntFlo7.port_b2, sinDisRet7.ports[1]); connect(senDifEntFlo7.port_b1, buiHeaGen2to4.port_aSerHea); connect(senDifEntFlo7.port_a2, buiHeaGen2to4.port_bSerHea); connect(souDisSup4.ports[1],senDifEntFlo4.port_a1); connect(sinDisRet4.ports[1],senDifEntFlo4.port_b2); connect(senDifEntFlo4.port_b1,buiComGen5. port_aSerAmb); connect(buiComGen5.port_bSerAmb,senDifEntFlo4. port_a2); connect(souDisSup8.ports[1],senDifEntFlo8.port_a1); connect(sinDisRet8.ports[1],senDifEntFlo8.port_b2); connect(senDifEntFlo8.port_b1,buiTesOutETS. port_aSerAmb); connect(buiTesOutETS.port_bSerAmb,senDifEntFlo8. port_a2); connect(souDisSup9.ports[1],senDifEntFlo9.port_a1); connect(sinDisRet9.ports[1],senDifEntFlo9.port_b2); connect(senDifEntFlo9.port_b1,buiTesOutETSBui. port_aSerAmb); connect(buiTesOutETSBui.port_bSerAmb,senDifEntFlo9. port_a2); connect(souDisSup10.ports[1],senDifEntFlo10. port_a1); connect(sinDisRet10.ports[1],senDifEntFlo10. port_b2); connect(senDifEntFlo10.port_b1,buiTesFacMul. port_aSerAmb); connect(buiTesFacMul.port_bSerAmb,senDifEntFlo10. port_a2); end BuildingWithETS;

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.GetPeakLoad Buildings.Experimental.DHC.Loads.BaseClasses.Validation.GetPeakLoad

Model that validates the getPeakLoad function

Information

This model tests reading the peak loads from the load file. If the wrong values are read, then the simulation stops with an error.

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

Parameters

TypeNameDefaultDescription
HeatFlowRateQCoo_flowBuildings.Experimental.DHC.L...Peak heat flow rate [W]
HeatFlowRateQHea_flowBuildings.Experimental.DHC.L...Peak heat flow rate [W]
HeatFlowRateQWatHea_flowBuildings.Experimental.DHC.L...Peak water heating flow rate [W]

Modelica definition

model GetPeakLoad "Model that validates the getPeakLoad function" extends Modelica.Icons.Example; parameter Modelica.SIunits.HeatFlowRate QCoo_flow=Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad( string="#Peak space cooling load", filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/Experimental/DHC/Loads/BaseClasses/Validation/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos")) "Peak heat flow rate"; parameter Modelica.SIunits.HeatFlowRate QHea_flow=Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad( string="#Peak space heating load", filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/Experimental/DHC/Loads/BaseClasses/Validation/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos")) "Peak heat flow rate"; parameter Modelica.SIunits.HeatFlowRate QWatHea_flow=Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad( string="#Peak water heating load", filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/Experimental/DHC/Loads/BaseClasses/Validation/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos")) "Peak water heating flow rate"; equation assert( abs( QCoo_flow-(-383165.6989)) < 1E-3, "Error in reading the peak heating load. Read "+String( QCoo_flow)); assert( abs( QHea_flow-893931.4335) < 1E-3, "Error in reading the peak heating load. Read "+String( QHea_flow)); assert( abs( QWatHea_flow-19496.90012) < 1E-3, "Error in reading the peak water heating load. Read "+String( QWatHea_flow)); end GetPeakLoad;