def example3(): # T is in hours, strain in percent, stress in MPa 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) smax = 250.0 R = -0.5 srate = 1.0 * 3600.0 ncycles = 25 hold = 25 res1 = drivers.stress_cyclic(pmodel, smax, R, srate, ncycles, hold_time = [0,hold]) model = models.SmallStrainCreepPlasticity(elastic, pmodel, cmodel, verbose = False) res2 = drivers.stress_cyclic(model, smax, R, srate, ncycles, hold_time = [0,hold], verbose = False) plt.plot(res1['strain'], res1['stress'], 'k-') plt.plot(res2['strain'], res2['stress'], 'r-') plt.show()
plt.figure() plt.plot(res['strain'], res['stress'], 'k-') plt.xlabel("Strain (mm/mm)") plt.ylabel("Stress (MPa)") plt.title("Strain-controlled cyclic with follow up") plt.show() # Stress controlled-cyclic smax = 200.0 R = -0.75 erate = 1.0e-4 ncycles = 5 hold_time = [10 * 3600.0, 0] res = drivers.stress_cyclic(model, smax, R, erate, ncycles, hold_time=hold_time) plt.figure() plt.plot(res['strain'], res['stress'], 'k-') plt.xlabel("Strain (mm/mm)") plt.ylabel("Stress (MPa)") plt.title("Stress-controlled cyclic") plt.show() # Stress relaxation emax = 0.05 erate = 1.0e-4 hold = 1000.0 * 3600.0 res = drivers.stress_relaxation(model, emax, erate, hold) plt.figure()
# A strain-controlled cyclic test res = drivers.strain_cyclic(model, 0.01, -0.25, 1.0e-4, 50) plt.plot(res['strain'], res['stress'], 'k-') plt.xlabel("Strain (-/-)") plt.ylabel("Stress (MPa)") plt.show() 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("Stress (MPa)") plt.show() # A stress-controlled cyclic test res = drivers.stress_cyclic(model, 525.0, -1.0, 5.0, 50, hold_time=100) plt.plot(res['strain'], res['stress'], 'k-') plt.xlabel("Strain (-/-)") plt.ylabel("Stress (MPa)") plt.show() 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-')
n_interp) rd_flow = general_flow.TVPFlowRule(elastic_m, visco_flow_m) rd_model = models.GeneralIntegrator(elastic_m, rd_flow) ri_flow_m = ri_flow.RateIndependentNonAssociativeHardening( surface_m, hmodel_ri) ri_model = models.SmallStrainRateIndependentPlasticity( elastic_m, ri_flow_m) model = models.KMRegimeModel(elastic_m, [ri_model, rd_model], [g0], kboltz, b, eps0) smax = 400.0 Rs = [-1.0, -0.75, -0.5, -0.25, 0.0] srate = 1.0e-3 ncycles = 50 for R in Rs: res = drivers.stress_cyclic(model, smax, R, srate, ncycles, T=550 + 273.15) plt.plot(res['cycles'], res['max']) #plt.plot(res['strain'], res['stress']) #plt.show() plt.legend(map(str, Rs)) plt.show()
K = E / 50.0 emodel = elasticity.IsotropicLinearElasticModel(E, "youngs", nu, "poissons") surface = surfaces.IsoKinJ2I1(h, l) hiso = hardening.LinearIsotropicHardeningRule(sY, -K / 10) hmodel = hardening.Chaboche(hiso, [K * 3.0 / 2.0], [hardening.ConstantGamma(0.0)], [0.0], [1.0]) flow = ri_flow.RateIndependentNonAssociativeHardening(surface, hmodel) #hkin = hardening.LinearKinematicHardeningRule(K) #hmodel = hardening.CombinedHardeningRule(hiso, hkin) #flow = ri_flow.RateIndependentAssociativeFlow(surface, hmodel) model = models.SmallStrainRateIndependentPlasticity(emodel, flow) smax = 200.0 Rs = [-1.0, -0.75, -0.5, -0.25, 0.0] srate = 1.0 ncycles = 50 for R in Rs: res = drivers.stress_cyclic(model, smax, R, srate, ncycles) plt.plot(res['cycles'], res['max']) plt.legend(map(str, Rs)) plt.show()
res = drivers.strain_cyclic(model, 0.001, -0.25, 1.0e-4, 50, verbose = False) plt.plot(res['strain'], res['stress'], 'k-') plt.xlabel("Strain (-/-)") plt.ylabel("Stress (MPa)") plt.show() 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("Stress (MPa)") plt.show() # A stress-controlled cyclic test res = drivers.stress_cyclic(model, 100.0, -1.0, 5.0, 50, hold_time = 10, verbose = False) plt.plot(res['strain'], res['stress'], 'k-') plt.xlabel("Strain (-/-)") plt.ylabel("Stress (MPa)") plt.show() 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, verbose = False)