Exemple #1
0
 def test_from_strain_stress_list(self):
     strain_list = [Strain.from_deformation(def_matrix)
                    for def_matrix in self.def_stress_dict['deformations']]
     stress_list = [stress for stress in self.def_stress_dict['stresses']]
     with warnings.catch_warnings(record = True):
         et_fl = -0.1*ElasticTensor.from_strain_stress_list(strain_list, stress_list)
         self.assertArrayAlmostEqual(et_fl.round(2),
                                     [[59.29, 24.36, 22.46, 0, 0, 0],
                                      [28.06, 56.91, 22.46, 0, 0, 0],
                                      [28.06, 25.98, 54.67, 0, 0, 0],
                                      [0, 0, 0, 26.35, 0, 0],
                                      [0, 0, 0, 0, 26.35, 0],
                                      [0, 0, 0, 0, 0, 26.35]])
Exemple #2
0
 def test_from_strain_stress_list(self):
     strain_list = [Strain.from_deformation(def_matrix)
                    for def_matrix in self.def_stress_dict['deformations']]
     stress_list = [stress for stress in self.def_stress_dict['stresses']]
     with warnings.catch_warnings(record=True):
         et_fl = -0.1*ElasticTensor.from_strain_stress_list(strain_list, 
                                                            stress_list).voigt
         self.assertArrayAlmostEqual(et_fl.round(2),
                                     [[59.29, 24.36, 22.46, 0, 0, 0],
                                      [28.06, 56.91, 22.46, 0, 0, 0],
                                      [28.06, 25.98, 54.67, 0, 0, 0],
                                      [0, 0, 0, 26.35, 0, 0],
                                      [0, 0, 0, 0, 26.35, 0],
                                      [0, 0, 0, 0, 0, 26.35]])