Phasors model

Requirements.Examples.Elementary.Units.Phasors  ยท source

Icon of Phasors

Every transformation of Requirements.Units.Phasors asserted against its closed form, and its round trip

Extends Modelica.Icons.Example

Asserts every function of Requirements.Units.Phasors: the transformations in both directions, their agreement with Modelica.ComplexMath.abs and arg, the round trip polar to rectangular and back, and the wrap to (-pi, pi], including across pi (170 deg relative to -170 deg is -20 deg); a model that translates and runs is the test.

Copyright © 2026 Model Based Innovation LLC. All rights reserved.

Parameters

NameTypeDescription
eps constantRealAbsolute tolerance of the assertions
c parameterComplexA phasor in the second quadrant

Components and variables

NameTypeDescription
rRealIts magnitude, 5
phiSI.AngleIts phase angle