diff --git a/Modelica/Mechanics/Rotational/Components/FreeWheel.mo b/Modelica/Mechanics/Rotational/Components/FreeWheel.mo new file mode 100644 index 0000000000..c9b7bbde9f --- /dev/null +++ b/Modelica/Mechanics/Rotational/Components/FreeWheel.mo @@ -0,0 +1,84 @@ +within Modelica.Mechanics.Rotational.Components; +model FreeWheel "Ideal freewheel" + extends Modelica.Mechanics.Rotational.Interfaces.PartialCompliant; + + SI.AngularVelocity w_rel(start=0) + "Relative angular velocity (= der(phi_rel))"; + Boolean free(start=false) "Indicates freewheeling"; + parameter SI.RotationalDampingConstant residualFriction=1e-5 "Residual friction coefficient (free = true)"; + parameter SI.RotationalDampingConstant torqueTransmission=1e5 "Torque transmission coefficient (free = false)"; + +protected + Real s(start=0, final unit="1") "Auxilliary variable"; + constant SI.AngularVelocity unitAngularVelocity=1; + constant SI.Torque unitTorque=1; + +equation + w_rel = der(phi_rel); + free = w_rel >= 0; + w_rel = s*unitTorque *(if free then 1 else 1/torqueTransmission); + tau = s*unitAngularVelocity*(if free then residualFriction else 1); + annotation ( + Icon(graphics={ + Rectangle( + lineColor={64,64,64}, + fillColor={192,192,192}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100,-10},{-30,10}}), + Rectangle( + lineColor={64,64,64}, + fillColor={255,255,255}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-30,-60},{-10,60}}), + Rectangle( + lineColor={64,64,64}, + fillColor={255,255,255}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{10,-60},{30,60}}), + Rectangle( + lineColor={64,64,64}, + fillColor={192,192,192}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{30,-10},{100,10}}), + Rectangle( + lineColor={64,64,64}, + extent={{-30,-60},{-10,60}}), + Rectangle( + lineColor={64,64,64}, + extent={{10,-60},{30,60}}), + Polygon( + points={{-10,30},{50,0},{-10,-30},{-10,30}}, + fillPattern=FillPattern.Solid), + Text(extent={{-152,60},{148,100}}, + textString="%name", + textColor={0,0,255})}), + Documentation(info=" +

+An idealized model of a freewheel. Compared to +OneWayClutch +it is modeled in a simplified way referring to +an idealized +model of electrical diode. +This means in particular that there exist two cases indicated +by the variable free and distinguished as follows. +

+ + +\"FreeWheel.png\" +")); +end FreeWheel; diff --git a/Modelica/Mechanics/Rotational/Components/package.order b/Modelica/Mechanics/Rotational/Components/package.order index ed6ce5197e..150cd66502 100644 --- a/Modelica/Mechanics/Rotational/Components/package.order +++ b/Modelica/Mechanics/Rotational/Components/package.order @@ -2,6 +2,7 @@ Fixed Inertia Disc Coupling +FreeWheel Spring Damper SpringDamper diff --git a/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel.mo b/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel.mo new file mode 100644 index 0000000000..aa735cd2c6 --- /dev/null +++ b/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel.mo @@ -0,0 +1,43 @@ +within Modelica.Mechanics.Rotational.Examples; +model DemoFreeWheel "Demonstrate freewheel" + extends Modelica.Icons.Example; + Modelica.Mechanics.Rotational.Components.FreeWheel freeWheel + annotation (Placement(transformation(extent={{0,-10},{20,10}}))); + Modelica.Mechanics.Rotational.Components.Inertia inertia1(J=1) + annotation (Placement(transformation(extent={{-30,-10},{-10,10}}))); + Modelica.Mechanics.Rotational.Components.Inertia inertia2(J=1, + phi(start=0, fixed=true), + w(start=0, fixed=true)) + annotation (Placement(transformation(extent={{30,-10},{50,10}}))); + Modelica.Mechanics.Rotational.Sources.LinearSpeedDependentTorque torqueLoad( + tau_nominal=-5, + TorqueDirection=false, + w_nominal=1) annotation (Placement(transformation(extent={{80,-10},{60,10}}))); + Modelica.Mechanics.Rotational.Sources.Speed speed(exact=true) + annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); + Modelica.Blocks.Sources.Sine signalSpeed(amplitude=5, f=5) annotation (Placement(transformation(extent={{-90,-10},{-70,10}}))); +equation + connect(freeWheel.flange_b, inertia2.flange_a) + annotation (Line(points={{20,0},{30,0}}, color={0,0,0})); + connect(torqueLoad.flange, inertia2.flange_b) annotation (Line(points={{60,0},{50,0}}, color={0,0,0})); + connect(inertia1.flange_a, speed.flange) + annotation (Line(points={{-30,0},{-40,0}}, color={0,0,0})); + connect(inertia1.flange_b, freeWheel.flange_a) + annotation (Line(points={{-10,0},{0,0}}, color={0,0,0})); + connect(signalSpeed.y, speed.w_ref) annotation (Line(points={{-69,0},{-62,0}}, color={0,0,127})); + annotation (experiment( + Interval=0.001, + Tolerance=1e-06, + StopTime=1), + Documentation(info=" +

+Demonstration of an ideal freewheel: +The inertia inertia1 is driven with a prescribed sinusoidal velocity. +Load inertia inertia2 is coupled to inertia1 by an ideal +freewheel. inertia2 is accelerated as long as its flange_a +is driven. When freewheeling occurs, i.e. +inertia2.w ≥ inertia1.w, a velocity dependent +load torque decelerates inertia2.w. +

+")); +end DemoFreeWheel; diff --git a/Modelica/Mechanics/Rotational/Examples/package.order b/Modelica/Mechanics/Rotational/Examples/package.order index 66e4d58e13..446fd41460 100644 --- a/Modelica/Mechanics/Rotational/Examples/package.order +++ b/Modelica/Mechanics/Rotational/Examples/package.order @@ -15,4 +15,5 @@ EddyCurrentBrake GenerationOfFMUs OneWayClutch OneWayClutchDisengaged +DemoFreeWheel Utilities diff --git a/Modelica/Resources/Images/Mechanics/Rotational/Components/FreeWheel.png b/Modelica/Resources/Images/Mechanics/Rotational/Components/FreeWheel.png new file mode 100644 index 0000000000..20cbe82912 Binary files /dev/null and b/Modelica/Resources/Images/Mechanics/Rotational/Components/FreeWheel.png differ diff --git a/Modelica/Resources/Reference/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel/comparisonSignals.txt b/Modelica/Resources/Reference/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel/comparisonSignals.txt new file mode 100644 index 0000000000..c2d50b3ca5 --- /dev/null +++ b/Modelica/Resources/Reference/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel/comparisonSignals.txt @@ -0,0 +1,5 @@ +time +inertia1.w +inertia2.w +freeWheel.w_rel +freeWheel.tau diff --git a/ModelicaTest/Rotational.mo b/ModelicaTest/Rotational.mo index f2b4211f05..ed0d95a0a8 100644 --- a/ModelicaTest/Rotational.mo +++ b/ModelicaTest/Rotational.mo @@ -978,6 +978,25 @@ they were not deleted yet.")})); offset=0, startTime=0.75) annotation (Placement(transformation(extent={{60,-230},{40,-210}}))); + Modelica.Mechanics.Rotational.Components.FreeWheel freeWheel + annotation (Placement(transformation(extent={{-50,-268},{-30,-248}}))); + Modelica.Mechanics.Rotational.Components.Inertia inertia21( + J=1, + phi(start=0, fixed=true), + w(start=0, fixed=true)) + annotation (Placement(transformation(extent={{-20,-268},{0,-248}}))); + Modelica.Mechanics.Rotational.Sources.LinearSpeedDependentTorque + linearSpeedDependentTorque1( + tau_nominal=-5, + TorqueDirection=false, + w_nominal=1) + annotation (Placement(transformation(extent={{30,-268},{10,-248}}))); + Modelica.Mechanics.Rotational.Sources.Speed speed1(exact=true) + annotation (Placement(transformation(extent={{-110,-268},{-90,-248}}))); + Modelica.Mechanics.Rotational.Components.Inertia inertia22(J=1) + annotation (Placement(transformation(extent={{-80,-268},{-60,-248}}))); + Modelica.Blocks.Sources.Sine sine8(amplitude=5, f=5) + annotation (Placement(transformation(extent={{-140,-268},{-120,-248}}))); equation connect(inertia.flange_b, idealGear.flange_a) annotation (Line( points={{-60,90},{-50,90}})); @@ -1139,7 +1158,19 @@ they were not deleted yet.")})); annotation (Line(points={{-119,-220},{-112,-220}}, color={0,0,127})); connect(step.y, torque2.tau) annotation (Line(points={{39,-220},{32,-220}}, color={0,0,127})); - annotation (experiment(StopTime=0.9), Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-180,-240},{180,160}}))); + connect(freeWheel.flange_b, inertia21.flange_a) + annotation (Line(points={{-30,-258},{-20,-258}}, color={0,0,0})); + connect(linearSpeedDependentTorque1.flange, inertia21.flange_b) + annotation (Line(points={{10,-258},{0,-258}}, color={0,0,0})); + connect(inertia22.flange_a, speed1.flange) + annotation (Line(points={{-80,-258},{-90,-258}}, color={0,0,0})); + connect(inertia22.flange_b, freeWheel.flange_a) + annotation (Line(points={{-60,-258},{-50,-258}}, color={0,0,0})); + connect(sine8.y, speed1.w_ref) + annotation (Line(points={{-119,-258},{-112,-258}}, color={0,0,127})); + annotation (experiment(StopTime=0.9), Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-180, + -280},{180,160}})), + Icon(coordinateSystem(extent={{-180,-280},{180,160}}))); end AllComponents; model TestBearingConversion