Gear
fpc.gear
gear.py - gear, gear-pair, and powertrain calculations.
Gears trade speed for torque (and back). These helpers cover the geometry of a single gear, the ratio of a meshing pair, how speed and torque transform across a ratio, and how to combine stages into an overall powertrain ratio.
Gear
Gear and powertrain calculations.
Source code in fpc/gear.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
pitch_diameter(*, teeth, module)
Pitch diameter of a spur gear (metric): d = module * teeth.
The module (mm of pitch diameter per tooth) is the metric measure
of tooth size; meshing gears must share the same module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
teeth
|
number of teeth N [-] |
required | |
module
|
gear module m [mm] |
required |
Returns:
| Type | Description |
|---|---|
|
pitch diameter [mm] |
Source code in fpc/gear.py
15 16 17 18 19 20 21 22 23 24 25 | |
gear_ratio(*, driver_teeth, driven_teeth)
Gear ratio of a meshing pair: ratio = driven / driver.
A ratio > 1 reduces speed and multiplies torque (a reduction).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
driver_teeth
|
teeth on the input (driving) gear [-] |
required | |
driven_teeth
|
teeth on the output (driven) gear [-] |
required |
Returns:
| Type | Description |
|---|---|
|
gear ratio [-] |
Source code in fpc/gear.py
27 28 29 30 31 32 33 34 35 36 | |
output_speed(*, input_speed, gear_ratio)
Output shaft speed after a ratio: n_out = n_in / ratio.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_speed
|
input speed (rpm or rad/s) [-] |
required | |
gear_ratio
|
gear ratio [-] |
required |
Returns:
| Type | Description |
|---|---|
|
output speed in the same units as input_speed |
Source code in fpc/gear.py
38 39 40 41 42 43 44 45 | |
output_torque(*, input_torque, gear_ratio, efficiency=1.0)
Output torque after a ratio: T_out = T_in * ratio * efficiency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_torque
|
input torque [N*m] |
required | |
gear_ratio
|
gear ratio [-] |
required | |
efficiency
|
mechanical efficiency 0..1, defaults to ideal (1.0) |
1.0
|
Returns:
| Type | Description |
|---|---|
|
output torque [N*m] |
Source code in fpc/gear.py
47 48 49 50 51 52 53 54 55 | |
powertrain_ratio(*, stage_ratios)
Overall ratio of gear stages in series (the product of each ratio).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stage_ratios
|
iterable of individual stage ratios [-] |
required |
Returns:
| Type | Description |
|---|---|
|
total powertrain ratio [-] |
Source code in fpc/gear.py
57 58 59 60 61 62 63 64 65 66 67 68 | |
center_distance(*, module, driver_teeth, driven_teeth)
Center distance between two meshing spur gears.
C = module * (N1 + N2) / 2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module
|
shared gear module m [mm] |
required | |
driver_teeth
|
teeth on gear 1 [-] |
required | |
driven_teeth
|
teeth on gear 2 [-] |
required |
Returns:
| Type | Description |
|---|---|
|
center-to-center distance [mm] |
Source code in fpc/gear.py
70 71 72 73 74 75 76 77 78 79 80 | |