This function returns the imaginary part of the Complex input.
function imag extends Modelica.Icons.Function; input Complex c "Complex number"; output Real r "= c.im"; end imag;