WormWheel¶
- class WormWheel(name: str, n_teeth: int, inertia_moment: InertiaMoment, helix_angle: Angle, pressure_angle: Angle, module: Length | None = None, face_width: Length | None = None)¶
Bases:
HelicalGearWormWheelobject.Attributes¶
namestrName of the worm wheel.
n_teethintNumber of gear teeth.
inertia_momentInertiaMomentMoment of inertia of the gear.
helix_angleAngleHelix angle of the worm wheel.
pressure_angleAnglePressure angle of the worm wheel.
moduleLengthUnit of the gear teeth size.
reference_diameterLengthReference diameter of the gear.
face_widthLengthFace width of the gear.
lewis_factorfloatFactor used to compute stresses on the gear tooth.
driven_byRotatingObjectRotating object that drives the gear, for example a
DCMotor, aFlywheelor another gear (SpurGear,HelicalGear,WormGear,WormWheel).drivesRotatingObjectRotating object driven by the gear, it can be a
Flywheelor another gear (SpurGear,HelicalGear,WormGear,WormWheel).master_gear_ratiofloatGear ratio of the mating between the gear and its driving gear.
master_gear_efficiencyfloatorintEfficiency of the gear mating between the gear and its driving gear.
mating_role:RoleThe role of the gear in the gear mating.
angular_positionAngularPositionAngular position of the gear.
angular_speedAngularSpeedAngular speed of the gear.
angular_accelerationAngularAccelerationAngular acceleration of the gear.
torqueTorqueNet torque applied on the gear.
driving_torqueTorqueDriving torque applied on the gear by its driving gear.
load_torqueTorqueLoad torque applied on the gear by its driven gear or an external load.
tangential_forceForceTangential force applied on the gear teeth by the mating gear.
tangential_force_is_computableboolWhether is possible to compute the
tangential_forceon the gear teeth.bending_stressStressBending stress applied on the gear teeth by the mating gear.
bending_stress_is_computableboolWhether is possible to compute the
bending_stresson the gear teeth.time_variablesdictTime variables of the gear.
Methods¶
compute_tangential_force()It computes the
tangential_forceapplied on the gear teeth by the mating gear.compute_bending_stress()It computes the
bending_stressapplied on the gear teeth by the mating gear.external_torque()Custom function to compute the external torque applied on the gear.
update_time_variables()It updates
time_variablesdictionary by appending the last value of each time variable to corresponding list.
- property angular_acceleration: AngularAcceleration¶
Angular acceleration of the gear. It must be an instance of
AngularAcceleration.Returns¶
AngularAccelerationAngular acceleration of the gear.
Raises
TypeErrorIf
angular_accelerationis not an instance ofAngularAcceleration.
- property angular_position: AngularPosition¶
Angular position of the gear. It must be an instance of
AngularPosition.Returns¶
AngularPositionAngular position of the gear.
Raises
TypeErrorIf
angular_positionis not an instance ofAngularPosition.
- property angular_speed: AngularSpeed¶
Angular speed of the gear. It must be an instance of
AngularSpeed.Returns¶
AngularSpeedAngular speed of the gear.
Raises
TypeErrorIf
angular_speedis not an instance ofAngularSpeed.
- property bending_stress: Stress¶
Bending stress applied on the gear teeth by the mating gear. It must be an instance of
Stress.Returns¶
StressBending stress applied on the gear teeth by the mating gear.
Raises
TypeErrorIf
bending_stressis not an instance ofStress.
See Also
- property bending_stress_is_computable: bool¶
Whether is possible to compute the
bending_stresson the gear teeth.The bending stress computation depends on the value of
moduleandface_widthand thereference_diameterof the matingWormGear, so if these optional parameters have been set at worm wheel and worm gear instantiations, then it is possible to compute the bending stress and this property isTrue, otherwise isFalse.Returns¶
boolWhether is possible to compute the bending stress on the gear teeth.
See Also
- compute_bending_stress() None¶
It computes the
bending_stressapplied on the gear teeth by the mating gear.Notes
The bending stress computation is based on the following assumptions:
the tooth is stressed by the overall force acting on the tip of the tooth itself,
the most unfavorable situation is considered in the calculation, as if there is only one pair of teeth in contact within the contact segment,
the component of the overall force that determines the bending on the tooth is the only one considered and, for simplicity, is taken as having a value equal to the tangential force on the reference diameter,
the radial component of the overall force that causes a compressive stress on the tooth is neglected.
The bending stress is computed with the following formula:
\[\sigma_b = \frac{F_t}{p_n \, b_{eff} \, Y_{LW}}\]where:
\(F_t\) is the
tangential_forceapplied on the tooth,\(p_n\) is the normal pitch,
\(b_{eff}\) is the effective tooth face width,
\(Y_{LW}\) is the gear Lewis factor
lewis_factor.
The normal pitch can be computed with:
\[p_n = \frac{\pi d_{wg} \sin \beta}{N}\]where:
\(d_{wg}\) is the mating worm gear
reference_diameter,\(\beta\) is the mating worm gear
helix_angle,\(N\) is the worm wheel number of teeth
n_teeth.
The effective tooth face width \(b_{eff}\) is the minimum between the worm wheel face width
face_widthand the mating worm gear reference diameter multiplied by 0.67.
- compute_tangential_force() None¶
It computes the
tangential_forceapplied on the gear teeth by the mating gear.Considering a gear mating:
if the gear is the master one, then it takes into account the
load_torquefor the computation,if the gear is the slave one, then it take into account the
driving_torquefor the computation.
The tangential force is computed dividing the just described reference torque by the reference radius (half of the
reference_diameter).Raises
ValueErrorIf a gear mating between two gears has not been set.
- property driven_by: RotatingObject¶
Rotating object that drives the gear, for example a
DCMotor, aFlywheelor another gear (SpurGear,HelicalGear,WormGear,WormWheel). It must be aRotatingObject.To set this property use
add_worm_gear_matingoradd_fixed_joint.Returns¶
RotatingObjectMaster rotating object that drives the gear.
Raises
TypeErrorIf
driven_byis not an instance ofRotatingObject.
- property drives: RotatingObject¶
Rotating object driven by the gear, it can be a
Flywheelor another gear (SpurGear,HelicalGear,WormGear,WormWheel). It must be aRotatingObject.To set this property use
add_worm_gear_matingoradd_fixed_joint.Returns¶
RotatingObjectRotating object driven by the gear.
Raises
TypeErrorIf
drivesis not an instance ofRotatingObject.
- property driving_torque: Torque¶
Driving torque applied on the gear by its driving gear. It must be an instance of
Torque.Returns¶
TorqueDriving torque applied on the gear by its driving gear.
Raises
TypeErrorIf
driving_torqueis not an instance ofTorque.
- property external_torque: Callable[[AngularPosition, AngularSpeed, Time], Torque]¶
Custom function to compute the external torque applied on the gear. It must be a function with parameters
angular_position,angular_speedandtime. The function must return an instance ofTorque.Returns¶
CallableThe function to compute the external torque applied on the gear.
Raises
TypeErrorIf
external_torqueis not callable.KeyErrorIf
external_torquemisses parametersangular_position,angular_speedortime.
Examples
Constant torque, not dependent on
angular_position,angular_speedortime.>>> from gearpy.mechanical_objects import WormWheel >>> from gearpy.units import InertiaMoment, Torque >>> gear = WormWheel( ... name='gear', ... n_teeth=10, ... inertia_moment=InertiaMoment(1, 'kgm^2') ... ) >>> gear.external_torque = \ ... lambda angular_position, angular_speed, time: Torque(5, 'Nm')
Torque dependent on
angular_positionandtime.In this case the gear gets a periodic load, dependent on time, and an extra load dependent on its angular position. The dependence by angular position may be used to model cases where cams are involved.
>>> import numpy as np >>> from gearpy.units import AngularPosition, AngularSpeed, Time >>> def custom_external_torque( ... angular_position: AngularPosition, ... angular_speed: AngularSpeed, ... time: Time ... ) -> Torque: >>> return Torque( ... value=angular_position.sin() + ... np.cos(time.to('sec').value), ... unit='Nm' ... ) >>> gear.external_torque = custom_external_torque
Torque dependent on
angular_position,angular_speedandtime.With respect ot the previous case, the gear gets an extra load dependent on its angular speed. The dependence by angular speed may be used to model cases where air friction is not negligible.
>>> def complex_external_torque( ... angular_position: AngularPosition, ... angular_speed: AngularSpeed, ... time: Time ... ) -> Torque: >>> return Torque( ... value=angular_position.sin() + ... 0.001*(angular_speed.to('rad/s').value)**2 + ... np.cos(time.to('sec').value), ... unit='Nm' ... ) >>> gear.external_torque = complex_external_torque
- property face_width: Length | None¶
Face width of the gear. It must be an instance of
Length.Returns¶
LengthFace width of the gear.
Raises
TypeErrorIf
face_widthis not an instance ofLength.
- property helix_angle: Angle¶
Helix angle of the worm wheel. It must be an instance of
Angle.The maximum allowable value of helix angle depends on the
pressure_angle.Once set at the worm gear instantiation, it cannot be changed afterward.
Returns¶
AngleThe helix angle of the worm wheel.
Raises
TypeErrorIf
helix_angleis not an instance ofAngle.ValueErrorIf
helix_angleis greater than the maximum allowable helix angle, depending onpressure_anglevalue.
- property inertia_moment: InertiaMoment¶
Moment of inertia of the gear. It must be an instance of
InertiaMoment.Once set at the worm wheel instantiation, it cannot be changed afterward.
Returns¶
InertiaMomentMoment of inertia of the gear.
Raises
TypeErrorIf
inertia_momentis not an instance ofInertiaMoment.
- property lewis_factor: float | None¶
Factor used to compute stresses on the gear tooth.
It is a tabular value that depends on the
pressure_angle.Returns¶
floatFactor used to compute stresses on the gear tooth.
- property load_torque: Torque¶
Load torque applied on the gear by its driven gear or an external load. It must be an instance of
Torque.Returns¶
TorqueLoad torque applied on the gear by its driven gear or an external load.
Raises
TypeErrorIf
load_torqueis not an instance ofTorque.
- property master_gear_efficiency: float | int¶
Efficiency of the gear mating between the gear and its driving gear. It must be a
floator anintwithin0and1.To set this property use
add_worm_gear_matingoradd_fixed_joint.Returns¶
Raises
TypeErrorIf
master_gear_efficiencyis not afloator anint.ValueErrorIf
master_gear_efficiencyis not within0and1.
- property master_gear_ratio: float¶
Gear ratio of the mating between the gear and its driving gear. It must be a positive a
float.If the wheel gear is fixed to another driving
RotatingObject, then the ratio is1, otherwise it is defined as the ratio between the worm wheel number of teethn_teethand the driving worm gear number of startsWormGear.n_starts.To set this property use
add_worm_gear_matingoradd_fixed_joint.Returns¶
floatGear ratio of the mating between the gear and its driving gear.
Raises
TypeErrorIf
master_gear_ratiois not afloat.ValueErrorIf
master_gear_ratiois negative or null.
- property mating_role: Role¶
Role of the gear in the gear mating.
If the gear drives the mate one, then it is the “master” gear and its role is
MatingMaster, otherwise it is the “slave” one and its role isMatingSlave.To set this parameter use
add_worm_gear_mating.Returns¶
RoleThe role of the gear in the gear mating.
Raises
ValueErrorIf
mating_roleis not a subclass ofRole.
- property module: Length | None¶
Unit of the gear teeth size. It must be an instance of
Length.Once set at the worm wheel instantiation, it cannot be changed afterward.
Returns¶
LengthUnit of the gear teeth size.
- property n_teeth: int¶
Number of gear teeth. It must be a positive
int.Once set at the worm wheel instantiation, it cannot be changed afterward.
Returns¶
intNumber of gear teeth.
- property name: str¶
Name of the worm wheel. It must be a non-empty
str.It must be a unique name, not shared by other elements in the powertrain elements.
Once set at the worm wheel instantiation, it cannot be changed afterward.
Returns¶
strName of the worm wheel.
- property pressure_angle: Angle¶
Pressure angle of the worm wheel. It must be an instance of
Angleand its value must be one of: 14.5 deg, 20 deg, 25 deg or 30 deg.Once set at the worm wheel instantiation, it cannot be changed afterward.
Returns¶
AngleThe pressure angle of the worm wheel.
Raises
TypeErrorIf
pressure_angleis not an instance ofAngle.ValueErrorIf
pressure_anglevalue is not among available ones: 14.5 deg, 20 deg, 25 deg or 30 deg.
- property reference_diameter: Length | None¶
Reference diameter of the gear. It must be an instance of
Length.It is computed as the product of
n_teethtimesmoduleat the worm wheel instantiation and it cannot be changed afterward.Returns¶
LengthReference diameter of the gear.
- property tangential_force: Force¶
Tangential force applied on the gear teeth by the mating gear. It must be an instance of
Force.Returns¶
ForceTangential force applied on the gear teeth by the mating gear.
Raises
TypeErrorIf
tangential_forceis not an instance ofForce.
See Also
- property tangential_force_is_computable: bool¶
Whether is possible to compute the
tangential_forceon the gear teeth.The tangential force computation depends on the value of
module, so if this optional parameter has been set at worm wheel instantiation, then it is possible to compute the tangential force and this property isTrue, otherwise isFalse.Returns¶
boolWhether is possible to compute the tangential force on the gear teeth.
See Also
- property time_variables: dict[str, list[UnitBase]]¶
Time variables of the worm wheel. Each time variable is stored as a dictionary key-value pair. The available time variables are:
angular_position:'angular position',angular_speed:'angular speed',angular_acceleration:'angular acceleration',torque:'torque',driving_torque:'driving torque',load_torque:'load torque',tangential_force:'tangential force',bending_stress:'bending stress'.
'tangential force'and'bending stress'are listed among time variables only if they are computable indeed, depending on which gear parameters are set at worm wheel instantiation; seetangential_force_is_computableandbending_stress_is_computable.Corresponding values of the dictionary are lists of the respective time variable values.
At each time iteration, the
Solverappends every time variables’ values to the relative list in the dictionary.Returns¶
dictTime variables of the worm wheel.
See Also
- property torque: Torque¶
Net torque applied on the gear. It must be an instance of
Torque.It is computed as the difference between
driving_torqueandload_torque.Returns¶
TorqueNet torque applied on the gear.
- update_time_variables() None¶
It updates
time_variablesdictionary by appending the last value of each time variable (key of the dictionary) to corresponding list (value of the dictionary).