def _GetSolutionScheme(self, scheme_type, component_wise,
                           compute_contact_forces):

        if (scheme_type == "Newmark") or (scheme_type == "Bossak"):
            if (scheme_type == "Newmark"):
                mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBossakDisplacementScheme(
                    0.0)
            else:
                alpha = self.settings["damp_factor_m"].GetDouble()
                mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBossakDisplacementScheme(
                    alpha)

        return mechanical_scheme
コード例 #2
0
    def _ConstructScheme(self, scheme_type, solution_type):

        rayleigh_m = self.settings["mechanical_solver_settings"][
            "rayleigh_m"].GetDouble()
        rayleigh_k = self.settings["mechanical_solver_settings"][
            "rayleigh_k"].GetDouble()
        self.main_model_part.ProcessInfo.SetValue(KratosSolid.RAYLEIGH_ALPHA,
                                                  rayleigh_m)
        self.main_model_part.ProcessInfo.SetValue(KratosSolid.RAYLEIGH_BETA,
                                                  rayleigh_k)
        if (solution_type == "Quasi-Static"):
            if (rayleigh_m < 1.0e-20 and rayleigh_k < 1.0e-20):
                scheme = TrilinosApplication.TrilinosResidualBasedIncrementalUpdateStaticScheme(
                )
            else:
                scheme = KratosDam.TrilinosIncrementalUpdateStaticDampedScheme(
                )
        else:
            if (scheme_type == "Newmark"):
                damp_factor_m = 0.0
            else:
                damp_factor_m = -0.01
            scheme = TrilinosApplication.TrilinosResidualBasedBossakDisplacementScheme(
                damp_factor_m)

        return scheme
 def _create_solution_scheme(self):
     scheme_type = self.settings["scheme_type"].GetString()
     if (scheme_type == "Newmark"):
         damp_factor_m = 0.0
     elif (scheme_type == "Bossak"):
         damp_factor_m = self.dynamic_settings["damp_factor_m"].GetDouble()
     else:
         raise Exception("Unsupported scheme_type: " + scheme_type)
     mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBossakDisplacementScheme(
         damp_factor_m)
     return mechanical_scheme
コード例 #4
0
 def _create_solution_scheme(self):
     scheme_type = self.settings["scheme_type"].GetString()
     process_info = self.main_model_part.ProcessInfo
     process_info[
         StructuralMechanicsApplication.
         RAYLEIGH_ALPHA] = self.settings["rayleigh_alpha"].GetDouble()
     process_info[
         StructuralMechanicsApplication.
         RAYLEIGH_BETA] = self.settings["rayleigh_beta"].GetDouble()
     if scheme_type == "newmark":
         damp_factor_m = 0.0
         mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBossakDisplacementScheme(
             damp_factor_m)
     elif scheme_type == "bossak":
         damp_factor_m = self.settings["damp_factor_m"].GetDouble()
         mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBossakDisplacementScheme(
             damp_factor_m)
     elif scheme_type.startswith("bdf") or scheme_type == "backward_euler":
         order = auxiliar_methods_solvers.GetBDFIntegrationOrder(
             scheme_type)
         # In case of rotation dof we declare the dynamic variables
         if self.settings["rotation_dofs"].GetBool():
             bdf_parameters = KratosMultiphysics.Parameters(""" {
                 "domain_size"           : 3,
                 "integration_order"     : 2,
                 "solution_variables"    : ["DISPLACEMENT","ROTATION"]
             } """)
             bdf_parameters["domain_size"].SetInt(
                 process_info[KratosMultiphysics.DOMAIN_SIZE])
             mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBDFCustomScheme(
                 order, bdf_parameters)
         else:
             mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBDFDisplacementScheme(
                 order)
     else:
         err_msg = "The requested scheme type \"" + scheme_type + "\" is not available!\n"
         err_msg += "Available options are: \"newmark\", \"bossak\""
         raise Exception(err_msg)
     return mechanical_scheme
コード例 #5
0
 def _create_solution_scheme(self):
     scheme_type = self.dynamic_settings["scheme_type"].GetString()
     self.main_model_part.ProcessInfo[StructuralMechanicsApplication.RAYLEIGH_ALPHA] = self.dynamic_settings["rayleigh_alpha"].GetDouble()
     self.main_model_part.ProcessInfo[StructuralMechanicsApplication.RAYLEIGH_BETA] = self.dynamic_settings["rayleigh_beta"].GetDouble()
     if (scheme_type == "newmark"):
         damp_factor_m = 0.0
     elif (scheme_type == "bossak"):
         damp_factor_m = self.dynamic_settings["damp_factor_m"].GetDouble()
     else:
         err_msg =  "The requested scheme type \"" + scheme_type + "\" is not available!\n"
         err_msg += "Available options are: \"newmark\", \"bossak\""
         raise Exception(err_msg)
     mechanical_scheme = TrilinosApplication.TrilinosResidualBasedBossakDisplacementScheme(damp_factor_m)
     return mechanical_scheme