.BuildingSystems.Utilities.Math.Functions.BaseClasses.smoothTransition

Information

This function is used by BuildingSystems.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 BuildingSystems.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 BuildingSystems.Utilities.Math.Functions.BaseClasses.der_smoothTransition and in BuildingSystems.Utilities.Math.Functions.BaseClasses.der_2__smoothTransition.

Interface

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;

Revisions


Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos