    

 ## On this page

  

 

 # Model

 Last update: 16.07.2026 

<a id="compolyx.Model"></a>

### *class* compolyx.Model(name=None, path=None, format=None, ignored\_entities=None, graph=None, parent=None, convert\_section\_data=False, unit\_system\_type=None, reference\_surface\_input\_unit\_system\_type=None, cache\_data=False)

Represents a finite element model.

Access:

```pycon
>>> import compolyx
>>> db = compolyx.DB()
>>> model = db.import_model(name='class40.1', path='class40.cdb', format='ansys:cdb')

```

Get existing model:

```pycon
>>> class40_model = db.models['class40.1']

```

### Attributes

NameDescription[`Model.active_scene`](compolyx.Model.active_scene.md#compolyx.Model.active_scene)Active Scene.[`Model.analysis_model_path`](compolyx.Model.analysis_model_path.md#compolyx.Model.analysis_model_path)Analysis model file path.[`Model.angle_tolerance`](compolyx.Model.angle_tolerance.md#compolyx.Model.angle_tolerance)Section computation angle tolerance (in degree).[`Model.cache_update_results`](compolyx.Model.cache_update_results.md#compolyx.Model.cache_update_results)Define whether to store the update results or not.[`Model.definitions`](compolyx.Model.definitions.md#compolyx.Model.definitions)Definitions.[`Model.deformation_scale_factor`](compolyx.Model.deformation_scale_factor.md#compolyx.Model.deformation_scale_factor)Factor with which the deformed shape plot is scaled.[`Model.draping_offset_correction`](compolyx.Model.draping_offset_correction.md#compolyx.Model.draping_offset_correction)Define whether to consider lay-up thickness in draping analysis.[`Model.edge_sets`](compolyx.Model.edge_sets.md#compolyx.Model.edge_sets)Dictionary with all Edge Sets defined.[`Model.element_sets`](compolyx.Model.element_sets.md#compolyx.Model.element_sets)Dictionary with all element sets defined.[`Model.enabled`](compolyx.Model.enabled.md#compolyx.Model.enabled)[`Model.excel_path`](compolyx.Model.excel_path.md#compolyx.Model.excel_path)[`Model.field_definitions`](compolyx.Model.field_definitions.md#compolyx.Model.field_definitions)Dictionary with all defined field definitions.[`Model.force_disable_result_extrapolation`](compolyx.Model.force_disable_result_extrapolation.md#compolyx.Model.force_disable_result_extrapolation)Force the result extrapolation to be disabled ('ERESX,NO' command) when exporting to APDL or CDB format.[`Model.format`](compolyx.Model.format.md#compolyx.Model.format)File format string.[`Model.geometry`](compolyx.Model.geometry.md#compolyx.Model.geometry)Geometry node.[`Model.is_dict_item`](compolyx.Model.is_dict_item.md#compolyx.Model.is_dict_item)Indicates whether the object is an item in a dictionary.[`Model.is_list_item`](compolyx.Model.is_list_item.md#compolyx.Model.is_list_item)Indicates whether the object is an item of a list.[`Model.layup_plots`](compolyx.Model.layup_plots.md#compolyx.Model.layup_plots)Plots.[`Model.link_path`](compolyx.Model.link_path.md#compolyx.Model.link_path)Root path of the current node in the tree for links to this object.[`Model.lookup_tables`](compolyx.Model.lookup_tables.md#compolyx.Model.lookup_tables)Dictionary with all Look-Up Tables.[`Model.material_data`](compolyx.Model.material_data.md#compolyx.Model.material_data)Dictionary with all Material Data defined.[`Model.mesh`](compolyx.Model.mesh.md#compolyx.Model.mesh)Mesh of this model.[`Model.minimum_analysis_ply_thickness`](compolyx.Model.minimum_analysis_ply_thickness.md#compolyx.Model.minimum_analysis_ply_thickness)Section computation minimum analysis ply thickness (in length unit of model).[`Model.modeling_groups`](compolyx.Model.modeling_groups.md#compolyx.Model.modeling_groups)Dictionary with all Modeling Groups defined.[`Model.name`](compolyx.Model.name.md#compolyx.Model.name)Name of the object.[`Model.oriented_selection_sets`](compolyx.Model.oriented_selection_sets.md#compolyx.Model.oriented_selection_sets)Dictionary with all oriented element sets defined.[`Model.parameters`](compolyx.Model.parameters.md#compolyx.Model.parameters)List of parameters visible to the workbench.[`Model.parent`](compolyx.Model.parent.md#compolyx.Model.parent)Parent object in the tree.[`Model.path`](compolyx.Model.path.md#compolyx.Model.path)Path to the reference surface input file.[`Model.plybook`](compolyx.Model.plybook.md#compolyx.Model.plybook)PlyBook.[`Model.pre_path`](compolyx.Model.pre_path.md#compolyx.Model.pre_path)Save path of pre database linked to currently loaded post database.[`Model.ratio_of_displayed_vectors`](compolyx.Model.ratio_of_displayed_vectors.md#compolyx.Model.ratio_of_displayed_vectors)[`Model.reference_surface_bounding_box`](compolyx.Model.reference_surface_bounding_box.md#compolyx.Model.reference_surface_bounding_box)Tuple with corners of bounding box of reference surface mesh.[`Model.reference_surface_input_unit_system_locked`](compolyx.Model.reference_surface_input_unit_system_locked.md#compolyx.Model.reference_surface_input_unit_system_locked)If the unit system of the reference surface is not defined in the mesh input, the unit system can be changed.[`Model.reference_surface_input_unit_system_type`](compolyx.Model.reference_surface_input_unit_system_type.md#compolyx.Model.reference_surface_input_unit_system_type)Unit System of the Reference Surface Input File.[`Model.relative_thickness_tolerance`](compolyx.Model.relative_thickness_tolerance.md#compolyx.Model.relative_thickness_tolerance)Section computation relative thickness tolerance.[`Model.root_path`](compolyx.Model.root_path.md#compolyx.Model.root_path)Root path of the current node in the tree.[`Model.rosettes`](compolyx.Model.rosettes.md#compolyx.Model.rosettes)Dictionary with all Rosettes defined.[`Model.sampling_points`](compolyx.Model.sampling_points.md#compolyx.Model.sampling_points)Sampling point Container.[`Model.save_path`](compolyx.Model.save_path.md#compolyx.Model.save_path)[`Model.scenes`](compolyx.Model.scenes.md#compolyx.Model.scenes)Scenes.[`Model.scripts`](compolyx.Model.scripts.md#compolyx.Model.scripts)List of user-defined scripts.[`Model.section_cuts`](compolyx.Model.section_cuts.md#compolyx.Model.section_cuts)Section Cuts.[`Model.selection`](compolyx.Model.selection.md#compolyx.Model.selection)Selected objects of this model.[`Model.selection_rules`](compolyx.Model.selection_rules.md#compolyx.Model.selection_rules)Dictionary with all Selection Rules defined.[`Model.sensors`](compolyx.Model.sensors.md#compolyx.Model.sensors)Dictionary with all Sensors.[`Model.show_deformed`](compolyx.Model.show_deformed.md#compolyx.Model.show_deformed)Whether to show result plots in the deformed and scaled configuration.[`Model.show_solver_elements`](compolyx.Model.show_solver_elements.md#compolyx.Model.show_solver_elements)Whether mesh selections and plot should consider solver elements in solid models or not.[`Model.solid_models`](compolyx.Model.solid_models.md#compolyx.Model.solid_models)SolidModel.[`Model.solutions`](compolyx.Model.solutions.md#compolyx.Model.solutions)Solutions.[`Model.solver`](compolyx.Model.solver.md#compolyx.Model.solver)Solver instance.[`Model.status_changed_controller`](compolyx.Model.status_changed_controller.md#compolyx.Model.status_changed_controller)[`Model.unit_system`](compolyx.Model.unit_system.md#compolyx.Model.unit_system)Create a unit system and assign it to the model.[`Model.use_default_section_tolerances`](compolyx.Model.use_default_section_tolerances.md#compolyx.Model.use_default_section_tolerances)Boolean whether to uses angle and thickness tolerances of the application preferences for section computation.[`Model.use_nodal_thicknesses`](compolyx.Model.use_nodal_thicknesses.md#compolyx.Model.use_nodal_thicknesses)Define whether to use nodal thicknesses or element thicknesses.[`Model.vector_scale_factor`](compolyx.Model.vector_scale_factor.md#compolyx.Model.vector_scale_factor)[`Model.views`](compolyx.Model.views.md#compolyx.Model.views)Views.[`Model.workbench_state`](compolyx.Model.workbench_state.md#compolyx.Model.workbench_state)### Methods

NameDescription[`Model.add_solution`](compolyx.Model.add_solution.md#compolyx.Model.add_solution)(name\[, id, path, path2, ...\])Load a nodal solution from one or more files and add it to the model.[`Model.add_winding_entities`](compolyx.Model.add_winding_entities.md#compolyx.Model.add_winding_entities)(axial\_direction, ...)Generates a winding layup for an axisymmetric body.[`Model.average_element_size`](compolyx.Model.average_element_size.md#compolyx.Model.average_element_size)()Average element size of the model.[`Model.coordinate_system_arrow_length`](compolyx.Model.coordinate_system_arrow_length.md#compolyx.Model.coordinate_system_arrow_length)()[`Model.copy_combined_failure_criteria`](compolyx.Model.copy_combined_failure_criteria.md#compolyx.Model.copy_combined_failure_criteria)(source)Copy a combined failure criteria definition.[`Model.copy_edge_set`](compolyx.Model.copy_edge_set.md#compolyx.Model.copy_edge_set)(source)Copy a edge set.[`Model.copy_element_set`](compolyx.Model.copy_element_set.md#compolyx.Model.copy_element_set)(source)Copy an element set.[`Model.copy_field_definition`](compolyx.Model.copy_field_definition.md#compolyx.Model.copy_field_definition)(source)Copy a FieldDefinition.[`Model.copy_lookup_table`](compolyx.Model.copy_lookup_table.md#compolyx.Model.copy_lookup_table)(source)Copy a lookup table.[`Model.copy_oriented_selection_set`](compolyx.Model.copy_oriented_selection_set.md#compolyx.Model.copy_oriented_selection_set)(source)Copy an oriented element set.[`Model.copy_rosette`](compolyx.Model.copy_rosette.md#compolyx.Model.copy_rosette)(source)Copy a rosette.[`Model.copy_sampling_point`](compolyx.Model.copy_sampling_point.md#compolyx.Model.copy_sampling_point)(source)Copy a sampling point.[`Model.copy_section_cut`](compolyx.Model.copy_section_cut.md#compolyx.Model.copy_section_cut)(source)Copy a section cut.[`Model.copy_selection_rule`](compolyx.Model.copy_selection_rule.md#compolyx.Model.copy_selection_rule)(source)Copy a rule.[`Model.copy_sensor`](compolyx.Model.copy_sensor.md#compolyx.Model.copy_sensor)(source)Copy a sensor.[`Model.copy_solid_model`](compolyx.Model.copy_solid_model.md#compolyx.Model.copy_solid_model)(source)Copy a solid model.[`Model.create_boolean_selection_rule`](compolyx.Model.create_boolean_selection_rule.md#compolyx.Model.create_boolean_selection_rule)(name\[, ...\])Create a new boolean selection rule.[`Model.create_combined_failure_criteria`](compolyx.Model.create_combined_failure_criteria.md#compolyx.Model.create_combined_failure_criteria)(name)Create a combined failure criteria.[`Model.create_combined_solution`](compolyx.Model.create_combined_solution.md#compolyx.Model.create_combined_solution)(\[name, solutions\])[`Model.create_cutoff_selection_rule`](compolyx.Model.create_cutoff_selection_rule.md#compolyx.Model.create_cutoff_selection_rule)(name\[, ...\])Create new cut-off rule.[`Model.create_cylindrical_selection_rule`](compolyx.Model.create_cylindrical_selection_rule.md#compolyx.Model.create_cylindrical_selection_rule)(name)Create new cylindrical selection rule.[`Model.create_edge_set`](compolyx.Model.create_edge_set.md#compolyx.Model.create_edge_set)(name\[, id, origin, ...\])Create a new edge set.[`Model.create_element_set`](compolyx.Model.create_element_set.md#compolyx.Model.create_element_set)(name\[, id, ...\])Create a new element set.[`Model.create_envelope_solution`](compolyx.Model.create_envelope_solution.md#compolyx.Model.create_envelope_solution)(name\[, id, ...\])Create an envelope solution.[`Model.create_field_definition`](compolyx.Model.create_field_definition.md#compolyx.Model.create_field_definition)(name\[, id, ...\])Create a new field definition.[`Model.create_geometrical_selection_rule`](compolyx.Model.create_geometrical_selection_rule.md#compolyx.Model.create_geometrical_selection_rule)(name)Create new geometrical selection rule.[`Model.create_imported_modeling_group`](compolyx.Model.create_imported_modeling_group.md#compolyx.Model.create_imported_modeling_group)(name\[, id\])[`Model.create_imported_solid_model`](compolyx.Model.create_imported_solid_model.md#compolyx.Model.create_imported_solid_model)(name\[, ...\])Create a new solid model.[`Model.create_lookup_table1d`](compolyx.Model.create_lookup_table1d.md#compolyx.Model.create_lookup_table1d)(name\[, id, ...\])Create a new 1D lookup table object.[`Model.create_lookup_table3d`](compolyx.Model.create_lookup_table3d.md#compolyx.Model.create_lookup_table3d)(name\[, id, ...\])Create a new 3D lookup table object.[`Model.create_modeling_group`](compolyx.Model.create_modeling_group.md#compolyx.Model.create_modeling_group)(name\[, id\])[`Model.create_oriented_selection_set`](compolyx.Model.create_oriented_selection_set.md#compolyx.Model.create_oriented_selection_set)(name\[, ...\])Create a new oriented selection set.[`Model.create_parallel_selection_rule`](compolyx.Model.create_parallel_selection_rule.md#compolyx.Model.create_parallel_selection_rule)(name\[, ...\])Create a new parallel selection rule.[`Model.create_published_parameter`](compolyx.Model.create_published_parameter.md#compolyx.Model.create_published_parameter)(name\[, ...\])Create a published parameter.[`Model.create_rosette`](compolyx.Model.create_rosette.md#compolyx.Model.create_rosette)(name\[, id, origin, ...\])Create a new rosette.[`Model.create_sampling_point`](compolyx.Model.create_sampling_point.md#compolyx.Model.create_sampling_point)(name\[, id, ...\])Create a new sampling point.[`Model.create_scene`](compolyx.Model.create_scene.md#compolyx.Model.create_scene)(name\[, id, title, ...\])Create a new scene.[`Model.create_script`](compolyx.Model.create_script.md#compolyx.Model.create_script)(name\[, source, active, ...\])Creates a script object, which allows executing custom Python code.[`Model.create_section_cut`](compolyx.Model.create_section_cut.md#compolyx.Model.create_section_cut)(name\[, id, active, ...\])Creates a new section cut.[`Model.create_sensor`](compolyx.Model.create_sensor.md#compolyx.Model.create_sensor)(name\[, id, active, ...\])Create new sensor.[`Model.create_solid_model`](compolyx.Model.create_solid_model.md#compolyx.Model.create_solid_model)(name\[, id, active, ...\])Create a new solid model.[`Model.create_spherical_selection_rule`](compolyx.Model.create_spherical_selection_rule.md#compolyx.Model.create_spherical_selection_rule)(name)Create a new spherical selection rule.[`Model.create_tube_selection_rule`](compolyx.Model.create_tube_selection_rule.md#compolyx.Model.create_tube_selection_rule)(name\[, id, ...\])Create a new tube selection rule.[`Model.create_variable_offset_selection_rule`](compolyx.Model.create_variable_offset_selection_rule.md#compolyx.Model.create_variable_offset_selection_rule)(name)Create new slab offset rule.[`Model.create_view`](compolyx.Model.create_view.md#compolyx.Model.create_view)(name\[, position, ...\])[`Model.default_vector_scale_and_ratio`](compolyx.Model.default_vector_scale_and_ratio.md#compolyx.Model.default_vector_scale_and_ratio)()[`Model.element_normal`](compolyx.Model.element_normal.md#compolyx.Model.element_normal)(globalID)Returns the element normal (direction).[`Model.export_composite_cae_h5`](compolyx.Model.export_composite_cae_h5.md#compolyx.Model.export_composite_cae_h5)(path\[, ...\])Export layup to composite CAE .hdf5 file.[`Model.export_h5_composite_definitions`](compolyx.Model.export_h5_composite_definitions.md#compolyx.Model.export_h5_composite_definitions)(path)Save composite definitions to .hdf5 file.[`Model.export_ply_geometries`](compolyx.Model.export_ply_geometries.md#compolyx.Model.export_ply_geometries)(filename\[, ...\])Exports the surface, boundary, and/or fiber directions of modeling, production, and analysis ply to .igs or .step file.[`Model.export_solid_models`](compolyx.Model.export_solid_models.md#compolyx.Model.export_solid_models)(\[directory, ...\])Save solid models to files.[`Model.find_materials`](compolyx.Model.find_materials.md#compolyx.Model.find_materials)(\*\*properties)Find materials with the given properties or property ranges.[`Model.find_parent`](compolyx.Model.find_parent.md#compolyx.Model.find_parent)(type)Steps up the tree and returns the first parent with given type.[`Model.get_composite_cae_h5_mesh_preview`](compolyx.Model.get_composite_cae_h5_mesh_preview.md#compolyx.Model.get_composite_cae_h5_mesh_preview)(...)[`Model.get_element_by_point`](compolyx.Model.get_element_by_point.md#compolyx.Model.get_element_by_point)(point)Returns the element label of the closest element with respect to the given point.[`Model.get_layup`](compolyx.Model.get_layup.md#compolyx.Model.get_layup)(path\[, format, objects, mode\])Load layup from excel or .csv file.[`Model.get_layup_from_csv_file`](compolyx.Model.get_layup_from_csv_file.md#compolyx.Model.get_layup_from_csv_file)(path\[, ...\])Function that reads the layup data from a .csv file and adds the data to the graph.[`Model.get_layup_from_excel_file`](compolyx.Model.get_layup_from_excel_file.md#compolyx.Model.get_layup_from_excel_file)(path\[, ...\])Load layup from Excel File.[`Model.graph_report`](compolyx.Model.graph_report.md#compolyx.Model.graph_report)()[`Model.import_composite_cae_h5`](compolyx.Model.import_composite_cae_h5.md#compolyx.Model.import_composite_cae_h5)(path\[, mode, ...\])Import a composite layup definition from a .hdf5 file.[`Model.import_section_data_from_legacy_model`](compolyx.Model.import_section_data_from_legacy_model.md#compolyx.Model.import_section_data_from_legacy_model)(path)Import and convert the layup of a legacy (Mechanical APDL) shell model into ACP composite definitions.[`Model.mesh_query`](compolyx.Model.mesh_query.md#compolyx.Model.mesh_query)(name, position\[, ...\])Query arbitrary data from the mesh of the model.[`Model.plot_dependencies`](compolyx.Model.plot_dependencies.md#compolyx.Model.plot_dependencies)(\[path, parent, levels\])Generates a graph with all dependencies.[`Model.reference_element`](compolyx.Model.reference_element.md#compolyx.Model.reference_element)(globalID)[`Model.refresh_material_apdl_file`](compolyx.Model.refresh_material_apdl_file.md#compolyx.Model.refresh_material_apdl_file)(apdl\_file\_path)[`Model.refresh_material_data`](compolyx.Model.refresh_material_data.md#compolyx.Model.refresh_material_data)(matml\_file\_path, ...)Refresh material external data sources in the model .acph5 database.[`Model.reload_mesh`](compolyx.Model.reload_mesh.md#compolyx.Model.reload_mesh)(\[path, format\])Reloads the mesh (nodes, elements, and named selections).[`Model.reorder_modeling_groups`](compolyx.Model.reorder_modeling_groups.md#compolyx.Model.reorder_modeling_groups)(\[source, ...\])Reorders the modeling groups by placing source before or after the target.[`Model.save`](compolyx.Model.save.md#compolyx.Model.save)(\[path, cache\_data\])Save ACP model to .acph5 file.[`Model.save_analysis_model`](compolyx.Model.save_analysis_model.md#compolyx.Model.save_analysis_model)(path)Save actual analysis model to disc.[`Model.save_apdl_commands`](compolyx.Model.save_apdl_commands.md#compolyx.Model.save_apdl_commands)(path)Save APDL commands for composite definitions of actual model.[`Model.save_h5`](compolyx.Model.save_h5.md#compolyx.Model.save_h5)(path\[, cache\_data\])Save ACP model in .acph5 format.[`Model.save_layup`](compolyx.Model.save_layup.md#compolyx.Model.save_layup)(path\[, format, objects\])Function that saves the layup data to a .csv file.[`Model.save_layup_to_csv_file`](compolyx.Model.save_layup_to_csv_file.md#compolyx.Model.save_layup_to_csv_file)(path\[, objects\])Function that saves the layup data to a .csv file.[`Model.save_layup_to_excel_file`](compolyx.Model.save_layup_to_excel_file.md#compolyx.Model.save_layup_to_excel_file)(path\[, objects\])Function that saves the layup data to an excel file (Windows only).[`Model.select_elements`](compolyx.Model.select_elements.md#compolyx.Model.select_elements)(\[selection, op, ...\])Selects element within active model and marks the selection as SELECTED.[`Model.select_nodes`](compolyx.Model.select_nodes.md#compolyx.Model.select_nodes)(\[selection, op, labels, ...\])Function selects nodes in graph and marks the given selection as SELECTED.[`Model.select_solid_elements_from_shells`](compolyx.Model.select_solid_elements_from_shells.md#compolyx.Model.select_solid_elements_from_shells)(\[...\])Selects the solid element within given selection and deselects the shell elements.[`Model.solve`](compolyx.Model.solve.md#compolyx.Model.solve)(\[wait\])Convenience function to directly solve the current model.[`Model.sphere_widget_radius`](compolyx.Model.sphere_widget_radius.md#compolyx.Model.sphere_widget_radius)()[`Model.update`](compolyx.Model.update.md#compolyx.Model.update)(\[objects, relations\_only\])Main update function.[`Model.visit`](compolyx.Model.visit.md#compolyx.Model.visit)(visitor)Walk through the tree and let the visitor perform action on every descendant node.[`Model.wbupdate`](compolyx.Model.wbupdate.md#compolyx.Model.wbupdate)(\[objects, relations\_only\])Generate all output files of ACP for the Workbench application.