コード例 #1
0
ファイル: export.py プロジェクト: e-dub/python-gearbox
 def __aw(self):
     inv = involute(self.pinion.data['alpha_t']) + 2 * (self.pinion.data['x'] + self.wheel.data['x']) / (
         self.pinion.data['z'] + self.wheel.data['z']) * tan(
         radians(self.pinion.data['alpha_n']))
     alpha_wt = arcinvolute(inv)
     a = ((self.pinion.data['z'] + self.wheel.data['z']) * self.pinion.data['m_n']) / (
         2 * cos(radians(self.pinion.data['beta'])))
     aw = a * cos(radians(self.pinion.data['alpha_n'])) / cos(radians(alpha_wt))
     return aw
コード例 #2
0
 def __aw(self):
     inv = involute(self.pinion.data['alpha_t']) + 2 * (
         self.pinion.data['x'] + self.wheel.data['x']) / (
             self.pinion.data['z'] + self.wheel.data['z']) * tan(
                 radians(self.pinion.data['alpha_n']))
     alpha_wt = arcinvolute(inv)
     a = ((self.pinion.data['z'] + self.wheel.data['z']) *
          self.pinion.data['m_n']) / (
              2 * cos(radians(self.pinion.data['beta'])))
     aw = a * cos(radians(self.pinion.data['alpha_n'])) / cos(
         radians(alpha_wt))
     return aw
コード例 #3
0
    def __calculate(self, gear_one, gear_two, rpm_in, rpm_out):
        if gear_one.m is not gear_two.m:
            raise Exception("the modulus of the two gears most be equal")
        else:
            self.m = gear_one.m

        if gear_one.alpha is not gear_two.alpha:
            raise Exception("the pressure angle of the two gears most be equal")
        else:
            self.alpha = gear_one.alpha
            self.alpha_t = gear_one.alpha_t

        self.u_real = gear_two.z / gear_one.z
        self.u = rpm_in / rpm_out
        self.u_error = abs(1 - (self.u_real / self.u)) * 100
        inv = involute(gear_one.alpha_t) + 2 * (gear_one.x + gear_two.x) / (gear_one.z + gear_two.z) * tan(
            radians(gear_one.alpha))
        self.alpha_wt = arcinvolute(inv)
        self.a = ((gear_one.z + gear_two.z) * gear_one.m) / (2 * cos(radians(gear_one.beta)))
        self.aw = self.a * cos(radians(gear_one.alpha)) / cos(radians(self.alpha_wt))
        self.epsilon_alpha = (0.5 * (
        sqrt(gear_one.da ** 2 - gear_one.db ** 2) + sqrt(gear_two.da ** 2 - gear_two.db ** 2)) - self.a * sin(
            radians(self.alpha_wt))) / (
                             pi * gear_one.m * cos(radians(gear_one.alpha_t)) / (cos(radians(gear_one.beta))))
        self.epsilon_beta = gear_one.b * sin(radians(gear_one.beta)) / (gear_one.m * pi)
        self.epsilon_gama = self.epsilon_alpha + self.epsilon_beta
        self.v = rpm_in * gear_one.d * pi / 60000
        self.ft = 1000. * self.p * 60000 / (pi * gear_one.d * rpm_in)
        if self.ka * self.ft / gear_one.b < 100:
            self.fmt = 100
        else:
            self.fmt = self.ka * self.ft / gear_one.b

        # self.xsum = ((gear_one.z + gear_two.z) * (involute(radians(self.alpha_wt))-involute(radians(self.alpha_t))))/(2*tan(radians(self.alpha)))
        self.xsum = gear_one.x + gear_two.x
        self.gear_one = gear_one
        self.gear_two = gear_two
コード例 #4
0
ファイル: gears.py プロジェクト: e-dub/python-gearbox
    def __calculate(self, gear_one, gear_two, rpm_in, rpm_out):
        if gear_one.m is not gear_two.m:
            raise Exception("the modulus of the two gears most be equals")
        else:
            self.m = gear_one.m

        if gear_one.alpha is not gear_two.alpha:
            raise Exception("the pressure angle of the two gears most be equals")
        else:
            self.alpha = gear_one.alpha
            self.alpha_t = gear_one.alpha_t

        self.u_real = gear_two.z / gear_one.z
        self.u = rpm_in / rpm_out
        self.u_error = abs(1 - (self.u_real / self.u)) * 100
        inv = involute(gear_one.alpha_t) + 2 * (gear_one.x + gear_two.x) / (gear_one.z + gear_two.z) * tan(
            radians(gear_one.alpha))
        self.alpha_wt = arcinvolute(inv)
        self.a = ((gear_one.z + gear_two.z) * gear_one.m) / (2 * cos(radians(gear_one.beta)))
        self.aw = self.a * cos(radians(gear_one.alpha)) / cos(radians(self.alpha_wt))
        self.epsilon_alpha = (0.5 * (
        sqrt(gear_one.da ** 2 - gear_one.db ** 2) + sqrt(gear_two.da ** 2 - gear_two.db ** 2)) - self.a * sin(
            radians(self.alpha_wt))) / (
                             pi * gear_one.m * cos(radians(gear_one.alpha_t)) / (cos(radians(gear_one.beta))))
        self.epsilon_beta = gear_one.b * sin(radians(gear_one.beta)) / (gear_one.m * pi)
        self.epsilon_gama = self.epsilon_alpha + self.epsilon_beta
        self.v = rpm_in * gear_one.d * pi / 60000
        self.ft = 1000. * self.n * 60000 / (pi * gear_one.d * rpm_in)
        if self.ka * self.ft / gear_one.b < 100:
            self.fmt = 100
        else:
            self.fmt = self.ka * self.ft / gear_one.b

        # self.xsum = ((gear_one.z + gear_two.z) * (involute(radians(self.alpha_wt))-involute(radians(self.alpha_t))))/(2*tan(radians(self.alpha)))
        self.xsum = gear_one.x + gear_two.x
        self.gear_one = gear_one
        self.gear_two = gear_two
