forked from modelica/ModelicaStandardLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ObsoleteModelica4.mo
2925 lines (2655 loc) · 132 KB
/
ObsoleteModelica4.mo
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
within ;
package ObsoleteModelica4 "Library that contains components from Modelica Standard Library 3.2.3 that have been removed from version 4.0.0"
extends Modelica.Icons.Package;
import Modelica.Units.SI;
package Blocks "Library of basic input/output control blocks (continuous, discrete, logical, table blocks)"
extends Modelica.Icons.Package;
package Interfaces "Library of connectors and partial models for input/output blocks"
extends Modelica.Icons.Package;
package Adaptors "Package with adaptors"
extends Modelica.Icons.Package;
block SendReal "Obsolete block to send Real signal to bus"
extends Modelica.Icons.ObsoleteModel;
Modelica.Blocks.Interfaces.RealOutput toBus "Output signal to be connected to bus" annotation (Placement(transformation(extent={{100,-10},{120,10}})));
Modelica.Blocks.Interfaces.RealInput u "Input signal to be send to bus" annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
equation
toBus = u;
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}}), graphics={Rectangle(
extent={{-100,40},{100,-40}},
lineColor={0,0,127},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),Text(
extent={{-150,90},{150,50}},
textString="%name",
lineColor={0,0,255}), Text(
extent={{-100,30},{100,-30}},
lineColor={0,0,127},
textString="send")}), Documentation(info="<html>
<p>
Obsolete block that was previously used to connect a Real signal
to a signal in a connector. This block is only provided for
backward compatibility.
</p>
<p>
It is much more convenient and more powerful to use \"expandable connectors\"
for signal buses, see example
<a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
</p>
</html>"),
obsolete = "Obsolete block - use expandable connectors instead");
end SendReal;
block SendBoolean "Obsolete block to send Boolean signal to bus"
extends Modelica.Icons.ObsoleteModel;
Modelica.Blocks.Interfaces.BooleanOutput toBus "Output signal to be connected to bus" annotation (Placement(transformation(extent={{100,-10},{120,10}})));
Modelica.Blocks.Interfaces.BooleanInput u "Input signal to be send to bus" annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
equation
toBus = u;
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}}), graphics={Rectangle(
extent={{-100,40},{100,-40}},
lineColor={255,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),Text(
extent={{-150,90},{150,50}},
textString="%name",
lineColor={0,0,255}), Text(
extent={{-100,30},{100,-30}},
lineColor={255,0,255},
textString="send")}), Documentation(info="<html>
<p>
Obsolete block that was previously used to connect a Boolean signal
to a signal in a connector. This block is only provided for
backward compatibility.
</p>
<p>
It is much more convenient and more powerful to use \"expandable connectors\"
for signal buses, see example
<a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
</p>
</html>"),
obsolete = "Obsolete block - use expandable connectors instead");
end SendBoolean;
block SendInteger "Obsolete block to send Integer signal to bus"
extends Modelica.Icons.ObsoleteModel;
Modelica.Blocks.Interfaces.IntegerOutput toBus "Output signal to be connected to bus" annotation (Placement(transformation(extent={{100,-10},{120,10}})));
Modelica.Blocks.Interfaces.IntegerInput u "Input signal to be send to bus" annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
equation
toBus = u;
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}}), graphics={Rectangle(
extent={{-100,40},{100,-40}},
lineColor={255,127,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),Text(
extent={{-150,90},{150,50}},
textString="%name",
lineColor={0,0,255}), Text(
extent={{-100,30},{100,-30}},
lineColor={255,127,0},
textString="send")}), Documentation(info="<html>
<p>
Obsolete block that was previously used to connect an Integer signal
to a signal in a connector. This block is only provided for
backward compatibility.
</p>
<p>
It is much more convenient and more powerful to use \"expandable connectors\"
for signal buses, see example
<a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
</p>
</html>"),
obsolete = "Obsolete block - use expandable connectors instead");
end SendInteger;
block ReceiveReal "Obsolete block to receive Real signal from bus"
extends Modelica.Icons.ObsoleteModel;
Modelica.Blocks.Interfaces.RealInput fromBus "To be connected with signal on bus" annotation (Placement(transformation(extent={{-120,-10},{-100,10}})));
Modelica.Blocks.Interfaces.RealOutput y "Output signal to be received from bus" annotation (Placement(transformation(extent={{100,-10},{120,10}})));
equation
y = fromBus;
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}}), graphics={Rectangle(
extent={{-100,40},{100,-40}},
lineColor={0,0,127},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),Text(
extent={{-100,30},{100,-30}},
lineColor={0,0,127},
textString="receive"),Text(
extent={{-150,90},{150,50}},
textString="%name",
lineColor={0,0,255})}), Documentation(info="<html>
<p>
Obsolete block that was previously used to connect a Real signal
in a connector to an input of a block. This block is only provided for
backward compatibility.
</p>
<p>
It is much more convenient and more powerful to use \"expandable connectors\"
for signal buses, see example
<a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
</p>
</html>"),
obsolete = "Obsolete block - use expandable connectors instead");
end ReceiveReal;
block ReceiveBoolean "Obsolete block to receive Boolean signal from bus"
extends Modelica.Icons.ObsoleteModel;
Modelica.Blocks.Interfaces.BooleanInput fromBus "To be connected with signal on bus" annotation (Placement(transformation(extent={{-120,-10},{-100,10}})));
Modelica.Blocks.Interfaces.BooleanOutput y "Output signal to be received from bus" annotation (Placement(transformation(extent={{100,-10},{120,10}})));
equation
y = fromBus;
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}}), graphics={Rectangle(
extent={{-100,40},{100,-40}},
lineColor={255,0,255},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),Text(
extent={{-100,30},{100,-30}},
lineColor={255,0,255},
textString="receive"),Text(
extent={{-150,90},{150,50}},
textString="%name",
lineColor={0,0,255})}), Documentation(info="<html>
<p>
Obsolete block that was previously used to connect a Boolean signal
in a connector to an input of a block. This block is only provided for
backward compatibility.
</p>
<p>
It is much more convenient and more powerful to use \"expandable connectors\"
for signal buses, see example
<a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
</p>
</html>"),
obsolete = "Obsolete block - use expandable connectors instead");
end ReceiveBoolean;
block ReceiveInteger "Obsolete block to receive Integer signal from bus"
extends Modelica.Icons.ObsoleteModel;
Modelica.Blocks.Interfaces.IntegerInput fromBus "To be connected with signal on bus" annotation (Placement(transformation(extent={{-120,-10},{-100,10}})));
Modelica.Blocks.Interfaces.IntegerOutput y "Output signal to be received from bus" annotation (Placement(transformation(extent={{100,-10},{120,10}})));
equation
y = fromBus;
annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}}), graphics={Rectangle(
extent={{-100,40},{100,-40}},
lineColor={255,127,0},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),Text(
extent={{-100,30},{100,-30}},
lineColor={255,127,0},
textString="receive"),Text(
extent={{-150,90},{150,50}},
textString="%name",
lineColor={0,0,255})}), Documentation(info="<html>
<p>
Obsolete block that was previously used to connect an Integer signal
in a connector to an input of a block. This block is only provided for
backward compatibility.
</p>
<p>
It is much more convenient and more powerful to use \"expandable connectors\"
for signal buses, see example
<a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
</p>
</html>"),
obsolete = "Obsolete block - use expandable connectors instead");
end ReceiveInteger;
end Adaptors;
end Interfaces;
package Tables "Library of blocks to interpolate in one and two-dimensional tables"
extends Modelica.Icons.Package;
package Internal "Internal external object definitions for table functions that should not be directly utilized by the user"
extends Modelica.Icons.InternalPackage;
function readTimeTableData "Read table data from text or MATLAB MAT-file"
extends Modelica.Icons.Function;
extends Modelica.Icons.ObsoleteModel;
input Modelica.Blocks.Types.ExternalCombiTimeTable tableID "External table object";
input Boolean forceRead = false
"= true: Force reading of table data; = false: Only read, if not yet read.";
output Real readSuccess "Table read success";
input Boolean verboseRead = true
"= true: Print info message; = false: No info message";
external "C" readSuccess = ModelicaStandardTables_CombiTimeTable_read(tableID, forceRead, verboseRead)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
annotation(__ModelicaAssociation_Impure=true);
end readTimeTableData;
function readTable1DData "Read table data from text or MATLAB MAT-file"
extends Modelica.Icons.Function;
extends Modelica.Icons.ObsoleteModel;
input Modelica.Blocks.Types.ExternalCombiTable1D tableID "External table object";
input Boolean forceRead = false
"= true: Force reading of table data; = false: Only read, if not yet read.";
input Boolean verboseRead = true
"= true: Print info message; = false: No info message";
output Real readSuccess "Table read success";
external "C" readSuccess = ModelicaStandardTables_CombiTable1D_read(tableID, forceRead, verboseRead)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
annotation(__ModelicaAssociation_Impure=true);
end readTable1DData;
function readTable2DData "Read table data from text or MATLAB MAT-file"
extends Modelica.Icons.Function;
extends Modelica.Icons.ObsoleteModel;
input Modelica.Blocks.Types.ExternalCombiTable2D tableID "External table object";
input Boolean forceRead = false
"= true: Force reading of table data; = false: Only read, if not yet read.";
input Boolean verboseRead = true
"= true: Print info message; = false: No info message";
output Real readSuccess "Table read success";
external "C" readSuccess = ModelicaStandardTables_CombiTable2D_read(tableID, forceRead, verboseRead)
annotation (IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaStandardTables.h\"", Library={"ModelicaStandardTables", "ModelicaIO", "ModelicaMatIO", "zlib"});
annotation(__ModelicaAssociation_Impure=true);
end readTable2DData;
end Internal;
end Tables;
end Blocks;
package Electrical "Library of electrical models (analog, digital, machines, polyphase)"
extends Modelica.Icons.Package;
package PowerConverters "Rectifiers, Inverters and DC/DC converters"
extends Modelica.Icons.Package;
package DCDC "DC to DC converters"
extends Modelica.Icons.Package;
package Control "Control components for DC to DC converters"
extends Modelica.Icons.Package;
block VoltageToDutyCycle "Obsolete block - use Modelica.Electrical.PowerConverters.DCDC.Control.Voltage2DutyCycle instead"
extends Modelica.Icons.ObsoleteModel;
parameter Boolean useBipolarVoltage = true
"Enables bipolar input voltage range";
parameter Boolean useConstantMaximumVoltage=true
"Enables constant maximum voltage";
parameter SI.Voltage vMax=0
"Maximum voltage range mapped to dutyCycle = 1"
annotation(Dialog(enable=useConstantMaximumVoltage));
Modelica.Blocks.Interfaces.RealInput v "Voltage" annotation (Placement(
transformation(extent={{-140,-20},{-100,20}}), iconTransformation(
extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealOutput dutyCycle "Duty cycle" annotation (
Placement(transformation(extent={{100,-10},{120,10}}), iconTransformation(
extent={{100,-10},{120,10}})));
Modelica.Blocks.Math.Division divisionUnipolar if not useBipolarVoltage
annotation (Placement(transformation(extent={{-40,20},{-20,40}})));
Modelica.Blocks.Math.Division divisionBipolar if useBipolarVoltage
annotation (Placement(transformation(extent={{-40,-40},{-20,-20}})));
Modelica.Blocks.Math.Add add(k1=0.5, k2=1) if useBipolarVoltage
annotation (Placement(transformation(extent={{0,-60},{20,-40}})));
Modelica.Blocks.Sources.Constant offset(final k=0.5) if useBipolarVoltage
"Offset of 0.5 in case of bipolar operation"
annotation (Placement(transformation(extent={{-40,-80},{-20,-60}})));
Modelica.Blocks.Interfaces.RealInput vMaxExt if not useConstantMaximumVoltage
"External maximum voltage" annotation (Placement(transformation(
extent={{-20,-20},{20,20}},
rotation=270,
origin={0,120}), iconTransformation(
extent={{-20,-20},{20,20}},
rotation=270,
origin={0,120})));
Modelica.Blocks.Sources.Constant vMaxConst(final k=vMax) if
useConstantMaximumVoltage "Offset of 0.5 in case of bipolar operation"
annotation (Placement(transformation(extent={{40,70},{20,90}})));
protected
Modelica.Blocks.Interfaces.RealInput vMaxInt "External maximum voltage"
annotation (Placement(transformation(
extent={{-4,-4},{4,4}},
rotation=180,
origin={0,80})));
equation
connect(divisionBipolar.y, add.u1) annotation (Line(points={{-19,-30},{-10,-30},
{-10,-44},{-2,-44}}, color={0,0,127}));
connect(offset.y, add.u2) annotation (Line(
points={{-19,-70},{-10,-70},{-10,-56},{-2,-56}}, color={0,0,127}));
connect(divisionUnipolar.y, dutyCycle) annotation (Line(points={{-19,30},{40,30},
{40,0},{110,0}}, color={0,0,127}));
connect(add.y, dutyCycle) annotation (Line(
points={{21,-50},{40,-50},{40,0},{110,0}}, color={0,0,127}));
connect(v, divisionUnipolar.u1) annotation (Line(points={{-120,0},{-80,0},{-80,
36},{-42,36}}, color={0,0,127}));
connect(v, divisionBipolar.u1) annotation (Line(points={{-120,0},{-80,0},{-80,
-24},{-42,-24}}, color={0,0,127}));
connect(vMaxExt, vMaxInt)
annotation (Line(points={{0,120},{0,80}}, color={0,0,127}));
connect(vMaxInt, divisionUnipolar.u2) annotation (Line(points={{0,80},{-60,80},
{-60,24},{-42,24}}, color={0,0,127}));
connect(vMaxInt, vMaxConst.y)
annotation (Line(points={{0,80},{19,80}}, color={0,0,127}));
connect(vMaxInt, divisionBipolar.u2) annotation (Line(points={{0,80},{-60,80},
{-60,-36},{-42,-36}}, color={0,0,127}));
annotation (obsolete="Obsolete block - use Modelica.Electrical.PowerConverters.DCDC.Control.Voltage2DutyCycle instead",
defaultComponentName="adaptor", Icon(graphics={
Rectangle(
extent={{-100,100},{100,-100}},
fillColor={255,255,255},
fillPattern=FillPattern.Solid),
Line(
points={{0,-60},{60,60}},
pattern=LinePattern.Dash),
Line(
points={{-60,-60},{60,60}}),
Polygon(
points={{-78,-60},{-76,-60},{62,-60},{62,-54},{82,-60},{62,-66},{62,-60},
{62,-60},{-78,-60}},
fillPattern=FillPattern.Solid),
Polygon(
points={{0,-80},{0,60},{-6,60},{0,80},{6,60},{0,60},{0,-80}},
fillPattern=FillPattern.Solid), Text(extent={{
-150,-120},{150,-160}}, textString = "%name", lineColor = {0, 0, 255})}),
Documentation(info="<html>
<p>
This model linearly transforms the input voltage signal into a duty cycle. For the unipolar case the input voltage range is between zero and <code>vMax</code>. In case of bipolar input the input voltage is in the range between <code>-vMax</code> and <code>vMax</code>.
</p>
<p>
Note: This block is replaced by the improved <a href=\"modelica://Modelica.Electrical.PowerConverters.DCDC.Control.Voltage2DutyCycle\">Voltage2DutyCycle</a> block.
</p>
</html>"));
end VoltageToDutyCycle;
end Control;
end DCDC;
annotation (Icon(graphics={
Line(
points={{-78,0},{80,0}},
color={95,95,95}),
Polygon(points={{36,0},{-34,50},{-34,-50},{36,0}}, lineColor={95,95,95}),
Line(
points={{36,50},{36,-52}},
color={95,95,95})}));
end PowerConverters;
package QuasiStationary "Library for quasi-stationary electrical singlephase and multiphase AC simulation"
extends Modelica.Icons.Package;
package SinglePhase "Single phase AC library"
extends Modelica.Icons.Package;
package Interfaces "Interfaces"
extends Modelica.Icons.InterfacesPackage;
partial model RelativeSensor "Obsolete model - use Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.RelativeSensorElementary instead"
extends Modelica.Icons.ObsoleteModel;
extends Modelica.Icons.RoundSensor;
extends Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.OnePort;
Modelica.ComplexBlocks.Interfaces.ComplexOutput y annotation (Placement(
transformation(
origin={0,-110},
extent={{-10,-10},{10,10}},
rotation=270)));
annotation (obsolete="Obsolete block - use Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.RelativeSensorElementary instead",
Icon(graphics={
Line(points={{-70,0},{-94,0}}, color={85,170,255}),
Line(points={{70,0},{94,0}}, color={85,170,255}),
Text(
extent={{-160,120},{160,80}},
lineColor={0,0,255},
textString="%name"),
Line(points={{0,-70},{0,-80},{0,-90},{0,-100}})}),
Documentation(info="<html>
<p>
The relative sensor partial model relies on the
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.OnePort\">OnePort</a> to measure the complex voltage or current. Additionally this model contains a proper icon and a definition of the angular velocity.
</p>
<h4>See also</h4>
<p>
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.AbsoluteSensor\">AbsoluteSensor</a>,
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.VoltageSensor\">VoltageSensor</a>,
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.CurrentSensor\">CurrentSensor</a>,
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.PowerSensor\">PowerSensor</a>,
<a href=\"modelica://Modelica.Electrical.QuasiStatic.Polyphase.Interfaces.AbsoluteSensor\">Polyphase.Interfaces.AbsoluteSensor</a>,
<a href=\"modelica://Modelica.Electrical.QuasiStatic.Polyphase.Interfaces.RelativeSensorElementary\">Polyphase.Interfaces.RelativeSensorElementary</a>
</p>
</html>"));
end RelativeSensor;
end Interfaces;
end SinglePhase;
package MultiPhase "Polyphase AC library"
extends Modelica.Icons.Package;
package Interfaces "Interfaces"
extends Modelica.Icons.InterfacesPackage;
partial model RelativeSensor "Obsolete model - use Modelica.Electrical.QuasiStatic.Polyphase.Interfaces.RelativeSensorElementary instead"
extends Modelica.Icons.ObsoleteModel;
extends Modelica.Icons.RoundSensor;
extends Modelica.Electrical.QuasiStatic.Polyphase.Interfaces.TwoPlug;
Modelica.ComplexBlocks.Interfaces.ComplexOutput y[m] annotation (
Placement(transformation(
origin={0,-110},
extent={{-10,-10},{10,10}},
rotation=270)));
annotation (obsolete="Obsolete block - use Modelica.Electrical.QuasiStatic.Polyphase.Interfaces.RelativeSensorElementary instead",
Icon(graphics={
Line(points={{-70,0},{-94,0}}, color={85,170,255}),
Line(points={{70,0},{94,0}}, color={85,170,255}),
Line(points={{0,-70},{0,-80},{0,-90},{0,-100}}, color={85,170,255}),
Text(
extent={{150,-100},{-150,-70}},
textString="m=%m"),
Text(
lineColor={0,0,255},
extent={{-150,80},{150,120}},
textString="%name")}), Documentation(info="<html>
<p>
The relative sensor partial model relies on the
<a href=\"modelica://Modelica.Electrical.QuasiStatic.Polyphase.Interfaces.TwoPlug\">TwoPlug</a> to measure the complex voltages and currents. Additionally this model contains a proper icon and a definition of the angular velocity.
</p>
<h4>See also</h4>
<p>
<a href=\"modelica://Modelica.Electrical.QuasiStatic.Polyphase.Interfaces.AbsoluteSensor\">AbsoluteSensor</a>,
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.AbsoluteSensor\">SinglePhase.Interfaces.AbsoluteSensor</a>,
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.RelativeSensorElementary\">SinglePhase.Interfaces.RelativeSensorElementary</a>
</p>
</html>"));
end RelativeSensor;
end Interfaces;
end MultiPhase;
end QuasiStationary;
annotation (Icon(graphics={
Rectangle(
origin={20.3125,82.8571},
extent={{-45.3125,-57.8571},{4.6875,-27.8571}}),
Line(
origin={7.0,50.0},
points={{18.0,-10.0},{53.0,-10.0},{53.0,-45.0}}),
Line(
origin={9.0,54.0},
points={{31.0,-49.0},{71.0,-49.0}}),
Line(
origin={8.0,48.0},
points={{32.0,-58.0},{72.0,-58.0}}),
Line(
origin={6.2593,48.0},
points={{53.7407,-58.0},{53.7407,-93.0},{-66.2593,-93.0},{-66.2593,-58.0}}),
Line(
origin={-3.0,45.0},
points={{-72.0,-55.0},{-42.0,-55.0}}),
Line(
origin={-2.0,55.0},
points={{-83.0,-50.0},{-33.0,-50.0}}),
Line(
origin={1.0,50.0},
points={{-61.0,-45.0},{-61.0,-10.0},{-26.0,-10.0}})}));
end Electrical;
package Mechanics "Library of 1-dim. and 3-dim. mechanical components (multi-body, rotational, translational)"
extends Modelica.Icons.Package;
package MultiBody "Library to model 3-dimensional mechanical systems"
extends Modelica.Icons.Package;
package Joints "Components that constrain the motion between two frames"
extends Modelica.Icons.Package;
model Prismatic "Prismatic joint (1 translational degree-of-freedom, 2 potential states, optional axis flange, optional distance offset)"
extends Modelica.Icons.ObsoleteModel;
extends Modelica.Mechanics.MultiBody.Interfaces.PartialElementaryJoint;
Modelica.Mechanics.Translational.Interfaces.Flange_a axis if useAxisFlange
"1-dim. translational flange that drives the joint"
annotation (Placement(transformation(extent={{90,50},{70,70}})));
Modelica.Mechanics.Translational.Interfaces.Flange_b support if useAxisFlange
"1-dim. translational flange of the drive support (assumed to be fixed in the world frame, NOT in the joint)"
annotation (Placement(transformation(extent={{-30,50},{-50,70}})));
parameter Boolean useAxisFlange=false "= true, if axis flange is enabled"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
parameter Boolean animation=true "= true, if animation shall be enabled";
parameter Modelica.Mechanics.MultiBody.Types.Axis n={1,0,0}
"Axis of translation resolved in frame_a (= same as in frame_b)"
annotation (Evaluate=true);
parameter SI.Position s_offset=0
"Relative distance offset (distance between frame_a and frame_b = s_offset + s)";
parameter Modelica.Mechanics.MultiBody.Types.Axis boxWidthDirection={0,1,0}
"Vector in width direction of box, resolved in frame_a"
annotation (Evaluate=true, Dialog(tab="Animation", group=
"if animation = true", enable=animation));
parameter SI.Distance boxWidth=world.defaultJointWidth
"Width of prismatic joint box"
annotation (Dialog(tab="Animation", group="if animation = true", enable=animation));
parameter SI.Distance boxHeight=boxWidth "Height of prismatic joint box"
annotation (Dialog(tab="Animation", group="if animation = true", enable=animation));
input Modelica.Mechanics.MultiBody.Types.Color boxColor=Modelica.Mechanics.MultiBody.Types.Defaults.JointColor
"Color of prismatic joint box"
annotation (Dialog(colorSelector=true, tab="Animation", group="if animation = true", enable=animation));
input Modelica.Mechanics.MultiBody.Types.SpecularCoefficient specularCoefficient = world.defaultSpecularCoefficient
"Reflection of ambient light (= 0: light is completely absorbed)"
annotation (Dialog(tab="Animation", group="if animation = true", enable=animation));
parameter StateSelect stateSelect=StateSelect.prefer
"Priority to use distance s and v=der(s) as states" annotation(Dialog(tab="Advanced"));
final parameter Real e[3](each final unit="1")=
Modelica.Math.Vectors.normalizeWithAssert(n)
"Unit vector in direction of prismatic axis n";
SI.Position s(start=0, final stateSelect=stateSelect)
"Relative distance between frame_a and frame_b"
annotation (unassignedMessage="
The relative distance s of a prismatic joint cannot be determined.
Possible reasons:
- A non-zero mass might be missing on either side of the parts
connected to the prismatic joint.
- Too many StateSelect.always are defined and the model
has less degrees of freedom as specified with this setting
(remove all StateSelect.always settings).
");
SI.Velocity v(start=0,final stateSelect=stateSelect)
"First derivative of s (relative velocity)";
SI.Acceleration a(start=0) "Second derivative of s (relative acceleration)";
SI.Force f "Actuation force in direction of joint axis";
protected
Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape box(
shapeType="box",
color=boxColor,
specularCoefficient=specularCoefficient,
length=if noEvent(abs(s + s_offset) > 1.e-6) then s + s_offset else 1.e-6,
width=boxWidth,
height=boxHeight,
lengthDirection=e,
widthDirection=boxWidthDirection,
r=frame_a.r_0,
R=frame_a.R) if world.enableAnimation and animation;
Modelica.Mechanics.Translational.Components.Fixed fixed
annotation (Placement(transformation(extent={{-50,30},{-30,50}})));
Modelica.Mechanics.Translational.Interfaces.InternalSupport internalAxis(f = f)
annotation (Placement(transformation(extent={{70,50},{90,30}})));
Modelica.Mechanics.Translational.Sources.ConstantForce constantForce(f_constant=0) if not useAxisFlange
annotation (Placement(transformation(extent={{40,30},{60,50}})));
equation
v = der(s);
a = der(v);
// relationships between kinematic quantities of frame_a and of frame_b
frame_b.r_0 = frame_a.r_0 + Modelica.Mechanics.MultiBody.Frames.resolve1(frame_a.R, e*(s_offset + s));
frame_b.R = frame_a.R;
// Force and torque balance
zeros(3) = frame_a.f + frame_b.f;
zeros(3) = frame_a.t + frame_b.t + cross(e*(s_offset + s), frame_b.f);
// d'Alemberts principle
f = -e*frame_b.f;
// Connection to internal connectors
s = internalAxis.s;
connect(fixed.flange, support) annotation (Line(
points={{-40,40},{-40,60}}, color={0,127,0}));
connect(internalAxis.flange, axis) annotation (Line(
points={{80,40},{80,60}}, color={0,127,0}));
connect(constantForce.flange, internalAxis.flange) annotation (Line(
points={{60,40},{80,40}}, color={0,127,0}));
annotation (obsolete = "Obsolete model - use Modelica.Mechanics.MultiBody.Joints.Prismatic instead",
Icon(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(
extent={{-100,-50},{-30,41}},
pattern=LinePattern.None,
fillColor={192,192,192},
fillPattern=FillPattern.Solid,
lineColor={0,0,255}),
Rectangle(
extent={{-100,40},{-30,50}},
pattern=LinePattern.None,
fillPattern=FillPattern.Solid,
lineColor={0,0,255}),
Rectangle(
extent={{-30,-30},{100,20}},
pattern=LinePattern.None,
fillColor={192,192,192},
fillPattern=FillPattern.Solid,
lineColor={0,0,255}),
Rectangle(
extent={{-30,20},{100,30}},
pattern=LinePattern.None,
fillPattern=FillPattern.Solid,
lineColor={0,0,255}),
Line(points={{-30,-50},{-30,50}}),
Line(points={{100,-30},{100,21}}),
Text(
extent={{60,12},{96,-13}},
lineColor={128,128,128},
textString="b"),
Text(
extent={{-95,13},{-60,-9}},
lineColor={128,128,128},
textString="a"),
Text(
visible=useAxisFlange,
extent={{-150,-135},{150,-95}},
textString="%name",
lineColor={0,0,255}),
Text(
extent={{-150,-90},{150,-60}},
textString="n=%n"),
Rectangle(
visible=useAxisFlange,
extent={{90,30},{100,70}},
pattern=LinePattern.None,
fillColor={192,192,192},
fillPattern=FillPattern.Solid,
lineColor={0,0,255}),
Text(
visible=not useAxisFlange,
extent={{-150,60},{150,100}},
textString="%name",
lineColor={0,0,255})}),
Documentation(info="<html>
<p>
Joint where frame_b is translated along axis n which is fixed in frame_a.
The two frames coincide when the relative distance \"s = 0\".
</p>
<p>
Optionally, two additional 1-dimensional mechanical flanges
(flange \"axis\" represents the driving flange and
flange \"support\" represents the bearing) can be enabled via
parameter <strong>useAxisFlange</strong>. The enabled axis flange can be
driven with elements of the
<a href=\"modelica://Modelica.Mechanics.Translational\">Modelica.Mechanics.Translational</a>
library.
</p>
<p>
In the \"Advanced\" menu it can be defined via parameter <strong>stateSelect</strong>
that the relative distance \"s\" and its derivative shall be definitely
used as states by setting stateSelect=StateSelect.always.
Default is StateSelect.prefer to use the relative distance and its
derivative as preferred states. The states are usually selected automatically.
In certain situations, especially when closed kinematic loops are present,
it might be slightly more efficient, when using the StateSelect.always setting.
</p>
<p>
In the following figure the animation of a prismatic
joint is shown. The light blue coordinate system is
frame_a and the dark blue coordinate system is
frame_b of the joint. The black arrow is parameter
vector \"n\" defining the translation axis
(here: n = {1,1,0}).
</p>
<div>
<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Joints/Prismatic.png\">
</div>
</html>"));
end Prismatic;
model Revolute "Revolute joint (1 rotational degree-of-freedom, 2 potential states, optional axis flange, optional angle offset)"
extends Modelica.Icons.ObsoleteModel;
Modelica.Mechanics.Rotational.Interfaces.Flange_a axis if useAxisFlange
"1-dim. rotational flange that drives the joint"
annotation (Placement(transformation(extent={{10,90},{-10,110}})));
Modelica.Mechanics.Rotational.Interfaces.Flange_b support if useAxisFlange
"1-dim. rotational flange of the drive support (assumed to be fixed in the world frame, NOT in the joint)"
annotation (Placement(transformation(extent={{-70,90},{-50,110}})));
Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a
"Coordinate system fixed to the joint with one cut-force and cut-torque"
annotation (Placement(transformation(extent={{-116,-16},{-84,16}})));
Modelica.Mechanics.MultiBody.Interfaces.Frame_b frame_b
"Coordinate system fixed to the joint with one cut-force and cut-torque"
annotation (Placement(transformation(extent={{84,-16},{116,16}})));
parameter Boolean useAxisFlange=false "= true, if axis flange is enabled"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
parameter Boolean animation=true
"= true, if animation shall be enabled (show axis as cylinder)";
parameter Modelica.Mechanics.MultiBody.Types.Axis n={0,0,1}
"Axis of rotation resolved in frame_a (= same as in frame_b)"
annotation (Evaluate=true);
parameter SI.Angle phi_offset=0
"Relative angle offset (angle = phi_offset + phi)";
parameter SI.Distance cylinderLength=world.defaultJointLength
"Length of cylinder representing the joint axis"
annotation (Dialog(tab="Animation", group="if animation = true", enable=animation));
parameter SI.Distance cylinderDiameter=world.defaultJointWidth
"Diameter of cylinder representing the joint axis"
annotation (Dialog(tab="Animation", group="if animation = true", enable=animation));
input Modelica.Mechanics.MultiBody.Types.Color cylinderColor=Modelica.Mechanics.MultiBody.Types.Defaults.JointColor
"Color of cylinder representing the joint axis"
annotation (Dialog(colorSelector=true, tab="Animation", group="if animation = true", enable=animation));
input Modelica.Mechanics.MultiBody.Types.SpecularCoefficient
specularCoefficient = world.defaultSpecularCoefficient
"Reflection of ambient light (= 0: light is completely absorbed)"
annotation (Dialog(tab="Animation", group="if animation = true", enable=animation));
parameter StateSelect stateSelect=StateSelect.prefer
"Priority to use joint angle phi and w=der(phi) as states" annotation(Dialog(tab="Advanced"));
SI.Angle phi(start=0, final stateSelect=stateSelect)
"Relative rotation angle from frame_a to frame_b"
annotation (unassignedMessage="
The rotation angle phi of a revolute joint cannot be determined.
Possible reasons:
- A non-zero mass might be missing on either side of the parts
connected to the revolute joint.
- Too many StateSelect.always are defined and the model
has less degrees of freedom as specified with this setting
(remove all StateSelect.always settings).
");
SI.AngularVelocity w(start=0, stateSelect=stateSelect)
"First derivative of angle phi (relative angular velocity)";
SI.AngularAcceleration a(start=0)
"Second derivative of angle phi (relative angular acceleration)";
SI.Torque tau "Driving torque in direction of axis of rotation";
SI.Angle angle "= phi_offset + phi";
protected
outer Modelica.Mechanics.MultiBody.World world;
parameter Real e[3](each final unit="1")=Modelica.Math.Vectors.normalizeWithAssert(n)
"Unit vector in direction of rotation axis, resolved in frame_a (= same as in frame_b)";
Modelica.Mechanics.MultiBody.Frames.Orientation R_rel
"Relative orientation object from frame_a to frame_b or from frame_b to frame_a";
Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape cylinder(
shapeType="cylinder",
color=cylinderColor,
specularCoefficient=specularCoefficient,
length=cylinderLength,
width=cylinderDiameter,
height=cylinderDiameter,
lengthDirection=e,
widthDirection={0,1,0},
r_shape=-e*(cylinderLength/2),
r=frame_a.r_0,
R=frame_a.R) if world.enableAnimation and animation;
protected
Modelica.Mechanics.Rotational.Components.Fixed fixed
"support flange is fixed to ground"
annotation (Placement(transformation(extent={{-70,70},{-50,90}})));
Modelica.Mechanics.Rotational.Interfaces.InternalSupport internalAxis(tau=tau)
annotation (Placement(transformation(extent={{-10,90},{10,70}})));
Modelica.Mechanics.Rotational.Sources.ConstantTorque constantTorque(tau_constant=0) if not useAxisFlange
annotation (Placement(transformation(extent={{40,70},{20,90}})));
equation
Connections.branch(frame_a.R, frame_b.R);
assert(cardinality(frame_a) > 0,
"Connector frame_a of revolute joint is not connected");
assert(cardinality(frame_b) > 0,
"Connector frame_b of revolute joint is not connected");
angle = phi_offset + phi;
w = der(phi);
a = der(w);
// relationships between quantities of frame_a and of frame_b
frame_b.r_0 = frame_a.r_0;
if Connections.rooted(frame_a.R) then
R_rel = Modelica.Mechanics.MultiBody.Frames.planarRotation(e, phi_offset + phi, w);
frame_b.R = Modelica.Mechanics.MultiBody.Frames.absoluteRotation(frame_a.R, R_rel);
frame_a.f = -Modelica.Mechanics.MultiBody.Frames.resolve1(R_rel, frame_b.f);
frame_a.t = -Modelica.Mechanics.MultiBody.Frames.resolve1(R_rel, frame_b.t);
else
R_rel = Modelica.Mechanics.MultiBody.Frames.planarRotation(-e, phi_offset + phi, w);
frame_a.R = Modelica.Mechanics.MultiBody.Frames.absoluteRotation(frame_b.R, R_rel);
frame_b.f = -Modelica.Mechanics.MultiBody.Frames.resolve1(R_rel, frame_a.f);
frame_b.t = -Modelica.Mechanics.MultiBody.Frames.resolve1(R_rel, frame_a.t);
end if;
// d'Alemberts principle
tau = -frame_b.t*e;
// Connection to internal connectors
phi = internalAxis.phi;
connect(fixed.flange, support) annotation (Line(
points={{-60,80},{-60,100}}));
connect(internalAxis.flange, axis) annotation (Line(
points={{0,80},{0,100}}));
connect(constantTorque.flange, internalAxis.flange) annotation (Line(
points={{20,80},{0,80}}));
annotation (obsolete = "Obsolete model - use Modelica.Mechanics.MultiBody.Joints.Revolute instead",
Icon(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(
extent={{-100,-60},{-30,60}},
lineColor={64,64,64},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={255,255,255},
radius=10),
Rectangle(
extent={{30,-60},{100,60}},
lineColor={64,64,64},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={255,255,255},
radius=10),
Rectangle(extent={{-100,60},{-30,-60}}, lineColor={64,64,64}, radius=10),
Rectangle(extent={{30,60},{100,-60}}, lineColor={64,64,64}, radius=10),
Text(
extent={{-90,14},{-54,-11}},
lineColor={128,128,128},
textString="a"),
Text(
extent={{51,11},{87,-14}},
lineColor={128,128,128},
textString="b"),
Line(
visible=useAxisFlange,
points={{-20,80},{-20,60}}),
Line(
visible=useAxisFlange,
points={{20,80},{20,60}}),
Rectangle(
visible=useAxisFlange,
extent={{-10,100},{10,50}},
fillPattern=FillPattern.VerticalCylinder,
fillColor={192,192,192}),
Polygon(
visible=useAxisFlange,
points={{-10,30},{10,30},{30,50},{-30,50},{-10,30}},
lineColor={64,64,64},
fillColor={192,192,192},
fillPattern=FillPattern.Solid),
Rectangle(
extent={{-30,11},{30,-10}},
lineColor={64,64,64},
fillColor={192,192,192},
fillPattern=FillPattern.Solid),
Polygon(
visible=useAxisFlange,
points={{10,30},{30,50},{30,-50},{10,-30},{10,30}},
lineColor={64,64,64},
fillColor={192,192,192},
fillPattern=FillPattern.Solid),
Text(
extent={{-150,-110},{150,-80}},
textString="n=%n"),
Text(
visible=useAxisFlange,
extent={{-150,-155},{150,-115}},
textString="%name",
lineColor={0,0,255}),
Line(
visible=useAxisFlange,
points={{-20,70},{-60,70},{-60,60}}),
Line(
visible=useAxisFlange,
points={{20,70},{50,70},{50,60}}),
Line(
visible=useAxisFlange,
points={{-90,100},{-30,100}}),
Line(
visible=useAxisFlange,
points={{-30,100},{-50,80}}),
Line(
visible=useAxisFlange,
points={{-49,100},{-70,80}}),
Line(
visible=useAxisFlange,
points={{-70,100},{-90,80}}),
Text(
visible=not useAxisFlange,
extent={{-150,70},{150,110}},
textString="%name",
lineColor={0,0,255})}),
Documentation(info="<html>
<p>
Joint where frame_b rotates around axis n which is fixed in frame_a.
The two frames coincide when the rotation angle \"phi = 0\".
</p>
<p>
Optionally, two additional 1-dimensional mechanical flanges
(flange \"axis\" represents the driving flange and
flange \"support\" represents the bearing) can be enabled via
parameter <strong>useAxisFlange</strong>. The enabled axis flange can be
driven with elements of the
<a href=\"modelica://Modelica.Mechanics.Rotational\">Modelica.Mechanics.Rotational</a>
library.
</p>
<p>
In the \"Advanced\" menu it can be defined via parameter <strong>stateSelect</strong>
that the rotation angle \"phi\" and its derivative shall be definitely
used as states by setting stateSelect=StateSelect.always.
Default is StateSelect.prefer to use the joint angle and its
derivative as preferred states. The states are usually selected automatically.
In certain situations, especially when closed kinematic loops are present,
it might be slightly more efficient, when using the StateSelect.always setting.
</p>
<p>
If a <strong>planar loop</strong> is present, e.g., consisting of 4 revolute joints
where the joint axes are all parallel to each other, then there is no
longer a unique mathematical solution and the symbolic algorithms will
fail. Usually, an error message will be printed pointing out this
situation. In this case, one revolute joint of the loop has to be replaced
by a Joints.RevolutePlanarLoopConstraint joint. The
effect is that from the 5 constraints of a usual revolute joint,
3 constraints are removed and replaced by appropriate known
variables (e.g., the force in the direction of the axis of rotation is
treated as known with value equal to zero; for standard revolute joints,
this force is an unknown quantity).
</p>
<p>
In the following figure the animation of a revolute
joint is shown. The light blue coordinate system is
frame_a and the dark blue coordinate system is
frame_b of the joint. The black arrow is parameter
vector \"n\" defining the translation axis
(here: n = {0,0,1}, phi.start = 45<sup>o</sup>).
</p>
<div>
<img src=\"modelica://Modelica/Resources/Images/Mechanics/MultiBody/Joints/Revolute.png\">
</div>
</html>"));
end Revolute;
end Joints;
package Visualizers "3-dimensional visual objects used for animation"
extends Modelica.Icons.Package;
model Ground "Visualizing the ground (box in z=0)"
extends Modelica.Icons.ObsoleteModel;
parameter Boolean animation=true
"= true, if animation of ground shall be enabled";
parameter SI.Position length = 10
"Length and width of box (center is at x=y=0)" annotation (Dialog(enable=animation));
parameter SI.Position height = 0.02
"Height of box (upper surface is at z=0, lower surface is at z=-height)" annotation (Dialog(enable=animation));
parameter Modelica.Mechanics.MultiBody.Types.Color groundColor={0,255,0}
"Color of box" annotation (Dialog(colorSelector=true, enable=animation));
Modelica.Mechanics.MultiBody.Visualizers.FixedShape ground(
lengthDirection={1,0,0},
widthDirection={0,1,0},
animation=animation,
r_shape={-length/2,0,-height},
length=length,
height=height,
color=groundColor,
width=length)
annotation (Placement(transformation(extent={{-20,0},{0,20}})));
Modelica.Mechanics.MultiBody.Parts.Fixed fixed
annotation (Placement(transformation(extent={{-60,0},{-40,20}})));
equation
connect(fixed.frame_b, ground.frame_a) annotation (Line(
points={{-40,10},{-20,10}},
color={95,95,95},
thickness=0.5));
annotation (
obsolete = "Obsolete model - use ground visualization feature in Modelica.Mechanics.MultiBody.World, or use model Modelica.Mechanics.MultiBody.Visualizers.Rectangle instead",
Icon(
coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}),
graphics = {
Polygon(lineColor = {255, 255, 255}, fillColor = {126, 181, 78}, fillPattern = FillPattern.Solid, points = {{-100, -30}, {20, -90}, {100, 0}, {-10, 40}}),
Text(lineColor = {64, 64, 64}, extent = {{20, 70}, {60, 100}}, textString = "z", horizontalAlignment = TextAlignment.Left),
Polygon(lineColor = {255, 255, 255}, fillColor = {14, 111, 1}, fillPattern = FillPattern.Solid, points = {{100, -10}, {20, -100}, {20, -90}, {100, 0}}),
Polygon(lineColor = {255, 255, 255}, fillColor = {14, 111, 1}, fillPattern = FillPattern.Solid, points = {{-100, -40}, {20, -100}, {20, -90}, {-100, -30}}), Line(origin = {6, -8}, points={{-6,-10},{-6,108}}),
Polygon(origin = {6, 0}, points={{-6,102},{-14,72},{2,72},{-6,102}}, fillPattern=FillPattern.Solid),
Text(lineColor = {0,0,255}, extent = {{-150, -145}, {150, -105}}, textString = "%name")}),
Documentation(info = "<html>
<p>
This shape visualizes the x-y plane by a box.
</p>