Example #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):
        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)