-
Notifications
You must be signed in to change notification settings - Fork 164
/
Rotational.mo
2126 lines (2077 loc) · 109 KB
/
Rotational.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 ModelicaTest;
package Rotational "Test models for Modelica.Mechanics.Rotational"
extends Modelica.Icons.ExamplesPackage;
package ForUsersGuide "Models used as screenshot for the users guide"
extends Modelica.Icons.ExamplesPackage;
model SimpleDriveTrain
extends Modelica.Icons.Example;
Modelica.Blocks.Sources.Sine sine(f=1) annotation (Placement(
transformation(extent={{-80,0},{-60,20}})));
Modelica.Mechanics.Rotational.Sources.Torque torque(useSupport=true)
annotation (Placement(transformation(extent={{-40,0},{-20,20}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed annotation (
Placement(transformation(extent={{-40,-20},{-20,0}})));
Modelica.Mechanics.Rotational.Components.Inertia J1(
J=0.2,
phi(start=0, fixed=true),
w(start=0, fixed=true)) annotation (Placement(transformation(extent={{-10,
0},{10,20}})));
Modelica.Mechanics.Rotational.Components.IdealGear gear(ratio=5,
useSupport=true) annotation (Placement(transformation(extent={{20,0},
{40,20}})));
Modelica.Mechanics.Rotational.Components.Inertia J2(J=5) annotation (
Placement(transformation(extent={{50,0},{70,20}})));
equation
connect(sine.y, torque.tau) annotation (Line(
points={{-59,10},{-42,10}}, color={0,0,127}));
connect(torque.support, fixed.flange) annotation (Line(
points={{-30,0},{-30,-10}}));
connect(torque.flange, J1.flange_a) annotation (Line(
points={{-20,10},{-10,10}}));
connect(gear.flange_b, J2.flange_a) annotation (Line(
points={{40,10},{50,10}}));
connect(fixed.flange, gear.support) annotation (Line(
points={{-30,-10},{30,-10},{30,0}}));
connect(J1.flange_b, gear.flange_a) annotation (Line(
points={{10,10},{20,10}}));
annotation (experiment(StopTime=1.1));
end SimpleDriveTrain;
model ConnectionPossibilities
extends Modelica.Icons.Example;
Modelica.Mechanics.Rotational.Components.Inertia inertia1(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-60,
40},{-40,60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia2(J=1)
annotation (Placement(transformation(extent={{-20,40},{0,60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia3(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-60,
-20},{-40,0}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia4(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{
30,-20},{50,0}})));
Modelica.Mechanics.Rotational.Components.Spring spring1(c=1e4)
annotation (Placement(transformation(extent={{-30,-20},{-10,0}})));
Modelica.Mechanics.Rotational.Components.Spring spring2(c=1e4)
annotation (Placement(transformation(extent={{0,-20},{20,0}})));
equation
connect(inertia1.flange_b, inertia2.flange_a) annotation (Line(
points={{-40,50},{-20,50}}));
connect(inertia3.flange_b, spring1.flange_a) annotation (Line(
points={{-40,-10},{-30,-10}}));
connect(spring1.flange_b, spring2.flange_a) annotation (Line(
points={{-10,-10},{0,-10}}));
connect(spring2.flange_b, inertia4.flange_a) annotation (Line(
points={{20,-10},{30,-10}}));
annotation (experiment(StopTime=1.1));
end ConnectionPossibilities;
model SupportTorque1
extends Modelica.Icons.Example;
Modelica.Blocks.Sources.Sine sine2(f=1) annotation (Placement(
transformation(extent={{-100,0},{-80,20}})));
Modelica.Mechanics.Rotational.Sources.Torque torque2(useSupport=true)
annotation (Placement(transformation(extent={{-60,0},{-40,20}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed1 annotation (
Placement(transformation(extent={{-60,-20},{-40,0}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia3(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-30,
0},{-10,20}})));
Modelica.Mechanics.Rotational.Components.IdealGear idealGear2(ratio=1,
useSupport=true) annotation (Placement(transformation(extent={{0,0},{
20,20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia4(J=1)
annotation (Placement(transformation(extent={{60,0},{80,20}})));
Modelica.Mechanics.Rotational.Components.BearingFriction bearingFriction1(
useSupport=true) annotation (Placement(transformation(extent={{30,0},{
50,20}})));
equation
connect(sine2.y, torque2.tau) annotation (Line(
points={{-79,10},{-62,10}}, color={0,0,127}));
connect(torque2.support, fixed1.flange) annotation (Line(
points={{-50,0},{-50,-10}}));
connect(torque2.flange, inertia3.flange_a) annotation (Line(
points={{-40,10},{-30,10}}));
connect(fixed1.flange, idealGear2.support) annotation (Line(
points={{-50,-10},{10,-10},{10,0}}));
connect(inertia3.flange_b, idealGear2.flange_a) annotation (Line(
points={{-10,10},{0,10}}));
connect(idealGear2.flange_b, bearingFriction1.flange_a) annotation (Line(
points={{20,10},{30,10}}));
connect(bearingFriction1.flange_b, inertia4.flange_a) annotation (Line(
points={{50,10},{60,10}}));
connect(fixed1.flange, bearingFriction1.support) annotation (Line(
points={{-50,-10},{40,-10},{40,0}}));
annotation (experiment(StopTime=1.1));
end SupportTorque1;
model Directions
extends Modelica.Icons.Example;
Modelica.Blocks.Sources.Sine sine(f=1) annotation (Placement(
transformation(extent={{-80,50},{-60,70}})));
Modelica.Mechanics.Rotational.Sources.Torque torque(useSupport=true)
annotation (Placement(transformation(extent={{-44,50},{-24,70}})));
Modelica.Mechanics.Rotational.Components.Inertia J1(
J=0.2,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-10,
50},{10,70}})));
Modelica.Mechanics.Rotational.Components.IdealGear gear(ratio=5,
useSupport=true) annotation (Placement(transformation(extent={{20,50},
{40,70}})));
Modelica.Mechanics.Rotational.Components.Inertia J2(J=5) annotation (
Placement(transformation(extent={{52,50},{72,70}})));
Modelica.Blocks.Sources.Sine sine1(f=1) annotation (Placement(
transformation(extent={{-80,-10},{-60,10}})));
Modelica.Mechanics.Rotational.Sources.Torque torque1(useSupport=true)
annotation (Placement(transformation(extent={{-44,-10},{-24,10}})));
Modelica.Mechanics.Rotational.Components.Inertia J3(
J=0.2,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-10,
-10},{10,10}})));
Modelica.Mechanics.Rotational.Components.IdealGear gear1(ratio=1/5,
useSupport=true) annotation (Placement(transformation(extent={{40,-10},
{20,10}})));
Modelica.Mechanics.Rotational.Components.Inertia J4(J=5) annotation (
Placement(transformation(extent={{52,-10},{72,10}})));
Modelica.Blocks.Sources.Sine sine2(f=1) annotation (Placement(
transformation(extent={{-80,-70},{-60,-50}})));
Modelica.Mechanics.Rotational.Sources.Torque torque2(useSupport=true)
annotation (Placement(transformation(extent={{-44,-70},{-24,-50}})));
Modelica.Mechanics.Rotational.Components.Inertia J5(
J=0.2,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-10,
-70},{10,-50}})));
Modelica.Mechanics.Rotational.Components.IdealGear gear2(ratio=1/5,
useSupport=true) annotation (Placement(transformation(extent={{40,-70},
{20,-50}})));
Modelica.Mechanics.Rotational.Components.Inertia J6(J=5) annotation (
Placement(transformation(extent={{72,-70},{52,-50}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed1 annotation (
Placement(transformation(extent={{-10,30},{10,50}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed2 annotation (
Placement(transformation(extent={{-10,-26},{10,-6}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed3 annotation (
Placement(transformation(extent={{-10,-90},{10,-70}})));
equation
connect(sine.y, torque.tau) annotation (Line(
points={{-59,60},{-46,60}}, color={0,0,127}));
connect(torque.flange, J1.flange_a) annotation (Line(
points={{-24,60},{-10,60}}));
connect(gear.flange_b, J2.flange_a) annotation (Line(
points={{40,60},{52,60}}));
connect(J1.flange_b, gear.flange_a) annotation (Line(
points={{10,60},{20,60}}));
connect(sine1.y, torque1.tau) annotation (Line(
points={{-59,0},{-46,0}}, color={0,0,127}));
connect(torque1.flange, J3.flange_a) annotation (Line(
points={{-24,0},{-10,0}}));
connect(J3.flange_b, gear1.flange_b) annotation (Line(
points={{10,0},{20,0}}));
connect(gear1.flange_a, J4.flange_a) annotation (Line(
points={{40,0},{52,0}}));
connect(sine2.y, torque2.tau) annotation (Line(
points={{-59,-60},{-46,-60}}, color={0,0,127}));
connect(torque2.flange, J5.flange_a) annotation (Line(
points={{-24,-60},{-10,-60}}));
connect(J5.flange_b, gear2.flange_b) annotation (Line(
points={{10,-60},{20,-60}}));
connect(gear2.flange_a, J6.flange_b) annotation (Line(
points={{40,-60},{52,-60}}));
connect(torque.support, fixed1.flange) annotation (Line(
points={{-34,50},{-34,40},{0,40}}));
connect(fixed1.flange, gear.support) annotation (Line(
points={{0,40},{30,40},{30,50}}));
connect(torque1.support, fixed2.flange) annotation (Line(
points={{-34,-10},{-34,-16},{0,-16}}));
connect(fixed2.flange, gear1.support) annotation (Line(
points={{0,-16},{30,-16},{30,-10}}));
connect(torque2.support, fixed3.flange) annotation (Line(
points={{-34,-70},{-34,-80},{0,-80}}));
connect(fixed3.flange, gear2.support) annotation (Line(
points={{0,-80},{30,-80},{30,-70}}));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{
-100,-100},{100,100}}), graphics={Polygon(
points={{-23,87},{-13,84},{-23,81},{-23,87}},
fillPattern=FillPattern.Solid),Line(points={{-23,84},{-53,84}}),Text(
extent={{-18,88},{72,80}},
textString="(positive) axis of rotation")}), experiment(
StopTime=2));
end Directions;
model Directions2
extends Modelica.Icons.Example;
Modelica.Mechanics.Rotational.Components.Inertia J2(
J=5,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-60,
55},{-40,75}})));
Modelica.Mechanics.Rotational.Components.Inertia J4(
J=5,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-8,
55},{12,75}})));
Modelica.Mechanics.Rotational.Components.Inertia J6(
J=5,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{
65,55},{45,75}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia1(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-30,
-10},{-10,10}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia2(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{
10,-10},{30,10}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia3(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-80,
-100},{-60,-80}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia4(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-6,
-64},{-26,-44}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia5(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{0,
-100},{20,-80}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia6(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(
origin={40,-50},
extent={{-10,10},{10,-10}},
rotation=90)));
Modelica.Mechanics.Rotational.Sources.Torque torque1(useSupport=true)
annotation (Placement(transformation(extent={{-60,-10},{-40,10}})));
Modelica.Mechanics.Rotational.Sources.Torque torque2(useSupport=true)
annotation (Placement(transformation(extent={{60,-10},{40,10}})));
Modelica.Blocks.Sources.Sine sine1(f=1) annotation (Placement(
transformation(extent={{-90,-10},{-70,10}})));
Modelica.Blocks.Sources.Sine sine2(f=1) annotation (Placement(
transformation(extent={{90,-10},{70,10}})));
Modelica.Mechanics.Rotational.Components.IdealPlanetary idealPlanetary1(
ratio=2) annotation (Placement(transformation(extent={{-50,-100},{-30,
-80}})));
Modelica.Mechanics.Rotational.Components.IdealPlanetary idealPlanetary2(
ratio=2) annotation (Placement(transformation(extent={{60,-100},{80,-80}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed1 annotation (
Placement(transformation(extent={{-60,-27},{-40,-7}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed2 annotation (
Placement(transformation(extent={{40,-24},{60,-4}})));
equation
connect(torque1.flange, inertia1.flange_a) annotation (Line(
points={{-40,0},{-37.5,0},{-37.5,0},{-35,0},{-35,
0},{-30,0}}));
connect(sine1.y, torque1.tau) annotation (Line(
points={{-69,0},{-67.25,0},{-67.25,0},{-65.5,0},
{-65.5,0},{-62,0}}, color={0,0,127}));
connect(torque2.flange, inertia2.flange_b) annotation (Line(
points={{40,0},{37.5,0},{37.5,0},{35,0},{35,0},
{30,0}}));
connect(sine2.y, torque2.tau) annotation (Line(
points={{69,0},{67.25,0},{67.25,0},{65.5,0},{
65.5,0},{62,0}}, color={0,0,127}));
connect(idealPlanetary1.sun, inertia3.flange_b) annotation (Line(
points={{-50,-90},{-60,-90}}));
connect(idealPlanetary1.carrier, inertia4.flange_b) annotation (Line(
points={{-50,-86},{-56,-86},{-56,-54},{-26,-54}}));
connect(inertia5.flange_b, idealPlanetary2.sun) annotation (Line(
points={{20,-90},{60,-90}}));
connect(inertia6.flange_a, idealPlanetary2.carrier) annotation (Line(
points={{40,-60},{40,-86},{60,-86}}));
connect(torque1.support, fixed1.flange) annotation (Line(
points={{-50,-10},{-50,-17}}));
connect(fixed2.flange, torque2.support) annotation (Line(
points={{50,-14},{50,-10}}));
annotation (Diagram(coordinateSystem(
preserveAspectRatio=false,
extent={{-100,-100},{100,100}}),
graphics={Text(
extent={{-28,94},{62,86}},
textString="(positive) axis of rotation"),Line(points={{-61,
65},{-80,65}}),Polygon(
points={{-68,67},{-61,65},{-68,63},{-68,67}},
fillPattern=FillPattern.Solid),Text(
extent={{-57,69},{-91,73}},
textString="J2.flange_a.tau"),Line(points={{-42,45},{-61,45}}),Polygon(
points={{-49,47},{-42,45},{-49,43},{-49,47}},
fillPattern=FillPattern.Solid),Text(
extent={{-33,38},{-67,42}},
textString="J2.w"),Line(points={{-9,65},{-28,65}}),
Polygon(
points={{-16,67},{-9,65},{-16,63},{-16,67}},
fillPattern=FillPattern.Solid),Text(
extent={{-5,69},{-39,73}},
textString="J4.flange_a.tau"),Line(points={{10,45},{-9,45}}),Polygon(
points={{3,47},{10,45},{3,43},{3,47}},
fillPattern=FillPattern.Solid),Text(
extent={{19,38},{-15,42}},
textString="J4.w"),Line(points={{44,65},{25,65}}),
Polygon(
points={{37,67},{44,65},{37,63},{37,67}},
fillPattern=FillPattern.Solid),Text(
extent={{48,69},{14,73}},
textString="J6.flange_b.tau"),Line(points={{63,45},{44,45}}),Polygon(
points={{56,47},{63,45},{56,43},{56,47}},
fillPattern=FillPattern.Solid),Text(
extent={{72,38},{38,42}},
textString="J6.w"),Line(points={{-32,90},{-62,90}}),
Polygon(
points={{-32,93},{-22,90},{-32,87},{-32,93}},
fillPattern=FillPattern.Solid),Text(
extent={{-19,24},{71,16}},
textString="(positive) axis of rotation"),Line(points={{-23,
20},{-53,20}}),Polygon(
points={{-23,23},{-13,20},{-23,17},{-23,23}},
fillPattern=FillPattern.Solid),Polygon(
points={{-47,-47},{-54,-49},{-47,-51},{-47,-47}},
fillPattern=FillPattern.Solid),Line(points={{-52,-49},{-33,-49}}),Line(points={{31.5,-79.5},{31.5,-60.5}}),
Polygon(
points={{29.5,-75.5},{31.5,-82.5},{33.5,-75.5},{29.5,-75.5}},
fillPattern=FillPattern.Solid)}), experiment(StopTime=2));
end Directions2;
model Directions3
extends Modelica.Icons.Example;
Modelica.Mechanics.Rotational.Components.Inertia J1(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-80,
40},{-60,60}})));
Modelica.Mechanics.Rotational.Components.Inertia J2(J=1) annotation (
Placement(transformation(extent={{-20,40},{-40,60}})));
Modelica.Mechanics.Rotational.Components.Inertia J3(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{
20,40},{40,60}})));
Modelica.Mechanics.Rotational.Components.Inertia J4(J=1) annotation (
Placement(transformation(extent={{60,40},{80,60}})));
equation
connect(J1.flange_b, J2.flange_b) annotation (Line(
points={{-60,50},{-40,50}}));
connect(J3.flange_b, J4.flange_b) annotation (Line(
points={{40,50},{50,50},{50,30},{90,30},{90,50},{80,50}}));
annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{
-100,-100},{100,100}}), graphics={Line(points={{-60,66},{-80,66}}),Polygon(
points={{-67,68},{-60,66},{-67,64},{-67,68}},
fillPattern=FillPattern.Solid),Polygon(
points={{-34,68},{-41,66},{-34,64},{-34,68}},
fillPattern=FillPattern.Solid),Line(points={{-20,66},{-39,66}}),Text(
extent={{-10,60},{14,40}},
textString="="),Line(points={{40,66},{20,66}}),
Polygon(
points={{33,68},{40,66},{33,64},{33,68}},
fillPattern=FillPattern.Solid),Line(points={{80,66},{60,66}}),Polygon(
points={{73,68},{80,66},{73,64},{73,68}},
fillPattern=FillPattern.Solid)}), experiment(StopTime=2));
end Directions3;
end ForUsersGuide;
package InitializationConversion
extends Modelica.Icons.ExamplesPackage;
model Inertia
extends Modelica.Icons.Example;
Modelica.Mechanics.Rotational.Components.Inertia inertia1(
J=1,
phi(start=0.017453292519943, fixed=true),
w(start=2, fixed=true)) annotation (Placement(transformation(extent={{-90,
40},{-70,60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia2(
J=1,
stateSelect=StateSelect.default,
w(fixed=true, start=2),
phi(fixed=false, start=0.017453292519943),
a(fixed=true, start=0)) annotation (Placement(transformation(extent={{-10,
40},{10,60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia3(
J=1,
stateSelect=StateSelect.prefer,
a(fixed=false),
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{
40,40},{60,60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia4(
J=1,
stateSelect=StateSelect.always,
a(fixed=false),
w(fixed=true, start=-2),
phi(fixed=true, start=-0.017453292519943)) annotation (Placement(
transformation(extent={{80,40},{100,60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia5(
J=1,
stateSelect=StateSelect.avoid,
a(fixed=false),
w(fixed=true, start=33),
phi(fixed=true, start=0.38397243543875)) annotation (Placement(
transformation(extent={{-90,0},{-70,20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia6(
J=1,
a(fixed=true, start=44),
phi(fixed=false),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{-10,
0},{10,20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia7(
J=1,
a(fixed=true, start=3),
phi(fixed=true, start=0.017453292519943),
w(fixed=true, start=2)) annotation (Placement(transformation(extent={{
20,0},{40,20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia7a(
J=1,
a(start=3),
phi(start=0.017453292519943),
w(start=2, fixed=true)) annotation (Placement(transformation(extent={{
80,0},{100,20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia8(
J=1,
w(fixed=true, start=0),
a(fixed=true, start=0),
phi(fixed=false, start=0)) annotation (Placement(transformation(extent=
{{-80,-40},{-60,-20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia8a(
J=1,
phi(fixed=true, start=0),
w(start=0, fixed=true)) annotation (Placement(transformation(extent={{-20,
-40},{0,-20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia9(
J=1,
a(fixed=true, start=33),
w(fixed=true, start=22),
phi(fixed=true, start=0.19198621771938)) annotation (Placement(
transformation(extent={{20,-40},{40,-20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia9a(
J=1,
a(start=33),
phi(start=0.19198621771938),
w(start=22, fixed=true)) annotation (Placement(transformation(extent={{
80,-40},{100,-20}})));
Modelica.Mechanics.Rotational.Components.Spring spring(c=10000)
annotation (Placement(transformation(extent={{-40,40},{-20,60}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed annotation (
Placement(transformation(extent={{-60,40},{-40,60}})));
Modelica.Mechanics.Rotational.Components.Spring spring1(c=10000)
annotation (Placement(transformation(extent={{50,0},{70,20}})));
Modelica.Mechanics.Rotational.Components.Spring spring2(c=10000)
annotation (Placement(transformation(extent={{-40,0},{-20,20}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed1 annotation (
Placement(transformation(extent={{-60,0},{-40,20}})));
Modelica.Mechanics.Rotational.Components.Spring spring3(c=10000)
annotation (Placement(transformation(extent={{-50,-40},{-30,-20}})));
Modelica.Mechanics.Rotational.Components.Spring spring4(c=10000)
annotation (Placement(transformation(extent={{50,-40},{70,-20}})));
equation
connect(spring.flange_b, inertia2.flange_a) annotation (Line(
points={{-20,50},{-10,50}}));
connect(fixed.flange, spring.flange_a) annotation (Line(
points={{-50,50},{-40,50}}));
connect(inertia7.flange_b, spring1.flange_a) annotation (Line(
points={{40,10},{50,10}}));
connect(spring1.flange_b, inertia7a.flange_a) annotation (Line(
points={{70,10},{80,10}}));
connect(spring2.flange_b, inertia6.flange_a) annotation (Line(
points={{-20,10},{-10,10}}));
connect(fixed1.flange, spring2.flange_a) annotation (Line(
points={{-50,10},{-40,10}}));
connect(inertia8.flange_b, spring3.flange_a) annotation (Line(
points={{-60,-30},{-50,-30}}));
connect(spring3.flange_b, inertia8a.flange_a) annotation (Line(
points={{-30,-30},{-20,-30}}));
connect(inertia9.flange_b, spring4.flange_a) annotation (Line(
points={{40,-30},{50,-30}}));
connect(spring4.flange_b, inertia9a.flange_a) annotation (Line(
points={{70,-30},{80,-30}}));
annotation (experiment(StopTime=1.1), Diagram(graphics={Rectangle(
extent={{-90,98},{90,64}},
lineColor={255,170,85},
fillColor={255,213,170},
fillPattern=FillPattern.Solid), Text(
extent={{-80,100},{80,60}},
textColor={0,0,255},
fillColor={255,213,170},
fillPattern=FillPattern.Solid,
textString="Since the initialization was changed some elements here
are redundant (e.g. inertia4, inertia5).
But for compatibility reasons they were not deleted yet.")}));
end Inertia;
model SpringDamper
extends Modelica.Icons.Example;
Modelica.Mechanics.Rotational.Components.Fixed fixed annotation (
Placement(transformation(extent={{-100,60},{-80,80}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J=1)
annotation (Placement(transformation(extent={{-40,60},{-20,80}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia2(J=1)
annotation (Placement(transformation(extent={{-40,20},{-20,40}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia3(J=1)
annotation (Placement(transformation(extent={{-40,-20},{-20,0}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia4(J=1, w(fixed=
true, start=0)) annotation (Placement(transformation(extent={{-40,
-60},{-20,-40}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia5(J=1, phi(fixed=
true, start=0)) annotation (Placement(transformation(extent={{-40,
-100},{-20,-80}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia6(
J=1,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (Placement(transformation(extent={{
20,40},{40,60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia7(J=1)
annotation (Placement(transformation(extent={{74,40},{94,60}})));
Modelica.Mechanics.Rotational.Components.SpringDamper springDamper1(
c=1e4,
d=10,
w_rel(start=2, fixed=true),
phi_rel(start=1, fixed=true)) annotation (Placement(transformation(
extent={{-70,60},{-50,80}})));
Modelica.Mechanics.Rotational.Components.SpringDamper springDamper2(
c=1e4,
d=10,
stateSelect=StateSelect.prefer,
a_rel(fixed=true),
w_rel(fixed=true, start=-2),
phi_rel(fixed=false, start=-1)) annotation (Placement(transformation(
extent={{-70,20},{-50,40}})));
Modelica.Mechanics.Rotational.Components.SpringDamper springDamper3(
c=1e4,
d=10,
stateSelect=StateSelect.always,
a_rel(fixed=false),
w_rel(fixed=true, start=2),
phi_rel(fixed=true, start=1)) annotation (Placement(transformation(
extent={{-70,-20},{-50,0}})));
Modelica.Mechanics.Rotational.Components.SpringDamper springDamper4(
c=1e4,
d=10,
stateSelect=StateSelect.avoid,
a_rel(fixed=false),
phi_rel(fixed=true),
w_rel(fixed=false)) annotation (Placement(transformation(extent={{-70,-60},
{-50,-40}})));
Modelica.Mechanics.Rotational.Components.SpringDamper springDamper5(
c=1e4,
d=10,
stateSelect=StateSelect.never,
a_rel(fixed=false),
phi_rel(fixed=false),
w_rel(fixed=true, start=3)) annotation (Placement(transformation(extent=
{{-70,-100},{-50,-80}})));
Modelica.Mechanics.Rotational.Components.Spring spring(c=1e4) annotation (
Placement(transformation(extent={{48,40},{68,60}})));
Modelica.Mechanics.Rotational.Components.RelativeStates relativeStates(
phi_rel(fixed=true), w_rel(fixed=true)) annotation (Placement(
transformation(extent={{48,20},{68,40}})));
equation
connect(springDamper1.flange_a, fixed.flange) annotation (Line(
points={{-70,70},{-90,70}}));
connect(springDamper1.flange_b, inertia1.flange_a) annotation (Line(
points={{-50,70},{-40,70}}));
connect(inertia2.flange_a, springDamper2.flange_b) annotation (Line(
points={{-40,30},{-50,30}}));
connect(springDamper2.flange_a, fixed.flange) annotation (Line(
points={{-70,30},{-80,30},{-80,70},{-90,70}}));
connect(inertia3.flange_a, springDamper3.flange_b) annotation (Line(
points={{-40,-10},{-50,-10}}));
connect(springDamper3.flange_a, fixed.flange) annotation (Line(
points={{-70,-10},{-80,-10},{-80,70},{-90,70}}));
connect(inertia4.flange_a, springDamper4.flange_b) annotation (Line(
points={{-40,-50},{-50,-50}}));
connect(springDamper4.flange_a, fixed.flange) annotation (Line(
points={{-70,-50},{-80,-50},{-80,70},{-90,70}}));
connect(inertia5.flange_a, springDamper5.flange_b) annotation (Line(
points={{-40,-90},{-50,-90}}));
connect(springDamper5.flange_a, fixed.flange) annotation (Line(
points={{-70,-90},{-80,-90},{-80,70},{-90,70}}));
connect(inertia6.flange_b, spring.flange_a) annotation (Line(
points={{40,50},{48,50}}));
connect(spring.flange_b, inertia7.flange_a) annotation (Line(
points={{68,50},{74,50}}));
connect(relativeStates.flange_b, spring.flange_b) annotation (Line(
points={{68,30},{68,50}}));
connect(spring.flange_a, relativeStates.flange_a) annotation (Line(
points={{48,50},{48,30}}));
annotation (experiment(StopTime=1.1), Diagram(graphics={Polygon(
points={{-72,86},{-72,54},{-14,54},{-14,6},{-72,6},{-72,-32},
{100,-32},{100,20},{10,20},{10,86},{-72,86}},
lineColor={255,170,85},
fillColor={255,213,170},
fillPattern=FillPattern.Solid),Text(
extent={{10,20},{90,-30}},
textColor={0,0,255},
textString="This two parts are identical
concerning structure, parameters
and initialization.
But for compatibility reasons
they were not deleted yet.")}));
end SpringDamper;
end InitializationConversion;
model TestSpeed
extends Modelica.Icons.Example;
Modelica.Mechanics.Rotational.Sources.Speed speed1(f_crit=5, useSupport=
false) annotation (Placement(transformation(extent={{-20,60},{0,80}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J=1) annotation (
Placement(transformation(extent={{20,60},{40,80}})));
Modelica.Mechanics.Rotational.Sources.Speed speed2(
f_crit=5,
exact=true,
useSupport=false) annotation (Placement(transformation(extent={{-20,20},{
0,40}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia2(J=1) annotation (
Placement(transformation(extent={{20,20},{40,40}})));
Modelica.Blocks.Sources.Sine sine2(f=1) annotation (Placement(
transformation(extent={{-60,20},{-40,40}})));
Modelica.Blocks.Sources.Step step(startTime=0.5) annotation (Placement(
transformation(extent={{-60,60},{-40,80}})));
Modelica.Mechanics.Translational.Sources.Speed speed3(f_crit=5, s(start=1))
annotation (Placement(transformation(extent={{-20,-20},{0,0}})));
Modelica.Mechanics.Translational.Components.Mass mass1(m=2) annotation (
Placement(transformation(extent={{20,-20},{40,0}})));
Modelica.Blocks.Sources.Step step1(startTime=0.5) annotation (Placement(
transformation(extent={{-60,-20},{-40,0}})));
Modelica.Mechanics.Translational.Sources.Speed speed4(exact=true, s(start=1))
annotation (Placement(transformation(extent={{-20,-60},{0,-40}})));
Modelica.Mechanics.Translational.Components.Mass mass2(m=2) annotation (
Placement(transformation(extent={{20,-60},{40,-40}})));
Modelica.Blocks.Sources.Sine sine4(f=1) annotation (Placement(
transformation(extent={{-60,-60},{-40,-40}})));
equation
connect(speed1.flange, inertia1.flange_a)
annotation (Line(points={{0,70},{20,70}}));
connect(speed2.flange, inertia2.flange_a)
annotation (Line(points={{0,30},{20,30}}));
connect(sine2.y, speed2.w_ref)
annotation (Line(points={{-39,30},{-22,30}}, color={0,0,127}));
connect(step.y, speed1.w_ref)
annotation (Line(points={{-39,70},{-22,70}}, color={0,0,127}));
connect(speed3.flange, mass1.flange_a)
annotation (Line(points={{0,-10},{20,-10}}, color={0,127,0}));
connect(step1.y, speed3.v_ref)
annotation (Line(points={{-39,-10},{-22,-10}}, color={0,0,127}));
connect(speed4.flange, mass2.flange_a)
annotation (Line(points={{0,-50},{20,-50}}, color={0,127,0}));
connect(sine4.y, speed4.v_ref)
annotation (Line(points={{-39,-50},{-22,-50}}, color={0,0,127}));
annotation (experiment(StopTime=1.1));
end TestSpeed;
model TestMove
extends Modelica.Icons.Example;
Modelica.Mechanics.MultiBody.Parts.Body Body1(
I_33=2,
r_CM={0,0,0},
m=1) annotation (Placement(transformation(extent={{66,36},{86,56}})));
Modelica.Mechanics.MultiBody.Joints.Revolute ActuatedRevolute1(
useAxisFlange=true) annotation (Placement(transformation(extent={{32,0},
{52,20}})));
inner Modelica.Mechanics.MultiBody.World world(g=0) annotation (Placement(
transformation(extent={{0,0},{20,20}})));
Modelica.Mechanics.Rotational.Sources.Move move(useSupport=false)
annotation (Placement(transformation(extent={{20,40},{40,60}})));
Modelica.Blocks.Routing.Multiplex Multiplex3_1(n=3) annotation (Placement(
transformation(extent={{-56,40},{-36,60}})));
Modelica.Blocks.Sources.Constant Constant1(k=1) annotation (Placement(
transformation(extent={{-100,16},{-80,36}})));
Modelica.Blocks.Sources.Constant Constant2(k=0) annotation (Placement(
transformation(extent={{-100,70},{-80,90}})));
Modelica.Mechanics.Translational.Sources.Move move1 annotation (Placement(
transformation(extent={{-20,-40},{0,-20}})));
Modelica.Mechanics.Translational.Components.Mass slidingMass(m=2)
annotation (Placement(transformation(extent={{20,-40},{40,-20}})));
equation
connect(ActuatedRevolute1.frame_b, Body1.frame_a) annotation (Line(
points={{52,10},{62,10},{62,46},{66,46}},
thickness=0.5));
connect(world.frame_b, ActuatedRevolute1.frame_a) annotation (Line(
points={{20,10},{32,10}},
thickness=0.5));
connect(move.flange, ActuatedRevolute1.axis)
annotation (Line(points={{40,50},{42,50},{42,20}}));
connect(Multiplex3_1.y, move.u)
annotation (Line(points={{-35,50},{18,50}}, color={0,0,127}));
connect(Constant1.y, Multiplex3_1.u[3]) annotation (Line(points={{-79,26},
{-74,26},{-74,43},{-58,43}}, color={0,0,127}));
connect(Constant2.y, Multiplex3_1.u[1]) annotation (Line(points={{-79,80},
{-74,80},{-74,57},{-58,57}}, color={0,0,127}));
connect(Constant2.y, Multiplex3_1.u[2]) annotation (Line(points={{-79,80},
{-74,80},{-74,50},{-58,50}}, color={0,0,127}));
connect(Multiplex3_1.y, move1.u) annotation (Line(points={{-35,50},{-28,50},
{-28,-30},{-22,-30}}, color={0,0,127}));
connect(move1.flange, slidingMass.flange_a)
annotation (Line(points={{0,-30},{20,-30}}, color={0,127,0}));
annotation (experiment(StopTime=1.1));
end TestMove;
model AllComponents
extends Modelica.Icons.Example;
Modelica.Mechanics.Rotational.Components.Inertia inertia(J=3) annotation (
Placement(transformation(extent={{-80,80},{-60,100}})));
Modelica.Mechanics.Rotational.Components.IdealGear idealGear(ratio=3,
useSupport=true) annotation (Placement(transformation(extent={{-50,80},
{-30,100}})));
Modelica.Mechanics.Rotational.Components.IdealPlanetary idealPlanetary(
ratio=3) annotation (Placement(transformation(extent={{-16,80},{4,100}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed annotation (Placement(
transformation(extent={{-50,50},{-30,70}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia1(J=2) annotation (
Placement(transformation(extent={{-50,120},{-30,140}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia2(
J=4,
phi(start=0, fixed=true),
w(start=0, fixed=true)) annotation (Placement(transformation(extent={{40,
80},{60,100}})));
Modelica.Mechanics.Rotational.Components.Spring spring(c=1e4) annotation (
Placement(transformation(extent={{12,80},{32,100}})));
Modelica.Mechanics.Rotational.Components.Damper damper(
d=10,
phi_rel(fixed=true),
w_rel(fixed=true)) annotation (Placement(transformation(extent={{12,98},{
32,118}})));
Modelica.Mechanics.Rotational.Components.SpringDamper springDamper(
c=1e4,
d=10,
phi_rel0=1.7453292519943e-05,
phi_rel(fixed=true),
w_rel(fixed=true)) annotation (Placement(transformation(extent={{-78,120},
{-58,140}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia3(
J=2,
phi(start=0.0174532925199433),
w(start=2)) annotation (Placement(transformation(extent={{-112,120},{-92,
140}})));
Modelica.Mechanics.Rotational.Components.ElastoBacklash elastoBacklash(
c=1e4,
d=20,
b=1.7453292519943e-07,
phi_rel(fixed=true),
w_rel(fixed=true)) annotation (Placement(transformation(extent={{-10,120},
{10,140}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia4(J=2) annotation (
Placement(transformation(extent={{20,120},{40,140}})));
Modelica.Mechanics.Rotational.Components.BearingFriction bearingFriction(
tau_pos=[0, 2],
peak=1.1,
useSupport=true) annotation (Placement(transformation(extent={{44,120},{
64,140}})));
Modelica.Mechanics.Rotational.Components.Clutch clutch(
mu_pos=[0, 1],
peak=1.1,
cgeo=1.2,
fn_max=1.3,
phi_rel(fixed=true),
w_rel(fixed=true)) annotation (Placement(transformation(extent={{-106,100},
{-86,80}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia5(J=3) annotation (
Placement(transformation(extent={{-136,80},{-116,100}})));
Modelica.Blocks.Sources.Sine sine(f=1) annotation (Placement(
transformation(extent={{-124,50},{-104,70}})));
Modelica.Mechanics.Rotational.Components.Brake brake(useSupport=true,
fn_max=1) annotation (Placement(transformation(extent={{80,80},{100,100}})));
Modelica.Blocks.Sources.Sine sine1(f=1) annotation (Placement(
transformation(
origin={90,130},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Mechanics.Rotational.Components.LossyGear lossyGear(useSupport=
true, ratio=1) annotation (Placement(transformation(extent={{-140,120},
{-120,140}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia6(
J=2,
a(fixed=false),
phi(fixed=true, start=0.0174532925199433),
w(fixed=true, start=2)) annotation (Placement(transformation(extent={{-170,
120},{-150,140}})));
Modelica.Mechanics.Rotational.Components.Gearbox gear2_1(
ratio=2,
lossTable=[0, 0.9, 1, 0, 0],
c=1e4,
d=10,
useSupport=true,
b=1.7453292519943e-07,
phi_rel(fixed=true),
w_rel(fixed=true)) annotation (Placement(transformation(extent={{-100,0},
{-80,20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia7(J=3) annotation (
Placement(transformation(extent={{-130,0},{-110,20}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia8(
J=3,
phi(start=0, fixed=true),
w(start=0, fixed=true)) annotation (Placement(transformation(extent={{-68,
0},{-48,20}})));
Modelica.Mechanics.Rotational.Sources.Position position(useSupport=true, w(
fixed=true)) annotation (Placement(transformation(extent={{30,30},{50,
50}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed1 annotation (Placement(
transformation(extent={{-100,-20},{-80,0}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed2 annotation (Placement(
transformation(extent={{28,10},{48,30}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia9(J=3) annotation (
Placement(transformation(extent={{60,30},{80,50}})));
Modelica.Blocks.Sources.Sine sine2(f=1) annotation (Placement(
transformation(extent={{0,30},{20,50}})));
Modelica.Blocks.Sources.Sine sine3(f=1) annotation (Placement(
transformation(extent={{0,-20},{20,0}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia10(J=3) annotation (
Placement(transformation(extent={{60,-20},{80,0}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed3 annotation (Placement(
transformation(extent={{30,-40},{50,-20}})));
Modelica.Mechanics.Rotational.Sources.Speed speed(useSupport=true)
annotation (Placement(transformation(extent={{30,-20},{50,0}})));
Modelica.Blocks.Sources.Sine sine4(f=1) annotation (Placement(
transformation(extent={{0,-80},{20,-60}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia11(J=3) annotation (
Placement(transformation(extent={{60,-80},{80,-60}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed4 annotation (Placement(
transformation(extent={{30,-100},{50,-80}})));
Modelica.Mechanics.Rotational.Sources.Accelerate accelerate(useSupport=true)
annotation (Placement(transformation(extent={{30,-80},{50,-60}})));
Modelica.Blocks.Sources.Sine sine5[3](each amplitude=2, f={1,1,1})
annotation (Placement(transformation(extent={{0,-140},{20,-120}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia12(J=3) annotation (
Placement(transformation(extent={{60,-140},{80,-120}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed5 annotation (Placement(
transformation(extent={{30,-160},{50,-140}})));
Modelica.Mechanics.Rotational.Sources.Move move(useSupport=true)
annotation (Placement(transformation(extent={{30,-140},{50,-120}})));
Modelica.Mechanics.Rotational.Sources.Torque torque(useSupport=true)
annotation (Placement(transformation(extent={{130,80},{110,100}})));
Modelica.Blocks.Sources.Sine sine6(f=1) annotation (Placement(
transformation(extent={{160,80},{140,100}})));
Modelica.Mechanics.Rotational.Sources.Torque2 torque2_1 annotation (
Placement(transformation(extent={{92,-20},{112,0}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia13(
J=3,
phi(start=0, fixed=true),
w(start=0, fixed=true)) annotation (Placement(transformation(extent={{120,
-20},{140,0}})));
Modelica.Blocks.Sources.Sine sine7(f=1) annotation (Placement(
transformation(extent={{74,6},{94,26}})));
Modelica.Mechanics.Rotational.Sources.LinearSpeedDependentTorque
linearSpeedDependentTorque(
tau_nominal=10,
w_nominal=10,
useSupport=true) annotation (Placement(transformation(extent={{-162,0},{-142,
20}})));
Modelica.Mechanics.Rotational.Sources.QuadraticSpeedDependentTorque
quadraticSpeedDependentTorque(
tau_nominal=100,
w_nominal=1,
useSupport=true) annotation (Placement(transformation(extent={{-10,0},{-32,
20}})));
Modelica.Mechanics.Rotational.Sources.ConstantTorque constantTorque(
tau_constant=11, useSupport=true) annotation (Placement(transformation(
extent={{-140,-60},{-120,-40}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia14(
J=3,
phi(start=0, fixed=true),
w(start=0, fixed=true)) annotation (Placement(transformation(extent={{-104,
-80},{-84,-60}})));
Modelica.Mechanics.Rotational.Sources.TorqueStep torqueStep(
stepTorque=22,
offsetTorque=11,
startTime=1,
useSupport=true) annotation (Placement(transformation(extent={{-140,-100},
{-120,-80}})));
Modelica.Mechanics.Rotational.Components.Fixed fixed6 annotation (Placement(
transformation(extent={{-140,-120},{-120,-100}})));
Modelica.Mechanics.Rotational.Sources.ConstantSpeed constantSpeed(w_fixed=
11, useSupport=true) annotation (Placement(transformation(extent={{-90,
-110},{-70,-90}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia15(J=3, phi(start=0,
fixed=true)) annotation (Placement(transformation(extent={{-60,-110},
{-40,-90}})));
Modelica.Mechanics.Rotational.Components.RelativeStates relativeStates
annotation (Placement(transformation(extent={{-80,-40},{-60,-20}})));
Modelica.Mechanics.Rotational.Sensors.AngleSensor angleSensor annotation (
Placement(transformation(extent={{98,-80},{118,-60}})));
Modelica.Mechanics.Rotational.Sensors.SpeedSensor speedSensor annotation (
Placement(transformation(extent={{98,-56},{118,-36}})));
Modelica.Mechanics.Rotational.Sensors.AccSensor accSensor annotation (
Placement(transformation(extent={{98,-106},{118,-86}})));
Modelica.Mechanics.Rotational.Sensors.RelAngleSensor relAngleSensor
annotation (Placement(transformation(extent={{120,30},{140,50}})));
Modelica.Mechanics.Rotational.Sensors.RelSpeedSensor relSpeedSensor
annotation (Placement(transformation(extent={{146,-48},{166,-28}})));
Modelica.Mechanics.Rotational.Sensors.RelAccSensor relAccSensor annotation (
Placement(transformation(extent={{140,-90},{160,-70}})));
Modelica.Mechanics.Rotational.Sensors.TorqueSensor torqueSensor annotation (
Placement(transformation(extent={{-60,-150},{-40,-130}})));
Modelica.Mechanics.Rotational.Sensors.PowerSensor powerSensor annotation (
Placement(transformation(extent={{-90,-150},{-70,-130}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia16(J=3) annotation (
Placement(transformation(extent={{-120,-150},{-100,-130}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia17(
J=2,
phi(fixed=true, start=0),
w(fixed=true, start=0)) annotation (
Placement(transformation(extent={{-70,-200},{-50,-180}})));
Modelica.Mechanics.Rotational.Components.ElastoBacklash2 elastoBacklash2(
c=1e4,
d=20,
phi_rel(fixed=true),
w_rel(fixed=true),
b=1.7453292519943e-07,
stateSelect=StateSelect.always)
annotation (Placement(transformation(extent={{-30,-200},
{-10,-180}})));
Modelica.Mechanics.Rotational.Components.Inertia inertia18(
J=2) annotation (
Placement(transformation(extent={{0,-200},{20,-180}})));
Modelica.Mechanics.Rotational.Sources.Torque torque1
annotation (Placement(transformation(extent={{-96,-200},{-76,-180}})));
Modelica.Blocks.Sources.ExpSine expSine(f=2, damping=0.5)
annotation (Placement(transformation(extent={{-140,-200},{-120,-180}})));
equation
connect(inertia.flange_b, idealGear.flange_a) annotation (Line(
points={{-60,90},{-50,90}}));
connect(idealGear.flange_b, idealPlanetary.sun) annotation (Line(
points={{-30,90},{-16,90}}));
connect(idealGear.support, fixed.flange) annotation (Line(
points={{-40,80},{-40,60}}));
connect(idealPlanetary.carrier, inertia1.flange_b) annotation (Line(
points={{-16,94},{-22,94},{-22,130},{-30,130}}));
connect(idealPlanetary.ring, spring.flange_a) annotation (Line(
points={{4,90},{12,90}}));
connect(spring.flange_b, inertia2.flange_a) annotation (Line(
points={{32,90},{40,90}}));
connect(idealPlanetary.ring, damper.flange_a) annotation (Line(
points={{4,90},{8,90},{8,108},{12,108}}));
connect(damper.flange_b, inertia2.flange_a) annotation (Line(
points={{32,108},{40,108},{40,90}}));
connect(springDamper.flange_b, inertia1.flange_a) annotation (Line(
points={{-58,130},{-50,130}}));
connect(inertia3.flange_b, springDamper.flange_a) annotation (Line(
points={{-92,130},{-78,130}}));
connect(inertia1.flange_b, elastoBacklash.flange_a) annotation (Line(
points={{-30,130},{-10,130}}));
connect(elastoBacklash.flange_b, inertia4.flange_a) annotation (Line(
points={{10,130},{20,130}}));
connect(inertia4.flange_b, bearingFriction.flange_a) annotation (Line(
points={{40,130},{44,130}}));
connect(fixed.flange, bearingFriction.support) annotation (Line(
points={{-40,60},{70,60},{70,114},{54,114},{54,120}}));
connect(clutch.flange_b, inertia.flange_a) annotation (Line(
points={{-86,90},{-80,90}}));
connect(inertia5.flange_b, clutch.flange_a) annotation (Line(
points={{-116,90},{-106,90}}));
connect(sine.y, clutch.f_normalized) annotation (Line(
points={{-103,60},{-96,60},{-96,79}}, color={0,0,127}));
connect(inertia2.flange_b, brake.flange_a) annotation (Line(
points={{60,90},{80,90}}));
connect(sine1.y, brake.f_normalized) annotation (Line(
points={{90,119},{90,101}}, color={0,0,127}));
connect(fixed.flange, brake.support) annotation (Line(
points={{-40,60},{90,60},{90,80}}));
connect(lossyGear.flange_b, inertia3.flange_a) annotation (Line(
points={{-120,130},{-112,130}}));
connect(inertia6.flange_b, lossyGear.flange_a) annotation (Line(
points={{-150,130},{-140,130}}));