Buildings.Controls.OBC.UnitConversions.Validation

Collection of models that validate the unit conversion blocks of the CDL

Information

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

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.UnitConversions.Validation.From_Btu From_Btu Validation model for unit conversion from British thermal units to joule
Buildings.Controls.OBC.UnitConversions.Validation.From_BtuPerHour From_BtuPerHour Validation model for unit conversion from British thermal units per hour to watt
Buildings.Controls.OBC.UnitConversions.Validation.From_bar From_bar Validation model for unit conversion from bar to pascal
Buildings.Controls.OBC.UnitConversions.Validation.From_cfm From_cfm Validation model for unit conversion from cubic feet per minute to cubic meters per second
Buildings.Controls.OBC.UnitConversions.Validation.From_degC From_degC Validation model for unit conversion from degree Celsius to kelvin
Buildings.Controls.OBC.UnitConversions.Validation.From_degF From_degF Validation model for unit conversion from degree Fahrenheit to kelvin
Buildings.Controls.OBC.UnitConversions.Validation.From_gal From_gal Validation model for unit conversion from gallon to cubic meter
Buildings.Controls.OBC.UnitConversions.Validation.From_hp From_hp Validation model for unit conversion from horsepower to watt
Buildings.Controls.OBC.UnitConversions.Validation.From_inH2O From_inH2O Validation model for unit conversion from inch of water gauge (at 60 degF) to pascal
Buildings.Controls.OBC.UnitConversions.Validation.From_psi From_psi Validation model for unit conversion from pound-force per square inch to pascal
Buildings.Controls.OBC.UnitConversions.Validation.From_quad From_quad Validation model for unit conversion from quads to joule
Buildings.Controls.OBC.UnitConversions.Validation.From_ton From_ton Validation model for unit conversion from ton of refrigeration to watt
Buildings.Controls.OBC.UnitConversions.Validation.To_Btu To_Btu Validation model for unit conversion from joule to British thermal units
Buildings.Controls.OBC.UnitConversions.Validation.To_BtuPerHour To_BtuPerHour Validation model for unit conversion from watt to British thermal units per hour
Buildings.Controls.OBC.UnitConversions.Validation.To_bar To_bar Validation model for unit conversion from pascal to bar
Buildings.Controls.OBC.UnitConversions.Validation.To_cfm To_cfm Validation model for unit conversion from cubic meters per second to cubic feet per minute
Buildings.Controls.OBC.UnitConversions.Validation.To_degC To_degC Validation model for unit conversion from kelvin to degree Celsius
Buildings.Controls.OBC.UnitConversions.Validation.To_degF To_degF Validation model for unit conversion from kelvin to degree Fahrenheit
Buildings.Controls.OBC.UnitConversions.Validation.To_gal To_gal Validation model for unit conversion from cubic meter to gallon
Buildings.Controls.OBC.UnitConversions.Validation.To_hp To_hp Validation model for unit conversion from watt to horsepower
Buildings.Controls.OBC.UnitConversions.Validation.To_inH2O To_inH2O Validation model for unit conversion from pascal to inch of water gauge (at 60 degF)
Buildings.Controls.OBC.UnitConversions.Validation.To_psi To_psi Validation model for unit conversion from pascal to pound-force per square inch
Buildings.Controls.OBC.UnitConversions.Validation.To_quad To_quad Validation model for unit conversion from joule to quads
Buildings.Controls.OBC.UnitConversions.Validation.To_ton To_ton Validation model for unit conversion from watt to ton of refrigeration

Buildings.Controls.OBC.UnitConversions.Validation.From_Btu Buildings.Controls.OBC.UnitConversions.Validation.From_Btu

Validation model for unit conversion from British thermal units to joule

Buildings.Controls.OBC.UnitConversions.Validation.From_Btu

Information

This model validates energy unit conversion from British thermal units to joule.

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

Modelica definition

