.TRANSFORM.Math.regFun3

Information

Approximates a function in a region between x0 and x1 such that

In this region, a continuation is constructed from the given points (x0, y0), (x1, y1) and the respective derivatives. For this purpose, a single polynomial of third order or two cubic polynomials with a linear section in between are used [Gasparo and Morandi, 1991]. This algorithm was extended with two additional conditions to avoid saddle points with zero/infinite derivative that lead to integrator step size reduction to zero.

This function was developed for pressure loss correlations properly addressing the static head on top of the established requirements for monotonicity and smoothness. In this case, the present function allows to implement the exact solution in the limit of x1-x0 -> 0 or y1-y0 -> 0.

Typical screenshots for two different configurations are shown below. The first one illustrates five different settings of xi and yid:

regFun3_a.png

The second graph shows the continuous derivative of this regularization function:

regFun3_a.png

Literature

Gasparo M. G. and Morandi R. (1991):
Piecewise cubic monotone interpolation with assigned slopes. Computing, Vol. 46, Issue 4, December 1991, pp. 355 - 365.
Adapted from buildingspy. See also cubicHermiteSpline as similar function.

Interface

function regFun3
  extends TRANSFORM.Icons.Function;
  input Real x "Abscissa value";
  input Real x1 "Lower abscissa value";
  input Real x2 "Upper abscissa value";
  input Real y1 "Ordinate value at lower abscissa value";
  input Real y2 "Ordinate value at upper abscissa value";
  input Real y1d "Derivative at lower abscissa value";
  input Real y2d "Derivative at upper abscissa value";
  output Real y "Ordinate value";
  output Real c "Slope of linear section between two cubic polynomials or dummy linear section slope if single cubic is used";
end regFun3;

Revisions


Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos