def test_get_slip_system(self): ss = SlipSystem.get_slip_systems('111') self.assertEqual(len(ss), 12) for s in ss: n = s.get_slip_plane().normal() l = s.get_slip_direction().direction() self.assertEqual(np.dot(n, l), 0.) ss = SlipSystem.get_slip_systems('112') self.assertEqual(len(ss), 12) for s in ss: n = s.get_slip_plane().normal() l = s.get_slip_direction().direction() self.assertEqual(np.dot(n, l), 0.)
def __init__(self, microstructure): self.micro = microstructure # Microstructure instance self.slip_systems = SlipSystem.get_slip_systems('111') self.nact = 5 # number of active slip systems in one grain to accomodate the plastic strain self.dt = 1.e-3 self.max_time = 0.001 # sec self.time = 0.0 self.L = np.array([[-0.5, 0.0, 0.0], [0.0, -0.5, 0.0], [0.0, 0.0, 1.0]]) # velocity gradient
def test_MaxSchimdFactor(self): o = Orientation.from_euler([0., 0., 0.]) oct_ss = SlipSystem.get_slip_systems(plane_type='111') self.assertAlmostEqual( max(o.compute_all_schmid_factors(oct_ss, verbose=True)), 0.4082, 4)
def test_SchimdFactor(self): o = Orientation.from_euler([0., 0., 0.]) ss = SlipSystem(HklPlane(1, 1, 1), HklDirection(0, 1, -1)) self.assertAlmostEqual(o.schmid_factor(ss), 0.4082, 4)