AixLib.Utilities.Math.Functions.interpolate

# .AixLib.Utilities.Math.Functions.interpolate

Function for cubic hermite spline interpolation of table data

## Information

This function returns the value on a cubic hermite spline through the given support points and provided spline derivatives at these points. The spline derivatives at the support points can be computed using AixLib.Utilities.Math.Functions.splineDerivatives. The support points must be monotonically increasing. Outside the provided support points, the function returns a linear extrapolation with the same slope as the cubic spline has at the respective support point.

A similar model is also used in the CONTAM software (Dols and Walton, 2015).

This function is used in AixLib.Airflow.Multizone.Table_m_flow and AixLib.Airflow.Multizone.Table_V_flow

#### References

- W. S. Dols and B. J. Polidoro,2015. CONTAM User Guide and Program Documentation Version 3.2, National Institute of Standards and Technology, NIST TN 1887, Sep. 2015. doi: 10.6028/NIST.TN.1887.

#### Interface

>     function interpolate
>       extends Modelica.Icons.Function;
>       input Real u "Independent variable";
>       input Real[:] xd "x-axis support points";
>       input Real[size(xd, 1)] yd "y-axis support points";
>       input Real[size(xd, 1)] d "Derivatives at the support points";
>       output Real z "Dependent variable with monotone interpolation";
>     end interpolate;

## Revisions

- February 29, 2024, by Hongxiang Fu:
  Moved to AixLib.Utilities.Math.Functions from AixLib.Airflow.Multizone.BaseClasses.
  This is for IBPSA, #1844.
- February 26, 2024, by Hongxiang Fu:
  Correct implementation to make it smooth.
  This is for IBPSA, #1840.
- February 2, 2022, by Michael Wetter:
  Revised implementation.
  This is for IBPSA, #1436.
- Apr 6, 2021, by Klaas De Jonge:
  First Implementation.

Generated at 2026-05-12T20:19:03Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos