Buildings.Controls.OBC.CDL.Utilities.Validation

Collection of models that validate the utilities blocks of the CDL

Information

This package contains models that validate the blocks in Buildings.Controls.OBC.CDL.Utilities.

The examples plot various outputs, which have been verified against analytical solutions. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

Package Content

Name Description
Buildings.Controls.OBC.CDL.Utilities.Validation.Assert Assert Validate the Assert block
Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSet SunRiseSet Test model for the block SunRiseSet
Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetNegativeStartTime SunRiseSetNegativeStartTime Test model for the block SunRiseSet with negative start time
Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetPositiveStartTime SunRiseSetPositiveStartTime Test model for the block SunRiseSet with positive start time

Buildings.Controls.OBC.CDL.Utilities.Validation.Assert Buildings.Controls.OBC.CDL.Utilities.Validation.Assert

Validate the Assert block

Buildings.Controls.OBC.CDL.Utilities.Validation.Assert

Information

Validation test for the block Buildings.Controls.OBC.CDL.Utilities.Assert.

Modelica definition

model Assert "Validate the Assert block" Buildings.Controls.OBC.CDL.Utilities.Assert assert( message="input became false") "Trigger warning and print warning message"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( period=0.5) "Output boolean pulse"; equation connect(booPul.y,assert.u); end Assert;

Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSet Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSet

Test model for the block SunRiseSet

Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSet

Information

This example includes four instances of the Buildings.Controls.OBC.CDL.Utilities.SunRiseSet block: Two normal cases, an arctic and antarctic case. The normal cases are represented by San Francisco and Sydney, where there is a sunrise and sunset every day.

Above the arctic circle and below the antarctic circle, in winter and summer there is a period in which there is no sunset and sunrise for a few days. Hence, the output signals of the block remain constant.

Modelica definition

model SunRiseSet "Test model for the block SunRiseSet" Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetArctic( lat=1.2566370614359, lon=-1.2566370614359, timZon=-18000) "Arctic circle case"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetSf( lat=0.6457718232379, lon=-2.1293016874331, timZon=-28800) "San Francisco as an example in the northen hemisphere"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetAntarctic( lat=-1.3089969389957, lon=0.99483767363677, timZon=14400) "Antarctic circle case"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetSyd( lat=-0.59341194567807, lon=2.6354471705114, timZon=36000) "Sydney as an example in the southern hemisphere"; end SunRiseSet;

Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetNegativeStartTime Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetNegativeStartTime

Test model for the block SunRiseSet with negative start time

Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetNegativeStartTime

Information

This example includes 4 tests for the Buildings.Controls.OBC.CDL.Utilities.SunRiseSet block: 2 normal cases, an arctic and antarctic case. The normal cases are represented by San Francisco and Sydney, where there is a sunrise and sunset every day.

This model starts the simulation from -12 hour instead of 0.

Modelica definition

model SunRiseSetNegativeStartTime "Test model for the block SunRiseSet with negative start time" Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetArctic( lat=1.2566370614359, lon=-1.2566370614359, timZon=-18000) "Arctic circle case"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetSf( lat=0.6457718232379, lon=-2.1293016874331, timZon=-28800) "San Francisco as a test example in the northen hemisphere"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetAntarctic( lat=-1.3089969389957, lon=0.99483767363677, timZon=14400) "Antarctic circle case"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetSyd( lat=-0.59341194567807, lon=2.6354471705114, timZon=36000) "Sydney as a test example in the southern hemisphere"; end SunRiseSetNegativeStartTime;

Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetPositiveStartTime Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetPositiveStartTime

Test model for the block SunRiseSet with positive start time

Buildings.Controls.OBC.CDL.Utilities.Validation.SunRiseSetPositiveStartTime

Information

This example includes 4 tests for the Buildings.Controls.OBC.CDL.Utilities.SunRiseSet block: 2 normal cases, an arctic and antarctic case. The normal cases are represented by San Francisco and Sydney, where there is a sunrise and sunset every day.

This model starts the simulation from 12 hour instead of 0.

Modelica definition

model SunRiseSetPositiveStartTime "Test model for the block SunRiseSet with positive start time" Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetArctic( lat=1.2566370614359, lon=-1.2566370614359, timZon=-18000) "Arctic circle case"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetSf( lat=0.6457718232379, lon=-2.1293016874331, timZon=-28800) "San Francisco as a test example in the northen hemisphere"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetAntarctic( lat=-1.3089969389957, lon=0.99483767363677, timZon=14400) "Antarctic circle case"; Buildings.Controls.OBC.CDL.Utilities.SunRiseSet sunRiseSetSyd( lat=-0.59341194567807, lon=2.6354471705114, timZon=36000) "Sydney as a test example in the southern hemisphere"; end SunRiseSetPositiveStartTime;