Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation

Collection of validation models

Information

This package contains validation models for the classes in Buildings.ThermalZones.EnergyPlus.BaseClasses.

Note that most validation models contain simple input data which may not be realistic, but for which the correct output can be obtained through an analytic solution. The examples plot various outputs, which have been verified against these solutions. These model outputs are stored as reference data and used for continuous validation whenever models in the library change.

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

Package Content

Name Description
Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones1 FMUZoneAdapterZones1 Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange
Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones2 FMUZoneAdapterZones2 Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange
Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones3 FMUZoneAdapterZones3 Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange

Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones1 Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones1

Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange

Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones1

Information

Validation model that communicates with an FMU that emulates simple thermal zones. All thermal zones are identical.

This test is done to validate the FMI API, using an FMU 2.0 for Model Exchange, compiled for Linux 64 bit by JModelica.

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

Parameters

TypeNameDefaultDescription
StringidfNameModelica.Utilities.Files.loa...Name of the IDF file
StringweaNameModelica.Utilities.Files.loa...Name of the weather file
HeatCapacityCZon6*6*2.7*1.2*1006Heat capacity of zone air [J/K]

Modelica definition

model FMUZoneAdapterZones1 "Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange" extends Modelica.Icons.Example; constant String modelicaNameBuilding=getInstanceName() "Name of the building"; parameter String idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf") "Name of the IDF file"; parameter String weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos") "Name of the weather file"; parameter Modelica.SIunits.HeatCapacity CZon=6*6*2.7*1.2*1006 "Heat capacity of zone air"; inner Building building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus/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"), usePrecompiledFMU=false, showWeatherData=false) "Building model"; Buildings.ThermalZones.EnergyPlus.BaseClasses.ThermalZoneAdapter fmuZonCor( modelicaNameBuilding=modelicaNameBuilding, final idfName=idfName, final weaName=weaName, relativeSurfaceTolerance=building.relativeSurfaceTolerance, final zoneName="Core_ZN", usePrecompiledFMU=true, final fmuName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones1.fmu"), logLevel=building.logLevel, final nFluPor=2) "Adapter to EnergyPlus"; Modelica.Blocks.Sources.RealExpression X_w( y=0.01) "Zone absolute humidity"; Modelica.Blocks.Sources.RealExpression mIn_flow( y=0) "Inlet mass flow rate"; Modelica.Blocks.Math.Gain mOut_flow( k=-1) "Outlet mass flow rate"; Modelica.Blocks.Sources.RealExpression TIn[2]( each y=293.15) "Inlet temperature"; Modelica.Blocks.Sources.RealExpression QGaiRad_flow( y=0) "Radiative heat gain for the zone"; Modelica.Blocks.Continuous.Integrator TZonCor( k=1/CZon, initType=Modelica.Blocks.Types.Init.InitialState, y_start=294.15, y(final unit="K", displayUnit="degC")) "Zone air temperature"; equation connect(X_w.y,fmuZonCor.X_w); connect(fmuZonCor.m_flow[1],mIn_flow.y); connect(mOut_flow.u,mIn_flow.y); connect(mOut_flow.y,fmuZonCor.m_flow[2]); connect(TIn.y,fmuZonCor.TInlet); connect(fmuZonCor.QGaiRad_flow,QGaiRad_flow.y); connect(TZonCor.y,fmuZonCor.T); connect(fmuZonCor.QCon_flow,TZonCor.u); end FMUZoneAdapterZones1;

Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones2 Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones2

Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange

Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones2

Information

Validation model that communicates with an FMU that emulates two simple thermal zones. Both thermal zones are identical.

This test is done to validate the FMI API, using an FMU 2.0 for Model Exchange, compiled for Linux 64 bit by JModelica.

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

Parameters

TypeNameDefaultDescription
StringidfNameModelica.Utilities.Files.loa...Name of the IDF file
StringweaNameModelica.Utilities.Files.loa...Name of the weather file
HeatCapacityCZon6*6*2.7*1.2*1006Heat capacity of zone air [J/K]

Modelica definition

