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).Name | Description |
---|---|
ExtendedPolynomialDerivativeCheck |
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).
Type | Name | Default | Description |
---|---|---|---|
Real | c[:] | {0.1162,1.5404,-1.4825,0.766... | Polynomial coefficients |
Real | xMin | 1 | Minimum x value for polynomial |
Real | xMax | 2 | Maximum x value for polynomial |
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;