Ejemplo n.º 1
0
    def setUp(self):
        self.G1 = 36000.0
        self.G2 = 25000.0

        self.K1 = 10000.0
        self.K2 = 12000.0

        self.elastic1 = elasticity.IsotropicLinearElasticModel(
            self.G1, "shear", self.K1, "bulk")
        self.elastic2 = elasticity.IsotropicLinearElasticModel(
            self.G2, "shear", self.K2, "bulk")
Ejemplo n.º 2
0
  def setUp(self):
    self.E = 100000.0
    self.nu = 0.3

    self.mu = self.E / (2 * (1 + self.nu))
    self.K = self.E / (3 * (1 - 2.0 * self.nu))
    
    self.model_Ev = elasticity.IsotropicLinearElasticModel(
        self.E, "youngs", self.nu, "poissons")
    self.model_GK = elasticity.IsotropicLinearElasticModel(
        self.mu, "shear", self.K, "bulk")

    self.T = 300.0
Ejemplo n.º 3
0
    def setUp(self):
        self.hist0 = np.zeros((13, ))

        self.E = 92000.0
        self.nu = 0.3

        self.mu = self.E / (2 * (1 + self.nu))
        self.K = self.E / (3 * (1 - 2 * self.nu))

        self.s0 = 180.0
        self.Kp = 1000.0

        self.H = 1000.0

        self.elastic = elasticity.IsotropicLinearElasticModel(
            self.mu, "shear", self.K, "bulk")

        surface = surfaces.IsoKinJ2()
        iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
        kin = hardening.LinearKinematicHardeningRule(self.H)
        hrule = hardening.CombinedHardeningRule(iso, kin)

        flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

        self.model = models.SmallStrainRateIndependentPlasticity(
            self.elastic, flow)

        self.efinal = np.array([0.1, -0.05, 0.02, -0.03, 0.1, -0.15])
        self.tfinal = 10.0
        self.T = 300.0
        self.nsteps = 10
Ejemplo n.º 4
0
  def setUp(self):
    self.E = 92000.0
    self.nu = 0.3

    self.s0 = 180.0
    self.Kp = 1000.0
    self.H = 1000.0

    self.elastic = elasticity.IsotropicLinearElasticModel(self.E, "youngs",
        self.nu, "poissons")

    surface = surfaces.IsoKinJ2()
    iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
    kin = hardening.LinearKinematicHardeningRule(self.H)
    hrule = hardening.CombinedHardeningRule(iso, kin)

    flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

    self.bmodel = models.SmallStrainRateIndependentPlasticity(self.elastic, 
        flow)

    self.fn = interpolate.PolynomialInterpolate([-6.653e-9,2.952e-4,-6.197e-1])
    self.C = 32.06

    self.lmr = larsonmiller.LarsonMillerRelation(self.fn, self.C)
    self.effective = damage.VonMisesEffectiveStress()

    self.model = damage.LarsonMillerCreepDamageModel_sd(
        self.elastic, self.lmr, self.effective, self.bmodel)

    self.stress = np.array([100,-50.0,300.0,-99,50.0,125.0])
    self.T = 100.0

    self.s_np1 = self.stress
    self.s_n = np.array([-25,150,250,-25,-100,25])

    self.d_np1 = 0.5
    self.d_n = 0.4

    self.e_np1 = np.array([0.1,-0.01,0.15,-0.05,-0.1,0.15])
    self.e_n = np.array([-0.05,0.025,-0.1,0.2,0.11,0.13])

    self.T_np1 = self.T
    self.T_n = 90.0

    self.t_np1 = 1.0
    self.t_n = 0.0
    self.dt = self.t_np1 - self.t_n

    self.u_n = 0.0
    self.p_n = 0.0
  
    # This is a rather boring baseline history state to probe, but I can't
    # think of a better way to get a "generic" history from a generic model
    self.hist_n = np.array([self.d_n] + list(self.bmodel.init_store()))
    self.x_trial = np.array([50,-25,150,-150,190,100.0] + [0.41])

    self.nsteps = 10
    self.etarget = np.array([0.1,-0.025,0.02,0.015,-0.02,-0.05])
    self.ttarget = 10.0
