Buildings.Utilities.Math.Functions.BaseClasses
Package with base classes for Buildings.Utilities.Math.Functions
Information
This package contains base classes that are used to construct the models in Buildings.Utilities.Math.Functions.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
der_2_regNonZeroPower | Power function, regularized near zero, but nonzero value for x=0 |
der_2_smoothTransition | Second order derivative of smoothTransition with respect to x |
der_inverseXRegularized | Derivative of inverseXRegularised function |
der_regNonZeroPower | Power function, regularized near zero, but nonzero value for x=0 |
der_smoothTransition | First order derivative of smoothTransition with respect to x |
der_spliceFunction | Derivative of splice function |
smoothTransition | Twice continuously differentiable transition between the regions |
Buildings.Utilities.Math.Functions.BaseClasses.der_2_regNonZeroPower
Power function, regularized near zero, but nonzero value for x=0
Information
Implementation of the second derivative of the function Buildings.Utilities.Math.Functions.regNonZeroPower.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | n | Exponent | |
Real | delta | 0.01 | Abscissa value where transition occurs |
Real | der_x | ||
Real | der_2_x |
Outputs
Type | Name | Description |
---|---|---|
Real | der_2_y | Function value |
Modelica definition
Buildings.Utilities.Math.Functions.BaseClasses.der_2_smoothTransition
Second order derivative of smoothTransition with respect to x
Information
This function is the 2nd order derivative of Buildings.Utilities.Math.Functions.BaseClasses.smoothTransition.
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.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | delta | Abscissa value below which approximation occurs | |
Real | deltaInv | Inverse value of delta | |
Real | a | Polynomial coefficient | |
Real | b | Polynomial coefficient | |
Real | c | Polynomial coefficient | |
Real | d | Polynomial coefficient | |
Real | e | Polynomial coefficient | |
Real | f | Polynomial coefficient | |
Real | x_der | Derivative of x | |
Real | x_der2 | Second order derivative of x |
Outputs
Type | Name | Description |
---|---|---|
Real | y_der2 | Second order derivative of function value |
Modelica definition
Buildings.Utilities.Math.Functions.BaseClasses.der_inverseXRegularized
Derivative of inverseXRegularised function
Information
Implementation of the first derivative of the function Buildings.Utilities.Math.Functions.inverseXRegularized.
Extends from Modelica.Icons.Function (Icon for functions).
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 |
Real | x_der | Abscissa value |
Outputs
Type | Name | Description |
---|---|---|
Real | y_der | Function value |
Modelica definition
Buildings.Utilities.Math.Functions.BaseClasses.der_regNonZeroPower
Power function, regularized near zero, but nonzero value for x=0
Information
Implementation of the first derivative of the function Buildings.Utilities.Math.Functions.regNonZeroPower.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | n | Exponent | |
Real | delta | 0.01 | Abscissa value where transition occurs |
Real | der_x |
Outputs
Type | Name | Description |
---|---|---|
Real | der_y | Function value |
Modelica definition
Buildings.Utilities.Math.Functions.BaseClasses.der_smoothTransition
First order derivative of smoothTransition with respect to x
Information
This function is the 1st order derivative of Buildings.Utilities.Math.Functions.BaseClasses.smoothTransition.
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,
its derivative is provided in
Buildings.Utilities.Math.Functions.BaseClasses.der_2__smoothTransition.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Real | x | Abscissa value | |
Real | delta | Abscissa value below which approximation occurs | |
Real | deltaInv | Inverse value of delta | |
Real | a | Polynomial coefficient | |
Real | b | Polynomial coefficient | |
Real | c | Polynomial coefficient | |
Real | d | Polynomial coefficient | |
Real | e | Polynomial coefficient | |
Real | f | Polynomial coefficient | |
Real | x_der | Derivative of x |
Outputs
Type | Name | Description |
---|---|---|
Real | y_der | Derivative of function value |
Modelica definition
Buildings.Utilities.Math.Functions.BaseClasses.der_spliceFunction
Derivative of splice function
Information
Implementation of the first derivative of the function Buildings.Utilities.Math.Functions.spliceFunction.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Real | pos | ||
Real | neg | ||
Real | x | ||
Real | deltax | 1 | |
Real | dpos | ||
Real | dneg | ||
Real | dx | ||
Real | ddeltax | 0 |
Outputs
Type | Name | Description |
---|---|---|
Real | out |
Modelica definition
Buildings.Utilities.Math.Functions.BaseClasses.smoothTransition
Twice continuously differentiable transition between the regions
Information
This function is used by Buildings.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 Buildings.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
Buildings.Utilities.Math.Functions.BaseClasses.der_smoothTransition
and in
Buildings.Utilities.Math.Functions.BaseClasses.der_2__smoothTransition.
Extends from Modelica.Icons.Function (Icon for functions).
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 | Description |
---|---|---|
Real | y | Function value |