@@ -3,8 +3,8 @@ package Rectifier
33 model Rectifier1
44 extends Modelica.Icons.Example;
55
6- Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage (V= 5 , freqHz = 1.5 )
7- annotation ( Placement(transformation(
6+ Modelica.Electrical.Analog.Sources.SineVoltage V (V= 5 , f = 1.5 ) annotation (
7+ Placement(transformation(
88 extent={{-10,10},{10,-10}},
99 rotation=270,
1010 origin={-50,30})));
@@ -15,104 +15,109 @@ package Rectifier
1515 extent={{-10,-10},{10,10}},
1616 rotation=270,
1717 origin={30,30})));
18- Modelica.Electrical.Analog.Basic.Capacitor capacitor (C= 0.1 ) annotation (
19- Placement( transformation(
18+ Modelica.Electrical.Analog.Basic.Capacitor C (C= 0.1 ) annotation (Placement (
19+ transformation(
2020 extent={{-10,-10},{10,10}},
2121 rotation=-90,
2222 origin={52,30})));
2323 Modelica.Electrical.Analog.Basic.Ground ground
2424 annotation (Placement(transformation(extent={{-60,-20},{-40,0}})));
25- Modelica.Electrical.Analog.Ideal.IdealDiode diode
25+ Modelica.Electrical.Analog.Ideal.IdealDiode D
2626 annotation (Placement(transformation(extent={{0,40},{20,60}})));
2727 equation
28- connect (sineVoltage .p, R1.p)
28+ connect (V .p, R1.p)
2929 annotation (Line(points={{-50,40},{-50,50},{-32,50}}, color={0,0,255}));
30- connect (R2.n, sineVoltage .n) annotation (Line(points={{30,20},{30,6},{-50,6},{
31- -50,20}}, color={0,0,255}));
32- connect (capacitor .n, sineVoltage .n) annotation (Line(points={{52,20},{52,6},{-50,
33- 6},{-50,20}}, color={0,0,255}));
34- connect (sineVoltage .n, ground.p)
30+ connect (R2.n, V .n) annotation (Line(points={{30,20},{30,6},{-50,6},{-50,20}},
31+ color={0,0,255}));
32+ connect (C .n, V .n) annotation (Line(points={{52,20},{52,6},{-50,6},{-50,20}} ,
33+ color={0,0,255}));
34+ connect (V .n, ground.p)
3535 annotation (Line(points={{-50,20},{-50,0}}, color={0,0,255}));
36- connect (R1.n, diode .p)
36+ connect (R1.n, D .p)
3737 annotation (Line(points={{-12,50},{0,50}}, color={0,0,255}));
38- connect (diode .n, R2.p)
38+ connect (D .n, R2.p)
3939 annotation (Line(points={{20,50},{30,50},{30,40}}, color={0,0,255}));
40- connect (diode .n, capacitor .p)
40+ connect (D .n, C .p)
4141 annotation (Line(points={{20,50},{52,50},{52,40}}, color={0,0,255}));
4242 annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
43- coordinateSystem(preserveAspectRatio=false)));
43+ coordinateSystem(preserveAspectRatio=false)),
44+ experiment(StopTime=3, __Dymola_Algorithm="Dassl" ));
4445 end Rectifier1;
4546
4647 model Rectifier2
4748 extends Modelica.Icons.Example;
4849
49- Modelica.Electrical.Analog.Sources.SineVoltage Vsource (V= 220 , freqHz = 50 )
50- annotation ( Placement(transformation(
50+ Modelica.Electrical.Analog.Sources.SineVoltage V (V= 220 , f = 50 ) annotation (
51+ Placement(transformation(
5152 extent={{-10,10},{10,-10}},
5253 rotation=270,
53- origin={-80,30 })));
54+ origin={-60,10 })));
5455 Modelica.Electrical.Analog.Basic.Resistor R1(R= 20 )
55- annotation (Placement(transformation(extent={{-62,30 },{-42,50 }})));
56+ annotation (Placement(transformation(extent={{-42,10 },{-22,30 }})));
5657 Modelica.Electrical.Analog.Basic.Resistor R2(R= 500 )
5758 annotation (Placement(
5859 transformation(
5960 extent={{-10,-10},{10,10}},
6061 rotation=270,
61- origin={30,42 })));
62+ origin={30,18 })));
6263 Modelica.Electrical.Analog.Basic.Capacitor C(C= 1e-4 ) annotation (Placement(
6364 transformation(
6465 extent={{-10,-10},{10,10}},
6566 rotation=-90,
66- origin={52,40 })));
67+ origin={52,18 })));
6768 Modelica.Electrical.Analog.Basic.Ground ground
68- annotation (Placement(transformation(extent={{-90,-8 },{-70,12 }})));
69+ annotation (Placement(transformation(extent={{-70,-28 },{-50,-8 }})));
6970 Modelica.Electrical.Analog.Ideal.IdealDiode D1 annotation (Placement(
7071 transformation(
7172 extent={{10,10},{-10,-10}},
7273 rotation=-90,
73- origin={-10,58 })));
74+ origin={-10,38 })));
7475 Modelica.Electrical.Analog.Ideal.IdealDiode D3 annotation (Placement(
7576 transformation(
7677 extent={{10,10},{-10,-10}},
7778 rotation=-90,
78- origin={-10,0 })));
79+ origin={-10,-20 })));
7980 Modelica.Electrical.Analog.Ideal.IdealDiode D2 annotation (Placement(
8081 transformation(
8182 extent={{10,10},{-10,-10}},
8283 rotation=-90,
83- origin={10,58 })));
84+ origin={10,38 })));
8485 Modelica.Electrical.Analog.Ideal.IdealDiode D4 annotation (Placement(
8586 transformation(
8687 extent={{10,10},{-10,-10}},
8788 rotation=-90,
88- origin={10,0 })));
89+ origin={10,-20 })));
8990 equation
90- connect (Vsource .p, R1.p)
91- annotation (Line(points={{-80,40 },{-62,40 }}, color={0,0,255}));
92- connect (Vsource .n, ground.p)
93- annotation (Line(points={{-80,20 },{-80,12 }}, color={0,0,255}));
91+ connect (V .p, R1.p)
92+ annotation (Line(points={{-60,20 },{-42,20 }}, color={0,0,255}));
93+ connect (V .n, ground.p)
94+ annotation (Line(points={{-60,0 },{-60,-8 }}, color={0,0,255}));
9495 connect (R1.n, D1.p)
95- annotation (Line(points={{-42,40 },{-10,40 },{-10,48 }}, color={0,0,255}));
96+ annotation (Line(points={{-22,20 },{-10,20 },{-10,28 }}, color={0,0,255}));
9697 connect (D3.n, D1.p)
97- annotation (Line(points={{-10,10},{-10,48 }}, color={0,0,255}));
98+ annotation (Line(points={{-10,- 10},{-10,28 }},color={0,0,255}));
9899 connect (D1.n, D2.n)
99- annotation (Line(points={{-10,68 },{10,68 }}, color={0,0,255}));
100+ annotation (Line(points={{-10,48 },{10,48 }}, color={0,0,255}));
100101 connect (D4.n, D2.p)
101- annotation (Line(points={{10,10},{10,48 }}, color={0,0,255}));
102- connect (Vsource .n, D2.p)
103- annotation (Line(points={{-80,20 },{10,20 },{10,48 }}, color={0,0,255}));
102+ annotation (Line(points={{10,- 10},{10,28 }},color={0,0,255}));
103+ connect (V .n, D2.p)
104+ annotation (Line(points={{-60,0 },{10,0 },{10,28 }}, color={0,0,255}));
104105 connect (D3.p, D4.p)
105- annotation (Line(points={{-10,-10 },{10,-10 }}, color={0,0,255}));
106- connect (D2.n, R2.p) annotation (Line(points={{10,68 },{40,68 },{40,56 },{30,56 },
107- {30,52 }}, color={0,0,255}));
108- connect (R2.p, C.p) annotation (Line(points={{30,52 },{30,56 },{52,56 },{52,50 }},
106+ annotation (Line(points={{-10,-30 },{10,-30 }}, color={0,0,255}));
107+ connect (D2.n, R2.p) annotation (Line(points={{10,48 },{40,48 },{40,36 },{30,36 },
108+ {30,28 }}, color={0,0,255}));
109+ connect (R2.p, C.p) annotation (Line(points={{30,28 },{30,36 },{52,36 },{52,28 }},
109110 color={0,0,255}));
110- connect (D4.p, C.n) annotation (Line(points={{10,-10 },{40,-10 },{40,20 },{52,
111- 20}, {52,30 }}, color={0,0,255}));
112- connect (R2.n, C.n) annotation (Line(points={{30,32 },{30,20 },{52,20 },{52,30 }},
111+ connect (D4.p, C.n) annotation (Line(points={{10,-30 },{40,-30 },{40,0 },{52,0} ,
112+ {52,8 }}, color={0,0,255}));
113+ connect (R2.n, C.n) annotation (Line(points={{30,8 },{30,0 },{52,0 },{52,8 }},
113114 color={0,0,255}));
114115 annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
115- coordinateSystem(preserveAspectRatio=false)));
116+ coordinateSystem(preserveAspectRatio=false)),
117+ experiment(StopTime=0.1, __Dymola_Algorithm="Dassl" ));
116118 end Rectifier2;
117- annotation (uses(Modelica(version="3.2.3" )));
119+ annotation (uses(Modelica(version="4.0.0" )),
120+ version="1" ,
121+ conversion(from(version="" , script=
122+ "modelica://Rectifier/ConvertFromRectifier_.mos" )));
118123end Rectifier;
0 commit comments