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)
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
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])
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
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()
def setUp(self): self.A = 1.0e-6 self.n = 5.0 self.model = creep.PowerLawCreep(self.A, self.n) self.T = 300.0 self.e = 0.1 self.s = 150.0 self.t = 10.0
def gen_material(E, nu, sY, alpha, A, n): """ Generate a perfectly plastic + creep material model. """ elastic = elasticity.IsotropicLinearElasticModel(E, "youngs", nu, "poissons") surface = surfaces.IsoJ2() pmodel = models.SmallStrainPerfectPlasticity(elastic, surface, sY) smodel = creep.PowerLawCreep(A, n) cmodel = creep.J2CreepModel(smodel) return models.SmallStrainCreepPlasticity(elastic, pmodel, cmodel, alpha = alpha)
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()
def test_creep_plasticity(self): surface = surfaces.IsoJ2() sy = 100.0 bmodel = models.SmallStrainPerfectPlasticity(self.elastic1, surface, sy) A = 1.85e-10 n = 12.0 smodel = creep.PowerLawCreep(A, n) cmodel = creep.J2CreepModel(smodel) model = models.SmallStrainCreepPlasticity(self.elastic1, bmodel, cmodel) self.very_close(model, self.emodel1) model.set_elastic_model(self.elastic2) self.very_close(model, self.emodel2)
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()
A = s0**(-n) A = 1.0e-22 # Damage parameters xi = 0.478 phi = 1.914 S = 1.0e19 # Loading srate = 100.0 # Setup model emodel = elasticity.IsotropicLinearElasticModel(E, "youngs", nu, "poissons") bmodel = models.SmallStrainElasticity(emodel) scmodel = creep.PowerLawCreep(A, n) cfmodel = creep.J2CreepModel(scmodel) cmodel = models.SmallStrainCreepPlasticity(emodel, bmodel, cfmodel) 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,