-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathCapacitor.mo
More file actions
39 lines (39 loc) · 1.55 KB
/
Capacitor.mo
File metadata and controls
39 lines (39 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
within Modelica.Electrical.Polyphase.Basic;
model Capacitor "Ideal linear electrical capacitors"
extends Interfaces.TwoPlug;
parameter SI.Capacitance C[m](start=fill(1, m))
"Capacitance";
SI.Voltage vC[m](start=zeros(m), fixed=fill(false,m))=v "Capacitor voltages"
annotation(Dialog(showStartAttribute=true));
Modelica.Electrical.Analog.Basic.Capacitor capacitor[m](final C=C)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
equation
connect(capacitor.p, plug_p.pin)
annotation (Line(points={{-10,0},{-100,0}}, color={0,0,255}));
connect(capacitor.n, plug_n.pin)
annotation (Line(points={{10,0},{100,0}}, color={0,0,255}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,
-100},{100,100}}), graphics={
Line(
points={{-6,28},{-6,-28}},
color={0,0,255}),
Line(
points={{6,28},{6,-28}},
color={0,0,255}),
Line(points={{-90,0},{-6,0}}, color={0,0,255}),
Line(points={{6,0},{90,0}}, color={0,0,255}),
Text(
extent={{-150,90},{150,50}},
textString="%name",
textColor={0,0,255}),
Text(
extent={{-150,-80},{150,-40}},
textString="m=%m")}), Documentation(info="<html>
<p>
Contains m capacitors (Modelica.Electrical.Analog.Basic.Capacitor)
</p>
<p>
For demonstration and hints regarding initialization see <a href=\"modelica://Modelica.Electrical.Polyphase.Examples.PolyphaseInitialization\">Examples.PolyphaseInitialization</a>.
</p>
</html>"));
end Capacitor;