model From_Btu "Validation model for unit conversion from British thermal units to joule" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1. "Validation input"; parameter Real kin1 = 2. "Validation input 1"; parameter Real kout = 1.*1055.056 "Validation output"; parameter Real kout1 = 2.*1055.056 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_Btu from_Btu "Unit converter from British thermal units to joule "; Buildings.Controls.OBC.UnitConversions.From_Btu from_Btu1 "Unit converter from British thermal units to joule "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_Btu1.u); connect(from_Btu1.y, sub1.u1); connect(from_Btu.y, sub.u1); connect(value.y,from_Btu.u); end From_Btu;

Buildings.Controls.OBC.UnitConversions.Validation.From_BtuPerHour Buildings.Controls.OBC.UnitConversions.Validation.From_BtuPerHour

Validation model for unit conversion from British thermal units per hour to watt

Buildings.Controls.OBC.UnitConversions.Validation.From_BtuPerHour

Information

This model validates power unit conversion from British thermal units per hour to watt.

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

Modelica definition

model From_BtuPerHour "Validation model for unit conversion from British thermal units per hour to watt" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1./0.2930711 "Validation input"; parameter Real kin1 = 1000./0.2930711 "Validation input 1"; parameter Real kout = 1 "Validation output"; parameter Real kout1 = 1000 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_BtuPerHour from_BtuPerHour "Unit converter from British thermal units per hour to watt "; Buildings.Controls.OBC.UnitConversions.From_BtuPerHour from_BtuPerHour1 "Unit converter from British thermal units per hour to watt "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_BtuPerHour1.u); connect(from_BtuPerHour1.y, sub1.u1); connect(from_BtuPerHour.y, sub.u1); connect(value.y,from_BtuPerHour.u); end From_BtuPerHour;

Buildings.Controls.OBC.UnitConversions.Validation.From_bar Buildings.Controls.OBC.UnitConversions.Validation.From_bar

Validation model for unit conversion from bar to pascal

Buildings.Controls.OBC.UnitConversions.Validation.From_bar

Information

This model validates pressure unit conversion from bar to pascal.

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

Modelica definition

model From_bar "Validation model for unit conversion from bar to pascal" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1. "Validation input"; parameter Real kin1 = 0.00025 "Validation input 1"; parameter Real kout = 1.*100000. "Validation output"; parameter Real kout1 = 0.00025*100000. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_bar from_bar "Unit converter from bar to pascal "; Buildings.Controls.OBC.UnitConversions.From_bar from_bar1 "Unit converter from bar to pascal "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_bar1.u); connect(from_bar1.y, sub1.u1); connect(from_bar.y, sub.u1); connect(value.y,from_bar.u); end From_bar;

Buildings.Controls.OBC.UnitConversions.Validation.From_cfm Buildings.Controls.OBC.UnitConversions.Validation.From_cfm

Validation model for unit conversion from cubic feet per minute to cubic meters per second

Buildings.Controls.OBC.UnitConversions.Validation.From_cfm

Information

This model validates volume flow unit conversion from cubic feet per minute to cubic meters per second.

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

Modelica definition

model From_cfm "Validation model for unit conversion from cubic feet per minute to cubic meters per second" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 100. "Validation input"; parameter Real kin1 = 2000. "Validation input 1"; parameter Real kout = 100.*0.000471947 "Validation output"; parameter Real kout1 = 2000.*0.000471947 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_cfm from_cfm "Unit converter from cubic feet per minute to cubic meters per second "; Buildings.Controls.OBC.UnitConversions.From_cfm from_cfm1 "Unit converter from cubic feet per minute to cubic meters per second "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_cfm1.u); connect(from_cfm1.y, sub1.u1); connect(from_cfm.y, sub.u1); connect(value.y,from_cfm.u); end From_cfm;

Buildings.Controls.OBC.UnitConversions.Validation.From_degC Buildings.Controls.OBC.UnitConversions.Validation.From_degC

Validation model for unit conversion from degree Celsius to kelvin

Buildings.Controls.OBC.UnitConversions.Validation.From_degC

Information

This model validates temperature unit conversion from degree Celsius to kelvin.

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

Modelica definition

