def _unloaded(self, bearing, bypass, w=0.): """Lekhnitskii's unloaded hole solution Parameters ---------- bearing : array_like 1D 1x2 array [Px, Py] bypass : array_like 1D 1x3 array [Nx, Ny, Nxy] w : float, default 0. pitch or width in bearing load direction (set to 0. for infinite plate) Returns ------- bjsfm.lekhnitskii.UnloadedHole """ d = self.r*2 t = self.t a_inv = self.a_inv bearing = np.array(bearing, dtype=float) bypass = np.array(bypass, dtype=float) p, theta = self.bearing_angle(bearing) if w: # DeJong correction for finite width brg_dir_bypass = lk.rotate_plane_stress(bypass, angle=theta) sign = np.sign(brg_dir_bypass[0]) if abs(brg_dir_bypass[0]) > 0 else 1. bypass += lk.rotate_plane_stress(np.array([p/(2*w)*sign, 0., 0.]), angle=-theta) return lk.UnloadedHole(bypass, d, t, a_inv)
def test_strain_rotation(self): bearing = [0, 0] bypass = [100, 0, 0] angles = map(np.deg2rad, [0, 45, 90, -45, 60, -60]) for angle in angles: rotated_stresses = rotate_plane_stress(self.analysis.stresses( bearing, bypass), angle=angle) assert_array_almost_equal( (self.analysis.a_inv @ (rotated_stresses * self.analysis.t).T).T, rotate_strains(self.analysis.strains(bearing, bypass), angle=angle), )
def test_strain_rotation(self): bearing = [0, 0] bypass = [100, 0, 0] angles = [np.deg2rad(45.), np.deg2rad(-45.)] for angle in angles: rotated_stresses = rotate_plane_stress(self.analysis.stresses( bearing, bypass), angle=angle) assert_array_almost_equal( (self.analysis.a_inv @ (rotated_stresses * self.analysis.t).T).T, self.analysis._rotate_strains(self.analysis.strains( bearing, bypass), angle=angle), )
def test_width_45_angle(self): w = 6 * DIAMETER bearing = [100, 100] bypass = [0, 0, 0] p, theta = self.analysis.bearing_angle(bearing) bypass_correction = rotate_plane_stress(np.array([p / (2 * w), 0, 0]), angle=-theta) brg = LoadedHole(p, DIAMETER, QUASI_THICK, QUASI_INV, theta=theta) byp = UnloadedHole(bypass_correction, DIAMETER, QUASI_THICK, QUASI_INV) x, y = self.analysis.xy_points(rc=0., num=100) byp_stress = byp.stress(x, y) brg_stress = brg.stress(x, y) total_stress = byp_stress + brg_stress analysis_stress = self.analysis.stresses(bearing, bypass, rc=0., num=100, w=w) assert_array_almost_equal(total_stress, analysis_stress)
def test_max_strain(self): rc = 0.15 num = 4 bearing = [0, 0] bypass = [100., 0., 0.] margins = self.analysis.analyze(bearing, bypass, rc=rc, num=num) e0, e90, es0 = self.analysis.strains(bearing, bypass, rc=rc, num=num)[1] s0, s90, ss0 = self.analysis.stresses(bearing, bypass, rc=rc, num=num)[1] calc_strains = QUASI_INV @ np.array([s0, s90, ss0]) * QUASI_THICK self.assertAlmostEqual(e0, calc_strains[0]) self.assertAlmostEqual(e90, calc_strains[1]) self.assertAlmostEqual(es0, calc_strains[2]) s45, sn45, ss45 = rotate_plane_stress(np.array([s0, s90, ss0]), angle=np.deg2rad(45.)) e45, en45, es45 = QUASI_INV @ np.array([s45, sn45, ss45]) * QUASI_THICK self.assertAlmostEqual(margins[1, 0], QUASI_UNT / e0 - 1) self.assertAlmostEqual(margins[1, 1], -QUASI_UNC / e90 - 1) self.assertAlmostEqual(margins[1, 2], QUASI_SBS / abs(es0) - 1) self.assertAlmostEqual(margins[1, 3], QUASI_UNT / e45 - 1) self.assertAlmostEqual(margins[1, 4], QUASI_UNT / en45 - 1) self.assertAlmostEqual(margins[1, 5], QUASI_SBS / abs(es45) - 1)