Model Processor#

Script for the definition of the class model_Processor and its methods

NaxToPy.Modules.common.model_processor.create_material(material, materials, n2pmaterials)[source]#

Helper function to create and store material instances

NaxToPy.Modules.common.model_processor.elem_to_material(model: N2PModelContent, element_list: list[N2PElement], onlyisotropic: bool = False) dict[source]#

Maps elements to their corresponding material instances. Handles both PSHELL (single material) and PCOMP (list of materials) cases.

NaxToPy.Modules.common.model_processor.get_n2pmaterials(model: N2PModelContent, element_list: list[N2PElement]) dict[source]#

Function which creates a dictionary that relates the element with the n2pmaterial and filters out elements that trigger warnings from the original element_list.

NaxToPy.Modules.common.model_processor.get_n2pmaterials_iso(model: N2PModelContent, element_list: list[N2PElement]) dict[source]#

Function which creates a dictionary that relates the element with the n2pmaterial and filters out elements that trigger warnings from the original element_list.

NaxToPy.Modules.common.model_processor.get_np_array_from_result_new_report(model, result, element_map: dict, component_map: dict)[source]#

Processes the results array and returns the processed data and necessary mappings.

NaxToPy.Modules.common.model_processor.get_properties(model: N2PModelContent, element_list: list[N2PElement]) dict[source]#

Extracts and constructs property dictionaries for elements with CompositeShell instances.

Parameters:
  • model (N2PModelContent) – Model containing property and material data.

  • element_list (list[N2PElement]) – List of elements to process.

Returns:

A dictionary of unique properties and a dictionary mapping elements to their properties.

Return type:

tuple

NaxToPy.Modules.common.model_processor.get_sandwich_properties(core_type: str, model: N2PModelContent, element_list: list[N2PElement], mat_dict: dict) dict[source]#

Extracts and constructs sandwich dictionaries for elements with Sandwich instances.

Parameters:
  • model (N2PModelContent) – Model containing property and material data.

  • element_list (list[N2PElement]) – List of elements to process.

Returns:

A dictionary of unique sandwich and a dictionary mapping elements to their sandwich structure.

Return type:

dict