Package with base classes for Annex60.Utilities.Math.Functions
This package contains base classes that are used to construct the models in Annex60.Utilities.Math.Functions.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Name | Description |
---|---|
der_2_regNonZeroPower | Power function, regularized near zero, but nonzero value for x=0 |
der_2_smoothTransition | Second order derivative of smoothTransition with respect to x |
der_inverseXRegularized | Derivative of inverseXRegularised function |
der_regNonZeroPower | Power function, regularized near zero, but nonzero value for x=0 |
der_smoothTransition | First order derivative of smoothTransition with respect to x |
der_spliceFunction | Derivative of splice function |
smoothTransition | Twice continuously differentiable transition between the regions |
Power function, regularized near zero, but nonzero value for x=0
Implementation of the second derivative of the function Annex60.Utilities.Math.Functions.regNonZeroPower.
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | n | Exponent | |
Real | delta | 0.01 | Abscissa value where transition occurs |
Real | der_x | ||
Real | der_2_x |
Type | Name | Description |
---|---|---|
Real | der_2_y | Function value |
Second order derivative of smoothTransition with respect to x
This function is the 2nd order derivative of Annex60.Utilities.Math.Functions.BaseClasses.smoothTransition.
For efficiency, the polynomial coefficients
a, b, c, d, e, f
and
the inverse of the smoothing parameter deltaInv
are exposed as arguments to this function.
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | delta | Abscissa value below which approximation occurs | |
Real | deltaInv | Inverse value of delta | |
Real | a | Polynomial coefficient | |
Real | b | Polynomial coefficient | |
Real | c | Polynomial coefficient | |
Real | d | Polynomial coefficient | |
Real | e | Polynomial coefficient | |
Real | f | Polynomial coefficient | |
Real | x_der | Derivative of x | |
Real | x_der2 | Second order derivative of x |
Type | Name | Description |
---|---|---|
Real | y_der2 | Second order derivative of function value |
Derivative of inverseXRegularised function
Implementation of the first derivative of the function Annex60.Utilities.Math.Functions.inverseXRegularized.
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | delta | Abscissa value below which approximation occurs | |
Real | deltaInv | 1/delta | Inverse value of delta |
Real | a | -15*deltaInv | Polynomial coefficient |
Real | b | 119*deltaInv^2 | Polynomial coefficient |
Real | c | -361*deltaInv^3 | Polynomial coefficient |
Real | d | 534*deltaInv^4 | Polynomial coefficient |
Real | e | -380*deltaInv^5 | Polynomial coefficient |
Real | f | 104*deltaInv^6 | Polynomial coefficient |
Real | x_der | Abscissa value |
Type | Name | Description |
---|---|---|
Real | y_der | Function value |
Power function, regularized near zero, but nonzero value for x=0
Implementation of the first derivative of the function Annex60.Utilities.Math.Functions.regNonZeroPower.
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | n | Exponent | |
Real | delta | 0.01 | Abscissa value where transition occurs |
Real | der_x |
Type | Name | Description |
---|---|---|
Real | der_y | Function value |
First order derivative of smoothTransition with respect to x
This function is the 1st order derivative of Annex60.Utilities.Math.Functions.BaseClasses.smoothTransition.
For efficiency, the polynomial coefficients
a, b, c, d, e, f
and
the inverse of the smoothing parameter deltaInv
are exposed as arguments to this function.
Also,
its derivative is provided in
Annex60.Utilities.Math.Functions.BaseClasses.der_2__smoothTransition.
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | delta | Abscissa value below which approximation occurs | |
Real | deltaInv | Inverse value of delta | |
Real | a | Polynomial coefficient | |
Real | b | Polynomial coefficient | |
Real | c | Polynomial coefficient | |
Real | d | Polynomial coefficient | |
Real | e | Polynomial coefficient | |
Real | f | Polynomial coefficient | |
Real | x_der | Derivative of x |
Type | Name | Description |
---|---|---|
Real | y_der | Derivative of function value |
Derivative of splice function
Implementation of the first derivative of the function Annex60.Utilities.Math.Functions.spliceFunction.
Type | Name | Default | Description |
---|---|---|---|
Real | pos | ||
Real | neg | ||
Real | x | ||
Real | deltax | 1 | |
Real | dpos | ||
Real | dneg | ||
Real | dx | ||
Real | ddeltax | 0 |
Type | Name | Description |
---|---|---|
Real | out |
Twice continuously differentiable transition between the regions
This function is used by Annex60.Utilities.Math.Functions.inverseXRegularized to provide a twice continuously differentiable transition between the different regions. The code has been implemented in a function as this allows to implement the function Annex60.Utilities.Math.Functions.inverseXRegularized in such a way that Dymola inlines it. However, this function will not be inlined as its body is too large.
For efficiency, the polynomial coefficients
a, b, c, d, e, f
and
the inverse of the smoothing parameter deltaInv
are exposed as arguments to this function.
Also,
derivatives are provided in
Annex60.Utilities.Math.Functions.BaseClasses.der_smoothTransition
and in
Annex60.Utilities.Math.Functions.BaseClasses.der_2__smoothTransition.
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | delta | Abscissa value below which approximation occurs | |
Real | deltaInv | 1/delta | Inverse value of delta |
Real | a | -15*deltaInv | Polynomial coefficient |
Real | b | 119*deltaInv^2 | Polynomial coefficient |
Real | c | -361*deltaInv^3 | Polynomial coefficient |
Real | d | 534*deltaInv^4 | Polynomial coefficient |
Real | e | -380*deltaInv^5 | Polynomial coefficient |
Real | f | 104*deltaInv^6 | Polynomial coefficient |
Type | Name | Description |
---|---|---|
Real | y | Function value |