Collection of validation models
Information
This package contains validation models for the classes in
Buildings.ThermalZones.EnergyPlus_9_6_0.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 |
FMUZoneAdapterZones1
|
Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange |
FMUZoneAdapterZones2
|
Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange |
FMUZoneAdapterZones3
|
Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange |
Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange
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
Type | Name | Default | Description |
HeatCapacity | CZon | 6*6*2.7*1.2*1006 | Heat capacity of zone air [J/K] |
Modelica definition
model FMUZoneAdapterZones1
extends Modelica.Icons.Example;
parameter Modelica.Units.SI.HeatCapacity CZon=6*6*2.7*1.2*1006
;
inner Building building(
idfName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.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"),
computeWetBulbTemperature=false,
usePrecompiledFMU=false)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.ThermalZoneAdapter fmuZonCor(
modelicaNameBuilding=building.modelicaNameBuilding,
final spawnExe=building.spawnExe,
final idfVersion=building.idfVersion,
final idfName=building.idfName,
final epwName=building.epwName,
final relativeSurfaceTolerance=building.relativeSurfaceTolerance,
final zoneName="Core_ZN",
usePrecompiledFMU=true,
final fmuName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones1.fmu"),
logLevel=building.logLevel,
setInitialRadiativeHeatGainToZero=true,
final nFluPor=2)
;
Modelica.Blocks.Sources.RealExpression X_w(
y=0.01)
;
Modelica.Blocks.Sources.RealExpression mIn_flow(
y=0)
;
Modelica.Blocks.Math.Gain mOut_flow(
k=-1)
;
Modelica.Blocks.Sources.RealExpression TIn[2](
each y=293.15)
;
Modelica.Blocks.Sources.RealExpression QGaiRad_flow(
y=0)
;
Modelica.Blocks.Continuous.Integrator TZonCor(
k=1/CZon,
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=294.15,
y(
final unit="K",
displayUnit="degC"))
;
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;
Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange
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
Type | Name | Default | Description |
HeatCapacity | CZon | 6*6*2.7*1.2*1006 | Heat capacity of zone air [J/K] |
Modelica definition
model FMUZoneAdapterZones2
extends Modelica.Icons.Example;
parameter Modelica.Units.SI.HeatCapacity CZon=6*6*2.7*1.2*1006
;
inner Building building(
idfName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.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"),
computeWetBulbTemperature=false,
usePrecompiledFMU=false)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.ThermalZoneAdapter fmuZonCor(
final modelicaNameBuilding=building.modelicaNameBuilding,
final spawnExe=building.spawnExe,
final idfVersion=building.idfVersion,
final idfName=building.idfName,
final epwName=building.epwName,
final relativeSurfaceTolerance=building.relativeSurfaceTolerance,
final zoneName="Core_ZN",
usePrecompiledFMU=true,
final fmuName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones3.fmu"),
logLevel=building.logLevel,
setInitialRadiativeHeatGainToZero=true,
final nFluPor=2)
;
Modelica.Blocks.Sources.RealExpression X_w(
y=0.01)
;
Modelica.Blocks.Sources.RealExpression mIn_flow(
y=0)
;
Modelica.Blocks.Math.Gain mOut_flow(
k=-1)
;
Modelica.Blocks.Sources.RealExpression TIn[2](
each y=293.15)
;
Modelica.Blocks.Sources.RealExpression QGaiRad_flow(
y=0)
;
Modelica.Blocks.Continuous.Integrator TZonCor(
k=1/CZon,
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=294.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.ThermalZoneAdapter fmuZonSou(
final modelicaNameBuilding=building.modelicaNameBuilding,
final spawnExe=building.spawnExe,
final idfVersion=building.idfVersion,
final idfName=building.idfName,
final epwName=building.epwName,
final relativeSurfaceTolerance=building.relativeSurfaceTolerance,
final zoneName="South_ZN",
usePrecompiledFMU=true,
final fmuName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones3.fmu"),
logLevel=building.logLevel,
setInitialRadiativeHeatGainToZero=true,
final nFluPor=2)
;
Modelica.Blocks.Continuous.Integrator TZonSou(
k=1/CZon,
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=294.15,
y(
final unit="K",
displayUnit="degC"))
;
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;
Validation model for the class and functions that instantiate and communicate with an FMU for Model Exchange
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
Type | Name | Default | Description |
HeatCapacity | CZon | 6*6*2.7*1.2*1006 | Heat capacity of zone air [J/K] |
Modelica definition
model FMUZoneAdapterZones3
extends Modelica.Icons.Example;
parameter Modelica.Units.SI.HeatCapacity CZon=6*6*2.7*1.2*1006
;
inner Building building(
idfName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.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"),
computeWetBulbTemperature=false,
usePrecompiledFMU=false)
;
Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.ThermalZoneAdapter fmuZonCor(
final modelicaNameBuilding=building.modelicaNameBuilding,
final spawnExe=building.spawnExe,
final idfVersion=building.idfVersion,
final idfName=building.idfName,
final epwName=building.epwName,
final relativeSurfaceTolerance=building.relativeSurfaceTolerance,
final zoneName="Core_ZN",
usePrecompiledFMU=true,
final fmuName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones3.fmu"),
logLevel=building.logLevel,
setInitialRadiativeHeatGainToZero=true,
final nFluPor=2)
;
Modelica.Blocks.Sources.RealExpression X_w(
y=0.01)
;
Modelica.Blocks.Sources.RealExpression mIn_flow(
y=0)
;
Modelica.Blocks.Math.Gain mOut_flow(
k=-1)
;
Modelica.Blocks.Sources.RealExpression TIn[2](
each y=293.15)
;
Modelica.Blocks.Sources.RealExpression QGaiRad_flow(
y=0)
;
Modelica.Blocks.Continuous.Integrator TZonCor(
k=1/CZon,
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=294.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.ThermalZoneAdapter fmuZonSou(
final modelicaNameBuilding=building.modelicaNameBuilding,
final spawnExe=building.spawnExe,
final idfVersion=building.idfVersion,
final idfName=building.idfName,
final epwName=building.epwName,
final relativeSurfaceTolerance=building.relativeSurfaceTolerance,
final zoneName="South_ZN",
usePrecompiledFMU=true,
final fmuName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones3.fmu"),
logLevel=building.logLevel,
setInitialRadiativeHeatGainToZero=true,
final nFluPor=2)
;
Modelica.Blocks.Continuous.Integrator TZonSou(
k=1/CZon,
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=294.15,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.ThermalZones.EnergyPlus_9_6_0.BaseClasses.ThermalZoneAdapter fmuZonNor(
final modelicaNameBuilding=building.modelicaNameBuilding,
final spawnExe=building.spawnExe,
final idfVersion=building.idfVersion,
final idfName=building.idfName,
final epwName=building.epwName,
final relativeSurfaceTolerance=building.relativeSurfaceTolerance,
final zoneName="North_ZN",
usePrecompiledFMU=true,
final fmuName=
Modelica.Utilities.Files.loadResource(
"modelica://Buildings/Resources/src/ThermalZones/EnergyPlus_9_6_0/FMUs/Zones3.fmu"),
logLevel=building.logLevel,
setInitialRadiativeHeatGainToZero=true,
final nFluPor=2)
;
Modelica.Blocks.Continuous.Integrator TZonNor(
k=1/CZon,
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=294.15,
y(
final unit="K",
displayUnit="degC"))
;
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;