Ejemplo n.º 5
0
    def setUp(self):
        self.model1 = parse.parse_xml("test/examples.xml", "test_powerdamage")

        E = 92000.0
        nu = 0.3

        s0 = 180.0
        Kp = 1000.0

        elastic = elasticity.IsotropicLinearElasticModel(
            E, "youngs", nu, "poissons")

        surface = surfaces.IsoJ2()
        hrule = hardening.LinearIsotropicHardeningRule(s0, Kp)

        flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

        bmodel = models.SmallStrainRateIndependentPlasticity(elastic, flow)

        a = 2.2
        A = 2e-5
        self.model2 = damage.NEMLPowerLawDamagedModel_sd(elastic, A, a, bmodel)

        self.T = 300.0
        self.tmax = 10.0
        self.nsteps = 100.0
        self.emax = np.array([0.05, 0, 0, 0, 0, 0])
Ejemplo n.º 6
0
    def setUp(self):
        self.model1 = parse.parse_xml("test/examples.xml", "test_perzyna")

        mu = 40000.0
        K = 84000.0

        elastic = elasticity.IsotropicLinearElasticModel(
            mu, "shear", K, "bulk")

        sy = 100.0
        r = 100.0
        d = 1000.0
        KK = 1000.0

        n = 5.0
        eta = 500.0

        surface = surfaces.IsoKinJ2()
        iso = hardening.VoceIsotropicHardeningRule(sy, r, d)
        kin = hardening.LinearKinematicHardeningRule(KK)

        hmodel = hardening.CombinedHardeningRule(iso, kin)

        gmodel = visco_flow.GPowerLaw(n, eta)

        vmodel = visco_flow.PerzynaFlowRule(surface, hmodel, gmodel)
        flow = general_flow.TVPFlowRule(elastic, vmodel)

        self.model2 = models.GeneralIntegrator(elastic, flow)

        self.T = 550.0 + 273.15
        self.tmax = 10.0
        self.nsteps = 100.0
        self.emax = np.array([0.1, 0, 0, 0, 0, 0])
Ejemplo n.º 7
0
    def setUp(self):
        self.model1 = parse.parse_xml("test/examples.xml", "test_j2comb")

        mu = 40000.0
        K = 84000.0

        ys = 100.0
        r = 100.0
        d = 1000.0

        KH = 1000.0

        elastic = elasticity.IsotropicLinearElasticModel(
            mu, "shear", K, "bulk")

        surface = surfaces.IsoKinJ2()
        iso = hardening.VoceIsotropicHardeningRule(ys, r, d)
        kin = hardening.LinearKinematicHardeningRule(KH)
        hrule = hardening.CombinedHardeningRule(iso, kin)
        flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

        self.model2 = models.SmallStrainRateIndependentPlasticity(
            elastic, flow)

        self.T = 300.0
        self.tmax = 10.0
        self.nsteps = 100.0
        self.emax = np.array([0.1, 0, 0, 0, 0, 0])
Ejemplo n.º 8
0
    def setUp(self):
        self.model1 = parse.parse_xml("test/examples.xml", "test_j2isocomb")

        E = 150000.0
        nu = 0.3

        ys = 100.0
        H = 100.0
        r = 100.0
        d = 1000.0

        elastic = elasticity.IsotropicLinearElasticModel(
            E, "youngs", nu, "poissons")

        surface = surfaces.IsoJ2()
        hrule1 = hardening.LinearIsotropicHardeningRule(ys, H)
        hrule2 = hardening.VoceIsotropicHardeningRule(0.0, r, d)
        hrule = hardening.CombinedIsotropicHardeningRule([hrule1, hrule2])
        flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

        self.model2 = models.SmallStrainRateIndependentPlasticity(
            elastic, flow)

        self.T = 300.0
        self.tmax = 10.0
        self.nsteps = 100.0
        self.emax = np.array([0.1, 0, 0, 0, 0, 0])
