Buildings.Controls.OBC.CDL.Conversions.Validation

Collection of models that validate the conversion blocks of the CDL

Information

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

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.Conversions.Validation.BooleanToInteger BooleanToInteger Validation model for the BooleanToInteger block
Buildings.Controls.OBC.CDL.Conversions.Validation.BooleanToReal BooleanToReal Validation model for the BooleanToReal block
Buildings.Controls.OBC.CDL.Conversions.Validation.DayTypeCheck DayTypeCheck Model to validate blocks IsWorkingDay, IsNonWorkingDay, IsHoliday
Buildings.Controls.OBC.CDL.Conversions.Validation.IntegerToReal IntegerToReal Validation model for the IntegerToReal block
Buildings.Controls.OBC.CDL.Conversions.Validation.RealToInteger RealToInteger Validation model for the RealToInteger block

Buildings.Controls.OBC.CDL.Conversions.Validation.BooleanToInteger Buildings.Controls.OBC.CDL.Conversions.Validation.BooleanToInteger

Validation model for the BooleanToInteger block

Buildings.Controls.OBC.CDL.Conversions.Validation.BooleanToInteger

Information

Validation test for the block Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger.

Modelica definition

model BooleanToInteger "Validation model for the BooleanToInteger block" Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger booToInt "Block that convert Boolean to Integer signal"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( period=1) "Generate output cyclic on and off"; equation connect(booPul.y, booToInt.u); end BooleanToInteger;

Buildings.Controls.OBC.CDL.Conversions.Validation.BooleanToReal Buildings.Controls.OBC.CDL.Conversions.Validation.BooleanToReal

Validation model for the BooleanToReal block

Buildings.Controls.OBC.CDL.Conversions.Validation.BooleanToReal

Information

Validation test for the block Buildings.Controls.OBC.CDL.Conversions.BooleanToReal.

Modelica definition

model BooleanToReal "Validation model for the BooleanToReal block" Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea "Block that convert Boolean to Real signal"; Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( period=1) "Generate output cyclic on and off"; equation connect(booPul.y, booToRea.u); end BooleanToReal;

Buildings.Controls.OBC.CDL.Conversions.Validation.DayTypeCheck Buildings.Controls.OBC.CDL.Conversions.Validation.DayTypeCheck

Model to validate blocks IsWorkingDay, IsNonWorkingDay, IsHoliday

Buildings.Controls.OBC.CDL.Conversions.Validation.DayTypeCheck

Information

This example validates the bocks IsWorkingDay, IsNonWorkingDay, IsHoliday. The instance dayTypSat generates DayType signals for three consecutive weeks, with five working and two non-working days. The first day is Saturady, which is a non-working day.

Modelica definition

model DayTypeCheck "Model to validate blocks IsWorkingDay, IsNonWorkingDay, IsHoliday" Buildings.Controls.OBC.CDL.Conversions.IsWorkingDay isWorDay "Block to check if it is working day"; Buildings.Controls.OBC.CDL.Conversions.IsNonWorkingDay isNonWorDay "Block to check if it is non-working day"; Buildings.Controls.OBC.CDL.Conversions.IsHoliday isHoliday "Block to check if it is holiday day"; Buildings.Controls.OBC.CDL.Discrete.DayType dayTypSat(iStart=6) "Model that outputs the type of the day, starting with Saturday"; equation connect(dayTypSat.y[1], isNonWorDay.u); connect(dayTypSat.y[1], isHoliday.u); connect(dayTypSat.y[1], isWorDay.u); end DayTypeCheck;

Buildings.Controls.OBC.CDL.Conversions.Validation.IntegerToReal Buildings.Controls.OBC.CDL.Conversions.Validation.IntegerToReal

Validation model for the IntegerToReal block

Buildings.Controls.OBC.CDL.Conversions.Validation.IntegerToReal

Information

Validation test for the block Buildings.Controls.OBC.CDL.Conversions.IntegerToReal.

Modelica definition

model IntegerToReal "Validation model for the IntegerToReal block" Buildings.Controls.OBC.CDL.Conversions.IntegerToReal intToRea "Block that convert Integer to Real signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; Buildings.Controls.OBC.CDL.Continuous.Round round2(n=0) "Round real number to given digits"; Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt1 "Convert real to integer"; equation connect(ramp1.y, round2.u); connect(round2.y, reaToInt1.u); connect(reaToInt1.y, intToRea.u); end IntegerToReal;

Buildings.Controls.OBC.CDL.Conversions.Validation.RealToInteger Buildings.Controls.OBC.CDL.Conversions.Validation.RealToInteger

Validation model for the RealToInteger block

Buildings.Controls.OBC.CDL.Conversions.Validation.RealToInteger

Information

Validation test for the block Buildings.Controls.OBC.CDL.Conversions.RealToInteger.

Modelica definition

model RealToInteger "Validation model for the RealToInteger block" Buildings.Controls.OBC.CDL.Conversions.RealToInteger reaToInt "Block that converts Real to Integer signal"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; equation connect(ramp1.y, reaToInt.u); end RealToInteger;