Exemple #1
0
    def setUp(self):
        self.L = crystallography.CubicLattice(1.0)
        self.L.add_slip_system([1, 1, 0], [1, 1, 1])

        self.Q = rotations.Orientation(35.0, 17.0, 14.0, angle_type="degrees")
        self.S = tensors.Symmetric(
            np.array([[100.0, -25.0, 10.0], [-25.0, -17.0, 15.0],
                      [10.0, 15.0, 35.0]]))
        self.strength_0 = 35.0
        self.strength_1 = -5.0
        self.H = history.History()
        self.H.add_scalar("strength0")
        self.H.set_scalar("strength0", self.strength_0)
        self.H.add_scalar("strength1")
        self.H.set_scalar("strength1", self.strength_1)

        self.T = 300.0

        self.tau0_1 = 10.0
        self.tau_sat_1 = 50.0
        self.b_1 = 2.5

        self.tau0_2 = 5.0
        self.tau_sat_2 = -25.0
        self.b_2 = 1.5

        self.static = self.tau0_1 + self.tau0_2
        self.strength = self.strength_0 + self.strength_1

        self.model1 = slipharden.VoceSlipHardening(self.tau_sat_1, self.b_1,
                                                   self.tau0_1)
        self.model2 = slipharden.VoceSlipHardening(self.tau_sat_2, self.b_2,
                                                   self.tau0_2)

        self.model = slipharden.SumSlipSingleStrengthHardening(
            [self.model1, self.model2])

        self.g0 = 1.0
        self.n = 3.0
        self.sliprule = sliprules.PowerLawSlipRule(self.model, self.g0, self.n)

        self.fixed = history.History()

        self.nye = tensors.RankTwo([[1.1, 1.2, 1.3], [2.1, 2.2, 2.3],
                                    [3.1, 3.2, 3.3]])

        self.nye_part = 0.0
Exemple #2
0
    def setUp(self):
        self.strength_0 = 35.0
        self.H = history.History()
        self.H.add_scalar("strength0")
        self.H.set_scalar("strength0", self.strength_0)

        self.strength_1 = 25.0
        self.H.add_scalar("strength1")
        self.H.set_scalar("strength1", self.strength_1)

        self.tau0_0 = 10.0
        self.tau_sat_0 = 50.0
        self.b_0 = 2.5

        self.tau0_1 = 5.0
        self.tau_sat_1 = 25.0
        self.b_1 = 1.0

        self.strengthmodel = slipharden.SumSlipSingleStrengthHardening([
            slipharden.VoceSlipHardening(self.tau_sat_0, self.b_0,
                                         self.tau0_0),
            slipharden.VoceSlipHardening(self.tau_sat_1, self.b_1, self.tau0_1)
        ])

        self.g0 = 1.0
        self.n = 3.0
        self.slipmodel = sliprules.PowerLawSlipRule(self.strengthmodel,
                                                    self.g0, self.n)

        self.model = inelasticity.AsaroInelasticity(self.slipmodel)

        self.L = crystallography.CubicLattice(1.0)
        self.L.add_slip_system([1, 1, 0], [1, 1, 1])

        self.Q = rotations.Orientation(35.0, 17.0, 14.0, angle_type="degrees")
        self.S = tensors.Symmetric(
            np.array([[100.0, -25.0, 10.0], [-25.0, -17.0, 15.0],
                      [10.0, 15.0, 35.0]]))

        self.T = 300.0

        self.fixed = history.History()
