def __init__(self, Model, settings):
        KratosMultiphysics.Process.__init__(self)
        default_settings = KratosMultiphysics.Parameters("""
        {
            "model_part_name"           : "example_part",
            "computing_model_part_name" : "Structure",
            "node_ids"                  : [1,2],
            "element_id"                : 1,
            "property_id"               : 1,
            "displacement_data"         : [0.0,1.0,2.0,3.0],
            "force_data"                : [0.0,1.0,2.0,3.0],
            "polynomial_order"          : 3
        }
        """)
        default_settings.ValidateAndAssignDefaults(settings)
        self.function_fitted = polyfit(
            settings["displacement_data"].GetVector(),
            settings["force_data"].GetVector(),
            settings["polynomial_order"].GetInt())

        # The computing model part
        self.computing_model_part = Model[
            settings["computing_model_part_name"].GetString()]
        self.custom_model_part = Model[settings["model_part_name"].GetString()]

        self.empirical_spring_element_process = CableNetApplication.EmpiricalSpringElementProcess(
            self.custom_model_part, settings, self.function_fitted)
예제 #2
0
    def __init__(self, Model, settings):
        KratosMultiphysics.Process.__init__(self)
        default_settings = KratosMultiphysics.Parameters("""
        {
            "constraint_name"           : "LinearMasterSlaveConstraint",
            "master_sub_model_part_name"    : "master_connect",
            "slave_sub_model_part_name"     : "slave_connect",
            "model_name"                    : "Structure",
            "variable_names"                : ["DISPLACEMENT_Y","DISPLACEMENT_Z"],
            "reform_every_step"             : true,
            "debug_info"                    : true,
            "angled_initial_line"           : false,
            "follow_line"                   : false
        }
        """)
        default_settings.ValidateAndAssignDefaults(settings)

        # The computing model part
        self.computing_model_part = Model["Structure"].GetSubModelPart(
            "computing_domain")
        self.master_model_part = Model["Structure"].GetSubModelPart(
            settings["master_sub_model_part_name"].GetString())

        self.sliding_edge_process = CableNetApplication.SlidingEdgeProcess(
            Model[settings["model_name"].GetString()], settings)
예제 #3
0
 def __init__(self, Model, settings):
     KratosMultiphysics.Process.__init__(self)
     default_settings = KratosMultiphysics.Parameters("""
     {
         "model_part_name_slave"           : "example_part_slave",
         "model_part_name_master"          : "example_part_master",
         "computing_model_part_name"       : "Structure",
         "element_id"                      : 1,
         "property_id"                     : 1,
         "debug_info"                      : false
     }
     """)
     default_settings.ValidateAndAssignDefaults(settings)
     self.custom_process = CableNetApplication.ApplyWeakSlidingProcess(
         Model[settings["computing_model_part_name"].GetString()], settings)
    def __init__(self, Model, settings):
        KratosMultiphysics.Process.__init__(self)
        default_settings = KratosMultiphysics.Parameters("""
        {
            "edge_sub_model_part_name"  : "Structure.example_part",
            "element_type"              : "cable",
            "node_id_order"             : [1,2,3],
            "element_id"                : 1,
            "property_id"               : 1
        }
        """)
        default_settings.ValidateAndAssignDefaults(settings)

        # The computing model part
        self.edge_model_part = Model[
            settings["edge_sub_model_part_name"].GetString()]
        self.edge_cable_element_process = CableNetApplication.EdgeCableElementProcess(
            self.edge_model_part, settings)
예제 #5
0
    def __init__(self, Model, settings):
        KratosMultiphysics.Process.__init__(self)
        default_settings = KratosMultiphysics.Parameters("""
        {
            "edge_sub_model_part_name"  : "Structure.example_part",
            "element_type"              : "cable",
            "node_id_order"             : [1,2,3],
            "element_id"                : 1,
            "property_id"               : 1
        }
        """)
        default_settings.ValidateAndAssignDefaults(settings)

        self.edge_model_part = Model[
            settings["edge_sub_model_part_name"].GetString()]

        node_list = settings["node_id_order"].GetVector()
        if len(node_list) == 0:
            node_list = self.CreateCorrectNodeOrder()
            settings["node_id_order"].SetVector(node_list)

        self.edge_cable_element_process = CableNetApplication.EdgeCableElementProcess(
            self.edge_model_part, settings)