Skip to main content
Version: Next

Model

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)

Class to represent a finite element model.

Access:

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

Get existing model:

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

Attributes

NameDescription
Model.active_sceneActive Scene
Model.analysis_model_pathAnalysis model file path
Model.angle_toleranceSection computation angle tolerance (in degree)
Model.cache_update_resultsDefine whether to store the update results or not
Model.definitionsDefinitions
Model.deformation_scale_factorFactor with which the deformed shape plot is scaled
Model.draping_offset_correctionDefine whether to consider lay-up thickness in draping analysis
Model.edge_setsDictionary with all Edge Sets defined
Model.element_setsDictionary with all Element Sets defined
Model.enabled
Model.excel_path
Model.field_definitionsDictionary with all defined field definitions
Model.force_disable_result_extrapolationForce the result extrapolation to be disabled ('ERESX,NO' command) when exporting to APDL or CDB format
Model.formatFile format string.
Model.geometryGeometry node
Model.is_dict_itemSpecifies whether the object is an item of a dict
Model.is_list_itemSpecifies whether the object is an item of a list
Model.layup_plotsPlots
Model.link_pathRoot path of the current node in the tree for links to this object
Model.lookup_tablesDictionary with all Look-Up Tables
Model.material_dataDictionary with all Material Data defined
Model.meshMesh of this model
Model.minimum_analysis_ply_thicknessSection computation minimum analysis ply thickness (in length unit of model)
Model.modeling_groupsDictionary with all Modeling Groups defined
Model.nameName of object
Model.oriented_selection_setsDictionary with all oriented element sets defined.
Model.parametersList of parameters visible to the Workbench application
Model.parentParent object in tree
Model.pathPath to the reference surface input file
Model.plybookPlyBook
Model.pre_pathSave path of pre database linked to currently loaded post database
Model.ratio_of_displayed_vectors
Model.reference_surface_bounding_boxTuple with corners of bounding box of reference surface mesh
Model.reference_surface_input_unit_system_lockedIf 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_typeUnit System of the Reference Surface Input File
Model.relative_thickness_toleranceSection computation relative thickness tolerance
Model.root_pathRoot path of the current node in the tree
Model.rosettesDictionary with all Rosettes defined
Model.sampling_pointsSampling Point Container
Model.save_path
Model.scenesScenes
Model.scriptsList of user-defined scripts
Model.section_cutsSection Cuts
Model.selectionSelected objects of this model
Model.selection_rulesDictionary with all Selection Rules defined.
Model.sensorsDictionary with all Sensors.
Model.show_deformedWhether to show result plots in the deformed and scaled configuration
Model.show_solver_elementsWhether mesh selections and plot should consider solver elements in solid models or not
Model.solid_modelsSolidModel
Model.solutionsSolutions
Model.solverSolver instance
Model.status_changed_controller
Model.unit_systemCreate a unit system and assign it to the model
Model.use_default_section_tolerancesBoolean whether to uses angle and thickness tolerances of the application preferences for section computation
Model.use_nodal_thicknessesDefine whether to use nodal thicknesses or element thicknesses
Model.vector_scale_factor
Model.viewsViews
Model.workbench_state

Methods

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