Ejemplo n.º 9
0
def shear():
  """
    Recreate some of the results of Bazant 2013
  """
  F = lambda t: np.array([[1,t,0],[0,1.0,0],[0,0,1]])
  tmax = 10.0
  nsteps = 250
  
  G = 100.0
  K = 10.0

  elastic = elasticity.IsotropicLinearElasticModel(G, "shear", K, "bulk")
  model = models.SmallStrainElasticity(elastic)

  res = drivers.def_grad_driver(model, F, tmax, nsteps)
 
  theta = [Fi[0,1] / 2.0 for Fi in res['F']]
  nstress = [Si[5] / G / np.sqrt(2) for Si in res['stress']]
  plt.plot(theta, nstress, label = "Truesdell")

  model = models.SmallStrainElasticity(elastic, truesdell = False)
  
  res = drivers.def_grad_driver(model, F, tmax, nsteps)
  theta = [Fi[0,1] / 2.0 for Fi in res['F']]
  nstress = [Si[5] / G / np.sqrt(2) for Si in res['stress']]
  plt.plot(theta, nstress, label = "Jaumann")

  plt.xlabel(r"$\tan\left(\theta\right / 2)$")
  plt.ylabel(r"$\tau_{12}/G$")
  plt.legend(loc = 'best')
  plt.show()
Ejemplo n.º 10
0
def rotation():
  """
    Rotate a fixed stress tensor
  """
  def F(t):
    cut = 1.0
    bF = lambda tt: np.array([[1+tt,0,0],[0,1.0-tt/4.0,0],[0,0,1-tt/4.0]]) 
    R = lambda tt: np.array([
      [np.cos(tt*(np.pi/2)), -np.sin(tt*(np.pi/2)),0],
      [np.sin(tt*(np.pi/2)), np.cos(tt*(np.pi/2)),0],
      [0, 0, 1]])

    if t <= cut:
      F = bF(t)
    else:
      F = np.dot(R(t-cut), bF(cut))

    return F

  tmax = 2.0
  nsteps = 1000

  E = 100.0
  nu = 0.25

  elastic = elasticity.IsotropicLinearElasticModel(E, "youngs", nu, "poissons")
  model = models.SmallStrainElasticity(elastic)

  res = drivers.def_grad_driver(model, F, tmax, 2*nsteps)

  print(res['stress'][nsteps])
  print(res['stress'][2*nsteps])
Ejemplo n.º 11
0
def simple_ex():
    E = 92000.0
    nu = 0.3

    s0 = 180.0
    Kp = 1000.0
    H = 1000.0

    elastic = elasticity.IsotropicLinearElasticModel(E, "youngs", nu,
                                                     "poissons")

    surface = surfaces.IsoKinJ2()
    iso = hardening.LinearIsotropicHardeningRule(s0, Kp)
    kin = hardening.LinearKinematicHardeningRule(H)
    hrule = hardening.CombinedHardeningRule(iso, kin)

    flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

    bmodel = models.SmallStrainRateIndependentPlasticity(elastic, flow)

    A = 0.0e-6
    a = 2.2
    model_off = damage.NEMLPowerLawDamagedModel_sd(elastic, A, a, bmodel)

    A = 2e-5
    model_on = damage.NEMLPowerLawDamagedModel_sd(elastic, A, a, bmodel)

    res_off = drivers.uniaxial_test(model_off, 1.0e-2, emax=0.13)
    res_on = drivers.uniaxial_test(model_on, 1.0e-2, emax=0.13)

    plt.plot(res_off['strain'], res_off['stress'], 'k-')
    plt.plot(res_on['strain'], res_on['stress'], 'r-')
    plt.show()
