def test_equiv_strain_needle(self):
     """Test the equivalent strains for a needle."""
     if not available:
         self.skipTest(reason)
     mu = 0.3
     misfit = [0.05, 0.04, 0.03, 0.03, 0.02, 0.01]
     strain_eng = StrainEnergy(aspect=[50000.0, 5.0, 5.0],
                               eigenstrain=misfit, poisson=mu)
     f = 9.0
     eq_strain = strain_eng.equivalent_eigenstrain(f)
     kato = kato_et_al_needle(f, mu, misfit)
     self.assertTrue(np.allclose(eq_strain, kato, atol=1E-3))
Beispiel #2
0
 def test_equiv_strain_plate(self):
     """Test the equivalent strains for a plate."""
     if not available:
         self.skipTest(reason)
     mu = 0.3
     misfit = [0.05, 0.04, 0.03, 0.03, 0.02, 0.01]
     strain_eng = StrainEnergy(aspect=[200000000.0, 51200000.0, 0.001],
                               misfit=misfit,
                               poisson=mu)
     f = 4.0
     eq_strain = strain_eng.equivalent_eigenstrain(C_matrix=C_al,
                                                   scale_factor=f)
     kato = kato_et_al_plate(f, mu, misfit)
     self.assertTrue(np.allclose(eq_strain, kato, atol=1E-3))
    def test_equiv_strain_sphere(self):
        """Test the equivalent eigenstrain against analytic results.

        Kato, M.; Fujii, T. & Onaka, S.
        Elastic strain energies of sphere, plate and needle inclusions
        Materials Science and Engineering: A,
        Elsevier, 1996, 211, 95-103
        """
        if not available:
            self.skipTest(reason)
        mu = 0.3
        misfit = [0.05, 0.04, 0.03, 0.03, 0.02, 0.01]
        strain_eng = StrainEnergy(aspect=[2.0, 2.0, 2.0],
                                  eigenstrain=misfit, poisson=mu)
        f = 5.0
        eq_strain = strain_eng.equivalent_eigenstrain(f)
        kato_et_al = kato_et_al_sphere(f, mu, misfit)
        self.assertTrue(np.allclose(eq_strain, kato_et_al, atol=1E-5))