model From_degC "Validation model for unit conversion from degree Celsius to kelvin" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 0. "Validation input"; parameter Real kin1 = 100. "Validation input 1"; parameter Real kout = 273.15 "Validation output"; parameter Real kout1 = 373.15 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_degC from_degC "Unit converter from degree Celsius to kelvin "; Buildings.Controls.OBC.UnitConversions.From_degC from_degC1 "Unit converter from degree Celsius to kelvin "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_degC1.u); connect(from_degC1.y, sub1.u1); connect(from_degC.y, sub.u1); connect(value.y,from_degC.u); end From_degC;

Buildings.Controls.OBC.UnitConversions.Validation.From_degF Buildings.Controls.OBC.UnitConversions.Validation.From_degF

Validation model for unit conversion from degree Fahrenheit to kelvin

Buildings.Controls.OBC.UnitConversions.Validation.From_degF

Information

This model validates temperature unit conversion from degree Fahrenheit to kelvin.

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

Modelica definition

model From_degF "Validation model for unit conversion from degree Fahrenheit to kelvin" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 32. "Validation input"; parameter Real kin1 = 100. * (9./5.) + 32. "Validation input 1"; parameter Real kout = 273.15 "Validation output"; parameter Real kout1 = 373.15 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_degF from_degF "Unit converter from degree Fahrenheit to kelvin "; Buildings.Controls.OBC.UnitConversions.From_degF from_degF1 "Unit converter from degree Fahrenheit to kelvin "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_degF1.u); connect(from_degF1.y, sub1.u1); connect(from_degF.y, sub.u1); connect(value.y,from_degF.u); end From_degF;

Buildings.Controls.OBC.UnitConversions.Validation.From_gal Buildings.Controls.OBC.UnitConversions.Validation.From_gal

Validation model for unit conversion from gallon to cubic meter

Buildings.Controls.OBC.UnitConversions.Validation.From_gal

Information

This model validates volume unit conversion from gallon to cubic meter.

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

Modelica definition

model From_gal "Validation model for unit conversion from gallon to cubic meter" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1. "Validation input"; parameter Real kin1 = 100. "Validation input 1"; parameter Real kout = 1.*0.003785412 "Validation output"; parameter Real kout1 = 100.*0.003785412 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_gal from_gal "Unit converter from gallon to cubic meter "; Buildings.Controls.OBC.UnitConversions.From_gal from_gal1 "Unit converter from gallon to cubic meter "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_gal1.u); connect(from_gal1.y, sub1.u1); connect(from_gal.y, sub.u1); connect(value.y,from_gal.u); end From_gal;

Buildings.Controls.OBC.UnitConversions.Validation.From_hp Buildings.Controls.OBC.UnitConversions.Validation.From_hp

Validation model for unit conversion from horsepower to watt

Buildings.Controls.OBC.UnitConversions.Validation.From_hp

Information

This model validates power unit conversion from horsepower to watt.

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

Modelica definition

model From_hp "Validation model for unit conversion from horsepower to watt" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 10. "Validation input"; parameter Real kin1 = 45. "Validation input 1"; parameter Real kout = 10.*0.7457 "Validation output"; parameter Real kout1 = 45.*0.7457 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_hp from_hp "Unit converter from horsepower to watt "; Buildings.Controls.OBC.UnitConversions.From_hp from_hp1 "Unit converter from horsepower to watt "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_hp1.u); connect(from_hp1.y, sub1.u1); connect(from_hp.y, sub.u1); connect(value.y,from_hp.u); end From_hp;

Buildings.Controls.OBC.UnitConversions.Validation.From_inH2O Buildings.Controls.OBC.UnitConversions.Validation.From_inH2O

Validation model for unit conversion from inch of water gauge (at 60 degF) to pascal

Buildings.Controls.OBC.UnitConversions.Validation.From_inH2O

Information

This model validates pressure unit conversion from inch of water gauge (at 60 degF) to pascal.

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

Modelica definition

