Esempio n. 1
0
    def ExecuteThisProcess(self):
        self.model_part = self.model_part[self.model_part_name]
        self.restarted = self.model_part.ProcessInfo[
            KratosMultiphysics.IS_RESTARTED]
        if (self.restarted == True):
            self.executed = True
            return
        params = KratosMultiphysics.Parameters("{}")
        params.AddValue("model_part_name", self.settings["model_part_name"])
        params.AddValue("gravity_active", self.settings["gravity_active"])
        params.AddValue("constant_vertical_stress",
                        self.settings["constant_vertical_stress"])
        params.AddValue("constant_horizontal_stress",
                        self.settings["constant_horizontal_stress"])
        params.AddValue("constant_water_pressure",
                        self.settings["constant_water_pressure"])
        params.AddValue("top_surface_load_bool",
                        self.settings["top_surface_load_bool"])
        params.AddValue("top_surface_load", self.settings["top_surface_load"])
        params.AddValue("top_water_pressure",
                        self.settings["top_water_pressure"])
        initial_state_process = KratosPFEMSolid.SetMechanicalInitialStateProcess(
            self.model_part, self.settings)
        initial_state_process.Execute()

        for node in self.model_part.Nodes:
            GG = node.GetSolutionStepValue(
                KratosMultiphysics.VOLUME_ACCELERATION)
            GG[1] = -10
            node.SetSolutionStepValue(KratosMultiphysics.VOLUME_ACCELERATION,
                                      GG)
Esempio n. 2
0
 def ExecuteThisProcess(self):
     self.model_part = self.model_part[self.model_part_name]
     self.restarted = self.model_part.ProcessInfo[
         KratosMultiphysics.IS_RESTARTED]
     if (self.restarted == True):
         self.executed = True
         return
     params = KratosMultiphysics.Parameters("{}")
     params.AddValue("model_part_name", self.settings["model_part_name"])
     params.AddValue("gravity_active", self.settings["gravity_active"])
     params.AddValue("constant_vertical_stress",
                     self.settings["constant_vertical_stress"])
     params.AddValue("constant_horizontal_stress",
                     self.settings["constant_horizontal_stress"])
     params.AddValue("constant_water_pressure",
                     self.settings["constant_water_pressure"])
     params.AddValue("top_surface_load_bool",
                     self.settings["top_surface_load_bool"])
     params.AddValue("top_surface_load", self.settings["top_surface_load"])
     params.AddValue("top_water_pressure",
                     self.settings["top_water_pressure"])
     initial_state_process = KratosPFEMSolid.SetMechanicalInitialStateProcess(
         self.model_part, self.settings)
     initial_state_process.Execute()
     self.the_process_has_been_executed = True
    def _create_solution_scheme(self):

        scheme_type = self.settings["scheme_type"].GetString()

        damp_factor_m = 0.0
        mechanical_scheme = KratosPfemSolid.ResidualBasedUWBossakScheme(
            damp_factor_m, 1.0)

        return mechanical_scheme
    def _create_solution_scheme(self):
        
        integration_method = self.time_integration_settings["integration_method"].GetString()

        #if(integration_method == "Newmark"):           
        damp_factor_m = 0.0
        mechanical_scheme = KratosPfemSolid.ResidualBasedUWBossakScheme(damp_factor_m, 1.0)
                    
        return mechanical_scheme