Beispiel #1
0
    def Initialize(self):
        super(SPAlgorithm, self).Initialize()

        self.InitializeAdditionalProcessInfoVars()

        from KratosMultiphysics.DemStructuresCouplingApplication.multiaxial_control_module_fem_dem_generalized_2d_utility import MultiaxialControlModuleFEMDEMGeneralized2DUtility
        self.multiaxial_control_module = MultiaxialControlModuleFEMDEMGeneralized2DUtility(
            self.model, self.sp_parameters)
        self.multiaxial_control_module.ExecuteInitialize()
        # if self.test_number:
        #     from KratosMultiphysics.DemStructuresCouplingApplication.control_module_fem_dem_utility import ControlModuleFemDemUtility
        #     self.control_module_fem_dem_utility = ControlModuleFemDemUtility(self.model, self.dem_solution.spheres_model_part, self.test_number)
        #     self.control_module_fem_dem_utility.ExecuteInitialize()

        self.CreateSPMeasuringRingSubmodelpart()

        # Create Postprocess tool for SP
        if self.use_post_process_tool:
            from KratosMultiphysics.DemStructuresCouplingApplication.sand_production_post_process_tool import SandProductionPostProcessTool
            self.sp_post_process_tool = SandProductionPostProcessTool(
                self.structural_solution._GetSolver().GetComputingModelPart(),
                self.dem_solution.spheres_model_part, self.test_number)

        from KratosMultiphysics.DemStructuresCouplingApplication import stress_failure_check_utility
        self.stress_failure_check_utility = stress_failure_check_utility.StressFailureCheckUtility(
            self.dem_solution.spheres_model_part, self.test_number)
    def Initialize(self):
        self.structural_solution.Initialize()  # Reading mdpa
        self.dem_solution.Initialize()  # Adding DEM variables and reading

        self._DetectStructuresSkin()
        self._TransferStructuresSkinToDem()
        self.dem_solution.solver.Initialize()

        self.sandwich_simulation = False
        # Test types (4 different options):
        # Test number 0: no test simulation
        # Test number 1: CTW16 specimen
        # Test number 2: CTW10 specimen
        # Test number 3: Blind test specimen
        self.test_number = 0

        if not self.sandwich_simulation and self.test_number:
            import control_module_fem_dem_utility
            self.control_module_fem_dem_utility = control_module_fem_dem_utility.ControlModuleFemDemUtility(
                self.model, self.dem_solution.spheres_model_part,
                self.test_number)
            self.control_module_fem_dem_utility.ExecuteInitialize()

        from KratosMultiphysics.DemStructuresCouplingApplication import stress_failure_check_utility
        self.stress_failure_check_utility = stress_failure_check_utility.StressFailureCheckUtility(
            self.dem_solution.spheres_model_part, self.test_number)

        mixed_mp = self.model.CreateModelPart('MixedPart')
        filename = os.path.join(
            self.dem_solution.post_path,
            self.dem_solution.DEM_parameters["problem_name"].GetString())
        self.gid_output = dem_structures_coupling_gid_output.DemStructuresCouplingGiDOutput(
            filename, True, "Binary", "Multiples", True, True,
            self.structural_solution._GetSolver().GetComputingModelPart(),
            self.dem_solution.spheres_model_part,
            self.dem_solution.cluster_model_part,
            self.dem_solution.rigid_face_model_part,
            self.dem_solution.contact_model_part, mixed_mp)

        structures_nodal_results = [
            "VOLUME_ACCELERATION", "DEM_SURFACE_LOAD", "REACTION",
            "TARGET_STRESS", "REACTION_STRESS", "LOADING_VELOCITY"
        ]
        dem_nodal_results = ["IS_STICKY", "DEM_STRESS_TENSOR"]
        clusters_nodal_results = []
        rigid_faces_nodal_results = []
        contact_model_part_results = ["CONTACT_FAILURE"]
        mixed_nodal_results = ["DISPLACEMENT", "VELOCITY"]
        gauss_points_results = ["CAUCHY_STRESS_TENSOR"]
        self.gid_output.initialize_dem_fem_results(
            structures_nodal_results, dem_nodal_results,
            clusters_nodal_results, rigid_faces_nodal_results,
            contact_model_part_results, mixed_nodal_results,
            gauss_points_results)
    def Initialize(self):
        super(SPAlgorithm,self).Initialize()

        self.InitializeAdditionalProcessInfoVars()

        if self.test_number:
            from KratosMultiphysics.DemStructuresCouplingApplication.control_module_fem_dem_utility import ControlModuleFemDemUtility
            self.control_module_fem_dem_utility = ControlModuleFemDemUtility(self.model, self.dem_solution.spheres_model_part, self.test_number)
            self.control_module_fem_dem_utility.ExecuteInitialize()

        # Create Postprocess tool for SP
        from KratosMultiphysics.DemStructuresCouplingApplication.sand_production_post_process_tool import SandProductionPostProcessTool
        self.sp_post_process_tool = SandProductionPostProcessTool(self.structural_solution._GetSolver().GetComputingModelPart(),
                                                                                                    self.dem_solution.spheres_model_part,
                                                                                                    self.test_number)

        from KratosMultiphysics.DemStructuresCouplingApplication import stress_failure_check_utility
        self.stress_failure_check_utility = stress_failure_check_utility.StressFailureCheckUtility(self.dem_solution.spheres_model_part, self.test_number)