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

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

Package Content

NameDescription
Buildings.Utilities.Math.Examples.Bicubic Bicubic Test model for bicubic function
Buildings.Utilities.Math.Examples.Biquadratic Biquadratic Test model for biquadratic function
Buildings.Utilities.Math.Examples.SmoothBlocks SmoothBlocks  
Buildings.Utilities.Math.Examples.VectorFunctions VectorFunctions Test model for functions that take a vector as argument
Buildings.Utilities.Math.Examples.SmoothLimit SmoothLimit Test model for smooth limit


Buildings.Utilities.Math.Examples.Bicubic Buildings.Utilities.Math.Examples.Bicubic

Test model for bicubic function

Buildings.Utilities.Math.Examples.Bicubic

Information

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

Modelica definition

model Bicubic "Test model for bicubic function"
  import Buildings;
  extends Modelica.Icons.Example;
  Modelica.Blocks.Sources.Constant x1(k=1);
  Modelica.Blocks.Sources.Constant x2(k=2);
  Buildings.Utilities.Math.Bicubic bicubic(a={1,2,3,4,5,6,7,8,9,10});
equation 

  connect(x1.y, bicubic.u1);
  connect(x2.y, bicubic.u2);
end Bicubic;

Buildings.Utilities.Math.Examples.Biquadratic Buildings.Utilities.Math.Examples.Biquadratic

Test model for biquadratic function

Buildings.Utilities.Math.Examples.Biquadratic

Information

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

Modelica definition

model Biquadratic "Test model for biquadratic function"
  import Buildings;
  extends Modelica.Icons.Example;
  Modelica.Blocks.Sources.Constant x1(k=1);
  Modelica.Blocks.Sources.Constant x2(k=2);
  Buildings.Utilities.Math.Biquadratic biquadratic(a={1,2,3,4,5,6});
equation 

  connect(x1.y, biquadratic.u1);
  connect(x2.y, biquadratic.u2);
end Biquadratic;

Buildings.Utilities.Math.Examples.SmoothBlocks Buildings.Utilities.Math.Examples.SmoothBlocks

Buildings.Utilities.Math.Examples.SmoothBlocks

Information

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

Modelica definition

model SmoothBlocks
  extends Modelica.Icons.Example;
  SmoothMax smoMax(deltaX=0.5);
  Modelica.Blocks.Math.Max max;
  Modelica.Blocks.Sources.Sine sine(freqHz=8);
  Modelica.Blocks.Sources.Sine sine1;
  Diagnostics.AssertEquality assEquMax(threShold=0.08);
  SmoothMin smoMin(deltaX=0.5);
  Modelica.Blocks.Math.Min Min;
  Diagnostics.AssertEquality assEquMin(threShold=0.08);
equation 

  connect(sine.y, smoMax.u1);
  connect(sine.y, max.u1);
  connect(sine1.y, smoMax.u2);
  connect(sine1.y, max.u2);
  connect(smoMax.y, assEquMax.u1);
  connect(max.y, assEquMax.u2);
  connect(sine.y, smoMin.u1);
  connect(sine.y, Min.u1);
  connect(sine1.y, smoMin.u2);
  connect(sine1.y, Min.u2);
  connect(smoMin.y, assEquMin.u1);
  connect(Min.y, assEquMin.u2);
end SmoothBlocks;

Buildings.Utilities.Math.Examples.VectorFunctions Buildings.Utilities.Math.Examples.VectorFunctions

Test model for functions that take a vector as argument

Buildings.Utilities.Math.Examples.VectorFunctions

Information

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

Modelica definition

model VectorFunctions 
  "Test model for functions that take a vector as argument"
  extends Modelica.Icons.Example;

  Buildings.Utilities.Math.Min minVec(
                   nin=3);
  Modelica.Blocks.Sources.Sine sine(freqHz=6);
  Modelica.Blocks.Sources.Sine sine1(
                                    freqHz=8);
  Modelica.Blocks.Sources.Sine sine2(freqHz=10);
  Buildings.Utilities.Math.Max maxVec(
                   nin=3);
  Buildings.Utilities.Math.Average aveVec(
                       nin=3);
equation 
  connect(sine.y, minVec.u[1]);
  connect(sine1.y, minVec.u[2]);
  connect(sine2.y, minVec.u[3]);
  connect(sine.y, maxVec.u[1]);
  connect(sine1.y, maxVec.u[2]);
  connect(sine2.y, maxVec.u[3]);
  connect(sine.y, aveVec.u[1]);
  connect(sine1.y, aveVec.u[2]);
  connect(sine2.y, aveVec.u[3]);
end VectorFunctions;

Buildings.Utilities.Math.Examples.SmoothLimit Buildings.Utilities.Math.Examples.SmoothLimit

Test model for smooth limit

Buildings.Utilities.Math.Examples.SmoothLimit

Information

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

Modelica definition

model SmoothLimit "Test model for smooth limit"
  import Buildings;
  extends Modelica.Icons.Example;
  Modelica.Blocks.Sources.Sine sine(freqHz=8);
  Buildings.Utilities.Math.SmoothLimit smoLim(
    deltaX=0.001,
    upper=0.5,
    lower=0) "Smooth limit";
equation 

  connect(sine.y, smoLim.u);
end SmoothLimit;

Automatically generated Fri May 06 14:15:00 2011.