model ConstantVoltage "Source for constant voltage"
parameter SI.Voltage V(start = 1) "Value of constant voltage";
extends Interfaces.OnePort;
equation
v = V;
annotation (
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Text(
extent = {
{-150, 70},
{150, 110}},
lineColor = {0, 0, 255},
textString = "%name"),
Line(
points = {
{-70, 30},
{-70, 10}},
color = {0, 0, 255}),
Line(
points = {
{-80, 20},
{-60, 20}},
color = {0, 0, 255}),
Line(
points = {
{60, 20},
{80, 20}},
color = {0, 0, 255}),
Text(
extent = {
{-150, -110},
{150, -70}},
textString = "V=%V"),
Ellipse(
extent = {
{-50, 50},
{50, -50}},
lineColor = {0, 0, 255},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Line(
points = {
{-50, 0},
{50, 0}},
color = {0, 0, 255}),
Line(
points = {
{-90, 0},
{-50, 0}},
color = {0, 0, 255}),
Line(
points = {
{50, 0},
{90, 0}},
color = {0, 0, 255})}),
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 ConstantVoltage source is a simple source for an ideal constant voltage which is provided by a parameter. There is no internal resistance modeled. If it is used instead of a battery model it is not very realistic: This battery will never be unloaded.</p>\n</html>"));
end ConstantVoltage;