CDL.Conversions.Validation

Collection of models that validate the conversion blocks of the CDL

Information

This package contains models that validate the blocks in 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
CDL.Conversions.Validation.BooleanToInteger BooleanToInteger Validation model for the BooleanToInteger block
CDL.Conversions.Validation.BooleanToReal BooleanToReal Validation model for the BooleanToReal block
CDL.Conversions.Validation.IntegerToReal IntegerToReal Validation model for the IntegerToReal block
CDL.Conversions.Validation.RealToInteger RealToInteger Validation model for the RealToInteger block

CDL.Conversions.Validation.BooleanToInteger CDL.Conversions.Validation.BooleanToInteger

Validation model for the BooleanToInteger block

CDL.Conversions.Validation.BooleanToInteger

Information

Validation test for the block CDL.Conversions.BooleanToInteger.

Modelica definition

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

CDL.Conversions.Validation.BooleanToReal CDL.Conversions.Validation.BooleanToReal

Validation model for the BooleanToReal block

CDL.Conversions.Validation.BooleanToReal

Information

Validation test for the block CDL.Conversions.BooleanToReal.

Modelica definition

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

CDL.Conversions.Validation.IntegerToReal CDL.Conversions.Validation.IntegerToReal

Validation model for the IntegerToReal block

CDL.Conversions.Validation.IntegerToReal

Information

Validation test for the block CDL.Conversions.IntegerToReal.

Modelica definition

model IntegerToReal "Validation model for the IntegerToReal block" CDL.Conversions.IntegerToReal intToRea "Block that converts Integer to Real signal"; CDL.Continuous.Sources.Ramp ramp1( duration=1, offset=-3.5, height=7.0) "Block that generates ramp signal"; CDL.Continuous.Round round2( n=0) "Round real number to given digits"; 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;

CDL.Conversions.Validation.RealToInteger CDL.Conversions.Validation.RealToInteger

Validation model for the RealToInteger block

CDL.Conversions.Validation.RealToInteger

Information

Validation test for the block CDL.Conversions.RealToInteger.

Modelica definition

model RealToInteger "Validation model for the RealToInteger block" CDL.Conversions.RealToInteger reaToInt "Block that converts Real to Integer signal"; 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;