Skip to content

Commit

Permalink
Add more test models
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kormann committed May 11, 2023
1 parent f689295 commit 9570b82
Showing 1 changed file with 45 additions and 4 deletions.
49 changes: 45 additions & 4 deletions ModelicaTest/Translational.mo
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,13 @@ extends Modelica.Icons.ExamplesPackage;

parameter Real fric=155.9218;
Modelica.Mechanics.Translational.Sources.Position position(exact=true)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
annotation (Placement(transformation(extent={{-10,30},{10,50}})));

Modelica.Blocks.Sources.Sine sine(
amplitude=0.1,
f=1,
phase=0.78539816339745,
offset=0.5) annotation (Placement(transformation(extent={{-70,-10},{-50,10}})));
offset=0.5) annotation (Placement(transformation(extent={{-70,30},{-50,50}})));

Modelica.Mechanics.Translational.Components.SupportFriction supportFriction(f_pos=
Modelica.Mechanics.Translational.Examples.Utilities.GenerateStribeckFrictionTable(
Expand All @@ -335,11 +335,52 @@ extends Modelica.Icons.ExamplesPackage;
1,
12,
50), peak=1.001)
annotation (Placement(transformation(extent={{46,30},{66,50}})));
Modelica.Mechanics.Translational.Sources.Force force
annotation (Placement(transformation(extent={{-10,-50},{10,-30}})));
Modelica.Blocks.Sources.Sine sine1(
amplitude=25,
f=1,
phase=0.78539816339745,
offset=0.5) annotation (Placement(transformation(extent={{-70,-50},{-50,-30}})));
Modelica.Mechanics.Translational.Components.SupportFriction supportFriction1(f_pos=
Modelica.Mechanics.Translational.Examples.Utilities.GenerateStribeckFrictionTable(
1,
5,
10,
1,
12,
50), peak=1.001)
annotation (Placement(transformation(extent={{46,-50},{66,-30}})));
Modelica.Mechanics.Translational.Components.Mass mass(m=1, v(start=-2, fixed=true))
annotation (Placement(transformation(extent={{74,-50},{94,-30}})));
Modelica.Mechanics.Translational.Sources.Position position1(exact=true)
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
Modelica.Blocks.Sources.Sine sine2(
amplitude=0.3,
f=1,
phase=0.78539816339745,
offset=0.5) annotation (Placement(transformation(extent={{-70,-10},{-50,10}})));
Modelica.Mechanics.Translational.Components.SupportFriction supportFriction2(f_pos=
Modelica.Mechanics.Translational.Examples.Utilities.GenerateStribeckFrictionTable(
1,
5,
10,
1,
12,
50), peak=1.001)
annotation (Placement(transformation(extent={{46,-10},{66,10}})));
equation
connect(sine.y, position.s_ref) annotation (Line(points={{-49,0},{-12,0}}, color={0,0,127}));
connect(sine.y, position.s_ref) annotation (Line(points={{-49,40},{-12,40}},
color={0,0,127}));

connect(position.flange, supportFriction.flange_a) annotation (Line(points={{10,0},{46,0}}, color={0,127,0}));
connect(position.flange, supportFriction.flange_a) annotation (Line(points={{10,40},{46,40}},
color={0,127,0}));
connect(force.flange, supportFriction1.flange_a) annotation (Line(points={{10,-40},{46,-40}}, color={0,127,0}));
connect(supportFriction1.flange_b, mass.flange_a) annotation (Line(points={{66,-40},{74,-40}}, color={0,127,0}));
connect(sine1.y, force.f) annotation (Line(points={{-49,-40},{-12,-40}}, color={0,0,127}));
connect(sine2.y, position1.s_ref) annotation (Line(points={{-49,0},{-12,0}}, color={0,0,127}));
connect(position1.flange, supportFriction2.flange_a) annotation (Line(points={{10,0},{46,0}}, color={0,127,0}));
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem(preserveAspectRatio=false)));
end Friction;
end Translational;

0 comments on commit 9570b82

Please sign in to comment.