magnitude function
Requirements.Units.Phasors.magnitude
ยท source
Magnitude of a phasor from its real and imaginary parts
Extends Modelica.Icons.Function
Rectangular to polar: the magnitude sqrt(re^2 + im^2), in the unit of the parts. For a Complex it equals Modelica.ComplexMath.abs.
Inputs are the real part re and the imaginary part im of the phasor, output its magnitude r ≥ 0. For an RMS phasor of the MSL's quasi-static libraries the magnitude is an RMS value. The phase angle of the same phasor is phaseAngle; the inverse transformation is realPart and imaginaryPart. Examples.Elementary.Units.Phasors asserts it against its closed form and the round trip between the two forms.
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Inputs
| Name | Type | Description |
|---|---|---|
re input | Real | Real part |
im input | Real | Imaginary part |
Outputs
| Name | Type | Description |
|---|---|---|
r output | Real | Magnitude, in the unit of the parts |