[hardening.ConstantGamma(0.0)], [0.0], [1.0]) surface_m = surfaces.IsoKinJ2() visco_flow_m = visco_flow.ChabocheFlowRule(surface_m, hmodel_rd, eta_m, 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()
def setUp(self): # Fully-defined perfectly plastic model Epoly = [-78.2759, 236951.0] nu = 0.3 A = -9.6187 B = -1.4819 C = -5.0486 g0 = 0.3708 b = 0.248 * 1.0e-6 kboltz = 1.38064e-23 * 1000.0 eps0 = 1.0e10 # Temperature range over which to consider (K) Tmin = 550.0 Tmax = 950.0 Trange = np.linspace(Tmin, Tmax) # Elastic E_m = interpolate.PolynomialInterpolate(Epoly) nu_m = interpolate.ConstantInterpolate(nu) elastic_m = elasticity.IsotropicLinearElasticModel( E_m, "youngs", nu_m, "poissons") self.elastic = elastic_m # Rate sensitivity interpolates values mu_values = np.array([elastic_m.G(T) for T in Trange]) n_values = -mu_values * b**3.0 / (kboltz * Trange * A) eta_values = np.exp(B) * eps0**(kboltz * Trange * A / (mu_values * b**3.0)) * mu_values # Rate independent interpolate values flow_stress = mu_values * np.exp(C) # Common objects surface = surfaces.IsoKinJ2() hmodulus = interpolate.PolynomialInterpolate([-10.0, 12000.0]) # Setup visco model n_interp = interpolate.PiecewiseLinearInterpolate( list(Trange), list(n_values)) eta_interp = interpolate.PiecewiseLinearInterpolate( list(Trange), list(eta_values)) eta_m = visco_flow.ConstantFluidity(eta_interp) iso_rd = hardening.LinearIsotropicHardeningRule( interpolate.ConstantInterpolate(0.0), hmodulus) hard_rd = hardening.Chaboche( iso_rd, [interpolate.ConstantInterpolate(0.0)], [hardening.ConstantGamma(interpolate.ConstantInterpolate(0.0))], [interpolate.ConstantInterpolate(0.0)], [interpolate.ConstantInterpolate(1.0)]) visco_rd = visco_flow.ChabocheFlowRule(surface, hard_rd, eta_m, n_interp) general_rd = general_flow.TVPFlowRule(elastic_m, visco_rd) rate_dependent = models.GeneralIntegrator(elastic_m, general_rd) # Setup rate independent sy_interp = interpolate.PiecewiseLinearInterpolate( list(Trange), list(flow_stress)) iso_ri = hardening.LinearIsotropicHardeningRule(sy_interp, hmodulus) hard_ri = hardening.Chaboche( iso_ri, [interpolate.ConstantInterpolate(0.0)], [hardening.ConstantGamma(interpolate.ConstantInterpolate(0.0))], [interpolate.ConstantInterpolate(0.0)], [interpolate.ConstantInterpolate(1.0)]) flow_ri = ri_flow.RateIndependentNonAssociativeHardening( surface, hard_ri) rate_independent = models.SmallStrainRateIndependentPlasticity( elastic_m, flow_ri) # Combined model self.model = models.KMRegimeModel(elastic_m, [rate_independent, rate_dependent], [g0], kboltz, b, eps0) self.efinal = np.array([0.05, 0, 0, 0.02, 0, -0.01]) self.tfinal = 10.0 self.T = 700.0 self.nsteps = 100
sy_interp = interpolate.PiecewiseLinearInterpolate(list(Trange), list(flow_stress)) iso_ri = hardening.LinearIsotropicHardeningRule(sy_interp, hmodulus) hard_ri = hardening.Chaboche( iso_ri, [interpolate.ConstantInterpolate(0.0)], [hardening.ConstantGamma(interpolate.ConstantInterpolate(0.0))], [interpolate.ConstantInterpolate(0.0)], [interpolate.ConstantInterpolate(1.0)]) flow_ri = ri_flow.RateIndependentNonAssociativeHardening(surface, hard_ri) rate_independent = models.SmallStrainRateIndependentPlasticity( elastic_m, flow_ri) # Combined model combined = models.KMRegimeModel(elastic_m, [rate_independent, rate_dependent], [g0], kboltz, b, eps0) # Do things # Strain rate jump Ts = np.linspace(Tmin, Tmax, 5) erates = [ 1.0e-6, 1.0e-5, 1.0e-4, 1.0e-3, 1.0e-2, 1.0e-1, 1.0e-2, 1.0e-3, 1.0e-4, 1.0e-5, 1.0e-6 ] es = [0.01] * len(erates) for T in Ts: strain, stress = rate_jump_test(combined, erates, es, T) plt.plot(strain, stress)