This function constructs a Complex number from its length (absolute) and angle (argument).
function fromPolar extends Modelica.Icons.Function; input Real len "abs of complex"; input Modelica.SIunits.Angle phi "arg of complex"; output Complex c "= len*cos(phi) + j*len*sin(phi)"; end fromPolar;