Ejemplo n.º 12
0
def example4():
  # T is in hours, strain in percent, stress in MPa
  A = 1.85e-10
  n = 2.5
  m = 0.3

  smodel = creep.PowerLawCreep(A, n)
  cmodel = creep.J2CreepModel(smodel)

  E = 150000.0
  nu = 0.3
  sY = 200.0
  H = E / 25.0

  elastic = elasticity.IsotropicLinearElasticModel(E, "youngs", nu,
      "poissons")
  surface = surfaces.IsoJ2()
  iso = hardening.LinearIsotropicHardeningRule(sY, H)
  flow = ri_flow.RateIndependentAssociativeFlow(surface, iso)

  pmodel = models.SmallStrainRateIndependentPlasticity(elastic, flow)
  model = models.SmallStrainCreepPlasticity(elastic, pmodel, cmodel)

  res = drivers.creep(model, 205.0, 3600.0, 100.0, verbose = False, 
      nsteps_up = 500)
  plt.plot(res['strain'], res['stress'])
  plt.show()
Ejemplo n.º 13
0
    def setUp(self):
        string_rep = '<test_j2iso type="SmallStrainRateIndependentPlasticity"><elastic type="IsotropicLinearElasticModel"><m1>103561.64383561644</m1><m1_type>youngs</m1_type><m2>0.2945205479452055</m2><m2_type>poissons</m2_type></elastic><flow type="RateIndependentAssociativeFlow"><surface type="IsoJ2"/><hardening type="LinearIsotropicHardeningRule"><s0>100.0</s0><K>1000.0</K></hardening></flow></test_j2iso>'

        self.model1 = parse.parse_string(string_rep)

        mu = 40000.0
        K = 84000.0

        ys = 100.0
        H = 1000.0

        elastic = elasticity.IsotropicLinearElasticModel(
            mu, "shear", K, "bulk")

        surface = surfaces.IsoJ2()
        hrule = hardening.LinearIsotropicHardeningRule(ys, H)
        flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

        self.model2 = models.SmallStrainRateIndependentPlasticity(
            elastic, flow)

        self.T = 300.0
        self.tmax = 10.0
        self.nsteps = 100
        self.emax = np.array([0.1, 0, 0, 0, 0, 0])
Ejemplo n.º 14
0
    def setUp(self):
        self.model1 = parse.parse_xml(localize("examples.xml"), "test_perfect")

        E = [-100, 100000]
        nu = 0.3

        youngs = interpolate.PolynomialInterpolate(E)
        poissons = interpolate.ConstantInterpolate(nu)
        elastic = elasticity.IsotropicLinearElasticModel(
            youngs, "youngs", poissons, "poissons")

        surface = surfaces.IsoJ2()

        Ts = [100.0, 300.0, 500.0, 700.0]
        Sys = [1000.0, 120.0, 60.0, 30.0]

        yields = interpolate.PiecewiseLinearInterpolate(Ts, Sys)

        self.model2 = models.SmallStrainPerfectPlasticity(
            elastic, surface, yields)

        self.T = 550.0
        self.tmax = 10.0
        self.nsteps = 50
        self.emax = np.array([0.1, 0.05, 0, -0.025, 0, 0])
Ejemplo n.º 15
0
    def setUp(self):
        self.ro = 5
        self.ri = 4.5
        self.h = 2.5

        self.nr = 10
        self.nt = 20
        self.nz = 5

        self.E = 150000.0
        self.nu = 0.35

        self.tube = receiver.Tube(self.ro, self.ro - self.ri, self.h, self.nr,
                                  self.nt, self.nz)
        self.times = np.array([0, 1])
        self.tube.set_times(self.times)

        self.tube.set_pressure_bc(
            receiver.PressureBC(self.times, self.times * 0))

        self.emodel = elasticity.IsotropicLinearElasticModel(
            self.E, "youngs", self.nu, "poissons")
        self.mat = models.SmallStrainElasticity(self.emodel)

        self.d = 0.25

        self.force_exact = (np.pi * (self.ro**2.0 - self.ri**2.0) * self.E *
                            self.d / self.h)
        self.stiffness_exact = (np.pi * (self.ro**2.0 - self.ri**2.0) *
                                self.E / self.h)

        self.solver = structural.PythonTubeSolver(verbose=False)
