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 Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).

Package Content

NameDescription
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.



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


  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(c, time, xMin, xMax);
  der(y)=der(x);
  assert(abs(x-y) < 1E-2, "Model has an error");

end ExtendedPolynomialDerivativeCheck;

HTML-documentation generated by Dymola Tue Sep 29 08:09:27 2009.