model From_inH2O "Validation model for unit conversion from inch of water gauge (at 60 degF) to pascal" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 25./248.84 "Validation input"; parameter Real kin1 = 100000./248.84 "Validation input 1"; parameter Real kout = 25 "Validation output"; parameter Real kout1 = 100000 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_inH2O from_inH2O "Unit converter from inch of water gauge (at 60 degF) to pascal "; Buildings.Controls.OBC.UnitConversions.From_inH2O from_inH2O1 "Unit converter from inch of water gauge (at 60 degF) to pascal "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_inH2O1.u); connect(from_inH2O1.y, sub1.u1); connect(from_inH2O.y, sub.u1); connect(value.y,from_inH2O.u); end From_inH2O;

Buildings.Controls.OBC.UnitConversions.Validation.From_psi Buildings.Controls.OBC.UnitConversions.Validation.From_psi

Validation model for unit conversion from pound-force per square inch to pascal

Buildings.Controls.OBC.UnitConversions.Validation.From_psi

Information

This model validates pressure unit conversion from pound-force per square inch to pascal.

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

Modelica definition

model From_psi "Validation model for unit conversion from pound-force per square inch to pascal" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 0.0036 "Validation input"; parameter Real kin1 = 1. "Validation input 1"; parameter Real kout = 0.0036*6895. "Validation output"; parameter Real kout1 = 1.*6895. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_psi from_psi "Unit converter from pound-force per square inch to pascal "; Buildings.Controls.OBC.UnitConversions.From_psi from_psi1 "Unit converter from pound-force per square inch to pascal "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_psi1.u); connect(from_psi1.y, sub1.u1); connect(from_psi.y, sub.u1); connect(value.y,from_psi.u); end From_psi;

Buildings.Controls.OBC.UnitConversions.Validation.From_quad Buildings.Controls.OBC.UnitConversions.Validation.From_quad

Validation model for unit conversion from quads to joule

Buildings.Controls.OBC.UnitConversions.Validation.From_quad

Information

This model validates energy unit conversion from quads to joule.

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

Modelica definition

model From_quad "Validation model for unit conversion from quads to joule" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1. "Validation input"; parameter Real kin1 = 2. "Validation input 1"; parameter Real kout = 1.*1055.56e15 "Validation output"; parameter Real kout1 = 2.*1055.56e15 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_quad from_quad "Unit converter from quads to joule "; Buildings.Controls.OBC.UnitConversions.From_quad from_quad1 "Unit converter from quads to joule "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_quad1.u); connect(from_quad1.y, sub1.u1); connect(from_quad.y, sub.u1); connect(value.y,from_quad.u); end From_quad;

Buildings.Controls.OBC.UnitConversions.Validation.From_ton Buildings.Controls.OBC.UnitConversions.Validation.From_ton

Validation model for unit conversion from ton of refrigeration to watt

Buildings.Controls.OBC.UnitConversions.Validation.From_ton

Information

This model validates power unit conversion from ton of refrigeration to watt.

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

Modelica definition

model From_ton "Validation model for unit conversion from ton of refrigeration to watt" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1. "Validation input"; parameter Real kin1 = 100. "Validation input 1"; parameter Real kout = 3517. "Validation output"; parameter Real kout1 = 351700. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.From_ton from_ton "Unit converter from ton of refrigeration to watt "; Buildings.Controls.OBC.UnitConversions.From_ton from_ton1 "Unit converter from ton of refrigeration to watt "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,from_ton1.u); connect(from_ton1.y, sub1.u1); connect(from_ton.y, sub.u1); connect(value.y,from_ton.u); end From_ton;

Buildings.Controls.OBC.UnitConversions.Validation.To_Btu Buildings.Controls.OBC.UnitConversions.Validation.To_Btu

Validation model for unit conversion from joule to British thermal units

Buildings.Controls.OBC.UnitConversions.Validation.To_Btu

Information

This model validates energy unit conversion from joule to British thermal units.

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

Modelica definition