Exemple #3
0
    def setUp(self):
        self.L = crystallography.CubicLattice(1.0)
        self.L.add_slip_system([1, 1, 0], [1, 1, 1])

        self.Q = rotations.Orientation(35.0, 17.0, 14.0, angle_type="degrees")
        self.S = tensors.Symmetric(
            np.array([[100.0, -25.0, 10.0], [-25.0, -17.0, 15.0],
                      [10.0, 15.0, 35.0]]))
        self.strength_1 = 35.0
        self.strength_2 = 25.0
        self.strength = self.strength_1 + self.strength_2
        self.H = history.History()
        self.H.add_scalar("strength0")
        self.H.set_scalar("strength0", self.strength_1)
        self.H.add_scalar("strength1")
        self.H.set_scalar("strength1", self.strength_2)

        self.T = 300.0

        self.tau0 = 10.0
        self.tau_sat = 50.0
        self.b = 2.5

        self.strengthmodel = slipharden.SumSlipSingleStrengthHardening([
            slipharden.VoceSlipHardening(self.tau_sat, self.b, self.tau0),
            slipharden.VoceSlipHardening(self.tau_sat / 2, self.b / 2,
                                         self.tau0 / 2)
        ])
        self.static = self.tau0 + self.tau0 / 2

        self.strengths = [self.strengthmodel]
        self.strength_values = [self.strength + self.static]

        self.g0 = 1.0
        self.n = 3.0
        self.model = sliprules.PowerLawSlipRule(self.strengthmodel, self.g0,
                                                self.n)

        self.tau = 33.0

        self.fixed = history.History()
Exemple #4
0
    def setUp(self):
        self.tau0_0 = 10.0
        self.tau_sat_0 = 50.0
        self.b_0 = 2.5

        self.tau0_1 = 15.0
        self.tau_sat_1 = 25.0
        self.b_1 = 1.0

        self.strengthmodel = slipharden.SumSlipSingleStrengthHardening([
            slipharden.VoceSlipHardening(self.tau_sat_0, self.b_0,
                                         self.tau0_0),
            slipharden.VoceSlipHardening(self.tau_sat_1, self.b_1, self.tau0_1)
        ])

        self.g0 = 1.0
        self.n = 3.0
        self.slipmodel = sliprules.PowerLawSlipRule(self.strengthmodel,
                                                    self.g0, self.n)

        self.imodel = inelasticity.AsaroInelasticity(self.slipmodel)

        self.L = crystallography.CubicLattice(1.0)
        self.L.add_slip_system([1, 1, 0], [1, 1, 1])

        self.Q = rotations.Orientation(35.0, 17.0, 14.0, angle_type="degrees")

        self.mu = 29000.0
        self.E = 120000.0
        self.nu = 0.3

        self.emodel = elasticity.CubicLinearElasticModel(
            self.E, self.nu, self.mu, "moduli")

        self.kmodel = kinematics.StandardKinematicModel(
            self.emodel, self.imodel)

        self.model = singlecrystal.SingleCrystalModel(self.kmodel,
                                                      self.L,
                                                      initial_rotation=self.Q)
        self.model_no_rot = singlecrystal.SingleCrystalModel(
            self.kmodel,
            self.L,
            initial_rotation=self.Q,
            update_rotation=False,
            verbose=False)

        self.T = 300.0
        self.stress_n = np.array([120.0, -60.0, 170.0, 35.0, 80.0, -90.0])
        self.stress_np1 = np.array([15.0, -40.0, 120.0, 70.0, -10.0, -50.0])

        self.d = np.array([0.1, -0.2, 0.25, 0.11, -0.05, 0.075])
        self.w = np.array([0.1, 0.2, -0.2])

        self.strength_n = 25.0
        self.strength_np1 = 30.0

        self.S_np1 = tensors.Symmetric(common.usym(self.stress_np1))
        self.S_n = tensors.Symmetric(common.usym(self.stress_n))

        self.D = tensors.Symmetric(common.usym(self.d))
        self.W = tensors.Skew(common.uskew(self.w))

        self.strength_n_0 = 25.0
        self.strength_np1_0 = 30.0
        self.strength_n_1 = 15.0
        self.strength_np1_1 = 17.5

        self.H_n = history.History()
        self.H_n.add_scalar("strength0")
        self.H_n.set_scalar("strength0", self.strength_n_0)
        self.H_n.add_scalar("strength1")
        self.H_n.set_scalar("strength1", self.strength_n_1)

        self.H_np1 = history.History()
        self.H_np1.add_scalar("strength0")
        self.H_np1.set_scalar("strength0", self.strength_np1_0)
        self.H_np1.add_scalar("strength1")
        self.H_np1.set_scalar("strength1", self.strength_np1_1)

        self.dt = 2.0

        self.fixed = self.kmodel.decouple(self.S_n, self.D, self.W, self.Q,
                                          self.H_n, self.L, self.T,
                                          history.History())

        self.ts = singlecrystal.SCTrialState(self.D, self.W, self.S_n,
                                             self.H_n, self.Q, self.L, self.T,
                                             self.dt, self.fixed)

        self.x = np.zeros((self.model.nparams, ))
        self.x[:6] = self.stress_np1
        self.x[6] = self.strength_np1

        self.Ddir = np.array([0.01, -0.005, -0.003, 0.01, 0.02, -0.003]) * 2
        self.Wdir = np.array([0.02, -0.03, 0.01]) * 2

        self.nsteps = 10
    def setUp(self):
        self.strength_0 = 35.0
        self.H = history.History()
        self.H.add_scalar("strength0")
        self.H.set_scalar("strength0", self.strength_0)

        self.strength_1 = 25.0
        self.H.add_scalar("strength1")
        self.H.set_scalar("strength1", self.strength_1)

        self.tau0_0 = 10.0
        self.tau_sat_0 = 50.0
        self.b_0 = 2.5

        self.tau0_1 = 5.0
        self.tau_sat_1 = 25.0
        self.b_1 = 1.0

        self.strengthmodel = slipharden.SumSlipSingleStrengthHardening([
            slipharden.VoceSlipHardening(self.tau_sat_0, self.b_0,
                                         self.tau0_0),
            slipharden.VoceSlipHardening(self.tau_sat_1, self.b_1, self.tau0_1)
        ])

        self.g0 = 1.0
        self.n = 3.0
        self.slipmodel = sliprules.PowerLawSlipRule(self.strengthmodel,
                                                    self.g0, self.n)

        self.imodel = inelasticity.AsaroInelasticity(self.slipmodel)

        self.L = crystallography.CubicLattice(1.0)
        self.L.add_slip_system([1, 1, 0], [1, 1, 1])

        self.Q = rotations.Orientation(35.0, 17.0, 14.0, angle_type="degrees")
        self.S = tensors.Symmetric(
            np.array([[100.0, -25.0, 10.0], [-25.0, -17.0, 15.0],
                      [10.0, 15.0, 35.0]]))

        self.T = 300.0

        self.mu = 29000.0
        self.E = 120000.0
        self.nu = 0.3

        self.emodel = elasticity.CubicLinearElasticModel(
            self.E, self.nu, self.mu, "moduli")

        self.dn = np.array([[4.1, 2.8, -1.2], [3.1, 7.1, 0.2], [4, 2, 3]])
        self.dn = 0.5 * (self.dn + self.dn.T)
        self.d = tensors.Symmetric(self.dn)

        self.wn = np.array([[-9.36416517, 2.95527444, 8.70983194],
                            [-1.54693052, 8.7905658, -5.10895168],
                            [-8.52740468, -0.7741642, 2.89544992]])
        self.wn = 0.5 * (self.wn - self.wn.T)
        self.w = tensors.Skew(self.wn)

        self.model = kinematics.StandardKinematicModel(self.emodel,
                                                       self.imodel)

        self.fspin = self.model.spin(self.S, self.d, self.w, self.Q, self.H,
                                     self.L, self.T, history.History())

        self.fixed = self.model.decouple(self.S, self.d, self.w, self.Q,
                                         self.H, self.L, self.T,
                                         history.History())