def solve_highest_pressure(self, ui, res_dir, uniq_norm_force): """Solve for pressure distribution for highest normal force""" init_displ = self.get_grid_size(ui, res_dir, uniq_norm_force) [self.influ_mat_db_1, self.influ_mat_db_2] = load_influ_mat(ui, res_dir, 2) self.ring1.loc_press, self.influ_mat_db_1 = \ solve_half_space(self.roller.profile, self.ring1.profile, self.roller.x_axis, self.roller.y_axis, self.roller.res_x, self.roller.res_y, self.roller.delta_x, self.roller.delta_y, self.roller.e, self.ring1.e, self.roller.ny, self.ring1.ny, uniq_norm_force, res_dir, print_prog=False, influ_mat_db=self.influ_mat_db_1, init_displ=init_displ) self.ring2.loc_press, self.influ_mat_db_2 = \ solve_half_space(self.roller.profile, self.ring2.profile, self.roller.x_axis, self.roller.y_axis, self.roller.res_x, self.roller.res_y, self.roller.delta_x, self.roller.delta_y, self.roller.e, self.ring2.e, self.roller.ny, self.ring2.ny, uniq_norm_force, res_dir, print_prog=False, influ_mat_db=self.influ_mat_db_2, init_displ=init_displ)
def calc_contact_pressure(self, ui=None, res_dir=None): """Calculate contact pressure distribution between pin and disk""" print_it('calculating 1 pressure distribution') init_displ = self.get_grid_size(ui, res_dir) [self.influ_mat_db_1] = load_influ_mat(ui, res_dir, 1) print_it('solving first half space', PrintOpts.lvl1.value) self.pin.press, self.influ_mat_db_1 = \ solve_half_space(self.pin.profile, self.disk.profile, self.pin.x_axis, self.pin.y_axis, self.pin.res_x, self.pin.res_y, self.pin.delta_x, self.pin.delta_y, self.pin.e, self.disk.e, self.pin.ny, self.disk.ny, self.norm_forces[0], res_dir, init_displ=init_displ, influ_mat_db=self.influ_mat_db_1) cache_influ_mat(ui, [self.influ_mat_db_1], res_dir) self.pin.max_press = np.amax(self.pin.press, axis=1) self.save_pressure_to_matlab(res_dir)
def calc_contact_pressure(self, ui=None, res_dir=None): """Calculate contact pressure distribution between washer(s) and roller""" print_it('calculating 1 pressure distribution') init_displ = self.get_grid_size(ui, res_dir) [self.influ_mat_db_1] = load_influ_mat(ui, res_dir, 1) print_it('solving first half space', PrintOpts.lvl1.value) self.roller.press, self.influ_mat_db_1 = \ solve_half_space(self.roller.profile, self.ring1.profile, self.roller.x_axis, self.roller.y_axis, self.roller.res_x, self.roller.res_y, self.roller.delta_x, self.roller.delta_y, self.roller.e, self.ring1.e, self.roller.ny, self.ring1.ny, self.roller.norm_forces[0], res_dir, init_displ=init_displ, influ_mat_db=self.influ_mat_db_1) self.roller.max_press = np.amax(self.roller.press, axis=1) self.ring1.press = copy.copy(self.roller.press) self.ring1.max_press = copy.copy(self.roller.max_press) cache_influ_mat(ui, [self.influ_mat_db_1], res_dir)