コード例 #5
0
ファイル: agma.py プロジェクト: e-dub/python-gearbox
    def _j(n1, mg, ro1, r1, r2, rb1, c4, x, delta_sn, nc, hao, xo, rho_ao, delta_ao):
        # J FACTOR #
        if psi != 0:
            n = n1 / cos(psi) ** 3.0
            rn = n / 2
            rnb = rn * cos(fi_n)
            if mf <= 1:
                rn2 = rn * mg
                rnb2 = rnb * mg
                rna2 = rn2 + ro2 - r2
                cn6 = (rnb2 + rnb) * tan(fi_nr)
                cn1 = cn6 - sqrt(rna2 ** 2 - rnb2 ** 2)
                cn4 = cn1 + pn
                tan_fi_nw = cn4 / rnb
            else:
                rna = rn + ro1 - r1
                tan_fi_nw = sqrt(((rna / rnb) ** 2.0) - 1.0)
        else:
            n = n1
            rn = r1
            rnb = rb1
            tan_fi_nw = c4 / rnb

        xg = x - delta_sn / (2 * tan(fi_n))
        sn = pi / 2 + 2 * xg * tan(fi_n)
        inv_fi_n = tan(fi_n) - fi_n
        fi_nl = tan_fi_nw - tan(fi_n) + fi_n - sn / n
        rnl = rnb / cos(fi_nl)
        no = nc / cos(psi) ** 3.0
        rno = no / 2
        rnbo = rno * cos(fi_n)
        r_s_no = rno + hao + xo - rho_ao
        fi_ns = acos(rnbo / r_s_no)
        inv_fi_ns = tan(fi_ns) - fi_ns
        sno = pi / 2 + 2 * xo * tan(fi_n)
        inv_fi_npo = tan(fi_n) - fi_n + sno / no
        lambda_ns_2 = inv_fi_npo - inv_fi_ns + ((delta_ao - rho_ao) / rnbo)
        inv_fi_n_2 = inv_fi_n + ((2 * (xg + xo) * tan(fi_n)) / (n + no))
        fi_n_2 = radians(arcinvolute(inv_fi_n_2))

        rn_2 = rn * cos(fi_n) / cos(fi_n_2)
        rno_2 = rno * cos(fi_n) / cos(fi_n_2)
        alpha_n = pi / 4
        hf = 0.0
        xi_nf = 0.0
        while 1:
            mi_no = acos(rno_2 * cos(alpha_n) / r_s_no) - alpha_n
            ks = rno_2 * sin(alpha_n) - r_s_no * sin(alpha_n + mi_no)
            kf = ks - rho_ao
            sigma_n = no / n * (mi_no - lambda_ns_2 + pi / no)
            beta_n = alpha_n - sigma_n
            xi_nf = rn_2 * sin(sigma_n) + kf * cos(beta_n)
            eta_nf = rn_2 * cos(sigma_n) + kf * sin(beta_n)
            hf = rnl - eta_nf
            y = 2 * hf * tan(beta_n) - xi_nf
            y_ = (
                (2 * hf / cos(beta_n) ** 2)
                - kf * sin(beta_n)
                + no
                / n
                * ((rno_2 * sin(alpha_n) / (r_s_no * sin(alpha_n + mi_no))) - 1)
                * (2 * xi_nf * tan(beta_n) - eta_nf - 2 * hf / (cos(beta_n) ** 2))
                - rno_2
                * (cos(alpha_n) - sin(alpha_n) / tan(alpha_n + mi_no))
                * ((1 + sin(beta_n) ** 2.0) / cos(beta_n))
            )
            alpha_n1 = alpha_n - y / y_

            if y <= 1e-6:
                break
            else:
                alpha_n = alpha_n1

        rho_f = rho_ao + ((rno_2 - r_s_no) ** 2) / ((rn_2 * rno_2 / (rn_2 + rno_2)) - (rno_2 - r_s_no))
        omega = degrees(atan(tan(psi) * sin(fi_n)))
        sf = 2.0 * xi_nf
        h = 0.331 - 0.436 * fi_n
        l = 0.324 - 0.492 * fi_n
        m = 0.261 - 0.545 * fi_n
        kf = h + ((sf / rho_f) ** l) * ((sf / hf) ** m)

        if mf > 1:
            ch = 1.0 / (1.0 - sqrt((omega / 100.0) * (1.0 - omega / 100.0)))
            k_psi = cos(psi_r) * cos(psi)
        else:
            ch = 1.0
            k_psi = 1.0

        y = k_psi / ((cos(fi_nl) / cos(fi_nr)) * ((6.0 * hf / ((sf ** 2.0) * ch)) - tan(fi_nl) / sf))

        return y * c_psi / (kf * mn)
