Modelica.Media.Incompressible.TableBased.Polynomials_Temp

Temporary Functions operating on polynomials (including polynomial fitting); only to be used in Modelica.Media.Incompressible.TableBased

Information

This package contains functions to operate on polynomials, in particular to determine the derivative and the integral of a polynomial and to use a polynomial to fit a given set of data points.

Copyright © 2004-2016, Modelica Association and DLR.

This package is free software. It can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer in the documentation of package Modelica in file "Modelica/package.mo".

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluate evaluate Evaluate polynomial at a given abscissa value
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluateWithRange evaluateWithRange Evaluate polynomial at a given abscissa value with linear extrapolation outside of the defined range
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivative derivative Derivative of polynomial
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivativeValue derivativeValue Value of derivative of polynomial at abscissa value u
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.secondDerivativeValue secondDerivativeValue Value of 2nd derivative of polynomial at abscissa value u
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integral integral Indefinite integral of polynomial p(u)
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integralValue integralValue Integral of polynomial p(u) from u_low to u_high
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.fitting fitting Computes the coefficients of a polynomial that fits a set of data points in a least-squares sense
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluate_der evaluate_der Evaluate derivative of polynomial at a given abscissa value
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluateWithRange_der evaluateWithRange_der Evaluate derivative of polynomial at a given abscissa value with extrapolation outside of the defined range
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integralValue_der integralValue_der Time derivative of integral of polynomial p(u) from u_low to u_high, assuming only u_high as time-dependent (Leibniz rule)
Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivativeValue_der derivativeValue_der Time derivative of derivative of polynomial

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluate Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluate

Evaluate polynomial at a given abscissa value

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients (p[1] is coefficient of highest power)
uAbscissa value

Outputs

NameDescription
yValue of polynomial at u

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluateWithRange Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluateWithRange

Evaluate polynomial at a given abscissa value with linear extrapolation outside of the defined range

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients (p[1] is coefficient of highest power)
uMinPolynomial valid in the range uMin .. uMax
uMaxPolynomial valid in the range uMin .. uMax
uAbscissa value

Outputs

NameDescription
yValue of polynomial at u. Outside of uMin,uMax, linear extrapolation is used

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivative Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivative

Derivative of polynomial

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p1[:]Polynomial coefficients (p1[1] is coefficient of highest power)

Outputs

NameDescription
p2[size(p1, 1) - 1]Derivative of polynomial p1

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivativeValue Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivativeValue

Value of derivative of polynomial at abscissa value u

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients (p[1] is coefficient of highest power)
uAbscissa value

Outputs

NameDescription
yValue of derivative of polynomial at u

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.secondDerivativeValue Modelica.Media.Incompressible.TableBased.Polynomials_Temp.secondDerivativeValue

Value of 2nd derivative of polynomial at abscissa value u

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients (p[1] is coefficient of highest power)
uAbscissa value

Outputs

NameDescription
yValue of 2nd derivative of polynomial at u

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integral Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integral

Indefinite integral of polynomial p(u)

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p1[:]Polynomial coefficients (p1[1] is coefficient of highest power)

Outputs

NameDescription
p2[size(p1, 1) + 1]Polynomial coefficients of indefinite integral of polynomial p1 (polynomial p2 + C is the indefinite integral of p1, where C is an arbitrary constant)

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integralValue Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integralValue

Integral of polynomial p(u) from u_low to u_high

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients
u_highHigh integrand value
u_lowLow integrand value, default 0

Outputs

NameDescription
integralIntegral of polynomial p from u_low to u_high

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.fitting Modelica.Media.Incompressible.TableBased.Polynomials_Temp.fitting

Computes the coefficients of a polynomial that fits a set of data points in a least-squares sense

Information

Polynomials.fitting(u,y,n) computes the coefficients of a polynomial p(u) of degree "n" that fits the data "p(u[i]) - y[i]" in a least squares sense. The polynomial is returned as a vector p[n+1] that has the following definition:

  p(u) = p[1]*u^n + p[2]*u^(n-1) + ... + p[n]*u + p[n+1];

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
u[:]Abscissa data values
y[size(u, 1)]Ordinate data values
nOrder of desired polynomial that fits the data points (u,y)

Outputs

NameDescription
p[n + 1]Polynomial coefficients of polynomial that fits the date points

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluate_der Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluate_der

Evaluate derivative of polynomial at a given abscissa value

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients (p[1] is coefficient of highest power)
uAbscissa value
duDelta of abscissa value

Outputs

NameDescription
dyValue of derivative of polynomial at u

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluateWithRange_der Modelica.Media.Incompressible.TableBased.Polynomials_Temp.evaluateWithRange_der

Evaluate derivative of polynomial at a given abscissa value with extrapolation outside of the defined range

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients (p[1] is coefficient of highest power)
uMinPolynomial valid in the range uMin .. uMax
uMaxPolynomial valid in the range uMin .. uMax
uAbscissa value
duDelta of abscissa value

Outputs

NameDescription
dyValue of derivative of polynomial at u

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integralValue_der Modelica.Media.Incompressible.TableBased.Polynomials_Temp.integralValue_der

Time derivative of integral of polynomial p(u) from u_low to u_high, assuming only u_high as time-dependent (Leibniz rule)

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients
u_highHigh integrand value
u_lowLow integrand value, default 0
du_highHigh integrand value
du_lowLow integrand value, default 0

Outputs

NameDescription
dintegralIntegral of polynomial p from u_low to u_high

Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivativeValue_der Modelica.Media.Incompressible.TableBased.Polynomials_Temp.derivativeValue_der

Time derivative of derivative of polynomial

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

NameDescription
p[:]Polynomial coefficients (p[1] is coefficient of highest power)
uAbscissa value
duDelta of abscissa value

Outputs

NameDescription
dyTime-derivative of derivative of polynomial w.r.t. input variable at u
Automatically generated Tue Apr 05 09:37:00 2016.