VariableCurrentSource

model VariableCurrentSource "Variable multiphase AC current"
    extends Interfaces.Source;

    Modelica.Blocks.Interfaces.RealInput f annotation (Placement(
        transformation(
            origin = {40, 100},
            extent = {
                {-20, -20}, 
                {20, 20}},
            rotation = 270),
        iconTransformation(
            extent = {
                {-20, -20}, 
                {20, 20}},
            rotation = 270,
            origin = {60, 120})));
    Modelica.ComplexBlocks.Interfaces.ComplexInput I[m] annotation (Placement(
        transformation(
            origin = {-40, 100},
            extent = {
                {-20, -20}, 
                {20, 20}},
            rotation = 270),
        iconTransformation(
            extent = {
                {-20, -20}, 
                {20, 20}},
            rotation = 270,
            origin = {-62, 120})));
equation
    i = I;
    omega = 2 * Modelica.Constants.pi * f;

    annotation (
        defaultComponentName = "currentSource",
        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> variable current sources, with <em>m</em> complex signal inputs,\nspecifying the complex current by the complex RMS voltage components.\nAdditionally, the frequency of the current source is defined by a real signal input.\n<em>m</em> <a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sources.VariableCurrentSource\">single phase VariableCurrentSources</a> are used.\n</p>\n\n<h4>See also</h4>\n\n<p>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sources.VoltageSource\">SinglePhase.VoltageSource</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.CurrentSource\">CurrentSource</a>.\n</p>\n</html>"));
end VariableCurrentSource;