functionsmoothTransition
Extends from Modelica.Icons.Function (Icon for functions).
Information
This function is used by Buildings.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 Buildings.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.
Implementation
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
Buildings.Utilities.Math.Functions.BaseClasses.der_smoothTransition
and in
Buildings.Utilities.Math.Functions.BaseClasses.der_2__smoothTransition.
Inputs
| 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 |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y | Function value |
Revisions
-
September 12, 2018, by David Blum:
Change if-statement to if-expression. For issue #1019. -
August 11, 2015, by Michael Wetter:
First implementation.