def get_anal_pressure_tensor_fene(self, pos_1, pos_2, k, d_r_max, r_0): tensor = np.zeros([3, 3]) vec_r = pos_1 - pos_2 f = -tests_common.fene_force2(vec_r, k, d_r_max, r_0) tensor += np.einsum('i,j', f, vec_r) / system.volume() return tensor
def get_anal_stress_fene(self, pos_1, pos_2, k, d_r_max, r_0): stress = np.zeros([3, 3]) vec_r = pos_1 - pos_2 f = -fene_force2(vec_r, k, d_r_max, r_0) stress += np.einsum('i,j', f, vec_r) / np.prod(system.box_l) return stress
def get_anal_pressure_tensor_fene(self, pos_1, pos_2, k, d_r_max, r_0): tensor = np.zeros([3, 3]) vec_r = pos_1 - pos_2 f = -fene_force2(vec_r, k, d_r_max, r_0) tensor += np.einsum('i,j', f, vec_r) / np.prod(np.copy(system.box_l)) return tensor