示例#1
0
    def test_static_analysis(self):
        # set up
        from femexamples.boxanalysis import setup_static as setup
        setup(self.active_doc, "ccxtools")
        test_name = "ccxtools static"
        base_name = "cube_static"
        res_obj_name = "CCX_Results"
        analysis_dir = testtools.get_unit_test_tmp_dir(self.temp_dir,
                                                       "FEM_ccx_static")

        # test input file writing
        fea = self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            test_end=True,
        )

        # test result reading
        self.result_reading_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            fea=fea,
            res_obj_name=res_obj_name,
        )
示例#2
0
    def test_freq_analysis(self):
        # set up
        from femexamples.boxanalysis import setup_frequency as setup
        setup(self.document, "ccxtools")
        test_name = "frequency"
        base_name = "cube_frequency"
        res_obj_name = "CCX_Mode1_Results"
        analysis_dir = testtools.get_unit_test_tmp_dir(self.temp_dir,
                                                       "FEM_ccx_frequency")

        # test input file writing
        fea = self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            test_end=True,
        )

        # test result reading
        self.result_reading_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            fea=fea,
            res_obj_name=res_obj_name,
        )
示例#3
0
    def test_thermomech_spine_analysis(self):
        # set up
        from femexamples.thermomech_spine import setup
        setup(self.active_doc, "ccxtools")
        test_name = "thermomechanical"
        base_name = "spine_thermomech"
        res_obj_name = "CCX_Results"
        analysis_dir = testtools.get_unit_test_tmp_dir(self.temp_dir,
                                                       "FEM_ccx_thermomech")

        # test input file writing
        fea = self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            test_end=True,
        )

        # test result reading
        self.result_reading_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            fea=fea,
            res_obj_name=res_obj_name,
        )
示例#4
0
    def test_thermomech_flow1D_analysis(self):
        # set up
        from femexamples.thermomech_flow1d import setup
        setup(self.document, "ccxtools")
        test_name = "Flow1D"
        base_name = "Flow1D_thermomech"
        res_obj_name = "CCX_Time1_0_Results"
        analysis_dir = testtools.get_unit_test_tmp_dir(
            self.temp_dir, "FEM_ccx_Flow1D_thermomech")

        # test input file writing
        fea = self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            test_end=True,
        )

        # test result reading
        self.result_reading_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
            fea=fea,
            res_obj_name=res_obj_name,
        )
示例#5
0
 def test_static_material_nonlinar(self):
     # set up
     from femexamples.material_nl_platewithhole import setup
     setup(self.active_doc, "ccxtools")
     test_name = "nonlinear material"
     base_name = "mat_nonlinear"
     analysis_dir = testtools.get_unit_test_tmp_dir(self.temp_dir,
                                                    "FEM_ccx_matnonlinear")
     """ # https://forum.freecadweb.org/viewtopic.php?f=18&t=42821
示例#6
0
 def test_static_constraint_contact_solid_solid(self):
     # set up
     from femexamples.constraint_contact_solid_solid import setup
     setup(self.active_doc, "ccxtools")
     test_name = "constraint contact solid solid"
     base_name = "constraint_contact_solid_solid"
     analysis_dir = testtools.get_unit_test_tmp_dir(
         self.temp_dir,
         "FEM_ccx_constraint_contact_solid_solid",
     )
     """
示例#7
0
    def test_thermomech_bimetall(self):
        # set up
        from femexamples.thermomech_bimetall import setup
        setup(self.active_doc, "ccxtools")
        test_name = "thermomech bimetall"
        base_name = "thermomech_bimetall"
        analysis_dir = testtools.get_unit_test_tmp_dir(
            self.temp_dir, "FEM_ccx_thermomech_bimetall")

        # test input file writing
        self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
        )
示例#8
0
    def test_static_material_nonlinar(self):
        # set up
        from femexamples.material_nl_platewithhole import setup
        setup(self.active_doc, "ccxtools")
        test_name = "nonlinear material"
        base_name = "mat_nonlinear"
        analysis_dir = testtools.get_unit_test_tmp_dir(self.temp_dir,
                                                       "FEM_ccx_matnonlinear")

        # test input file writing
        self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
        )
示例#9
0
    def test_static_material_multiple(self):
        # set up
        from femexamples.material_multiple_twoboxes import setup
        setup(self.active_doc, "ccxtools")
        test_name = "multiple material"
        base_name = "mat_multiple"
        analysis_dir = testtools.get_unit_test_tmp_dir(self.temp_dir,
                                                       "FEM_ccx_multimat")

        # test input file writing
        self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
        )
示例#10
0
    def test_static_constraint_tie(self):
        # set up
        from femexamples.constraint_tie import setup
        setup(self.active_doc, "ccxtools")
        test_name = "constraint tie"
        base_name = "constraint_tie"
        analysis_dir = testtools.get_unit_test_tmp_dir(
            self.temp_dir,
            "FEM_ccx_constraint_tie",
        )

        # test input file writing
        self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
        )
示例#11
0
 def test_static_constraint_force_faceload_hexa20(self):
     # set up
     from femexamples.ccx_cantilever_std import setup_cantileverhexa20faceload as setup
     setup(self.active_doc, "ccxtools")
     test_name = "canti ccx faceload hexa20"
     base_name = "canti_ccx_faceload_hexa20"
     analysis_dir = testtools.get_unit_test_tmp_dir(
         self.temp_dir,
         ("FEM_" + base_name),
     )
     fcc_print(self.active_doc.Objects)
     # test input file writing
     self.input_file_writing_test(
         test_name=test_name,
         base_name=base_name,
         analysis_dir=analysis_dir,
     )
示例#12
0
    def test_static_constraint_contact_shell_shell(self):
        # set up
        from femexamples.constraint_contact_shell_shell import setup
        setup(self.document, "ccxtools")
        test_name = "constraint contact shell shell"
        base_name = "constraint_contact_shell_shell"
        analysis_dir = testtools.get_unit_test_tmp_dir(
            self.temp_dir,
            "FEM_ccx_constraint_contact_shell_shell",
        )

        # test input file writing
        self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
        )
示例#13
0
    def test_static_material_nonlinar(self):
        # set up
        from femexamples.material_nl_platewithhole import setup
        setup(self.active_doc, "ccxtools")
        test_name = "nonlinear material"
        base_name = "mat_nonlinear"
        analysis_dir = testtools.get_unit_test_tmp_dir(self.temp_dir,
                                                       "FEM_ccx_matnonlinear")

        # test input file writing
        if sys.version_info.major >= 3:
            # https://forum.freecadweb.org/viewtopic.php?f=18&t=42821
            self.input_file_writing_test(
                test_name=test_name,
                base_name=base_name,
                analysis_dir=analysis_dir,
            )
示例#14
0
    def test_static_constraint_contact_solid_solid(self):
        # does not pass on travis, but on my local system it does, Bernd
        return
        # TODO does not pass on Python 2
        if sys.version_info.major < 3:
            return

        # set up
        from femexamples.constraint_contact_solid_solid import setup
        setup(self.document, "ccxtools")
        test_name = "constraint contact solid solid"
        base_name = "constraint_contact_solid_solid"
        analysis_dir = testtools.get_unit_test_tmp_dir(
            self.temp_dir,
            "FEM_ccx_constraint_contact_solid_solid",
        )

        # test input file writing
        self.input_file_writing_test(
            test_name=test_name,
            base_name=base_name,
            analysis_dir=analysis_dir,
        )