.ThermoSysPro.Functions.TableSplineInterpolation

Information

ThermoSysPro Version 3.1

Computes 2-dimensional spline interpolation based on function SplineInterpolation. The resulting 2-dimensional spline will be continuous and have continuous first derivatives.

Implementation

It uses a cardinal spline interpolation algorithm. Cardinal splines are a sub-set of cubic Hermite splines where each piece is a third-degree polynomial specified in Hermite form: i.e specified by its values and the first derivatives at the end points of the reference interval.

The derivatives are calculated based on the non-uniform cardinal grid approach, see function SplineInterpolation for futher details.

Inputs

Output

Extrapolation

Linear extrapolation is employed if the reference value is not contained in the reference value table.


Example

TabY respresents the value table, and TabX and TabP represent the reference tables.

The example was called for X = linspace(0,0.1,5) and P = linspace(0.1,0.1,4)

The black dots represent the data points, and the red lines represent the interpolation result.


References

http://people.cs.clemson.edu/~dhouse/courses/405/notes/splines.pdf

Interface

function TableSplineInterpolation
  input Real TabP[:] "1st reference table";
  input Real TabX[:] "2nd reference table";
  input Real TabY[:, :] "Results table";
  input Real P "1st reference value";
  input Real X "2nd reference value";
  input Real t = 0.5 "Stiffness parameter";
  output Real Y "Interpolated result";
end TableSplineInterpolation;

Revisions


Generated at 2024-12-26T19:25:54Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos