.BuildSysPro.Utilities.Math.f_Pow

Information

Power function y = xn for n < 1

Hypothesis and equations

Let f be the real function f(x) = xn with 0 < n < 1.

To avoid a derivative that tends to infinity near 0, f is replaced by the function g such that g (x) = bx + ax² for 0 < x < xc and g(x) = f(x) for x > xc.

The coefficients a and b are selected so as to keep the continuity of g and its derivative at xc, real chosen close to 0 and depending on the applications. It is shown that a = (n-1) xcn-2 and b = (2-n) xcn-1.

Bibliography

none

Instructions for use

Example of calling of the function for n = 0.66, xc = 2.5

model Unnamed

Real f "Function f";

Real g "Function g";

Real g1 "Derivative function of g";

parameter Real n=0.66 "Exponent of f(x)=x^n";

parameter Real xc=2.5 "Abscissa of the junction point ";

equation

f=time^n;

(g,g1)=f_Pow(x=time,xc=xc,n=n);

end Unnamed;



Known limits / Use precautions

none

Validations

Validated function - Hassan Bouia 12/2010

--------------------------------------------------------------
Licensed by EDF under a 3-clause BSD-license
Copyright © EDF 2009 - 2023
BuildSysPro version 3.6.0
Author : Hassan BOUIA, EDF (2010)
--------------------------------------------------------------

Interface

function f_Pow
  input Real x "X-axis";
  input Real xc "Junction X-axis";
  input Real n "Exponent of the function";
  output Real g "Value of the function g at x";
  output Real g1 "Value of the derivative function of g at x";
end f_Pow;

Revisions


Generated at 2024-12-26T19:25:54Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos