def gf(r, torq, alpha = ddeg(20), beta = ddeg(24)): '''Get Gear Forces''' Ft = float(torq) / r * 1000 Fn = Ft * tan(alpha) / cos(beta) Fa = Ft * tan(beta) return advlist([Fa, Fn, Ft, torq])
def check_sh(gearlist, torqlist, poslist, A_1): # e, [x1, y1, x2, y2], C, ep dec_zc_7216ac = dec_zc(0.68, [0.41, 0.87, 1.0, 0], 63000, 3) dec_zc_30628 = dec_zc(1.5*tan(ddeg(25)), [0.4, 0.4*cot(ddeg(25)), 1, 0], 85000, 3.3) pos1c, pos1, pos2, pos2c = poslist # 0, 30, [shift], 400 tq1, tq2, tq3 = torqlist g1, g2, g3, g4 = gearlist fx1, fy1, fz1, fm1 = gf(g1.radi, tq1) * [ 1, 1, 1, 1] fxd1, fyd1, fzd1, fmd1 = gf(g1.radi, tq1) * [-1,-1,-1,-1] fxd2, fyd2, fzd2, fmd2 = gf(g3.radi, tq2) * [-1,-1, 1, 1] fx2, fy2, fz2, fm2 = gf(g3.radi, tq2) * [ 1, 1,-1,-1] fm2 = -tq3 # -------------------------- ax1 = board() ax1.set_f_in('y', f_in(pos1, fy1)) ax1.set_f_in('y', f_in(pos2, fy2)) ax1.set_f_in('z', f_in(pos1, fz1)) ax1.set_f_in('z', f_in(pos2, fz2)) ch1L = f_out_zc(pos1c) ch1R = f_out_zc(pos2c) ax1.set_f_out('yz', ch1L) ax1.set_f_out('yz', ch1R) ax1.set_f_in('x', f_in(pos1, fx1)) ax1.set_f_in('x', f_in(pos2, fx2)) ax1.set_f_out('x', f_out(pos2c)) ax1.set_f_in('m', f_in(0, -fm1)) ax1.set_f_in('m', f_in(pos1, fm1)) ax1.set_f_in('m', f_in(pos2, fm2)) ax1.set_f_out('m', f_out(pos2c)) ax1.set_fpos([g1.radi, g4.radi]) # y轴方向的位置 # -------------------------- axm = board() axm.set_f_in('y', f_in(pos1, fyd1)) axm.set_f_in('y', f_in(pos2, fyd2)) axm.set_f_in('z', f_in(pos1, fzd1)) axm.set_f_in('z', f_in(pos2, fzd2)) ch2L = f_out_zc(pos1c) ch2R = f_out_zc(pos2c) axm.set_f_out('yz', ch2L) axm.set_f_out('yz', ch2R) axm.set_f_in('x', f_in(pos1, fxd1)) axm.set_f_in('x', f_in(pos2, fxd2)) axm.set_f_out('x', f_out(pos2c)) axm.set_f_in('m', f_in(pos1, fmd1)) axm.set_f_in('m', f_in(pos2, fmd2)) axm.set_fpos([-g2.radi, -g3.radi]) ax1.cal_out() axm.cal_out() ffa1 = -ax1.getdd('x_out')[0].f['x'] ffam = -axm.getdd('x_out')[0].f['x'] # ax1.get是轴承施加的力, 取负值变为轴施加的力 #proc_zc(ch2L, ch2R, ffa1) print '__7216AC' proc_zc(ch1L, ch1R, ffa1, dec_zc_7216ac) print '__30628' proc_zc(ch2L, ch2R, ffam, dec_zc_30628)