1
1
within Modelica.Mechanics.Translational.Examples;
2
- model LeverGrounded "Translational grounded lever "
2
+ model GearGrounded "Translational grounded gear "
3
3
extends Modelica.Icons.Example;
4
4
5
5
Sources.Force force(
6
- useSupport= false ) annotation (Placement(transformation(extent={{-50 ,-10},{-30 ,10}})));
6
+ useSupport= false ) annotation (Placement(transformation(extent={{-70 ,-10},{-50 ,10}})));
7
7
Components.Mass mass1(
8
- m= 0.1 ) annotation (Placement(transformation(extent={{-20,-10},{0,10}})));
9
- Components.IdealLever idealLever(
10
- ratio= 1.6 , useSupport= true )
11
- annotation (Placement(transformation(extent={{10,-10},{30,10}})));
8
+ m= 0.1 ) annotation (Placement(transformation(extent={{-40,-10},{-20,10}})));
9
+ Components.IdealGear idealLever(ratio= 1.6 , useSupport= true ) annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
12
10
Components.Mass mass2(
13
11
m= 7 ,
14
12
s(fixed= true , start= 0 ),
15
- v(fixed= true , start= 0 )) annotation (Placement(transformation(extent={{40,-10},{60,10}})));
16
- Modelica.Blocks.Sources.Sine sine(amplitude= 10 ,
17
- f= 5 )
18
- annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
19
- Components.Fixed fixed annotation (Placement(transformation(extent={{-48,-60},{-28,-40}})));
13
+ v(fixed= true , start= 0 )) annotation (Placement(transformation(extent={{20,-10},{40,10}})));
14
+ Blocks.Sources.Ramp ramp(
15
+ height= 10 ,
16
+ duration= 0.6 ,
17
+ startTime= 0.2 )
18
+ annotation (Placement(transformation(extent={{-100,-10},{-80,10}})));
19
+ Components.Fixed fixed annotation (Placement(transformation(extent={{-68,-50},{-48,-30}})));
20
20
Components.SpringDamper springDamper(
21
21
s_rel(fixed= true ),
22
22
v_rel(fixed= true ),
23
23
c= 800 ,
24
- d= 50 ) annotation (Placement(transformation(extent={{-20,-60},{0,-40}})));
24
+ d= 50 ) annotation (Placement(transformation(extent={{-40,-50},{-20,-30}})));
25
+ Components.Fixed fixed1 annotation (Placement(transformation(extent={{70,-10},{90,10}})));
26
+ Components.SpringDamper
27
+ springDamper1(c= 160 , d= 10 )
28
+ annotation (Placement(transformation(extent={{50,-10},{70,10}})));
25
29
equation
26
- connect (mass1.flange_b, idealLever.flange_a) annotation (Line(points={{0,0},{10,0}}, color={0,127,0}));
27
- connect (idealLever.flange_b, mass2.flange_a) annotation (Line(points={{30,0},{40,0}}, color={0,127,0}));
28
- connect (sine.y, force.f) annotation (Line(points={{-59,0},{-52,0}}, color={0,0,127}));
29
- connect (force.flange, mass1.flange_a) annotation (Line(points={{-30,0},{-20,0}}, color={0,127,0}));
30
- connect (fixed.flange, springDamper.flange_a) annotation (Line(points={{-38,-50},{-20,-50}}, color={0,127,0}));
31
- connect (springDamper.flange_b, idealLever.support) annotation (Line(points={{0,-50},{20,-50},{20,-10}}, color={0,127,0}));
30
+ connect (mass1.flange_b, idealLever.flange_a) annotation (Line(points={{-20,0},{-10,0}}, color={0,127,0}));
31
+ connect (idealLever.flange_b, mass2.flange_a) annotation (Line(points={{10,0},{20,0}}, color={0,127,0}));
32
+ connect (ramp.y, force.f) annotation (Line(points={{-79,0},{-72,0}}, color={0,0,127}));
33
+ connect (force.flange, mass1.flange_a) annotation (Line(points={{-50,0},{-40,0}}, color={0,127,0}));
34
+ connect (fixed.flange, springDamper.flange_a) annotation (Line(points={{-58,-40},{-40,-40}}, color={0,127,0}));
35
+ connect (springDamper.flange_b, idealLever.support) annotation (Line(points={{-20,-40},{0,-40},{0,-10}}, color={0,127,0}));
36
+ connect (mass2.flange_b, springDamper1.flange_a) annotation (Line(points={{40,0},{50,0}}, color={0,127,0}));
37
+ connect (springDamper1.flange_b, fixed1.flange) annotation (Line(points={{70,0},{80,0}}, color={0,127,0}));
32
38
annotation (
33
39
experiment(
34
- StopTime=1 .0,
40
+ StopTime=3 .0,
35
41
Interval=0.001),
36
42
Documentation(info="<html>
37
43
<p>
@@ -47,4 +53,4 @@ Simulate for 1 second and plot the velocities of masses:
47
53
<code>mass2.v</code>, <code>mass2.v</code>
48
54
</p>
49
55
</html>" ));
50
- end LeverGrounded ;
56
+ end GearGrounded ;
0 commit comments