@@ -3,8 +3,8 @@ package Rectifier
3
3
model Rectifier1
4
4
extends Modelica.Icons.Example;
5
5
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(
8
8
extent={{-10,10},{10,-10}},
9
9
rotation=270,
10
10
origin={-50,30})));
@@ -15,104 +15,109 @@ package Rectifier
15
15
extent={{-10,-10},{10,10}},
16
16
rotation=270,
17
17
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(
20
20
extent={{-10,-10},{10,10}},
21
21
rotation=-90,
22
22
origin={52,30})));
23
23
Modelica.Electrical.Analog.Basic.Ground ground
24
24
annotation (Placement(transformation(extent={{-60,-20},{-40,0}})));
25
- Modelica.Electrical.Analog.Ideal.IdealDiode diode
25
+ Modelica.Electrical.Analog.Ideal.IdealDiode D
26
26
annotation (Placement(transformation(extent={{0,40},{20,60}})));
27
27
equation
28
- connect (sineVoltage .p, R1.p)
28
+ connect (V .p, R1.p)
29
29
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)
35
35
annotation (Line(points={{-50,20},{-50,0}}, color={0,0,255}));
36
- connect (R1.n, diode .p)
36
+ connect (R1.n, D .p)
37
37
annotation (Line(points={{-12,50},{0,50}}, color={0,0,255}));
38
- connect (diode .n, R2.p)
38
+ connect (D .n, R2.p)
39
39
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)
41
41
annotation (Line(points={{20,50},{52,50},{52,40}}, color={0,0,255}));
42
42
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
43
- coordinateSystem(preserveAspectRatio=false)));
43
+ coordinateSystem(preserveAspectRatio=false)),
44
+ experiment(StopTime=3, __Dymola_Algorithm="Dassl" ));
44
45
end Rectifier1;
45
46
46
47
model Rectifier2
47
48
extends Modelica.Icons.Example;
48
49
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(
51
52
extent={{-10,10},{10,-10}},
52
53
rotation=270,
53
- origin={-80,30 })));
54
+ origin={-60,10 })));
54
55
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 }})));
56
57
Modelica.Electrical.Analog.Basic.Resistor R2(R= 500 )
57
58
annotation (Placement(
58
59
transformation(
59
60
extent={{-10,-10},{10,10}},
60
61
rotation=270,
61
- origin={30,42 })));
62
+ origin={30,18 })));
62
63
Modelica.Electrical.Analog.Basic.Capacitor C(C= 1e-4 ) annotation (Placement(
63
64
transformation(
64
65
extent={{-10,-10},{10,10}},
65
66
rotation=-90,
66
- origin={52,40 })));
67
+ origin={52,18 })));
67
68
Modelica.Electrical.Analog.Basic.Ground ground
68
- annotation (Placement(transformation(extent={{-90,-8 },{-70,12 }})));
69
+ annotation (Placement(transformation(extent={{-70,-28 },{-50,-8 }})));
69
70
Modelica.Electrical.Analog.Ideal.IdealDiode D1 annotation (Placement(
70
71
transformation(
71
72
extent={{10,10},{-10,-10}},
72
73
rotation=-90,
73
- origin={-10,58 })));
74
+ origin={-10,38 })));
74
75
Modelica.Electrical.Analog.Ideal.IdealDiode D3 annotation (Placement(
75
76
transformation(
76
77
extent={{10,10},{-10,-10}},
77
78
rotation=-90,
78
- origin={-10,0 })));
79
+ origin={-10,-20 })));
79
80
Modelica.Electrical.Analog.Ideal.IdealDiode D2 annotation (Placement(
80
81
transformation(
81
82
extent={{10,10},{-10,-10}},
82
83
rotation=-90,
83
- origin={10,58 })));
84
+ origin={10,38 })));
84
85
Modelica.Electrical.Analog.Ideal.IdealDiode D4 annotation (Placement(
85
86
transformation(
86
87
extent={{10,10},{-10,-10}},
87
88
rotation=-90,
88
- origin={10,0 })));
89
+ origin={10,-20 })));
89
90
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}));
94
95
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}));
96
97
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}));
98
99
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}));
100
101
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}));
104
105
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 }},
109
110
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 }},
113
114
color={0,0,255}));
114
115
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
115
- coordinateSystem(preserveAspectRatio=false)));
116
+ coordinateSystem(preserveAspectRatio=false)),
117
+ experiment(StopTime=0.1, __Dymola_Algorithm="Dassl" ));
116
118
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" )));
118
123
end Rectifier;
0 commit comments