def AddNodalVariablesToModelPart(self): # Add variables (always before importing the model part) self.solver.AddVariables() # Add PfemSolidMechanicsApplication Variables import pfem_variables pfem_variables.AddVariables(self.main_model_part)
def AddNodalVariablesToModelPart(self): # Add PfemSolidMechanicsApplication Variables import pfem_variables pfem_variables.AddVariables(self.main_model_part)
ProjectParameters["problem_data"]["model_part_name"].GetString(): main_model_part } #construct the solver (main setting methods are located in the solver_module) solver_module = __import__( ProjectParameters["solver_settings"]["solver_type"].GetString()) solver = solver_module.CreateSolver(main_model_part, ProjectParameters["solver_settings"]) # Add variables (always before importing the model part) solver.AddVariables() # Add PfemSolidMechanicsApplication Variables import pfem_variables pfem_variables.AddVariables(main_model_part) #thermal thing: import eulerian_convection_diffusion_solver as convection_diffusion_solver_scripts #we create the thermal settings. thermal_settings = KratosMultiphysics.ConvectionDiffusionSettings() thermal_settings.SetDiffusionVariable(KratosMultiphysics.CONDUCTIVITY) thermal_settings.SetUnknownVariable(KratosMultiphysics.TEMPERATURE) (main_model_part.ProcessInfo).SetValue( KratosMultiphysics.CONVECTION_DIFFUSION_SETTINGS, thermal_settings) #adding the variables of the diffusion problem: convection_diffusion_solver_scripts.AddVariables( main_model_part) # no settings here! (read from the model_part) # Read model_part (note: the buffer_size is set here) (restart is read here) solver.ImportModelPart()