Example #1
0
  def setUp(self):
    self.N = 10

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

    self.strengthmodel = slipharden.VoceSlipHardening(self.tau_sat, self.b, self.tau0)
    
    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, 
        miter = 120)

    self.orientations = rotations.random_orientations(self.N)

    self.D = np.array([0.01,-0.002,-0.003,0.012,-0.04,0.01])
    self.W = np.array([0.02,-0.02,0.03])

    self.T = 300.0
    self.dt = 2.0
Example #2
0
#!/usr/bin/env python3

import sys
sys.path.append('../..')

import numpy as np

from neml.cp import crystallography
from neml.math import rotations

import matplotlib.pyplot as plt

if __name__ == "__main__":
    N = 300

    orientations = rotations.random_orientations(N)

    sgroup = crystallography.SymmetryGroup("432")

    angles = []

    for i in range(len(orientations)):
        for j in range(i + 1, len(orientations)):
            o1 = orientations[i]
            o2 = orientations[j]
            m = sgroup.misorientation(o1, o2)
            axis, angle = m.to_axis_angle()

            angles.append(angle)

    angles = np.rad2deg(angles)
from neml.cp import crystallography, slipharden, sliprules, inelasticity, kinematics, singlecrystal, polycrystal, crystaldamage
from neml.math import rotations, tensors, nemlmath
from neml import elasticity, drivers

import matplotlib.pyplot as plt

nthreads = 4

if __name__ == "__main__":
    N = 50
    emax = 0.122
    nsteps = 300
    erate = 1.0e-4
    nthreads = 4

    orientations = rotations.random_orientations(N)

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

    nslip = lattice.ntotal

    t0 = 100.0
    b = 10.0
    sat = 50

    g0 = 1.0e-4
    n = 6.0

    mu = 29000.0
    E = 120000.0