model ConstantCurrent "Source for constant current"
parameter SI.Current I(start = 1) "Value of constant current";
extends Interfaces.OnePort;
equation
i = I;
annotation (
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Ellipse(
extent = {
{-50, 50},
{50, -50}},
lineColor = {0, 0, 255},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Line(
points = {
{-90, 0},
{-50, 0}},
color = {0, 0, 255}),
Line(
points = {
{50, 0},
{90, 0}},
color = {0, 0, 255}),
Line(
points = {
{0, -50},
{0, 50}},
color = {0, 0, 255}),
Polygon(
points = {
{90, 0},
{60, 10},
{60, -10},
{90, 0}},
lineColor = {0, 0, 255},
fillColor = {0, 0, 255},
fillPattern = FillPattern.Solid),
Text(
extent = {
{-150, 60},
{150, 100}},
lineColor = {0, 0, 255},
textString = "%name"),
Text(
extent = {
{-150, -100},
{150, -60}},
textString = "I=%I")}),
Documentation(
revisions = "<html>\n<ul>\n<li><em> 1998 </em>\n by Christoph Clauss<br> initially implemented<br>\n </li>\n</ul>\n</html>",
info = "<html>\n<p>The ConstantCurrent source is a simple source for an ideal constant current which is provided by a parameter. There is no internal resistance modeled. No further effects are modeled. Especially, the current flow will never end.</p>\n</html>"));
end ConstantCurrent;