Exemplo n.º 1
0
    def setUp(self):
        self.model1 = parse.parse_xml(localize("examples.xml"), "test_perfect")

        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)

        self.model2 = models.SmallStrainPerfectPlasticity(
            elastic, surface, yields)

        self.T = 550.0
        self.tmax = 10.0
        self.nsteps = 50
        self.emax = np.array([0.1, 0.05, 0, -0.025, 0, 0])
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    def setUp(self):
        self.xs = [1.0, 5.0]
        self.cvs = [-1.0, 5.0, -2.0]
        self.fns = [interpolate.ConstantInterpolate(cv) for cv in self.cvs]

        self.interpolate = interpolate.GenericPiecewiseInterpolate(
            self.xs, self.fns)

        self.x = 4.0
Exemplo n.º 4
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
Exemplo n.º 5
0
 def setUp(self):
     self.v = ra.random((1, ))[0]
     self.interpolate = interpolate.ConstantInterpolate(self.v)
     self.x = ra.random((1, ))[0]
Exemplo n.º 6
0
    b = 0.248 * 1.0e-6
    kboltz = 1.38064e-23 * 1000.0
    eps0 = 1.0e10

    A = -9.774577
    B = -1.407274
    C = -5.060187
    g0 = 0.373716

    K = 150000.0 / 50.0
    h = 1.0e-2
    l = 1.0

    # Elastic
    E_m = interpolate.PolynomialInterpolate(E_poly)
    nu_m = interpolate.ConstantInterpolate(nu)
    elastic_m = elasticity.IsotropicLinearElasticModel(E_m, "youngs", nu_m,
                                                       "poissons")

    # Rate sensitivity interpolates
    Ts_rate = np.linspace(Tmin, Tmax, num=nrate_sens)
    n_values = []
    eta_values = []
    flow_stress_values = []
    for T in Ts_rate:
        mu = elastic_m.G(T)
        n_values.append(-mu * b**3.0 / (kboltz * T * A))
        eta_values.append(
            np.exp(B) * eps0**(kboltz * T * A / (mu * b**3.0)) * mu)
        flow_stress_values.append(mu * np.exp(C))
Exemplo n.º 7
0
    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")

    # 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])