.Modelica.Fluid.Utilities.regPow

Information

This function approximates abs(x)^a*sign(x), such that the derivative is positive, finite and smooth in x=0.

Function Approximation Range
y = regPow(x) y ~= abs(x)^a*sgn(x) abs(x) >>delta
y = regPow(x) y ~= x*delta^(a-1) abs(x) << delta

Interface

function regPow
  extends Modelica.Icons.Function;
  input Real x;
  input Real a;
  input Real delta = 0.01 "Range of significant deviation from x^a*sgn(x)";
  output Real y;
end regPow;

Revisions


Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f