Ejemplo n.º 16
0
def plastic_model(E, Y, a, nu=0.3):
    elmodel = elasticity.IsotropicLinearElasticModel(E, "youngs", nu,
                                                     "poissons")

    surf = surfaces.IsoJ2()

    return models.SmallStrainPerfectPlasticity(elmodel, surf, Y, alpha=a)
Ejemplo n.º 17
0
def verify_Q():
    E = 30000.0
    nu = 0.3

    sy = 100.0
    Q = 50.0
    b = 100.0

    C = 0.0
    g = 0.0

    mu = E / (2 * (1.0 + nu))
    K = E / (3 * (1 - 2 * nu))

    elastic = elasticity.IsotropicLinearElasticModel(mu, "shear", K, "bulk")
    surface = surfaces.IsoKinJ2()
    iso = hardening.VoceIsotropicHardeningRule(sy, Q, b)
    gmodels = [hardening.ConstantGamma(g)]
    hrule = hardening.Chaboche(iso, [C], gmodels, [0.0], [1.0])

    flow = ri_flow.RateIndependentNonAssociativeHardening(surface, hrule)
    model = models.SmallStrainRateIndependentPlasticity(elastic,
                                                        flow,
                                                        verbose=False)

    res = drivers.uniaxial_test(model, 1.0e-2, emax=0.2)
    stress = res['stress']

    print("Q: %f / %f" % (Q, stress[-1] - sy))
Ejemplo n.º 18
0
def verify_Cg():
    E = 30000.0
    nu = 0.3

    sy = 100.0
    Q = 0.0
    b = 0.0

    C = 1000.0
    g = 10.0

    mu = E / (2 * (1.0 + nu))
    K = E / (3 * (1 - 2 * nu))

    elastic = elasticity.IsotropicLinearElasticModel(mu, "shear", K, "bulk")
    surface = surfaces.IsoKinJ2()
    iso = hardening.VoceIsotropicHardeningRule(sy, Q, b)
    hrule = hardening.Chaboche(iso, [C], [hardening.ConstantGamma(g)], [0.0],
                               [1.0])

    flow = ri_flow.RateIndependentNonAssociativeHardening(surface, hrule)
    model = models.SmallStrainRateIndependentPlasticity(elastic,
                                                        flow,
                                                        verbose=False)

    res = drivers.strain_cyclic(model, 0.4, -1.0, 1.0e-4, 1)
    strain = res['strain']
    stress = res['stress']

    mv = np.max(np.abs(stress))
    hu = mv - sy

    print("C/y: %f / %f" % ((C / g), hu))
Ejemplo n.º 19
0
    def setUp(self):
        self.model1 = parse.parse_xml("test/examples.xml",
                                      "test_creep_plasticity")

        A = 1.85e-10
        n = 2.5

        smodel = creep.PowerLawCreep(A, n)
        cmodel = creep.J2CreepModel(smodel)

        E = 150000.0
        nu = 0.3
        sY = 200.0
        H = E / 50.0

        elastic = elasticity.IsotropicLinearElasticModel(
            E, "youngs", nu, "poissons")
        surface = surfaces.IsoJ2()
        iso = hardening.LinearIsotropicHardeningRule(sY, H)
        flow = ri_flow.RateIndependentAssociativeFlow(surface, iso)

        pmodel = models.SmallStrainRateIndependentPlasticity(elastic, flow)

        self.model2 = models.SmallStrainCreepPlasticity(
            elastic, pmodel, cmodel)

        self.T = 300.0
        self.tmax = 10.0
        self.nsteps = 100.0
        self.emax = np.array([0.1, 0, 0, 0, 0, 0])