model FMUZoneAdapterZones2 "Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange" extends Modelica.Icons.Example; constant String modelicaNameBuilding=getInstanceName() "Name of the building"; parameter String idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf") "Name of the IDF file"; parameter String weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos") "Name of the weather file"; parameter Modelica.SIunits.HeatCapacity CZon=6*6*2.7*1.2*1006 "Heat capacity of zone air"; inner Building building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus/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"), usePrecompiledFMU=false, showWeatherData=false) "Building model"; Buildings.ThermalZones.EnergyPlus.BaseClasses.ThermalZoneAdapter fmuZonCor( modelicaNameBuilding=modelicaNameBuilding, final idfName=idfName, final weaName=weaName, relativeSurfaceTolerance=building.relativeSurfaceTolerance, final zoneName="Core_ZN", usePrecompiledFMU=true, final fmuName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones3.fmu"), logLevel=building.logLevel, final nFluPor=2) "Adapter to EnergyPlus"; Modelica.Blocks.Sources.RealExpression X_w( y=0.01) "Zone absolute humidity"; Modelica.Blocks.Sources.RealExpression mIn_flow( y=0) "Inlet mass flow rate"; Modelica.Blocks.Math.Gain mOut_flow( k=-1) "Outlet mass flow rate"; Modelica.Blocks.Sources.RealExpression TIn[2]( each y=293.15) "Inlet temperature"; Modelica.Blocks.Sources.RealExpression QGaiRad_flow( y=0) "Radiative heat gain for the zone"; Modelica.Blocks.Continuous.Integrator TZonCor( k=1/CZon, initType=Modelica.Blocks.Types.Init.InitialState, y_start=294.15, y(final unit="K", displayUnit="degC")) "Zone air temperature"; Buildings.ThermalZones.EnergyPlus.BaseClasses.ThermalZoneAdapter fmuZonSou( modelicaNameBuilding=modelicaNameBuilding, final idfName=idfName, final weaName=weaName, relativeSurfaceTolerance=building.relativeSurfaceTolerance, final zoneName="South_ZN", usePrecompiledFMU=true, final fmuName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones3.fmu"), logLevel=building.logLevel, final nFluPor=2) "Adapter to EnergyPlus"; Modelica.Blocks.Continuous.Integrator TZonSou( k=1/CZon, initType=Modelica.Blocks.Types.Init.InitialState, y_start=294.15, y(final unit="K", displayUnit="degC")) "Zone air temperature"; equation connect(X_w.y,fmuZonCor.X_w); connect(fmuZonCor.m_flow[1],mIn_flow.y); connect(mOut_flow.u,mIn_flow.y); connect(mOut_flow.y,fmuZonCor.m_flow[2]); connect(TIn.y,fmuZonCor.TInlet); connect(fmuZonCor.QGaiRad_flow,QGaiRad_flow.y); connect(X_w.y,fmuZonSou.X_w); connect(fmuZonSou.m_flow[1],mIn_flow.y); connect(mOut_flow.y,fmuZonSou.m_flow[2]); connect(TIn.y,fmuZonSou.TInlet); connect(fmuZonSou.QGaiRad_flow,QGaiRad_flow.y); connect(TZonCor.y,fmuZonCor.T); connect(fmuZonCor.QCon_flow,TZonCor.u); connect(fmuZonSou.QCon_flow,TZonSou.u); connect(TZonSou.y,fmuZonSou.T); end FMUZoneAdapterZones2;

Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones3 Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones3

Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange

Buildings.ThermalZones.EnergyPlus.BaseClasses.Validation.FMUZoneAdapterZones3

Information

Validation model that communicates with an FMU that emulates three simple thermal zones. All thermal zones are identical.

This test is done to validate the FMI API, using an FMU 2.0 for Model Exchange, compiled for Linux 64 bit by JModelica.

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

Parameters

TypeNameDefaultDescription
StringidfNameModelica.Utilities.Files.loa...Name of the IDF file
StringweaNameModelica.Utilities.Files.loa...Name of the weather file
HeatCapacityCZon6*6*2.7*1.2*1006Heat capacity of zone air [J/K]

Modelica definition

model FMUZoneAdapterZones3 "Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange" extends Modelica.Icons.Example; constant String modelicaNameBuilding=getInstanceName() "Name of the building"; parameter String idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf") "Name of the IDF file"; parameter String weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos") "Name of the weather file"; parameter Modelica.SIunits.HeatCapacity CZon=6*6*2.7*1.2*1006 "Heat capacity of zone air"; inner Building building( idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus/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"), usePrecompiledFMU=false, showWeatherData=false) "Building model"; Buildings.ThermalZones.EnergyPlus.BaseClasses.ThermalZoneAdapter fmuZonCor( modelicaNameBuilding=modelicaNameBuilding, final idfName=idfName, final weaName=weaName, relativeSurfaceTolerance=building.relativeSurfaceTolerance, final zoneName="Core_ZN", usePrecompiledFMU=true, final fmuName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones3.fmu"), logLevel=building.logLevel, final nFluPor=2) "Adapter to EnergyPlus"; Modelica.Blocks.Sources.RealExpression X_w( y=0.01) "Zone absolute humidity"; Modelica.Blocks.Sources.RealExpression mIn_flow( y=0) "Inlet mass flow rate"; Modelica.Blocks.Math.Gain mOut_flow( k=-1) "Outlet mass flow rate"; Modelica.Blocks.Sources.RealExpression TIn[2]( each y=293.15) "Inlet temperature"; Modelica.Blocks.Sources.RealExpression QGaiRad_flow( y=0) "Radiative heat gain for the zone"; Modelica.Blocks.Continuous.Integrator TZonCor( k=1/CZon, initType=Modelica.Blocks.Types.Init.InitialState, y_start=294.15, y(final unit="K", displayUnit="degC")) "Zone air temperature"; Buildings.ThermalZones.EnergyPlus.BaseClasses.ThermalZoneAdapter fmuZonSou( modelicaNameBuilding=modelicaNameBuilding, final idfName=idfName, final weaName=weaName, relativeSurfaceTolerance=building.relativeSurfaceTolerance, final zoneName="South_ZN", usePrecompiledFMU=true, final fmuName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones3.fmu"), logLevel=building.logLevel, final nFluPor=2) "Adapter to EnergyPlus"; Modelica.Blocks.Continuous.Integrator TZonSou( k=1/CZon, initType=Modelica.Blocks.Types.Init.InitialState, y_start=294.15, y(final unit="K", displayUnit="degC")) "Zone air temperature"; Buildings.ThermalZones.EnergyPlus.BaseClasses.ThermalZoneAdapter fmuZonNor( modelicaNameBuilding=modelicaNameBuilding, final idfName=idfName, final weaName=weaName, relativeSurfaceTolerance=building.relativeSurfaceTolerance, final zoneName="North_ZN", usePrecompiledFMU=true, final fmuName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/src/ThermalZones/EnergyPlus/FMUs/Zones3.fmu"), logLevel=building.logLevel, final nFluPor=2) "Adapter to EnergyPlus"; Modelica.Blocks.Continuous.Integrator TZonNor( k=1/CZon, initType=Modelica.Blocks.Types.Init.InitialState, y_start=294.15, y(final unit="K", displayUnit="degC")) "Zone air temperature"; equation connect(X_w.y,fmuZonCor.X_w); connect(fmuZonCor.m_flow[1],mIn_flow.y); connect(mOut_flow.u,mIn_flow.y); connect(mOut_flow.y,fmuZonCor.m_flow[2]); connect(TIn.y,fmuZonCor.TInlet); connect(fmuZonCor.QGaiRad_flow,QGaiRad_flow.y); connect(X_w.y,fmuZonSou.X_w); connect(fmuZonSou.m_flow[1],mIn_flow.y); connect(mOut_flow.y,fmuZonSou.m_flow[2]); connect(TIn.y,fmuZonSou.TInlet); connect(fmuZonSou.QGaiRad_flow,QGaiRad_flow.y); connect(TZonCor.y,fmuZonCor.T); connect(X_w.y,fmuZonNor.X_w); connect(fmuZonNor.m_flow[1],mIn_flow.y); connect(mOut_flow.y,fmuZonNor.m_flow[2]); connect(TIn.y,fmuZonNor.TInlet); connect(fmuZonNor.QGaiRad_flow,QGaiRad_flow.y); connect(fmuZonCor.QCon_flow,TZonCor.u); connect(fmuZonSou.QCon_flow,TZonSou.u); connect(TZonSou.y,fmuZonSou.T); connect(fmuZonNor.QCon_flow,TZonNor.u); connect(TZonNor.y,fmuZonNor.T); end FMUZoneAdapterZones3;