added function to compute ax distance of shifted gears

This commit is contained in:
looooo
2017-09-18 13:08:59 +02:00
parent 255c77c1b2
commit 534c3aaad8

23
gearfunc/computation.py Normal file
View File

@@ -0,0 +1,23 @@
import numpy as np
from scipy import optimize as opt
def computeShiftedGears(m, alpha, t1, t2, x1, x2):
"""Summary
Args:
m (float): common module of both gears [length]
alpha (float): pressure-angle [rad]
t1 (int): number of teeth of gear1
t2 (int): number of teeth of gear2
x1 (float): relative profile-shift of gear1
x2 (float): relative profile-shift of gear2
Returns:
(float, float): distance between gears [length], pressure angle of the assembly [rad]
"""
inv = lambda x: np.tan(x) - x
inv_alpha_w = inv(alpha) + 2 * np.tan(alpha) * (x1 + x2) / (t1 + t2)
root_inv = lambda x: inv(x) - inv_alpha_w
alpha_w = opt.fsolve(root_inv, 0.)
dist = m * (t1+ t2) / 2 * np.cos(alpha) / np.cos(alpha_w)
return dist, alpha_w