コード例 #1
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()
コード例 #2
0
ファイル: damage.py プロジェクト: dschwen/neml
def creep_ex():
    E = 92000.0
    nu = 0.3

    s0 = 120.0

    A = 1.0e-10
    n = 3.0

    Kp = E / 500
    H = E / 500

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

    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)

    pmodel = models.SmallStrainRateIndependentPlasticity(elastic, flow)

    bmodel = models.SmallStrainCreepPlasticity(elastic, pmodel, cmodel)

    A_damg = 1.0e-2
    a_damg = 1.0

    model = damage.NEMLPowerLawDamagedModel_sd(elastic,
                                               A_damg,
                                               a_damg,
                                               bmodel,
                                               verbose=False)

    #res = drivers.uniaxial_test(model, 1.0e-2, emax = 0.25)
    #plt.plot(res['strain'], res['stress'])
    #plt.show()

    res = drivers.creep(model, 120.0, 1.0, 393.0, verbose=False)

    plt.plot(res['rtime'], res['rstrain'])
    plt.show()
    plt.loglog(res['rtime'], res['rrate'])
    plt.show()
コード例 #3
0
    model = damage.ClassicalCreepDamageModel_sd(emodel, S, xi, phi, cmodel)

    model2 = damage.ModularCreepDamageModel_sd(
        emodel, S, xi, phi, damage.VonMisesEffectiveStress(), cmodel)

    # Computed life
    srange = np.linspace(s0 / 2, s0, 10)
    tfs = S**(xi) / (1 + phi) * srange**(-xi)

    slife = []
    slife2 = []
    for s, tf in zip(srange, tfs):
        res = drivers.creep(model,
                            s,
                            srate,
                            tf * 1.25,
                            verbose=False,
                            logspace=False,
                            check_dmg=True,
                            nsteps=1000)
        slife.append(res['rtime'][-1])
        res2 = drivers.creep(model2,
                             s,
                             srate,
                             tf * 1.25,
                             verbose=False,
                             logspace=False,
                             check_dmg=True,
                             nsteps=1000)
        slife2.append(res2['rtime'][-1])

    plt.plot(srange, tfs / 3600.0, label="Analytic formula")
コード例 #4
0
ファイル: small_strain_drivers.py プロジェクト: dschwen/neml
    erate = 1.0e-4
    hold = 1000.0 * 3600.0
    res = drivers.stress_relaxation(model, emax, erate, hold)
    plt.figure()
    plt.plot(res['rtime'] / 3600.0, res['rstress'], 'k-')
    plt.xlabel("Time (hrs)")
    plt.ylabel("Stress (MPa)")
    plt.title("Stress relaxation")
    plt.tight_layout()
    plt.show()

    # Creep
    smax = 180.0
    srate = 1.0
    hold = 10000.0 * 3600.0
    res = drivers.creep(model, smax, srate, hold, logspace=True)
    plt.figure()
    plt.plot(res['rtime'] / 3600.0, res['rstrain'], 'k-')
    plt.xlabel("Time (hrs)")
    plt.ylabel("Creep strain (mm/mm)")
    plt.title("Creep")
    plt.tight_layout()
    plt.show()

    # Rate jump
    erates = [1.0e-6, 1.0e-4, 1.0e-2, 1.0, 1.0e-2, 1.0e-4, 1.0e-6]
    res = drivers.rate_jump_test(model, erates)
    plt.figure()
    plt.plot(res['strain'], res['stress'], 'k-')
    plt.xlabel("Strain (mm/mm)")
    plt.ylabel("Stress (MPa)")
コード例 #5
0
ファイル: rate_independent.py プロジェクト: khhsu0724/neml
    plt.plot(res['cycles'], res['max'], 'k-')
    plt.plot(res['cycles'], res['min'], 'k-')
    plt.plot(res['cycles'], res['mean'], 'k-')
    plt.xlabel("Cycle")
    plt.ylabel("Strain (-/-)")
    plt.show()

    # Stress relaxation test
    res = drivers.stress_relaxation(model, 0.02, 1.0e-4, 2000.0)
    plt.plot(res['time'], res['stress'], 'k-')
    plt.xlabel('Time (s)')
    plt.ylabel('Stress (MPa)')
    plt.show()

    plt.plot(res['rtime'], res['rrate'], 'k-')
    plt.xlabel('Time (s)')
    plt.ylabel('Relaxation rate (MPa/s)')
    plt.show()

    # Creep test
    res = drivers.creep(model, 350.0, 10.0, 2000.0)
    plt.plot(res['time'], res['strain'], 'k-')
    plt.xlabel('Time (s)')
    plt.ylabel('Strain (-/-)')
    plt.show()

    plt.plot(res['rtime'], res['rrate'], 'k-')
    plt.xlabel('Time (s)')
    plt.ylabel('Creep rate (1/s)')
    plt.show()
