model VariableCurrentSource "Variable AC current"
extends Interfaces.Source;
Modelica.Blocks.Interfaces.RealInput f(unit = "Hz") annotation (Placement(transformation(
origin = {60, 120},
extent = {
{-20, -20},
{20, 20}},
rotation = 270)));
Modelica.ComplexBlocks.Interfaces.ComplexInput I annotation (Placement(transformation(
origin = {-60, 120},
extent = {
{-20, -20},
{20, 20}},
rotation = 270)));
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 is a current source with a complex signal input, specifying the complex current by the complex RMS current components.\nAdditionally, the frequency of the voltage source is defined by a real signal input.\n</p>\n\n<h4>See also</h4>\n\n<p>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sources.VoltageSource\">VoltageSource</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sources.VariableVoltageSource\">VariableVoltageSource</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sources.CurrentSource\">CurrentSource</a>,\n</p>\n</html>"));
end VariableCurrentSource;