realPart function

Requirements.Units.Phasors.realPart  ยท source

Icon of realPart

Real part of a phasor from its magnitude and phase angle

Extends Modelica.Icons.Function

Polar to rectangular: the real part r*cos(phi), in the unit of the magnitude.

Inputs are the magnitude r and the phase angle phi [rad] of a phasor given in polar form (as power-system libraries often carry it); phi may be any angle, it need not be wrapped. The output is the real part re, as a Complex holds it. The imaginary part is imaginaryPart; the inverse transformation is magnitude and phaseAngle. 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

NameTypeDescription
r inputRealMagnitude
phi inputSI.AnglePhase angle

Outputs

NameTypeDescription
re outputRealReal part, in the unit of the magnitude