Beispiel #1
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])
Beispiel #2
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
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()
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))
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))
Beispiel #6
0
  def setUp(self):
    self.s0 = 200.0
    self.K = 15000.0

    self.n = 4
    self.cs = range(1,self.n+1)
    self.rs = range(1, self.n+1)

    self.iso = hardening.LinearIsotropicHardeningRule(self.s0, self.K)
    self.gmodels = [hardening.ConstantGamma(g) for g in self.rs]
    As = [0.0] * self.n
    ns = [1.0] * self.n
    self.hardening = hardening.Chaboche(self.iso, self.cs, self.gmodels, As, 
        ns)
    self.surface = surfaces.IsoKinJ2()

    self.model = ri_flow.RateIndependentNonAssociativeHardening(self.surface, self.hardening)

    self.hist0 = np.zeros((1+6*self.n,))

    self.T = 300.0
Beispiel #7
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.n = 2
        self.cs = [10.0, 2.0]
        self.rs = [5.0, 1.0]
        self.gmodels = [hardening.ConstantGamma(g) for g in self.rs]
        self.As = [0.0] * self.n
        self.ns = [1.0] * self.n

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

        surface = surfaces.IsoKinJ2()
        iso = hardening.LinearIsotropicHardeningRule(self.s0, self.Kp)
        hmodel = hardening.Chaboche(iso, self.cs, self.gmodels, self.As,
                                    self.ns)

        flow = ri_flow.RateIndependentNonAssociativeHardening(surface, hmodel)

        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 = 30
Beispiel #8
0
    s0 = 300.0
    Kp = 0.0
    c = [30000.0]
    r = [60.0]

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

    surface = surfaces.IsoKinJ2()
    iso = hardening.LinearIsotropicHardeningRule(s0, Kp)
    gmodels = [hardening.ConstantGamma(g) for g in r]
    As = [0.0]
    ns = [1.0]
    hrule = hardening.Chaboche(iso, c, gmodels, As, ns)

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

    # Uniaxial stress/strain curves at decades of strain rates
    erates = np.logspace(-6, 2, 9)
    for rate in erates:
        res = drivers.uniaxial_test(model, rate)
        plt.plot(res['strain'], res['stress'])

    plt.xlabel("Strain (-/-)")
    plt.ylabel("Stress (MPa)")
    plt.show()
Beispiel #9
0
    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
Beispiel #10
0
    hmodel_rd = hardening.Chaboche(iso_rd, [K * 3.0 / 2.0],
                                   [hardening.ConstantGamma(0.0)], [0.0],
                                   [1.0])
    hmodel_ri = hardening.Chaboche(iso_ri, [K * 3.0 / 2.0],
                                   [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,
Beispiel #11
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
    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,