model To_Btu "Validation model for unit conversion from joule to British thermal units" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1.*1055.056 "Validation input"; parameter Real kin1 = 2.*1055.056 "Validation input 1"; parameter Real kout = 1. "Validation output"; parameter Real kout1 = 2. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_Btu to_Btu "Unit converter from joule to British thermal units "; Buildings.Controls.OBC.UnitConversions.To_Btu to_Btu1 "Unit converter from joule to British thermal units "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_Btu1.u); connect(to_Btu1.y, sub1.u1); connect(to_Btu.y, sub.u1); connect(value.y,to_Btu.u); end To_Btu;

Buildings.Controls.OBC.UnitConversions.Validation.To_BtuPerHour Buildings.Controls.OBC.UnitConversions.Validation.To_BtuPerHour

Validation model for unit conversion from watt to British thermal units per hour

Buildings.Controls.OBC.UnitConversions.Validation.To_BtuPerHour

Information

This model validates power unit conversion from watt to British thermal units per hour.

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

Modelica definition

model To_BtuPerHour "Validation model for unit conversion from watt to British thermal units per hour" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1 "Validation input"; parameter Real kin1 = 1000 "Validation input 1"; parameter Real kout = 1./0.2930711 "Validation output"; parameter Real kout1 = 1000./0.2930711 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_BtuPerHour to_BtuPerHour "Unit converter from watt to British thermal units per hour "; Buildings.Controls.OBC.UnitConversions.To_BtuPerHour to_BtuPerHour1 "Unit converter from watt to British thermal units per hour "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_BtuPerHour1.u); connect(to_BtuPerHour1.y, sub1.u1); connect(to_BtuPerHour.y, sub.u1); connect(value.y,to_BtuPerHour.u); end To_BtuPerHour;

Buildings.Controls.OBC.UnitConversions.Validation.To_bar Buildings.Controls.OBC.UnitConversions.Validation.To_bar

Validation model for unit conversion from pascal to bar

Buildings.Controls.OBC.UnitConversions.Validation.To_bar

Information

This model validates pressure unit conversion from pascal to bar.

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

Modelica definition

model To_bar "Validation model for unit conversion from pascal to bar" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1.*100000. "Validation input"; parameter Real kin1 = 0.00025*100000. "Validation input 1"; parameter Real kout = 1. "Validation output"; parameter Real kout1 = 0.00025 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_bar to_bar "Unit converter from pascal to bar "; Buildings.Controls.OBC.UnitConversions.To_bar to_bar1 "Unit converter from pascal to bar "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_bar1.u); connect(to_bar1.y, sub1.u1); connect(to_bar.y, sub.u1); connect(value.y,to_bar.u); end To_bar;

Buildings.Controls.OBC.UnitConversions.Validation.To_cfm Buildings.Controls.OBC.UnitConversions.Validation.To_cfm

Validation model for unit conversion from cubic meters per second to cubic feet per minute

Buildings.Controls.OBC.UnitConversions.Validation.To_cfm

Information

This model validates volume flow unit conversion from cubic meters per second to cubic feet per minute.

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

Modelica definition

model To_cfm "Validation model for unit conversion from cubic meters per second to cubic feet per minute" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 100.*0.000471947 "Validation input"; parameter Real kin1 = 2000.*0.000471947 "Validation input 1"; parameter Real kout = 100. "Validation output"; parameter Real kout1 = 2000. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_cfm to_cfm "Unit converter from cubic meters per second to cubic feet per minute "; Buildings.Controls.OBC.UnitConversions.To_cfm to_cfm1 "Unit converter from cubic meters per second to cubic feet per minute "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_cfm1.u); connect(to_cfm1.y, sub1.u1); connect(to_cfm.y, sub.u1); connect(value.y,to_cfm.u); end To_cfm;

Buildings.Controls.OBC.UnitConversions.Validation.To_degC Buildings.Controls.OBC.UnitConversions.Validation.To_degC

Validation model for unit conversion from kelvin to degree Celsius

Buildings.Controls.OBC.UnitConversions.Validation.To_degC

Information

This model validates temperature unit conversion from kelvin to degree Celsius.

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

Modelica definition

model To_degC "Validation model for unit conversion from kelvin to degree Celsius" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 273.15 "Validation input"; parameter Real kin1 = 373.15 "Validation input 1"; parameter Real kout = 0. "Validation output"; parameter Real kout1 = 100. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_degC to_degC "Unit converter from kelvin to degree Celsius "; Buildings.Controls.OBC.UnitConversions.To_degC to_degC1 "Unit converter from kelvin to degree Celsius "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_degC1.u); connect(to_degC1.y, sub1.u1); connect(to_degC.y, sub.u1); connect(value.y,to_degC.u); end To_degC;

Buildings.Controls.OBC.UnitConversions.Validation.To_degF Buildings.Controls.OBC.UnitConversions.Validation.To_degF

Validation model for unit conversion from kelvin to degree Fahrenheit

Buildings.Controls.OBC.UnitConversions.Validation.To_degF

Information

This model validates temperature unit conversion from kelvin to degree Fahrenheit.

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

Modelica definition

model To_degF "Validation model for unit conversion from kelvin to degree Fahrenheit" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 273.15 "Validation input"; parameter Real kin1 = 373.15 "Validation input 1"; parameter Real kout = 32. "Validation output"; parameter Real kout1 = 100. * (9./5.) + 32. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_degF to_degF "Unit converter from kelvin to degree Fahrenheit "; Buildings.Controls.OBC.UnitConversions.To_degF to_degF1 "Unit converter from kelvin to degree Fahrenheit "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_degF1.u); connect(to_degF1.y, sub1.u1); connect(to_degF.y, sub.u1); connect(value.y,to_degF.u); end To_degF;

Buildings.Controls.OBC.UnitConversions.Validation.To_gal Buildings.Controls.OBC.UnitConversions.Validation.To_gal

Validation model for unit conversion from cubic meter to gallon

Buildings.Controls.OBC.UnitConversions.Validation.To_gal

Information

This model validates volume unit conversion from cubic meter to gallon.

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

Modelica definition

model To_gal "Validation model for unit conversion from cubic meter to gallon" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1.*0.003785412 "Validation input"; parameter Real kin1 = 100.*0.003785412 "Validation input 1"; parameter Real kout = 1. "Validation output"; parameter Real kout1 = 100. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_gal to_gal "Unit converter from cubic meter to gallon "; Buildings.Controls.OBC.UnitConversions.To_gal to_gal1 "Unit converter from cubic meter to gallon "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_gal1.u); connect(to_gal1.y, sub1.u1); connect(to_gal.y, sub.u1); connect(value.y,to_gal.u); end To_gal;

Buildings.Controls.OBC.UnitConversions.Validation.To_hp Buildings.Controls.OBC.UnitConversions.Validation.To_hp

Validation model for unit conversion from watt to horsepower

Buildings.Controls.OBC.UnitConversions.Validation.To_hp

Information

This model validates power unit conversion from watt to horsepower.

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

Modelica definition

model To_hp "Validation model for unit conversion from watt to horsepower" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 10.*0.7457 "Validation input"; parameter Real kin1 = 45.*0.7457 "Validation input 1"; parameter Real kout = 10. "Validation output"; parameter Real kout1 = 45. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_hp to_hp "Unit converter from watt to horsepower "; Buildings.Controls.OBC.UnitConversions.To_hp to_hp1 "Unit converter from watt to horsepower "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_hp1.u); connect(to_hp1.y, sub1.u1); connect(to_hp.y, sub.u1); connect(value.y,to_hp.u); end To_hp;

Buildings.Controls.OBC.UnitConversions.Validation.To_inH2O Buildings.Controls.OBC.UnitConversions.Validation.To_inH2O

Validation model for unit conversion from pascal to inch of water gauge (at 60 degF)

Buildings.Controls.OBC.UnitConversions.Validation.To_inH2O

Information

This model validates pressure unit conversion from pascal to inch of water gauge (at 60 degF).

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

Modelica definition

model To_inH2O "Validation model for unit conversion from pascal to inch of water gauge (at 60 degF)" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 25. "Validation input"; parameter Real kin1 = 100000. "Validation input 1"; parameter Real kout = 25./248.84 "Validation output"; parameter Real kout1 = 100000./248.84 "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_inH2O to_inH2O "Unit converter from pascal to inch of water gauge (at 60 degF) "; Buildings.Controls.OBC.UnitConversions.To_inH2O to_inH2O1 "Unit converter from pascal to inch of water gauge (at 60 degF) "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_inH2O1.u); connect(to_inH2O1.y, sub1.u1); connect(to_inH2O.y, sub.u1); connect(value.y,to_inH2O.u); end To_inH2O;

Buildings.Controls.OBC.UnitConversions.Validation.To_psi Buildings.Controls.OBC.UnitConversions.Validation.To_psi

Validation model for unit conversion from pascal to pound-force per square inch

Buildings.Controls.OBC.UnitConversions.Validation.To_psi

Information

This model validates pressure unit conversion from pascal to pound-force per square inch.

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

Modelica definition

model To_psi "Validation model for unit conversion from pascal to pound-force per square inch" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 0.0036*6895. "Validation input"; parameter Real kin1 = 1.*6895. "Validation input 1"; parameter Real kout = 0.0036 "Validation output"; parameter Real kout1 = 1. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_psi to_psi "Unit converter from pascal to pound-force per square inch "; Buildings.Controls.OBC.UnitConversions.To_psi to_psi1 "Unit converter from pascal to pound-force per square inch "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_psi1.u); connect(to_psi1.y, sub1.u1); connect(to_psi.y, sub.u1); connect(value.y,to_psi.u); end To_psi;

Buildings.Controls.OBC.UnitConversions.Validation.To_quad Buildings.Controls.OBC.UnitConversions.Validation.To_quad

Validation model for unit conversion from joule to quads

Buildings.Controls.OBC.UnitConversions.Validation.To_quad

Information

This model validates energy unit conversion from joule to quads.

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

Modelica definition

model To_quad "Validation model for unit conversion from joule to quads" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 1.*1055.56e15 "Validation input"; parameter Real kin1 = 2.*1055.56e15 "Validation input 1"; parameter Real kout = 1. "Validation output"; parameter Real kout1 = 2. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_quad to_quad "Unit converter from joule to quads "; Buildings.Controls.OBC.UnitConversions.To_quad to_quad1 "Unit converter from joule to quads "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_quad1.u); connect(to_quad1.y, sub1.u1); connect(to_quad.y, sub.u1); connect(value.y,to_quad.u); end To_quad;

Buildings.Controls.OBC.UnitConversions.Validation.To_ton Buildings.Controls.OBC.UnitConversions.Validation.To_ton

Validation model for unit conversion from watt to ton of refrigeration

Buildings.Controls.OBC.UnitConversions.Validation.To_ton

Information

This model validates power unit conversion from watt to ton of refrigeration.

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

Modelica definition

model To_ton "Validation model for unit conversion from watt to ton of refrigeration" extends Modelica.Icons.Example; Buildings.Controls.OBC.CDL.Continuous.Subtract sub "Difference between the calculated and expected conversion output"; Buildings.Controls.OBC.CDL.Continuous.Subtract sub1 "Difference between the calculated and expected conversion output"; protected parameter Real kin = 3517. "Validation input"; parameter Real kin1 = 351700. "Validation input 1"; parameter Real kout = 1. "Validation output"; parameter Real kout1 = 100. "Validation output 1"; Buildings.Controls.OBC.UnitConversions.To_ton to_ton "Unit converter from watt to ton of refrigeration "; Buildings.Controls.OBC.UnitConversions.To_ton to_ton1 "Unit converter from watt to ton of refrigeration "; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value( final k=kin) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant value1( final k=kin1) "Value to convert"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result( final k=kout) "Expected converted value"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant result1( final k=kout1) "Expected converted value"; equation connect(result.y, sub.u2); connect(result1.y, sub1.u2); connect(value1.y,to_ton1.u); connect(to_ton1.y, sub1.u1); connect(to_ton.y, sub.u1); connect(value.y,to_ton.u); end To_ton;