Skip to content

Commit af2926f

Browse files
committed
unify icon texts of Generic components
1 parent 0f6df92 commit af2926f

File tree

1 file changed

+44
-41
lines changed

1 file changed

+44
-41
lines changed

PowerSystems/Generic.mo

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package Generic "Simple components for basic investigations"
1818
if PhaseSystem.m > 0 then
1919
terminal_p.theta = terminal_n.theta;
2020
end if;
21-
annotation ( Icon(coordinateSystem(preserveAspectRatio=false,
21+
annotation (Icon(coordinateSystem(preserveAspectRatio=false,
2222
extent={{-100,-100},{100,100}}), graphics={
2323
Rectangle(
2424
extent={{-70,30},{70,-30}},
@@ -28,11 +28,11 @@ package Generic "Simple components for basic investigations"
2828
Line(points={{-100,0},{-70,0}}, color={0,120,120}),
2929
Line(points={{70,0},{100,0}}, color={0,120,120}),
3030
Text(
31-
extent={{-144,-60},{144,-100}},
31+
extent={{-150,-60},{150,-100}},
3232
lineColor={0,0,0},
33-
textString="R=%R%, L=%L%"),
33+
textString="R=%R, L=%L"),
3434
Text(
35-
extent={{-144,40},{144,100}},
35+
extent={{-150,60},{150,100}},
3636
lineColor={0,0,0},
3737
textString="%name"),
3838
Rectangle(
@@ -58,7 +58,7 @@ package Generic "Simple components for basic investigations"
5858
if PhaseSystem.m > 0 then
5959
terminal_p.theta = terminal_n.theta;
6060
end if;
61-
annotation ( Icon(coordinateSystem(preserveAspectRatio=false,
61+
annotation (Icon(coordinateSystem(preserveAspectRatio=false,
6262
extent={{-100,-100},{100,100}}), graphics={
6363
Rectangle(
6464
extent={{-70,30},{70,-30}},
@@ -68,11 +68,11 @@ package Generic "Simple components for basic investigations"
6868
Line(points={{-100,0},{-70,0}}, color={0,120,120}),
6969
Line(points={{70,0},{100,0}}, color={0,120,120}),
7070
Text(
71-
extent={{-144,-60},{144,-100}},
71+
extent={{-150,-60},{150,-100}},
7272
lineColor={0,0,0},
73-
textString="G=%G%, C=%C%"),
73+
textString="G=%G, C=%C"),
7474
Text(
75-
extent={{-144,40},{144,100}},
75+
extent={{-150,60},{150,100}},
7676
lineColor={0,0,0},
7777
textString="%name"),
7878
Rectangle(
@@ -96,16 +96,16 @@ package Generic "Simple components for basic investigations"
9696
if PhaseSystem.m > 0 then
9797
terminal_p.theta = terminal_n.theta;
9898
end if;
99-
annotation ( Icon(coordinateSystem(preserveAspectRatio=false,
99+
annotation (Icon(coordinateSystem(preserveAspectRatio=false,
100100
extent={{-100,-100},{100,100}}), graphics={
101101
Line(points={{-100,0},{-70,0}}, color={0,0,0}),
102102
Line(points={{70,0},{100,0}}, color={0,0,0}),
103103
Text(
104-
extent={{-144,-60},{144,-100}},
104+
extent={{-150,-60},{150,-100}},
105105
lineColor={0,0,0},
106-
textString="%ratio%"),
106+
textString="%ratio"),
107107
Text(
108-
extent={{-144,60},{144,120}},
108+
extent={{-150,60},{150,100}},
109109
lineColor={0,0,0},
110110
textString="%name"),
111111
Ellipse(
@@ -131,7 +131,11 @@ package Generic "Simple components for basic investigations"
131131
Line(points={{-80,-60},{80,-60}}, color={0,120,120}),
132132
Line(points={{-50,-80},{50,-80}}, color={0,120,120}),
133133
Line(points={{-20,-100},{20,-100}}, color={0,120,120}),
134-
Line(points={{-100,0},{0,0}}, color={0,120,120})}));
134+
Line(points={{-100,0},{0,0}}, color={0,120,120}),
135+
Text(
136+
extent={{-150,60},{150,100}},
137+
lineColor={0,0,0},
138+
textString="%name")}));
135139
end Ground;
136140

137141
model Generator "Basic transformation of rotational to electrical power"
@@ -171,16 +175,16 @@ package Generic "Simple components for basic investigations"
171175
end if;
172176
0 = PhaseSystem.activePower(terminal.v, terminal.i) + w*flange.tau;
173177
terminal.v = PhaseSystem.phaseVoltages(V, thetaRel);
174-
annotation ( Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
178+
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
175179
-100},{100,100}}), graphics={
176180
Line(points={{-100,0},{-50,0}}, color={0,120,120}),
177181
Line(points={{50,0},{100,0}}, color={0,120,120}),
178182
Text(
179-
extent={{-144,-60},{144,-100}},
183+
extent={{-150,-60},{150,-100}},
180184
lineColor={0,0,0},
181185
textString="V=%V_ref V"),
182186
Text(
183-
extent={{-144,40},{144,100}},
187+
extent={{-150,60},{150,100}},
184188
lineColor={0,0,0},
185189
textString="%name"),
186190
Ellipse(
@@ -241,7 +245,7 @@ package Generic "Simple components for basic investigations"
241245
terminal.i = PhaseSystem.phaseCurrents(I, thetaRel);
242246
0 = PhaseSystem_dc.activePower(terminal_dc.v, terminal_dc.i)
243247
+ PhaseSystem.activePower(terminal.v, terminal.i);
244-
annotation ( Icon(coordinateSystem(preserveAspectRatio=true,
248+
annotation (Icon(coordinateSystem(preserveAspectRatio=true,
245249
extent={{-100,-100},{100,100}}), graphics={
246250
Rectangle(
247251
extent={{-90,90},{90,-90}},
@@ -277,7 +281,7 @@ package Generic "Simple components for basic investigations"
277281
fillPattern=FillPattern.Solid,
278282
textString="~"),
279283
Text(
280-
extent={{-142,98},{146,158}},
284+
extent={{-150,100},{150,140}},
281285
lineColor={0,0,0},
282286
textString="%name")}));
283287
end Inverter;
@@ -308,7 +312,7 @@ package Generic "Simple components for basic investigations"
308312
fillColor={255,255,255},
309313
fillPattern=FillPattern.CrossDiag),
310314
Text(
311-
extent={{-142,98},{146,158}},
315+
extent={{-150,100},{150,140}},
312316
lineColor={0,0,0},
313317
textString="%name")}));
314318
end FixedVoltageSource;
@@ -319,7 +323,7 @@ package Generic "Simple components for basic investigations"
319323
parameter Modelica.SIunits.Angle phi = 0 "phase angle";
320324
equation
321325
PhaseSystem.phasePowers_vi(terminal.v, terminal.i) = PhaseSystem.phasePowers(P, phi);
322-
annotation ( Icon(coordinateSystem(preserveAspectRatio=false,
326+
annotation (Icon(coordinateSystem(preserveAspectRatio=false,
323327
extent={{-100,-100},{100,100}}), graphics={Rectangle(
324328
extent={{-90,90},{90,-90}},
325329
lineColor={0,120,120},
@@ -329,7 +333,10 @@ package Generic "Simple components for basic investigations"
329333
lineColor={0,0,0},
330334
fillColor={255,255,255},
331335
fillPattern=FillPattern.Solid,
332-
textString="VA")}));
336+
textString="VA"), Text(
337+
extent={{-150,100},{150,140}},
338+
lineColor={0,0,0},
339+
textString="%name")}));
333340
end FixedLoad;
334341

335342
model FixedCurrent
@@ -339,7 +346,7 @@ package Generic "Simple components for basic investigations"
339346
annotation (Dialog(group="Reference Parameters", enable = definiteReference));
340347
equation
341348
terminal.i = PhaseSystem.phaseCurrents(I, phi);
342-
annotation ( Icon(coordinateSystem(preserveAspectRatio=false,
349+
annotation (Icon(coordinateSystem(preserveAspectRatio=false,
343350
extent={{-100,-100},{100,100}}), graphics={
344351
Rectangle(
345352
extent={{-90,90},{90,-90}},
@@ -351,13 +358,17 @@ package Generic "Simple components for basic investigations"
351358
lineColor={0,0,0},
352359
fillColor={255,255,255},
353360
fillPattern=FillPattern.Solid,
354-
textString="%I% A"),
361+
textString="%I A"),
355362
Text(
356363
extent={{-38,-74},{38,-32}},
357364
lineColor={0,0,0},
358365
fillColor={255,255,255},
359366
fillPattern=FillPattern.Solid,
360-
textString="%phi%")}));
367+
textString="%phi"),
368+
Text(
369+
extent={{-150,100},{150,140}},
370+
lineColor={0,0,0},
371+
textString="%name")}));
361372
end FixedCurrent;
362373

363374
model PrescribedPowerSource "Prescribed power source"
@@ -383,17 +394,15 @@ package Generic "Simple components for basic investigations"
383394
end if;
384395
terminal.i = PhaseSystem.phaseCurrents(I, thetaRel);
385396
0 = PhaseSystem.activePower(terminal.v, terminal.i) + P;
386-
annotation ( Icon(coordinateSystem(preserveAspectRatio=false,
397+
annotation (Icon(coordinateSystem(preserveAspectRatio=false,
387398
extent={{-100,-100},{100,100}}), graphics={Rectangle(
388399
extent={{-90,90},{90,-90}},
389400
lineColor={0,120,120},
390401
fillColor={255,255,255},
391402
fillPattern=FillPattern.Solid), Text(
392-
extent={{-90,-132},{90,-90}},
403+
extent={{-150,100},{150,140}},
393404
lineColor={0,0,0},
394-
fillColor={255,255,255},
395-
fillPattern=FillPattern.Solid,
396-
textString="%name%")}));
405+
textString="%name")}));
397406
end PrescribedPowerSource;
398407

399408
model PrescribedPowerLoad "Prescribed power load"
@@ -403,17 +412,15 @@ package Generic "Simple components for basic investigations"
403412
transformation(extent={{130,-20},{90,20}})));
404413
equation
405414
PhaseSystem.phasePowers_vi(terminal.v, terminal.i) = PhaseSystem.phasePowers(P, phi);
406-
annotation ( Icon(coordinateSystem(preserveAspectRatio=false,
415+
annotation (Icon(coordinateSystem(preserveAspectRatio=false,
407416
extent={{-100,-100},{100,100}}), graphics={Rectangle(
408417
extent={{-90,90},{90,-90}},
409418
lineColor={0,120,120},
410419
fillColor={255,255,255},
411420
fillPattern=FillPattern.Solid), Text(
412-
extent={{-90,-132},{90,-90}},
421+
extent={{-150,100},{150,140}},
413422
lineColor={0,0,0},
414-
fillColor={255,255,255},
415-
fillPattern=FillPattern.Solid,
416-
textString="%name%")}));
423+
textString="%name")}));
417424
end PrescribedPowerLoad;
418425

419426
package Ports "Interfaces for generic components"
@@ -426,10 +433,8 @@ package Generic "Simple components for basic investigations"
426433
lineColor={0,120,120},
427434
fillColor={0,120,120},
428435
fillPattern=FillPattern.Solid), Text(
429-
extent={{-150,110},{150,50}},
436+
extent={{-150,60},{150,100}},
430437
lineColor={0,0,0},
431-
fillColor={0,0,0},
432-
fillPattern=FillPattern.Solid,
433438
textString="%name")}), Icon(coordinateSystem(
434439
preserveAspectRatio=false, extent={{-100,-100},{100,100}}),
435440
graphics={Polygon(
@@ -444,10 +449,8 @@ package Generic "Simple components for basic investigations"
444449
annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,
445450
-100},{100,100}}), graphics={
446451
Text(
447-
extent={{-150,110},{150,50}},
452+
extent={{-150,60},{150,100}},
448453
lineColor={0,0,0},
449-
fillColor={0,0,0},
450-
fillPattern=FillPattern.Solid,
451454
textString="%name"), Rectangle(
452455
extent={{-60,60},{60,-60}},
453456
lineColor={0,120,120},
@@ -581,7 +584,7 @@ package Generic "Simple components for basic investigations"
581584
thickness=0.5),
582585
Ellipse(extent={{-20,20},{20,-20}}, lineColor={135,135,135}),
583586
Text(
584-
extent={{-149,-114},{151,-154}},
587+
extent={{-150,-130},{150,-90}},
585588
lineColor={0,0,0},
586589
textString="%name"),
587590
Ellipse(

0 commit comments

Comments
 (0)