LBL logo

Buildings.Fluid.Actuators.BaseClasses.Examples

Collection of models that illustrate model use and test models

Information

This package contains examples for the use of models that can be found in Buildings.Fluid.Actuators.BaseClasses.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.Actuators.BaseClasses.Examples.EqualPercentageDerivativeCheck EqualPercentageDerivativeCheck  

Buildings.Fluid.Actuators.BaseClasses.Examples.EqualPercentageDerivativeCheck Buildings.Fluid.Actuators.BaseClasses.Examples.EqualPercentageDerivativeCheck

Information

This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.

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

Parameters

TypeNameDefaultDescription
RealR50Rangeability
Realdelta0.01Value where transition occurs
Reall0.001Leakage

Modelica definition

model EqualPercentageDerivativeCheck extends Modelica.Icons.Example; parameter Real R = 50 "Rangeability"; parameter Real delta = 0.01 "Value where transition occurs"; parameter Real l = 0.001 "Leakage"; Real x; Real y; initial equation y=x; equation x=Buildings.Fluid.Actuators.BaseClasses.equalPercentage(time, R, l, delta); der(y)=der(x); assert(abs(x-y) < 1E-2, "Model has an error"); end EqualPercentageDerivativeCheck;

http://simulationresearch.lbl.gov/modelica