functioninverseXRegularized
Extends from Modelica.Icons.Function (Icon for functions).
Information
Function that approximates y=1 ⁄ x inside the interval -δ ≤ x ≤ δ. The approximation is twice continuously differentiable with a bounded derivative on the whole real line.
See the plot of Buildings.Utilities.Math.Functions.Examples.InverseXRegularized for the graph.
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.
Typically, these coefficients only depend on parameters and hence
can be computed once.
They must be equal to their default values, otherwise the function
is not twice continuously differentiable.
By exposing these coefficients as function arguments, models
that call this function can compute them as parameters, and
assign these parameter values in the function call.
This avoids that the coefficients are evaluated for each time step,
as they would otherwise be if they were to be computed inside the
body of the function. However, assigning the values is optional
as otherwise, at the expense of efficiency, the values will be
computed each time the function is invoked.
See
Buildings.Utilities.Math.Functions.Examples.InverseXRegularized
for how to efficiently call this function.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | Abscissa value | |
| Real | delta | Abscissa value below which approximation occurs | |
| Real | deltaInv | 1/delta | Inverse value of delta |
| Real | a | -15*deltaInv | Polynomial coefficient |
| Real | b | 119*deltaInv^2 | Polynomial coefficient |
| Real | c | -361*deltaInv^3 | Polynomial coefficient |
| Real | d | 534*deltaInv^4 | Polynomial coefficient |
| Real | e | -380*deltaInv^5 | Polynomial coefficient |
| Real | f | 104*deltaInv^6 | Polynomial coefficient |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y | Function value |
Revisions
-
August 10, 2015, by Michael Wetter:
Removed dublicate entrysmoothOrder = 1and reimplmented the function so it is twice continuously differentiable. This is for issue 302. -
February 5, 2015, by Filip Jorissen:
AddedsmoothOrder = 1. -
May 10, 2013, by Michael Wetter:
Reformulated implementation to avoid unrequired computations. -
April 18, 2011, by Michael Wetter:
First implementation.