This function is used by AixLib.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 AixLib.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
AixLib.Utilities.Math.Functions.BaseClasses.der_smoothTransition
and in
AixLib.Utilities.Math.Functions.BaseClasses.der_2__smoothTransition.
function smoothTransition extends Modelica.Icons.Function; input Real x "Abscissa value"; input Real delta(min = Modelica.Constants.eps) "Abscissa value below which approximation occurs"; input Real deltaInv = 1/delta "Inverse value of delta"; input Real a = -15*deltaInv "Polynomial coefficient"; input Real b = 119*deltaInv^2 "Polynomial coefficient"; input Real c = -361*deltaInv^3 "Polynomial coefficient"; input Real d = 534*deltaInv^4 "Polynomial coefficient"; input Real e = -380*deltaInv^5 "Polynomial coefficient"; input Real f = 104*deltaInv^6 "Polynomial coefficient"; output Real y "Function value"; end smoothTransition;