コード例 #6
0
    def _j(n1, mg, ro1, r1, r2, rb1, c4, x, delta_sn, nc, hao, xo, rho_ao,
           delta_ao):
        # J FACTOR #
        if psi != 0:
            n = n1 / cos(psi)**3.
            rn = n / 2
            rnb = rn * cos(fi_n)
            if mf <= 1:
                rn2 = rn * mg
                rnb2 = rnb * mg
                rna2 = rn2 + ro2 - r2
                cn6 = (rnb2 + rnb) * tan(fi_nr)
                cn1 = cn6 - sqrt(rna2**2 - rnb2**2)
                cn4 = cn1 + pn
                tan_fi_nw = cn4 / rnb
            else:
                rna = rn + ro1 - r1
                tan_fi_nw = sqrt(((rna / rnb)**2.) - 1.)
        else:
            n = n1
            rn = r1
            rnb = rb1
            tan_fi_nw = c4 / rnb

        xg = x - delta_sn / (2 * tan(fi_n))
        sn = pi / 2 + 2 * xg * tan(fi_n)
        inv_fi_n = tan(fi_n) - fi_n
        fi_nl = tan_fi_nw - tan(fi_n) + fi_n - sn / n
        rnl = rnb / cos(fi_nl)
        no = nc / cos(psi)**3.
        rno = no / 2
        rnbo = rno * cos(fi_n)
        r_s_no = rno + hao + xo - rho_ao
        fi_ns = acos(rnbo / r_s_no)
        inv_fi_ns = tan(fi_ns) - fi_ns
        sno = pi / 2 + 2 * xo * tan(fi_n)
        inv_fi_npo = tan(fi_n) - fi_n + sno / no
        lambda_ns_2 = inv_fi_npo - inv_fi_ns + ((delta_ao - rho_ao) / rnbo)
        inv_fi_n_2 = inv_fi_n + ((2 * (xg + xo) * tan(fi_n)) / (n + no))
        fi_n_2 = radians(arcinvolute(inv_fi_n_2))

        rn_2 = rn * cos(fi_n) / cos(fi_n_2)
        rno_2 = rno * cos(fi_n) / cos(fi_n_2)
        alpha_n = pi / 4
        hf = 0.
        xi_nf = 0.
        while 1:
            mi_no = acos(rno_2 * cos(alpha_n) / r_s_no) - alpha_n
            ks = rno_2 * sin(alpha_n) - r_s_no * sin(alpha_n + mi_no)
            kf = ks - rho_ao
            sigma_n = no / n * (mi_no - lambda_ns_2 + pi / no)
            beta_n = alpha_n - sigma_n
            xi_nf = rn_2 * sin(sigma_n) + kf * cos(beta_n)
            eta_nf = rn_2 * cos(sigma_n) + kf * sin(beta_n)
            hf = rnl - eta_nf
            y = 2 * hf * tan(beta_n) - xi_nf
            y_ = (2 * hf / cos(beta_n)**2) - kf * sin(beta_n) + no / n * (
                (rno_2 * sin(alpha_n) / (r_s_no * sin(alpha_n + mi_no))) - 1
            ) * (2 * xi_nf * tan(beta_n) - eta_nf - 2 * hf /
                 (cos(beta_n)**2)) - rno_2 * (
                     cos(alpha_n) - sin(alpha_n) / tan(alpha_n + mi_no)) * (
                         (1 + sin(beta_n)**2.) / cos(beta_n))
            alpha_n1 = alpha_n - y / y_

            if y <= 1e-6:
                break
            else:
                alpha_n = alpha_n1

        rho_f = rho_ao + ((rno_2 - r_s_no)**2) / ((rn_2 * rno_2 /
                                                   (rn_2 + rno_2)) -
                                                  (rno_2 - r_s_no))
        omega = degrees(atan(tan(psi) * sin(fi_n)))
        sf = 2. * xi_nf
        h = 0.331 - 0.436 * fi_n
        l = 0.324 - 0.492 * fi_n
        m = 0.261 - 0.545 * fi_n
        kf = h + ((sf / rho_f)**l) * ((sf / hf)**m)

        if mf > 1:
            ch = 1. / (1. - sqrt((omega / 100.) * (1. - omega / 100.)))
            k_psi = cos(psi_r) * cos(psi)
        else:
            ch = 1.
            k_psi = 1.

        y = k_psi / ((cos(fi_nl) / cos(fi_nr)) *
                     ((6. * hf / ((sf**2.) * ch)) - tan(fi_nl) / sf))

        return y * c_psi / (kf * mn)