model CurrentSource "Constant multiphase AC current"
import Modelica.ComplexMath.j;
import Modelica.ComplexMath.exp;
extends Interfaces.Source;
parameter Modelica.SIunits.Frequency f(start = 1) "Frequency of the source";
parameter Modelica.SIunits.Current I[m](start = fill(1, m)) "RMS current of the source";
parameter Modelica.SIunits.Angle phi[m] = -Modelica.Electrical.MultiPhase.Functions.symmetricOrientation(m) "Phase shift of the source";
equation
i = {I[k] * exp(j * phi[k]) for k in 1:m};
omega = 2 * Modelica.Constants.pi * f;
annotation (
Icon(graphics = {
Line(
points = {
{0, 50},
{0, -50}},
color = {85, 170, 255}),
Polygon(
points = {
{90, 0},
{60, 10},
{60, -10},
{90, 0}},
lineColor = {85, 170, 255},
fillColor = {85, 170, 255},
fillPattern = FillPattern.Solid)}),
Documentation(info = "<html>\n\n<p>\nThis model describes <em>m</em> constant current sources, specifying the complex currents by the RMS currents and the phase shifts\n(defaults are\n<a href=\"modelica://Modelica.Electrical.MultiPhase.Functions.symmetricOrientation\">-symmetricOrientation</a>).\n<em>m</em> <a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sources.CurrentSource\">single phase CurrentSources</a> are used.\n</p>\n\n<h4>See also</h4>\n\n<p>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sources.CurrentSource\">SinglePhase.CurrentSource</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Sources.VoltageSource\">VoltageSource</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Sources.VariableVoltageSource\">VariableVoltageSource</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Sources.VariableCurrentSource\">VariableCurrentSource</a>\n</p>\n</html>"));
end CurrentSource;