Package Modelica.ComplexMath
This package contains basic mathematical functions operating on complex numbers (such as sin(..)), as well as functions operating on vectors of complex numbers.
Extends from Modelica.Icons.Package (Icon for standard packages).
| Name | Description |
|---|---|
abs | Absolute value of complex number |
acos | Arc-cosine of complex number |
acosh | Area-hyperbolic-cosine of complex number |
arg | Phase angle of complex number |
asin | Arc-sine of complex number |
asinh | Area-hyperbolic-sine of complex number |
atan | Arc-tangent of complex number |
atanh | Area-hyperbolic-tangent of complex number |
conj | Conjugate of complex number |
cos | Cosine of complex number |
cosh | Hyperbolic-cosine of complex number |
exp | Exponential of complex number |
fromPolar | Complex from polar representation |
imag | Imaginary part of complex number |
log | Logarithm of complex number |
max | Return maximum element of complex vector |
min | Return minimum element of complex vector |
product | Return product of complex vector |
real | Real part of complex number |
sin | Sine of complex number |
sinh | Hyperbolic-sine of complex number |
sqrt | Square root of complex number |
sum | Return sum of complex vector |
tan | Tangent of complex number |
tanh | Hyperbolic-tangent of complex number |
Vectors … | Library of functions operating on complex vectors |
| Type | Name | Value | Description |
|---|---|---|---|
final Complex | j | Complex(0, 1) | Imaginary unit |
Function Modelica.ComplexMath.sin
This function returns the Complex sine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | sin(c1) |
Function Modelica.ComplexMath.cos
This function returns the Complex cosine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = cos(c1) |
Function Modelica.ComplexMath.tan
This function returns the Complex tangent of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = tan(c1) |
Function Modelica.ComplexMath.asin
This function returns the inverse Complex sine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | arc_sin(c1) |
Function Modelica.ComplexMath.acos
This function returns the inverse Complex cosine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = arc_cos(c1) |
Function Modelica.ComplexMath.atan
This function returns the inverse Complex tangent of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = arc_tan(c1) |
Function Modelica.ComplexMath.sinh
This function returns the Complex hyperbolic sine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | sinh(c1) |
Function Modelica.ComplexMath.cosh
This function returns the Complex hyperbolic cosine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = cosh(c1) |
Function Modelica.ComplexMath.tanh
This function returns the Complex hyperbolic tangent of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = tanh(c1) |
Function Modelica.ComplexMath.asinh
This function returns the inverse Complex hyperbolic sine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | ar_sinh(c1) |
Function Modelica.ComplexMath.acosh
This function returns the inverse Complex hyperbolic cosine of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = ar_cosh(c1) |
Function Modelica.ComplexMath.atanh
This function returns the inverse Complex hyperbolic tangent of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = ar_tanh(c1) |
Function Modelica.ComplexMath.exp
This function returns the Complex natural exponential of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = exp(c1) |
Function Modelica.ComplexMath.log
This function returns the Complex natural logarithm of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = log(c1) |
Function Modelica.ComplexMath.abs
This function returns the Real absolute of the Complex input, i.e., its length.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c | Complex number |
| Type | Name | Description |
|---|---|---|
Real | result | = abs(c) |
Function Modelica.ComplexMath.arg
This function returns the Real argument of the Complex input, i.e., its angle.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c | Complex number |
Angle | phi0 | Phase angle phi shall be in the range: -pi < phi-phi0 < pi |
| Type | Name | Description |
|---|---|---|
Angle | phi | = phase angle of c |
Function Modelica.ComplexMath.conj
This function returns the Complex conjugate of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = c1.re - j*c1.im |
Function Modelica.ComplexMath.real
This function returns the real part of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c | Complex number |
| Type | Name | Description |
|---|---|---|
Real | r | = c.re |
Function Modelica.ComplexMath.imag
This function returns the imaginary part of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c | Complex number |
| Type | Name | Description |
|---|---|---|
Real | r | = c.im |
Function Modelica.ComplexMath.fromPolar
This function constructs a Complex number from its length (absolute) and angle (argument).
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Real | len | abs of complex |
Angle | phi | arg of complex |
| Type | Name | Description |
|---|---|---|
Complex | c | = len*cos(phi) + j*len*sin(phi) |
Function Modelica.ComplexMath.sqrt
This function returns the Complex square root (principal square root) of the Complex input.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | c1 | Complex number |
| Type | Name | Description |
|---|---|---|
Complex | c2 | = sqrt(c1) |
Function Modelica.ComplexMath.max
This function returns the largest element of the Complex input vector, defined by the Complex absolute.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | v[:] | Vector |
| Type | Name | Description |
|---|---|---|
Complex | result | Element of v with largest absolute value |
Integer | index | v[index] has the largest absolute value |
Function Modelica.ComplexMath.min
This function returns the smallest element of the Complex input vector, defined by the Complex absolute.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | v[:] | Vector |
| Type | Name | Description |
|---|---|---|
Complex | result | Element of v with smallest absolute value |
Integer | index | v[index] has the smallest absolute value |
Function Modelica.ComplexMath.sum
This function returns the Complex sum of the Complex input vector
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | v[:] | Vector |
| Type | Name | Description |
|---|---|---|
Complex | result | Complex sum of vector elements |
Function Modelica.ComplexMath.product
This function returns the Complex product of the Complex input vector
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Complex | v[:] | Vector |
| Type | Name | Description |
|---|---|---|
Complex | result | Complex product of vector elements |