mechanical_objects¶
- class DCMotor(name: str, inertia_moment: InertiaMoment, no_load_speed: AngularSpeed, maximum_torque: Torque, no_load_electric_current: Current | None = None, maximum_electric_current: Current | None = None)
Bases:
MotorBaseDCMotorobject.Attributes¶
namestrName of the DC motor.
drivesRotatingObjectRotating object driven by DC motor, it can be a
Flywheelor a gear (SpurGear,HelicalGear,WormGear,WormWheel).angular_positionAngularPositionAngular position of the DC motor.
angular_speedAngularSpeedAngular speed of the DC motor.
angular_accelerationAngularAccelerationAngular acceleration of the DC motor.
no_load_speedAngularSpeedNo load angular speed of the DC motor.
maximum_torqueTorqueMaximum torque developed by the DC motor.
torqueTorqueNet torque applied on the DC motor.
driving_torqueTorqueDriving torque developed by the DC motor.
load_torqueTorqueLoad torque applied on the DC motor by its driven gear.
inertia_momentInertiaMomentMoment of inertia of the DC motor.
no_load_electric_currentCurrentNo load electric current absorbed by the DC motor.
maximum_electric_currentCurrentMaximum electric current absorbed by the DC motor.
electric_current_is_computableboolWhether is possible to compute the
electric_currentabsorbed by the DC motor.electric_currentCurrentElectric current absorbed by the DC motor.
pwmfloatorintPulse Width Modulation duty cycle of the supply voltage of the DC motor.
time_variablesdictTime variables of the DC motor.
Methods¶
compute_torque()It computes the
driving_torquedeveloped by the DC motor.compute_electric_current()It computes the
electric_currentabsorbed by the DC motor.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 DC motor. It must be an instance of
AngularAcceleration.Returns¶
AngularAccelerationAngular acceleration of the DC motor.
Raises
TypeErrorIf
angular_accelerationis not an instance ofAngularAcceleration.
- property angular_position: AngularPosition
Angular position of the DC motor. It must be an instance of
AngularPosition.Returns¶
AngularPositionAngular position of the DC motor.
Raises
TypeErrorIf
angular_positionis not an instance ofAngularPosition.
- property angular_speed: AngularSpeed
Angular speed of the DC motor. It must be an instance of
AngularSpeed.Returns¶
AngularSpeedAngular speed of the DC motor.
Raises
TypeErrorIf
angular_speedis not an instance ofAngularSpeed.
- compute_electric_current() None
It computes the
electric_currentabsorbed by the DC motor.The absorbed electric current depends on the two constants
no_load_electric_currentandmaximum_electric_currentand the two variablesdriving_torqueandpwmof the DC motor.The computed electric current has the same unit of
maximum_electric_current.Notes
The computation is based on the following relationship:
\[i \left( T \right) = \left( i_{max}^D - i_0 \right) \frac{T}{T_{max}^D} + i_0\]where:
\(i\) is the
electric_currentabsorbed by the DC motor,\(T\) is the DC motor developed
driving_torque,\(i_{max}^D\) is the maximum electric current absorbed by the DC motor keeping into account
pwm,\(i_0\) is the
no_load_electric_currentabsorbed by the DC motor,\(T_{max}^D\) is the DC motor maximum torque developed by the DC motor keeping into account
pwm.
The maximum torque can be computed as:
\[T_{max}^D \left( D \right) = T_{max} \frac{D \, i_{max} - i_0}{i_{max} - i_0}\]and the maximum electric current can be computed as:
\[i_{max}^D \left( D \right) = D \, i_{max}\]where:
\(D\) is the DC motor supply voltage PWM duty cycle (
pwm),\(T_{max}\) is the DC motor
maximum_torque,\(i_{max}\) is the DC motor
maximum_electric_current,\(i_0\) is the DC motor
no_load_electric_current.
If the
pwmis lower than a critical threshold, then the motor cannot develop any torque, so theelectric_currentwill depend only onpwmvalue. The criticalpwmvalue can be computed as:\[D_{lim} = \frac{i_0}{i_{max}}\]and the relative electric current can be computed as:
\[i_{lim} \left( D \right) = D \, i_{max}\]
- compute_torque() None
It computes the
driving_torquedeveloped by the DC motor.The driving torque depends on the two constants
no_load_speedandmaximum_torqueand the two variablesangular_speedandpwmof the DCMotor.The computed torque has the same unit of
maximum_torque.Notes
The computation is based on the following relationship:
\[T \left( \dot{\theta} , T_{max}^D , \dot{\theta}_0^D \right) = T_{max}^D \left( 1 - \frac{\dot{\theta}}{\dot{\theta}_0^D} \right)\]where:
\(T\) is the DC motor developed driving torque
driving_torque,\(\dot{\theta}\) is the actual DC motor angular speed
angular_speed,\(T_{max}^D\) is the DC motor maximum torque developed by the DC motor keeping into account
pwm,\(\dot{\theta}_0^D\) is the DC motor no load angular speed keeping into account
pwm.
The maximum torque can be computed as:
\[T_{max}^D \left( D \right) = T_{max} \frac{D \, i_{max} - i_0}{i_{max} - i_0}\]and the no load angular speed can be computed as:
\[\dot{\theta}_0^D \left( D \right) = D \, \dot{\theta}_0\]where:
\(D\) is the DC motor supply voltage PWM duty cycle (
pwm),\(T_{max}\) is the DC motor
maximum_torque,\(i_{max}\) is the DC motor
maximum_electric_current,\(i_0\) is the DC motor
no_load_electric_current,\(\dot{\theta}_0\) is the DC motor
no_load_speed.
If the
pwmis lower than a critical threshold, then the motor cannot develop any torque, so thedriving_torquewill be null. The criticalpwmvalue can be computed as:\[D_{lim} = \frac{i_0}{i_{max}}\]
- property drives: RotatingObject
Rotating object driven by DC motor, it can be a
Flywheelor a gear (SpurGear,HelicalGear,WormGear,WormWheel). It must be an instance ofRotatingObject.To set this property use
add_fixed_joint.Returns¶
RotatingObjectRotating object driven by the DC motor.
Raises
TypeErrorIf
drivesis not an instance ofRotatingObject.
- property driving_torque: Torque
Driving torque developed by the DC motor. It must be an instance of
Torque.Returns¶
TorqueDriving torque developed by the DC motor.
Raises
TypeErrorIf
driving_torqueis not an instance ofTorque.
See Also
- property electric_current: Current | None
Electric current absorbed by the DC motor. It must be an instance of
Current.Returns¶
CurrentElectric current absorbed by the DC motor.
Raises
TypeErrorIf
electric_currentis not an instance ofCurrent.
See Also
- property electric_current_is_computable: bool
Whether is possible to compute the
electric_currentabsorbed by the DC motor.The electric current computation depends on the value of
no_load_electric_currentandmaximum_electric_current, so if these optional parameters have been set at DC motor instantiation, then it is possible to compute the absorbed electric current and this property isTrue, otherwise isFalse.Returns¶
boolWhether is possible to compute the electric current absorbed by the DC motor.
See Also
- property inertia_moment: InertiaMoment
Moment of inertia of the DC motor’s rotor. It must be an instance of
InertiaMoment.Once set at the DC motor instantiation, it cannot be changed afterward.
Returns¶
InertiaMomentMoment of inertia of the DC motor’s rotor.
Raises
TypeErrorIf
inertia_momentis not an instance ofInertiaMoment.
- property load_torque: Torque
Load torque applied on the DC motor by its driven gear. It must be an instance of
Torque.Returns¶
TorqueLoad torque applied on the DC motor by its driven gear.
Raises
TypeErrorIf
load_torqueis not an instance ofTorque.
- property maximum_electric_current: Current | None
Maximum electric current absorbed by the DC motor. It must be an instance of
Current. Its value must be positive and greater thanno_load_electric_current.It is the maximum electric current the DC motor can absorb when its rotor is kept still by the load.
Once set at the DC motor instantiation, it cannot be changed afterward.
Returns¶
CurrentMaximum electric current absorbed by the DC motor.
Raises
TypeErrorIf
maximum_electric_currentis not an instance ofCurrent.ValueErrorIf
maximum_electric_currentis negative or null,if
maximum_electric_currentis lower than or equal tono_load_electric_current.
- property maximum_torque: Torque
Maximum torque developed by the DC motor. It must be an instance of
Torque. Its value must be positive.It is the maximum torque the DC motor can develop when its rotor is kept still by the load.
Once set at the DC motor instantiation, it cannot be changed afterward.
Returns¶
TorqueMaximum torque developed by the DC motor.
Raises
TypeErrorIf
maximum_torqueis not an instance ofTorque.ValueErrorIf
maximum_torqueis negative or null.
- property name: str
Name of the DC motor. 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 DC motor instantiation, it cannot be changed afterward.
Returns¶
strName of the DC motor.
- property no_load_electric_current: Current | None
No load electric current absorbed by the DC motor. It must be an instance of
Current. Its value must be positive or null and lower thanmaximum_electric_current.It is the electric current absorbed by the DC motor when no load is applied to its rotor.
Once set at the DC motor instantiation, it cannot be changed afterward.
Returns¶
CurrentNo load electric current of the DC motor.
Raises
TypeErrorIf
no_load_electric_currentis not an instance ofCurrent.ValueErrorIf
no_load_electric_currentis negative,if
no_load_electric_currentis higher than or equal tomaximum_electric_current.
- property no_load_speed: AngularSpeed
No load angular speed of the DC motor. It must be an instance of
AngularSpeed. Its value must be positive.It is the angular speed at which the DC motor rotates when no load is applied to its rotor.
Once set at the DC motor instantiation, it cannot be changed afterward.
Returns¶
AngularSpeedNo load angular speed of the DC motor.
Raises
TypeErrorIf
no_load_speedis not an instance ofAngularSpeed.ValueErrorIf
no_load_speedis negative or null.
- property pwm: float | int
Pulse Width Modulation duty cycle of the supply voltage of the DC motor.
It must be a
floator anintwithin-1and1.In general the duty cycle can be between
0and1, butpwmcan be between-1and1, in order to take into account the voltage sign with respect to the direction of rotation:if
pwmis positive, then the supply voltage pushes the motor to rotate in the positive direction,if
pwmis negative, then the supply voltage pushes the motor to rotate in the negative direction,if
pwmis null, then the supply voltage is null to and the motor does not develop any driving torque.
The
pwmvalue has an impact on thedriving_torquedeveloped and theelectric_currentabsorbed by the DC motor.Returns¶
- property time_variables: dict[str, list[UnitBase]]
Time variables of the DC motor. 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',electric_current:'electric current',pwm:'pwm'.
'electric current'is listed among time variables only if it is computable indeed, depending on which motor parameters was set at DC motor instantiation; seeelectric_current_is_computablefor more details.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 DC motor.
See Also
- property torque: Torque
Net torque applied on the DC motor. It must be an instance of
Torque.It is computed as the difference between
driving_torqueandload_torque.Returns¶
TorqueNet torque applied on the DC motor.
- 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).
- class Flywheel(name: str, inertia_moment: InertiaMoment)
Bases:
RotatingObjectFlywheelobject.Attributes¶
namestrName of the flywheel.
driven_byRotatingObjectRotating object that drives the flywheel, for example a
DCMotoror a gear (SpurGear,HelicalGear,WormGear,WormWheel).drivesRotatingObjectRotating object driven by the flywheel, it can be a gear (
SpurGear,HelicalGear,WormGear,WormWheel).master_gear_ratiofloatGear ratio of the fixed joint between the flywheel and its driving rotating object.
master_gear_efficiencyfloatorintEfficiency of the fixed joint between the flywheel and its driving rotating object.
angular_positionAngularPositionAngular position of the flywheel.
angular_speedAngularSpeedAngular speed of the flywheel.
angular_accelerationAngularAccelerationAngular acceleration of the flywheel.
torqueTorqueNet torque applied on the flywheel.
driving_torqueTorqueDriving torque applied on the flywheel by its driving rotating object.
load_torqueTorqueLoad torque applied on the flywheel by its driven rotating object.
inertia_momentInertiaMomentMoment of inertia of the flywheel.
time_variablesdictTime variables of the flywheel.
Methods¶
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 flywheel. It must be an instance of
AngularAcceleration.Returns¶
AngularAccelerationAngular acceleration of the flywheel.
Raises
TypeErrorIf
angular_accelerationis not an instance ofAngularAcceleration.
- property angular_position: AngularPosition
Angular position of the flywheel. It must be an instance of
AngularPosition.Returns¶
AngularPositionAngular position of the flywheel.
Raises
TypeErrorIf
angular_positionis not an instance ofAngularPosition.
- property angular_speed: AngularSpeed
Angular speed of the flywheel. It must be an instance of
AngularSpeed.Returns¶
AngularSpeedAngular speed of the flywheel.
Raises
TypeErrorIf
angular_speedis not an instance ofAngularSpeed.
- property driven_by: RotatingObject
Rotating object that drives the flywheel, for example a
DCMotoror a gear (SpurGear,HelicalGear,WormGear,WormWheel). It must be aRotatingObject.To set this property use
add_fixed_joint.Returns¶
RotatingObjectMaster rotating object that drives the flywheel.
Raises
TypeErrorIf
driven_byis not an instance ofRotatingObject.
- property drives: RotatingObject
Rotating object driven by the flywheel, it can be a gear (
SpurGear,HelicalGear,WormGear,WormWheel). It must be aRotatingObject.To set this property use
add_fixed_joint.Returns¶
RotatingObjectRotating object driven by the flywheel.
Raises
TypeErrorIf
drivesis not an instance ofRotatingObject.
- property driving_torque: Torque
Driving torque applied on the flywheel by its driving rotating object. It must be an instance of
Torque.Returns¶
TorqueDriving torque applied on the flywheel by its driving rotating object.
Raises
TypeErrorIf
driving_torqueis not an instance ofTorque.
- property inertia_moment: InertiaMoment
Moment of inertia of the flywheel. It must be an instance of
InertiaMoment.Once set at the flywheel instantiation, it cannot be changed afterward.
Returns¶
InertiaMomentMoment of inertia of the flywheel.
Raises
TypeErrorIf
inertia_momentis not an instance ofInertiaMoment.
- property load_torque: Torque
Load torque applied on the flywheel by its driven rotating object. It must be an instance of
Torque.Returns¶
TorqueLoad torque applied on the flywheel by its driven rotating object.
Raises
TypeErrorIf
load_torqueis not an instance ofTorque.
- property master_gear_efficiency: float | int
Efficiency of the fixed joint between the flywheel and its driving rotating object. Since the relation between the flywheel and its neighbor elements in the powertrain elements is always a fixed joint, the efficiency is always equal to
1and cannot be overwritten.Returns¶
- property master_gear_ratio: float
Gear ratio of the fixed joint between the flywheel and its driving rotating object. It must be a positive a float. Since the relation between the flywheel and its neighbor elements in the powertrain elements is always a fixed joint, the gear ratio will be always set to
1byadd_fixed_joint.To set this property use
add_fixed_joint.Returns¶
floatGear ratio of the fixed joint between the flywheel and its driving rotating object.
Raises
TypeErrorIf
master_gear_ratiois not afloat.ValueErrorIf
master_gear_ratiois negative or null.
- property name: str
Name of the flywheel. 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 flywheel instantiation, it cannot be changed afterward.
Returns¶
strName of the flywheel.
- property time_variables: dict[str, list[UnitBase]]
Time variables of the flywheel. 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'.
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 flywheel.
See Also
- property torque: Torque
Net torque applied on the flywheel. It must be an instance of
Torque.It is computed as the difference between
driving_torqueandload_torque.Returns¶
TorqueNet torque applied on the flywheel.
- 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).
- class GearBase(name: str, n_teeth: int, module: Length, face_width: Length, inertia_moment: InertiaMoment, elastic_modulus: Stress)
Bases:
RotatingObjectGearBaseobject.Abstract base class for creating gear objects.
- class HelicalGear(name: str, n_teeth: int, inertia_moment: InertiaMoment, helix_angle: Angle, module: Length | None = None, face_width: Length | None = None, elastic_modulus: Stress | None = None)
Bases:
SpurGearHelicalGearobject.Attributes¶
namestrName of the helical gear.
n_teethintNumber of gear teeth.
inertia_momentInertiaMomentMoment of inertia of the gear.
helix_angleAngleHelix angle of the helical gear.
moduleLengthUnit of the gear teeth size.
reference_diameterLengthReference diameter of the gear.
face_widthLengthFace width of the gear.
elastic_modulusStressElastic modulus of the material 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.contact_stressStressThe stress generated by the contact with mating gear teeth.
contact_stress_is_computableboolWhether is possible to compute the
contact_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.compute_contact_stress()It computes the
contact_stressgenerated by the contact with mating gear teeth.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_width, so if these optional parameters have been set at helical gear instantiation, 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}{m \, b \, Y_{LW}}\]where:
\(F_t\) is the
tangential_forceapplied on the tooth,\(m\) is the gear
module,\(b\) is the gear tooth
face_width,\(Y_{LW}\) is the gear
lewis_factor.
- compute_contact_stress() None
It computes the
contact_stressgenerated by the contact with mating gear teeth.Raises
ValueErrorIf a gear mating between two gears has not been set,
if
mating_roleisMatingMasterand its slave gear missesmoduleparameter,if
mating_roleisMatingMasterand its slave gear misseselastic_modulusparameter,if
mating_roleisMatingSlaveand its master gear missesmoduleparameter,if
mating_roleisMatingSlaveand its master gear misseselastic_modulusparameter.
Notes
The contact stress computation is based on the following assumptions:
perfect elasticity of the materials the two mating gear,
absence of friction forces in the contact point,
small size of the contact surface compared to the size of the bodies between which contact occurs.
The contact stress is computed with the following formula:
\[\sigma_c = 0.262922 \, \sqrt{\frac{4 \, F_t \, \cos \beta}{b \, \cos \alpha_t \, \sin \alpha_t} \left( \frac{1}{D_1} + \frac{1}{D_2} \right) \, \frac{E_1 \, E_2}{E_1 + E_2}}\]where:
\(F_t\) is the
tangential_forceapplied on the tooth,\(\beta\) is the gear
helix_angle,\(b\) is the gear
face_width,\(\alpha_t\) is the transverse pressure angle of the gear,
\(D_1\) is the gear
reference_diameter,\(D_2\) is the mating gear
reference_diameter,\(E_1\) is the gear
elastic_modulus,\(E_2\) is the mating gear
elastic_modulus.
The transverse pressure angle of the gear can be computed with the formula:
\[\alpha_t = \tan^{-1} \frac{\tan \alpha}{\cos \beta}\]where \(\alpha\) is the pressure angle of the gear, always equal to 20 degrees.
- 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 contact_stress: Stress
Stress generated by the contact with mating gear teeth. It must be an instance of
Stress.Returns¶
StressThe stress generated by the contact with mating gear teeth.
Raises
TypeErrorIf
contact_stressis not an instance ofStress.
See Also
- property contact_stress_is_computable: bool
Whether is possible to compute the
contact_stressforce on the gear teeth.The contact stress computation depends on the value of
module,face_widthandelastic_modulus, so if these optional parameters have been set at helical gear instantiation, then it is possible to compute the contact stress and this property isTrue, otherwise isFalse.Returns¶
boolWhether is possible to compute the contact stress on the gear teeth.
See Also
- 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_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_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 elastic_modulus: Stress | None
Elastic modulus of the material of the gear. It must be an instance of
Stress. It must be positive.Returns¶
StressElastic modulus of the material of the gear.
Raises
TypeErrorIf
elastic_modulusis not an instance ofStress.ValueErrorIf
elastic_modulusvalue is negative or null.
- 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_torque()is not callable.KeyErrorIf
external_torque()misses parametersangular_position,angular_speedortime.
Examples
Constant torque, not dependent on
angular_position,angular_speedortime.>>> from gearpy.mechanical_objects import HelicalGear >>> from gearpy.units import InertiaMoment, Torque >>> gear = HelicalGear(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): ... 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): ... 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 helical gear. It must be an instance of
Anglelower than 90 degrees.Once set at the helical gear instantiation, it cannot be changed afterward.
Returns¶
AngleThe helix angle of the helical gear.
Raises
TypeErrorIf
helix_angleis not an instance ofAngle.ValueErrorIf
helix_angleis greater than or equal to 90 degrees.
- property inertia_moment: InertiaMoment
Moment of inertia of the gear. It must be an instance of
InertiaMoment.Once set at the helical gear 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 in general depends on the number of gear teeth, the pressure angle and the helix angle. In this case, the considered pressure angle is always 20 degrees, so the Lewis factor depends only on the number of gear teeth
n_teethand thehelix_angle.Returns¶
floatFactor used to compute stresses on the gear tooth.
Notes
The Lewis factor is a tabular value that depends on the helical gear virtual number of teeth, which can be computed as:
\[z_v = \frac{z}{\cos^2 \beta_b \, \cos \beta}\]where:
\(z\) is the gear number of teeth
n_teeth,\(\beta\) is the gear
helix_angle,\(\beta_b\) is the gear base helix angle.
The gear base helix angle \(\beta_b\) can be computed as:
\[\beta_b = \tan^{-1} \left( \cos \alpha_t \, \cos \beta \right)\]where the \(\alpha_t\) is the gear transverse pressure angle, which can be computed as:
\[\alpha_t = \tan^{-1} \frac{\tan \alpha}{\cos \beta}\]where \(\alpha\) is the pressure angle of the gear, always equal to 20 degrees.
- 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_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 gear is fixed to another driving
RotatingObject, then the ratio is1, otherwise it is defined as the ratio between the gear number of teethn_teethand the same parameter of the master (driving) gear.To set this property use
add_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_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 helical gear 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 helical gear instantiation, it cannot be changed afterward.
Returns¶
intNumber of gear teeth.
- property name: str
Name of the helical gear. 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 helical gear instantiation, it cannot be changed afterward.
Returns¶
strName of the helical gear.
- 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 helical gear 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 helical gear 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 gear. 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',contact_stress:'contact stress'.
'tangential force','bending stress'and'contact stress'are listed among time variables only if they are computable indeed, depending on which gear parameters are set at gear instantiation; seetangential_force_is_computable,bending_stress_is_computableandcontact_stress_is_computablefor more details.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 gear.
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).
- class MatingMaster
Bases:
RoleMatingMasterobject.Role of the master gear in a gear mating.
- class MatingSlave
Bases:
RoleMatingSlaveobject.Role of the slave gear in a gear mating.
- class MechanicalObject(name: str)
Bases:
ABCMechanicalObjectobject.Abstract base class for creating mechanical objects.
- class MotorBase(name: str, inertia_moment: InertiaMoment)
Bases:
RotatingObjectMotorBaseobject.Abstract base class for creating motor objects.
See Also
- class RotatingObject(name: str, inertia_moment: InertiaMoment)
Bases:
MechanicalObjectRotatingObjectobject.Abstract base class for creating rotating objects.
- class SpurGear(name: str, n_teeth: int, inertia_moment: InertiaMoment, module: Length | None = None, face_width: Length | None = None, elastic_modulus: Stress | None = None)
Bases:
GearBaseSpurGearobject.Attributes¶
namestrName of the spur gear.
n_teethintNumber of gear teeth.
inertia_momentInertiaMomentMoment of inertia of the gear.
moduleLengthUnit of the gear teeth size.
reference_diameterLengthReference diameter of the gear.
face_widthLengthFace width of the gear.
elastic_modulusStressElastic modulus of the material 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.contact_stressStressThe stress generated by the contact with mating gear teeth.
contact_stress_is_computableboolWhether is possible to compute the
contact_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.compute_contact_stress()It computes the
contact_stressgenerated by the contact with mating gear teeth.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_width, so if these optional parameters have been set at spur gear instantiation, 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}{m \, b \, Y_{LW}}\]where:
\(F_t\) is the
tangential_forceapplied on the tooth,\(m\) is the gear
module,\(b\) is the gear tooth
face_width,\(Y_{LW}\) is the gear
lewis_factor.
- compute_contact_stress() None
It computes the
contact_stressgenerated by the contact with mating gear teeth.Raises
ValueErrorIf a gear mating between two gears has not been set,
if
mating_roleisMatingMasterand its slave gear missesmoduleparameter,if
mating_roleisMatingMasterand its slave gear misseselastic_modulusparameter,if
mating_roleisMatingSlaveand its master gear missesmoduleparameter,if
mating_roleisMatingSlaveand its master gear misseselastic_modulusparameter.
Notes
The contact stress computation is based on the following assumptions:
perfect elasticity of the materials the two mating gear,
absence of friction forces in the contact point,
small size of the contact surface compared to the size of the bodies between which contact occurs.
The contact stress is computed with the following formula:
\[\sigma_c = 0.262922 \, \sqrt{\frac{4 \, F_t}{b \, \cos \alpha \, \sin \alpha} \left( \frac{1}{D_1} + \frac{1}{D_2} \right) \, \frac{E_1 \, E_2}{E_1 + E_2}}\]where:
\(F_t\) is the
tangential_forcetangential force applied on the tooth,\(b\) is the gear
face_width,\(\alpha\) is the pressure angle of the gear, always equal to 20 degrees,
\(D_1\) is the gear
reference_diameter,\(D_2\) is the mating gear
reference_diameter,\(E_1\) is the gear
elastic_modulus,\(E_2\) is the mating gear
elastic_modulus.
- 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 contact_stress: Stress
Stress generated by the contact with mating gear teeth. It must be an instance of
Stress.Returns¶
StressThe stress generated by the contact with mating gear teeth.
Raises
TypeErrorIf
contact_stressis not an instance ofStress.
See Also
- property contact_stress_is_computable: bool
Whether is possible to compute the
contact_stressforce on the gear teeth.The contact stress computation depends on the value of
module,face_widthandelastic_modulus, so if these optional parameters have been set at spur gear instantiation, then it is possible to compute the contact stress and this property isTrue, otherwise isFalse.Returns¶
boolWhether is possible to compute the contact stress on the gear teeth.
See Also
- 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_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_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 elastic_modulus: Stress | None
Elastic modulus of the material of the gear. It must be an instance of
Stress. It must be positive.Returns¶
StressElastic modulus of the material of the gear.
Raises
TypeErrorIf
elastic_modulusis not an instance ofStress.ValueErrorIf
elastic_modulusvalue is negative or null.
- 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_torque()is not callable.KeyErrorIf
external_torque()misses parametersangular_position,angular_speedortime.
Examples
Constant torque, not dependent on
angular_position,angular_speedortime.>>> from gearpy.mechanical_objects import SpurGear >>> from gearpy.units import InertiaMoment, Torque >>> gear = SpurGear(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): ... 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): ... 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 inertia_moment: InertiaMoment
Moment of inertia of the gear. It must be an instance of
InertiaMoment.Once set at the spur gear 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 in general depends on the number of gear teeth and the pressure angle. In this case, the considered pressure angle is always 20 degrees, so the Lewis factor depends only on the number of gear teeth
n_teeth.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_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 gear is fixed to another driving
RotatingObject, then the ratio is1, otherwise it is defined as the ratio between the gear number of teethn_teethand the same parameter of the master (driving) gear.To set this property use
add_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_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 spur gear 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 integer.
Once set at the spur gear instantiation, it cannot be changed afterward.
Returns¶
intNumber of gear teeth.
- property name: str
Name of the spur gear. 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 spur gear instantiation, it cannot be changed afterward.
Returns¶
strName of the spur gear.
- 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 spur gear 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 spur gear 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 gear. 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',contact_stress:'contact stress'.
'tangential force','bending stress'and'contact stress'are listed among time variables only if they are computable indeed, depending on which gear parameters are set at gear instantiation; seetangential_force_is_computable,bending_stress_is_computableandcontact_stress_is_computablefor more details.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 gear.
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).
- class WormGear(name: str, n_starts: int, inertia_moment: InertiaMoment, helix_angle: Angle, pressure_angle: Angle, reference_diameter: Length | None = None)
Bases:
RotatingObjectWormGearobject.Attributes¶
namestrName of the worm gear.
n_startsintNumber of starts, which refers to the number of independent threads running around the length of the thread.
inertia_momentInertiaMomentMoment of inertia of the gear.
helix_angleAngleHelix angle of the worm gear.
pressure_angleAnglePressure angle of the worm gear.
reference_diameterLengthReference diameter of the gear.
self_lockingboolWhether the
WormGearcannot be moved by the matingWormWheel.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 threads by the mating gear.
tangential_force_is_computableboolWhether is possible to compute the
tangential_forceon the gear threads.time_variablesdictTime variables of the gear.
Methods¶
compute_tangential_force()It computes the
tangential_forceapplied on the gear threads 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.
- compute_tangential_force() None
It computes the
tangential_forceapplied on the gear threads 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_torque()is not callable.KeyErrorIf
external_torque()misses parametersangular_position,angular_speedortime.
Examples
Constant torque, not dependent on
angular_position,angular_speedortime.>>> from gearpy.mechanical_objects import WormGear >>> from gearpy.units import InertiaMoment, Torque, Angle >>> gear = WormGear(name = 'gear', n_starts = 1, inertia_moment = InertiaMoment(1, 'kgm^2'), >>> pressure_angle = Angle(20, 'deg'), helix_angle = Angle(10, 'deg')) >>> 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): ... 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): ... 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 helix_angle: Angle
Helix angle of the worm gear. 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 gear.
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 gear instantiation, it cannot be changed afterward.
Returns¶
InertiaMomentMoment of inertia of the gear.
Raises
TypeErrorIf
inertia_momentis not an instance ofInertiaMoment.
- 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 worm gear is fixed to another driving
RotatingObject, then the ratio is1, otherwise it is defined as the ratio between the worm gear number of startsn_startsand the driving wheel gear number of teethWormWheel.n_teeth.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 n_starts: int
Number of starts, which refers to the number of independent threads running around the length of the thread. It must be a positive
intequal to or greater than1.Once set at the worm gear instantiation, it cannot be changed afterward.
Returns¶
intNumber of starts, which refers to the number of independent threads running around the length of the thread.
- property name: str
Name of the worm gear. 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 gear instantiation, it cannot be changed afterward.
Returns¶
strName of the worm gear.
- property pressure_angle: Angle
Pressure angle of the worm gear. 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 gear instantiation, it cannot be changed afterward.
Returns¶
AngleThe pressure angle of the worm gear.
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.Once set at the worm gear instantiation, it cannot be changed afterward.
Returns¶
LengthReference diameter of the gear.
Raises
TypeErrorIf
reference_diameteris not an instance ofLength.
- property self_locking: bool
Whether the
WormGearcannot be moved by the matingWormWheel.The gear mating can be self-locking if the amount of friction is high enough with respect to the gear pressure and helix angles.
If the mating is self-locking, then the
WormGearcannot be moved by the matingWormWheel.To set this property use
add_worm_gear_mating.Returns¶
- property tangential_force: Force
Tangential force applied on the gear threads by the mating gear. It must be an instance of
Force.Returns¶
ForceTangential force applied on the gear threads 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 threads.The tangential force computation depends on the value of
reference_diameter, so if this optional parameter has been set at worm gear 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 threads.
See Also
- property time_variables: dict[str, list[UnitBase]]
Time variables of the gear. 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'
'tangential force'is listed among time variables only if they are computable indeed, depending on which gear parameters are set at gear instantiation; seetangential_force_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 gear.
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).
- 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): ... 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): ... 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).