Ejemplo n.º 20
0
def verify_warp3d():
    E = 30000.0
    nu = 0.3

    sy = 100.0
    Q = 50.0
    b = 100.0

    C = 1000.0
    g = 10.0

    mu = E / (2 * (1.0 + nu))
    K = E / (3 * (1 - 2 * nu))

    elastic = elasticity.IsotropicLinearElasticModel(mu, "shear", K, "bulk")
    surface = surfaces.IsoKinJ2()
    iso = hardening.VoceIsotropicHardeningRule(sy, Q, b)
    hrule = hardening.Chaboche(iso, [C], [hardening.ConstantGamma(g)], [0.0],
                               [1.0])

    flow = ri_flow.RateIndependentNonAssociativeHardening(surface, hrule)
    model = models.SmallStrainRateIndependentPlasticity(elastic,
                                                        flow,
                                                        verbose=False)

    res = drivers.strain_cyclic(model, 0.0075, -1.0, 1.0e-4, 50)
    strain = res['strain']
    stress = res['stress']

    data_warp = np.load('data_fa_warp.npy')

    plt.plot(strain, stress, 'k-')
    plt.plot(data_warp[0], data_warp[1], 'r-')
    plt.show()
Ejemplo n.º 21
0
    def setUp(self):
        self.model1 = parse.parse_xml("test/examples.xml", "test_nonassri")

        mu = 40000.0
        K = 84000.0

        ys = 100.0
        r = 100.0
        d = 1000.0

        cs = [5.0, 10.0]
        gs = [1000.0, 1000.0]
        As = [0.0, 0.0]
        ns = [1.0, 1.0]

        elastic = elasticity.IsotropicLinearElasticModel(
            mu, "shear", K, "bulk")

        surface = surfaces.IsoKinJ2()
        iso = hardening.VoceIsotropicHardeningRule(ys, r, d)

        gammas = [hardening.ConstantGamma(g) for g in gs]
        hmodel = hardening.Chaboche(iso, cs, gammas, As, ns)
        flow = ri_flow.RateIndependentNonAssociativeHardening(surface, hmodel)

        self.model2 = models.SmallStrainRateIndependentPlasticity(
            elastic, flow)

        self.T = 300.0
        self.tmax = 10.0
        self.nsteps = 100
        self.emax = np.array([0.05, 0, 0, 0, 0, 0])
Ejemplo n.º 22
0
    def setUp(self):
        self.hist0 = np.zeros((7, ))

        self.E = 92000.0
        self.nu = 0.3

        self.mu = self.E / (2 * (1 + self.nu))
        self.K = self.E / (3 * (1 - 2 * self.nu))

        self.s0 = 180.0
        self.R = 150.0
        self.d = 10.0

        self.elastic = elasticity.IsotropicLinearElasticModel(
            self.mu, "shear", self.K, "bulk")

        surface = surfaces.IsoJ2()
        hrule = hardening.VoceIsotropicHardeningRule(self.s0, self.R, self.d)
        flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

        self.model = models.SmallStrainRateIndependentPlasticity(
            self.elastic, flow, check_kt=False)

        self.efinal = np.array([0.1, -0.05, 0.02, -0.03, 0.1, -0.15])
        self.tfinal = 10.0
        self.T = 300.0
        self.nsteps = 10
Ejemplo n.º 23
0
    def setUp(self):
        self.model1 = parse.parse_xml("test/examples.xml", "test_pcreep")

        E = [-100, 100000]
        nu = 0.3

        youngs = interpolate.PolynomialInterpolate(E)
        poissons = interpolate.ConstantInterpolate(nu)
        elastic = elasticity.IsotropicLinearElasticModel(
            youngs, "youngs", poissons, "poissons")

        surface = surfaces.IsoJ2()

        Ts = [100.0, 300.0, 500.0, 700.0]
        Sys = [1000.0, 120.0, 60.0, 30.0]

        yields = interpolate.PiecewiseLinearInterpolate(Ts, Sys)

        pmodel = models.SmallStrainPerfectPlasticity(elastic, surface, yields)

        self.T = 550.0
        self.tmax = 10.0
        self.nsteps = 50.0
        self.emax = np.array([0.1, 0.05, 0, -0.025, 0, 0])

        A = 1.85e-10
        n = 2.5

        smodel = creep.PowerLawCreep(A, n)
        cmodel = creep.J2CreepModel(smodel)

        self.model2 = models.SmallStrainCreepPlasticity(
            elastic, pmodel, cmodel)
