def _create_solution_scheme(self): integration_method = self.time_integration_settings[ "integration_method"].GetString() if (self.implicit_solver_settings["rayleigh_damping"].GetBool() == True ): self.process_info[ KratosSolid.RAYLEIGH_ALPHA] = self.implicit_solver_settings[ "rayleigh_alpha"].GetDouble() self.process_info[ KratosSolid.RAYLEIGH_BETA] = self.implicit_solver_settings[ "rayleigh_beta"].GetDouble() else: self.process_info[KratosSolid.RAYLEIGH_ALPHA] = 0.0 self.process_info[KratosSolid.RAYLEIGH_BETA] = 0.0 # compute mass lumped matrix if (self.implicit_solver_settings["lumped_mass_matrix"].GetBool() == True): self.process_info[ KratosMultiphysics.COMPUTE_LUMPED_MASS_MATRIX] = True else: # compute consistent dynamic tangent/mass matrix if (self.implicit_solver_settings["consistent_mass_matrix"]. GetBool() == True): self.process_info[ KratosMultiphysics.COMPUTE_DYNAMIC_TANGENT] = True # set bossak factor bossak_factor = self.implicit_solver_settings[ "bossak_factor"].GetDouble() self.process_info[KratosMultiphysics.BOSSAK_ALPHA] = bossak_factor # set solution scheme and integration method dictionary self.integration_methods = {} if (integration_method == "Newmark"): self.integration_methods.update({ 'DISPLACEMENT': KratosSolid.NewmarkMethod(), 'ROTATION': KratosSolid.NewmarkMethod() }) #shells mechanical_scheme = KratosSolid.DisplacementNewmarkScheme() elif (integration_method == "Bossak"): self.integration_methods.update({ 'DISPLACEMENT': KratosSolid.BossakMethod(), 'ROTATION': KratosSolid.BossakMethod() }) #shells mechanical_scheme = KratosSolid.DisplacementBossakScheme() elif (integration_method == "Simo"): self.integration_methods.update({ 'DISPLACEMENT': KratosSolid.SimoMethod(), 'ROTATION': KratosSolid.SimoMethod() }) #shells mechanical_scheme = KratosSolid.DisplacementSimoScheme() elif (integration_method == "RotationNewmark"): self.integration_methods.update({ 'DISPLACEMENT': KratosSolid.NewmarkStepMethod(), 'ROTATION': KratosSolid.NewmarkStepRotationMethod() }) #beams mechanical_scheme = KratosSolid.DisplacementRotationNewmarkScheme() elif (integration_method == "RotationBossak"): self.integration_methods.update({ 'DISPLACEMENT': KratosSolid.BossakStepMethod(), 'ROTATION': KratosSolid.BossakStepRotationMethod() }) #beams mechanical_scheme = KratosSolid.DisplacementRotationBossakScheme() elif (integration_method == "RotationSimo"): self.integration_methods.update({ 'DISPLACEMENT': KratosSolid.SimoStepMethod(), 'ROTATION': KratosSolid.SimoStepRotationMethod() }) #beams mechanical_scheme = KratosSolid.DisplacementRotationSimoScheme() elif (integration_method == "RotationEMC"): self.integration_methods.update({ 'DISPLACEMENT': KratosSolid.EmcStepMethod(), 'ROTATION': KratosSolid.EmcStepRotationMethod() }) #shells mechanical_scheme = KratosSolid.DisplacementRotationEmcScheme() else: raise Exception("Unsupported integration_method: " + integration_method) # set integration parameters self._set_time_integration_methods() return mechanical_scheme
def _create_solution_scheme(self): integration_method = self.time_integration_settings[ "integration_method"].GetString() if (self.implicit_solver_settings["rayleigh_damping"].GetBool() == True ): self.process_info[ KratosSolid.RAYLEIGH_ALPHA] = self.implicit_solver_settings[ "rayleigh_alpha"].GetDouble() self.process_info[ KratosSolid.RAYLEIGH_BETA] = self.implicit_solver_settings[ "rayleigh_beta"].GetDouble() else: self.process_info[KratosSolid.RAYLEIGH_ALPHA] = 0.0 self.process_info[KratosSolid.RAYLEIGH_BETA] = 0.0 # compute mass lumped matrix if (self.implicit_solver_settings["lumped_mass_matrix"].GetBool() == True): self.process_info[ KratosMultiphysics.COMPUTE_LUMPED_MASS_MATRIX] = True else: # compute consistent dynamic tangent/mass matrix if (self.implicit_solver_settings["consistent_mass_matrix"]. GetBool() == True): self.process_info[ KratosMultiphysics.COMPUTE_DYNAMIC_TANGENT] = True if (self.solving_strategy_settings["builder_type"].GetString() == "component_wise"): dynamic_factor = self.implicit_solver_settings[ "dynamic_factor"].GetDouble() damp_factor_m = self.implicit_solver_settings[ "bossak_factor"].GetDouble() mechanical_scheme = KratosSolid.ComponentWiseBossakScheme( damp_factor_m, dynamic_factor) elif (integration_method == "Newmark"): # integration method for the integration of the imposed variable components time_integration_method = KratosSolid.NewmarkMethod() time_integration_method.AddToProcessInfo( KratosSolid.TIME_INTEGRATION_METHOD, time_integration_method, self.process_info) #damp_factor_m = 0.0 #mechanical_scheme = KratosMultiphysics.ResidualBasedBossakDisplacementScheme(damp_factor_m) mechanical_scheme = KratosSolid.ResidualBasedDisplacementNewmarkScheme( ) elif (integration_method == "Bossak"): bossak_factor = self.implicit_solver_settings[ "bossak_factor"].GetDouble() self.process_info[KratosMultiphysics.BOSSAK_ALPHA] = bossak_factor # integration method for the integration of the imposed variable components time_integration_method = KratosSolid.BossakMethod() time_integration_method.AddToProcessInfo( KratosSolid.TIME_INTEGRATION_METHOD, time_integration_method, self.process_info) #mechanical_scheme = KratosMultiphysics.ResidualBasedBossakDisplacementScheme(bossak_factor) mechanical_scheme = KratosSolid.ResidualBasedDisplacementBossakScheme( ) elif (integration_method == "RotationNewmark"): dynamic_factor = self.implicit_solver_settings[ "dynamic_factor"].GetDouble() # 0,1 damp_factor_m = self.implicit_solver_settings[ "bossak_factor"].GetDouble() mechanical_scheme = KratosSolid.ResidualBasedRotationNewmarkScheme( dynamic_factor, damp_factor_m) elif (integration_method == "RotationSimo"): dynamic_factor = self.implicit_solver_settings[ "dynamic_factor"].GetDouble() # 0,1 damp_factor_m = self.implicit_solver_settings[ "bossak_factor"].GetDouble() mechanical_scheme = KratosSolid.ResidualBasedRotationSimoScheme( dynamic_factor, damp_factor_m) elif (integration_method == "RotationEMC"): dynamic_factor = self.implicit_solver_settings[ "dynamic_factor"].GetDouble() # 0,1 mechanical_scheme = KratosSolid.ResidualBasedRotationEMCScheme( dynamic_factor) else: raise Exception("Unsupported integration_method: " + integration_method) return mechanical_scheme