IdealGearR2T
Gearbox transforming rotational into translational motion.
This component models an ideal gearbox that transforms rotational motion from a rotational spline
connector (relative to support_r
) to translational motion at a flange
connector (relative to support_t
). The transformation is defined by the ratio
parameter.
The kinematic relationship between the relative angular displacement on the rotational side and the relative linear displacement on the translational side is:
The corresponding force-torque relationship, ensuring power conservation (ideal gear), is:
The component extends PartialElementaryRotationalToTranslational
, which provides the rotational connectors (spline
, support_r
with variables phi
, tau
) and translational connectors (flange
, support_t
with variables s
, f
).
This component extends from PartialElementaryRotationalToTranslational
Usage
IdealGearR2T(ratio)
Parameters:
Name | Description | Units | Default value |
---|---|---|---|
ratio | Gear ratio defining the conversion from relative angular displacement (spline.phi - support_r.phi) to relative translational displacement (flange.s - support_t.s). Units: rad/m. | rad/m |
Connectors
Behavior
Source
# Gearbox transforming rotational into translational motion.
#
# This component models an ideal gearbox that transforms rotational motion from a
# rotational `spline` connector (relative to `support_r`) to translational motion
# at a `flange` connector (relative to `support_t`). The transformation is defined
# by the `ratio` parameter.
#
# The kinematic relationship between the relative angular displacement on the
# rotational side and the relative linear displacement on the translational side is:
# ```math
# spline.\\phi - support_r.\\phi = \text{ratio} \\cdot (flange.s - support_t.s)
# ```
#
# The corresponding force-torque relationship, ensuring power conservation (ideal gear), is:
# ```math
# \text{ratio} \\cdot spline.\\tau + flange.f = 0
# ```
#
# The component extends `PartialElementaryRotationalToTranslational`, which provides
# the rotational connectors (`spline`, `support_r` with variables `phi`, `tau`) and
# translational connectors (`flange`, `support_t` with variables `s`, `f`).
component IdealGearR2T
extends PartialElementaryRotationalToTranslational
# Gear ratio defining the conversion from relative angular displacement (spline.phi - support_r.phi) to relative translational displacement (flange.s - support_t.s). Units: rad/m.
parameter ratio::Real(units="rad/m")
relations
spline.phi-support_r.phi = ratio*flange.s-support_t.s
0 = ratio*spline.tau+flange.f
metadata {"Dyad": {"icons": {"default": "dyad://RotationalComponents/IdealGearR2T.svg"}}}
end
Flattened Source
# Gearbox transforming rotational into translational motion.
#
# This component models an ideal gearbox that transforms rotational motion from a
# rotational `spline` connector (relative to `support_r`) to translational motion
# at a `flange` connector (relative to `support_t`). The transformation is defined
# by the `ratio` parameter.
#
# The kinematic relationship between the relative angular displacement on the
# rotational side and the relative linear displacement on the translational side is:
# ```math
# spline.\\phi - support_r.\\phi = \text{ratio} \\cdot (flange.s - support_t.s)
# ```
#
# The corresponding force-torque relationship, ensuring power conservation (ideal gear), is:
# ```math
# \text{ratio} \\cdot spline.\\tau + flange.f = 0
# ```
#
# The component extends `PartialElementaryRotationalToTranslational`, which provides
# the rotational connectors (`spline`, `support_r` with variables `phi`, `tau`) and
# translational connectors (`flange`, `support_t` with variables `s`, `f`).
component IdealGearR2T
# Primary rotational mechanical interface
spline = Spline() [{"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}]
# Primary translational mechanical interface
flange = Flange() [{"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}]
# Rotational mechanical support interface (e.g., for housing)
support_r = Spline() [{"Dyad": {"placement": {"icon": {"x1": 100, "y1": 950, "x2": 200, "y2": 1050}}}}]
# Translational mechanical support interface (e.g., for housing)
support_t = Flange() [{"Dyad": {"placement": {"icon": {"x1": 800, "y1": 950, "x2": 900, "y2": 1050}}}}]
# Gear ratio defining the conversion from relative angular displacement (spline.phi - support_r.phi) to relative translational displacement (flange.s - support_t.s). Units: rad/m.
parameter ratio::Real(units="rad/m")
relations
spline.phi-support_r.phi = ratio*flange.s-support_t.s
0 = ratio*spline.tau+flange.f
metadata {"Dyad": {"icons": {"default": "dyad://RotationalComponents/IdealGearR2T.svg"}}}
end
Test Cases
This is setup code, that must be run before each test case.
using RotationalComponents
using ModelingToolkit, OrdinaryDiffEqDefault
using Plots
using CSV, DataFrames
snapshotsdir = joinpath(dirname(dirname(pathof(RotationalComponents))), "test", "snapshots")
"/home/actions-runner-10/.julia/packages/RotationalComponents/0VPxm/test/snapshots"
Related
Examples
Experiments
Analyses