コード例 #6
0
ファイル: creep_plasticity.py プロジェクト: khhsu0724/neml
    smodel = creep.PowerLawCreep(A, n)
    cmodel = creep.J2CreepModel(smodel)

    E = 150000.0
    nu = 0.3
    sY = 200.0

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

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

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

    res = drivers.creep(model, 200.0, 1.0e2, 1000.0, verbose=True)
    plt.plot(res['time'], res['strain'])
    plt.show()

    res = drivers.strain_cyclic(model,
                                0.01,
                                -1,
                                1.0e-4,
                                15,
                                verbose=True,
                                nsteps=25,
                                hold_time=[10.0, 0])
    plt.plot(res['strain'], res['stress'])
    plt.show()

    res = drivers.uniaxial_test(model,
コード例 #7
0
    C = 28.0
    lmr = larsonmiller.LarsonMillerRelation(fn, C)
    estress = damage.VonMisesEffectiveStress()
    model = damage.LarsonMillerCreepDamageModel_sd(emodel, lmr, estress,
                                                   bmodel)

    T = 550 + 273.15

    lmps = []

    for s in srange:
        res = drivers.creep(model,
                            s,
                            100.0,
                            300000 * 3600.0,
                            T=T,
                            check_dmg=True,
                            dtol=0.95,
                            nsteps_up=20,
                            nsteps=1000,
                            logspace=True)
        time = res['rtime'][-1] / 3600.0
        lmp = T * (np.log10(time) + base_C)
        lmps.append(lmp)

    plt.figure()

    plt.semilogy(lmp_range,
                 10.0**np.polyval(base_poly, lmp_range),
                 'k-',
                 label="Base LMR")
    plt.semilogy(lmps, srange, 'r--', label="Model results")
コード例 #8
0
    tf = 10000

    # Hayhurst solution
    times = np.linspace(0, tf, 100)
    dmg = (1 - (eta + 1) * w0 * (s / s0)**nu * times)**(1.0 / (eta + 1.0))
    strain = -e0 * (s / s0)**(-nu) * dmg**(eta + 1) / (
        (1 + eta - n) * w0) * (s / (s0 * dmg))**n + e0 * (s / s0)**(n - nu) / (
            (1 + eta - n) * w0)

    E = 10000000.0
    nu = 0.3

    srate = 100.0

    emodel = elasticity.IsotropicLinearElasticModel(E, "youngs", nu,
                                                    "poissons")
    bmodel = models.SmallStrainElasticity(emodel)
    scmodel = creep.NormalizedPowerLawCreep(s0, n)
    cfmodel = creep.J2CreepModel(scmodel)
    cmodel = models.SmallStrainCreepPlasticity(emodel, bmodel, cfmodel)
    model = damage.ModularCreepDamageModel_sd(emodel, A, xi, phi,
                                              damage.VonMisesEffectiveStress(),
                                              cmodel)

    res = drivers.creep(model, s, srate, tf, nsteps=1000)

    plt.plot(times, strain)
    plt.plot(res['rtime'], res['rstrain'])
    plt.show()
コード例 #9
0
  plt.plot(res['cycles'], res['min'], 'k-')
  plt.plot(res['cycles'], res['mean'], 'k-')
  plt.xlabel("Cycle")
  plt.ylabel("Strain (-/-)")
  plt.show()
  

  # Stress relaxation test
  res = drivers.stress_relaxation(model, 0.02, 1.0e-4, 2000.0, verbose = False)
  plt.plot(res['time'], res['stress'], 'k-')
  plt.xlabel('Time (s)')
  plt.ylabel('Stress (MPa)')
  plt.show()

  plt.plot(res['rtime'], res['rrate'], 'k-')
  plt.xlabel('Time (s)')
  plt.ylabel('Relaxation rate (MPa/s)')
  plt.show()

  # Creep test
  res = drivers.creep(model, 150.0, 10.0, 6000.0)
  plt.plot(res['time'], res['strain'], 'k-')
  plt.xlabel('Time (s)')
  plt.ylabel('Strain (-/-)')
  plt.show()

  plt.plot(res['rtime'], res['rrate'], 'k-')
  plt.xlabel('Time (s)')
  plt.ylabel('Creep rate (1/s)')
  plt.show()