.Modelica.Fluid.Dissipation.Utilities.Functions.General.SmoothPower

Information

The function is used to limit the derivative of the following function at x=0:

   y = if x ≥ 0 then xpow else -(-x)pow;  // pow > 0

by approximating the function in the range -deltax< x < deltax with a third order polynomial that has the same derivative at abs(x)=deltax, as the function above.

Example

In the picture below the input x is increased from -1 to 1. The range of interpolation is defined by the same range. Displayed is the output of the function SmoothPower compared to

y=x*|x|

For |x| > 1 both functions return identical results.

SmoothPower

References

ThermoFluid Library
http://sourceforge.net/projects/thermofluid/

Interface

function SmoothPower
  extends Modelica.Icons.Function;
  input Real x "input variable";
  input Real deltax "range for interpolation";
  input Real pow "exponent for x";
  output Real y "output variable";
end SmoothPower;

Revisions

2014-04-29 Stefan Wischhusen: Introduced deltax and pow as zero derivatives.
Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39