Buildings.Fluid.Utilities.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.Utilities.

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

Package Content

Name Description
Buildings.Fluid.Utilities.Examples.ExtendedPolynomialDerivativeCheck ExtendedPolynomialDerivativeCheck  

Buildings.Fluid.Utilities.Examples.ExtendedPolynomialDerivativeCheck Buildings.Fluid.Utilities.Examples.ExtendedPolynomialDerivativeCheck

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
Realc[:]{0.1162,1.5404,-1.4825,0.766...Polynomial coefficients
RealxMin1Minimum x value for polynomial
RealxMax2Maximum x value for polynomial

Modelica definition

model ExtendedPolynomialDerivativeCheck extends Modelica.Icons.Example; parameter Real[:] c={0.1162,1.5404,-1.4825,0.7664,-0.1971} "Polynomial coefficients"; parameter Real xMin=1 "Minimum x value for polynomial"; parameter Real xMax=2 "Maximum x value for polynomial"; Real x; Real y; initial equation y=x; equation x=Buildings.Fluid.Utilities.extendedPolynomial( x=time, c=c, xMin=xMin, xMax=xMax); der(y)=der(x); assert(abs(x-y) < 1E-2, "Model has an error"); end ExtendedPolynomialDerivativeCheck;