Ejemplo n.º 24
0
    def setUp(self):
        self.hist0 = np.zeros((13, ))

        self.A = 1.85e-10
        self.n = 2.5

        self.smodel = creep.PowerLawCreep(self.A, self.n)
        self.cmodel = creep.J2CreepModel(self.smodel)

        self.E = 150000.0
        self.nu = 0.3
        self.sY = 200.0
        self.H = self.E / 50.0

        self.elastic = elasticity.IsotropicLinearElasticModel(
            self.E, "youngs", self.nu, "poissons")

        self.surface = surfaces.IsoJ2()
        self.iso = hardening.LinearIsotropicHardeningRule(self.sY, self.H)
        self.flow = ri_flow.RateIndependentAssociativeFlow(
            self.surface, self.iso)

        self.pmodel = models.SmallStrainRateIndependentPlasticity(
            self.elastic, self.flow)

        self.model = models.SmallStrainCreepPlasticity(self.elastic,
                                                       self.pmodel,
                                                       self.cmodel)

        self.efinal = np.array([0.1, -0.05, 0.02, -0.03, 0.1, -0.15])
        self.tfinal = 10.0
        self.T = 300.0
        self.nsteps = 10
Ejemplo n.º 25
0
  def complete(self):
    self.E = 92000.0
    self.nu = 0.3

    self.s0 = 180.0
    self.Kp = 1000.0
    self.H = 1000.0

    self.elastic = elasticity.IsotropicLinearElasticModel(self.E, "youngs",
        self.nu, "poissons")

    surface = surfaces.IsoKinJ2()
    iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
    kin = hardening.LinearKinematicHardeningRule(self.H)
    hrule = hardening.CombinedHardeningRule(iso, kin)

    flow = ri_flow.RateIndependentAssociativeFlow(surface, hrule)

    self.bmodel = models.SmallStrainRateIndependentPlasticity(self.elastic, 
        flow)

    self.xi = 0.478
    self.phi = 1.914
    self.A = 10000000.0

    self.model = damage.ModularCreepDamageModel_sd(
        self.elastic, 
        self.A, self.xi, self.phi,
        self.effective_model(),
        self.bmodel)

    self.stress = np.array([100,-50.0,300.0,-99,50.0,125.0])
    self.T = 100.0

    self.s_np1 = self.stress
    self.s_n = np.array([-25,150,250,-25,-100,25])

    self.d_np1 = 0.5
    self.d_n = 0.4

    self.e_np1 = np.array([0.1,-0.01,0.15,-0.05,-0.1,0.15])
    self.e_n = np.array([-0.05,0.025,-0.1,0.2,0.11,0.13])

    self.T_np1 = self.T
    self.T_n = 90.0

    self.t_np1 = 1.0
    self.t_n = 0.0

    self.u_n = 0.0
    self.p_n = 0.0
  
    # This is a rather boring baseline history state to probe, but I can't
    # think of a better way to get a "generic" history from a generic model
    self.hist_n = np.array([self.d_n] + list(self.bmodel.init_store()))
    self.x_trial = np.array([50,-25,150,-150,190,100.0] + [0.41])

    self.nsteps = 10
    self.etarget = np.array([0.1,-0.025,0.02,0.015,-0.02,-0.05])
    self.ttarget = 10.0
