Skip to main content
Version: 2026R1

Material

class compolyx.Material(graph, obj, parent=None)

ComPoLyX material class.

This class enables retrieving all material properties defined within the loaded Finite Element model.

  • Access:

    >>> import compolyx
    >>> db = compolyx.DB()
    >>> model = db.models['class40.1']
    >>> materials = model.material_data.materials
    >>> mat_UD300 = materials['UD300_GLAS']
    >>> print mat_UD300.property_names

    [‘density’, ‘engineering_constants’, ‘larc_constants’, ‘puck_constants’, ‘strain_limits’, ‘stress_limits’, ‘thermal_expansion_coefficients’, ‘tsai_wu_constants’, ‘woven_characterization’, ‘woven_puck_constants_1’, ‘woven_puck_constants_2’, ‘woven_stress_limits_1’, ‘woven_stress_limits_2’]

    >>> property_set_eng_const = mat_UD300['engineering_constants']

Attributes

NameDescription
Material.activeActive status of object
Material.active_propertiesList of the active properties for the underlying material
Material.enabledWhether this object is currently enabled or not
Material.ext_idID of corresponding Material in external source
Material.idID of object
Material.is_constantTrue if engineering constants are constant
Material.is_dict_itemSpecifies whether the object is an item of a dict
Material.is_isotropicTrue if ply_type is isotropic or isotropic_homogeneous_core
Material.is_list_itemSpecifies whether the object is an item of a list
Material.link_pathRoot path of the current node in the tree for links to this object
Material.lockedMaterial is generated from an external source and cannot be changed
Material.nameName of object
Material.parentParent object in tree
Material.ply_typePly type
Material.property_namesList with all available property keys
Material.root_pathRoot path of the current node in the tree
Material.statusStatus of the object
Material.status_changedBoolean flag which is set to true in C++ when up-to-date status of object changes
Material.uidUID of object
Material.vertexThis will throw an error if the object has been removed from the graph

Methods

NameDescription
Material.create_property_set(property_name, ...)Function to create a specific property set
Material.delete_property_set(property_name)Function to delete a specific property set
Material.find_parent(type)Function steps up the tree and returns the first parent with given type
Material.obj_exists()Checks if __obj still references the C++ object (i.e. has not been reset to None by self._delete) and exists in the graph
Material.serialize()Serialize to Python string
Material.serialize_name_and_id()Helper function to serialize name and ID
Material.update()
Material.visit(visitor)Walk through the tree and let the visitor perform action on every descendant node