Esempio n. 1
0
 def import_constitutive_laws(self):
     materials_filename = self.settings["material_import_settings"][
         "materials_filename"].GetString()
     if (materials_filename != ""):
         import read_materials_process
         # Create a dictionary of model parts.
         Model = {self.main_model_part.Name: self.main_model_part}
         for i in range(self.settings["problem_domain_sub_model_part_list"].
                        size()):
             part_name = self.settings[
                 "problem_domain_sub_model_part_list"][i].GetString()
             Model.update({
                 part_name:
                 self.main_model_part.GetSubModelPart(part_name)
             })
         for i in range(
                 self.settings["processes_sub_model_part_list"].size()):
             part_name = self.settings["processes_sub_model_part_list"][
                 i].GetString()
             Model.update({
                 part_name:
                 self.main_model_part.GetSubModelPart(part_name)
             })
         # Add constitutive laws and material properties from json file to model parts.
         read_materials_process.ReadMaterialsProcess(
             Model, self.settings["material_import_settings"])
         materials_imported = True
     else:
         materials_imported = False
     return materials_imported
Esempio n. 2
0
 def Initialize(self):
     import read_materials_process
     # Create a dictionary of model parts.
     model = Model()
     model.AddModelPart(self.model_part)
     # Add constitutive laws and material properties from json file to model parts.
     read_materials_process.ReadMaterialsProcess(model, self.response_settings["material_import_settings"])
     self.response_function_utility.Initialize()
Esempio n. 3
0
 def import_constitutive_laws(self):
     materials_filename = self.settings["material_import_settings"]["materials_filename"].GetString()
     if (materials_filename != ""):
         import read_materials_process
         # Add constitutive laws and material properties from json file to model parts.
         read_materials_process.ReadMaterialsProcess(self.model, self.settings["material_import_settings"])
         materials_imported = True
     else:
         materials_imported = False
     return materials_imported
Esempio n. 4
0
    def Initialize(self):
        import read_materials_process

        if self.model_part_needs_to_be_imported:
            # import model part
            model_part_io = ModelPartIO(self.response_settings["model_import_settings"]["input_filename"].GetString())
            model_part_io.ReadModelPart(self.model_part)

        # Add constitutive laws and material properties from json file to model parts.
        read_materials_process.ReadMaterialsProcess(self.model, self.response_settings["material_import_settings"])
        self.response_function_utility.Initialize()
    def Initialize(self):
        import read_materials_process

        if self.model_part_needs_to_be_imported:
            # import model part
            model_part_io = ModelPartIO(self.model_part.Name)
            self.model_part.ProcessInfo.SetValue(DOMAIN_SIZE, 3)
            model_part_io.ReadModelPart(self.model_part)

        # Add constitutive laws and material properties from json file to model parts.
        read_materials_process.ReadMaterialsProcess(self.model, self.response_settings["material_import_settings"])
        self.response_function_utility.Initialize()
Esempio n. 6
0
 def import_constitutive_laws(self):
     materials_filename = self.settings["material_import_settings"]["materials_filename"].GetString()
     if (materials_filename != ""):
         import read_materials_process
         # Create a dictionary of model parts.
         Model = KratosMultiphysics.Model()
         Model.AddModelPart(self.main_model_part)
         # Add constitutive laws and material properties from json file to model parts.
         read_materials_process.ReadMaterialsProcess(Model, self.settings["material_import_settings"])
         materials_imported = True
     else:
         materials_imported = False
     return materials_imported