IdealGearR2T

model IdealGearR2T "Gearbox transforming rotational into translational motion"
    extends Rotational.Interfaces.PartialElementaryRotationalToTranslational;

    parameter Real ratio(final unit = "rad/m", start = 1) "Transmission ratio (flange_a.phi/flange_b.s)";
equation
    0 = ratio * flangeR.tau + flangeT.f;
    flangeR.phi - internalSupportR.phi = ratio * (flangeT.s - internalSupportT.s);

    annotation (
        Documentation(info = "<html>\n<p>\nThis is an ideal mass- and inertialess gearbox which transforms a\n1D-rotational into a 1D-translational motion. If elasticity, damping\nor backlash has to be considered, this ideal gearbox has to be\nconnected with corresponding elements.\nThis component defines the kinematic constraint:\n</p>\n\n<pre>\n  (flangeR.phi - internalSupportR.phi) = ratio*(flangeT.s - internalSupportT.s);\n</pre>\n</html>"),
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Rectangle(
                    origin = {133.3333, 0},
                    lineColor = {64, 64, 64},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.HorizontalCylinder,
                    extent = {
                        {-233.3333, -10}, 
                        {-163.3333, 10}}), 
                Text(
                    lineColor = {0, 0, 255},
                    extent = {
                        {-150, 85}, 
                        {150, 125}},
                    textString = "%name"), 
                Rectangle(
                    fillColor = {131, 175, 131},
                    fillPattern = FillPattern.Solid,
                    extent = {
                        {95, -60}, 
                        {106, -10}}), 
                Rectangle(
                    fillColor = {131, 175, 131},
                    fillPattern = FillPattern.Solid,
                    extent = {
                        {-74.411, -80}, 
                        {106.589, -60}}), 
                Text(
                    extent = {
                        {-150, 50}, 
                        {150, 80}},
                    textString = "ratio=%ratio"), 
                Line(points = {
                    {-100, 16}, 
                    {-80, 16}}), 
                Line(points = {
                    {-100, -16}, 
                    {-80, -16}}), 
                Line(points = {
                    {-100, -16}, 
                    {-100, -100}}), 
                Line(
                    points = {
                        {100, -80}, 
                        {100, -100}},
                    color = {0, 127, 0}), 
                Polygon(
                    origin = {16.875, -50},
                    fillColor = {131, 175, 131},
                    fillPattern = FillPattern.Solid,
                    points = {
                        {-84.375, -10}, 
                        {-79.375, 10}, 
                        {-69.375, 10}, 
                        {-64.375, -10}, 
                        {-54.375, -10}, 
                        {-49.375, 10}, 
                        {-39.375, 10}, 
                        {-34.375, -10}, 
                        {-24.375, -10}, 
                        {-19.375, 10}, 
                        {-9.375, 10}, 
                        {-4.375, -10}, 
                        {5.625, -10}, 
                        {10.625, 10}, 
                        {20.625, 10}, 
                        {25.625, -10}, 
                        {35.625, -10}, 
                        {40.625, 10}, 
                        {50.625, 10}, 
                        {55.625, -10}, 
                        {65.625, -10}, 
                        {70.625, 10}, 
                        {78.125, 10}, 
                        {78.125, -10}}), 
                Polygon(
                    origin = {-20, 0},
                    rotation = 10,
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid,
                    points = {
                        {-5, 45}, 
                        {-10, 10}, 
                        {-45, 5}, 
                        {-45, -5}, 
                        {-10, -10}, 
                        {-5, -45}, 
                        {5, -45}, 
                        {10, -10}, 
                        {45, -5}, 
                        {45, 5}, 
                        {10, 10}, 
                        {5, 45}}), 
                Polygon(
                    origin = {-20, 0},
                    rotation = 55,
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid,
                    points = {
                        {-5, 45}, 
                        {-10, 10}, 
                        {-45, 5}, 
                        {-45, -5}, 
                        {-10, -10}, 
                        {-5, -45}, 
                        {5, -45}, 
                        {10, -10}, 
                        {45, -5}, 
                        {45, 5}, 
                        {10, 10}, 
                        {5, 45}}), 
                Ellipse(
                    origin = {-20, 0},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid,
                    extent = {
                        {-30, -30}, 
                        {30, 30}}), 
                Ellipse(
                    origin = {-20, 0},
                    fillColor = {128, 128, 128},
                    fillPattern = FillPattern.Solid,
                    extent = {
                        {-10, -10}, 
                        {10, 10}})}));
end IdealGearR2T;