Ejemplo n.º 26
0
    def setUp(self):
        self.hist0 = np.zeros((6, ))

        self.A = 1.85e-10
        self.n = 2.5

        self.smodel = creep.PowerLawCreep(self.A, self.n)
        self.cmodel = creep.J2CreepModel(self.smodel)

        self.E = 150000.0
        self.nu = 0.3
        self.sY = 200.0

        self.elastic = elasticity.IsotropicLinearElasticModel(
            self.E, "youngs", self.nu, "poissons")
        self.surface = surfaces.IsoJ2()

        self.pmodel = models.SmallStrainPerfectPlasticity(
            self.elastic, self.surface, self.sY)

        self.model = models.SmallStrainCreepPlasticity(self.elastic,
                                                       self.pmodel,
                                                       self.cmodel)

        self.efinal = np.array([0.1, -0.05, 0.02, -0.05, 0.1, -0.15])
        self.tfinal = 10.0
        self.T = 300.0
        self.nsteps = 10
Ejemplo n.º 27
0
    def setUp(self):
        self.eps0 = 1.0e2
        self.D = 100.0
        self.n = 5.2
        self.s0 = 150.0
        self.K = 10000.0

        self.vmodel = walker.TestFlowRule(self.eps0, self.D, self.n, self.s0,
                                          self.K)

        E = 92000.0
        nu = 0.3

        self.emodel = elasticity.IsotropicLinearElasticModel(
            E, "youngs", nu, "poissons")

        self.lv = 1

        self.model = walker.WalkerKremplSwitchRule(self.emodel, self.vmodel,
                                                   self.lv, self.eps0)

        self.T_n = 300.0
        self.e_n = np.zeros((6, ))
        self.t_n = 0.0
        self.h_n = np.zeros((2, ))

        self.eps = 1.0e-6
Ejemplo n.º 28
0
    def setUp(self):
        self.hist0 = np.zeros((7, ))

        self.hist0 = np.zeros((7, ))

        self.E = 92000.0
        self.nu = 0.3

        self.mu = self.E / (2 * (1 + self.nu))
        self.K = self.E / (3 * (1 - 2 * self.nu))

        self.s0 = 180.0
        self.R = 150.0
        self.d = 10.0

        self.n = 2.0
        self.eta = 200.0

        self.elastic = elasticity.IsotropicLinearElasticModel(
            self.mu, "shear", self.K, "bulk")

        surface = surfaces.IsoJ2()
        hrule = hardening.VoceIsotropicHardeningRule(self.s0, self.R, self.d)
        g = visco_flow.GPowerLaw(self.n, self.eta)

        vmodel = visco_flow.PerzynaFlowRule(surface, hrule, g)

        flow = general_flow.TVPFlowRule(self.elastic, vmodel)
        self.model = models.GeneralIntegrator(self.elastic, flow)

        self.efinal = np.array([0.05, 0, 0, 0.02, 0, -0.01])
        self.tfinal = 10.0
        self.T = 300.0
        self.nsteps = 100
Ejemplo n.º 29
0
    def setUp(self):
        E = 200000.0
        nu = 0.27

        mu = E / (2 * (1.0 + nu))
        K = E / (3 * (1 - 2 * nu))

        s0 = 300.0
        Kp = 0.0
        c = [30000.0]
        r = [60.0]
        A = [0.0]
        n = [1.0]

        elastic = elasticity.IsotropicLinearElasticModel(
            mu, "shear", K, "bulk")
        surface = surfaces.IsoKinJ2()
        iso = hardening.LinearIsotropicHardeningRule(s0, Kp)
        gmodels = [hardening.ConstantGamma(g) for g in r]
        hrule = hardening.Chaboche(iso, c, gmodels, A, n)

        flow = ri_flow.RateIndependentNonAssociativeHardening(surface, hrule)
        self.model = models.SmallStrainRateIndependentPlasticity(
            elastic, flow, verbose=False, check_kt=False)
        self.umodel = uniaxial.UniaxialModel(self.model)

        self.de = 0.001
        self.dt = 1.0
        self.dT = 0.0
        self.T0 = 0.0
        self.nsteps = 100
Ejemplo n.º 30
0
  def setUp(self):
    self.mu = 29000.0
    self.K = 64000.0
    self.T = 325.0

    self.model = elasticity.IsotropicLinearElasticModel(self.mu, 
        "shear", self.K, "bulk")