Model.nodetoelementgapscreate#
- Model.nodetoelementgapscreate(gaps_location, target_elems, face_nodes, break_angle, property_name, tolerance, vectorentity, nodeentity, orient_x, orient_y, orient_z, comps_flag, systementity)#
Creates node-to-element gap elements (CGAPG) for use with the OS solver.
- Parameters:
gaps_location (Collection) – The collection containing the node entities of the locations of the gaps.
target_elems (Collection) – The collection containing the element entities to which the nodes are projected.
face_nodes (Collection) – The collection containing the node entities which lie on the face of one or more elements (applyied only for nodes of faces in solids only).
break_angle (double) – The break angle of a solid face.
property_name (hwString) – The name of the property to which the gap elements should point.
tolerance (double) – The maximum distance allowed between the nodes (on
gaps_location) and the elements (ontarget_elems).vectorentity (Entity) – The object describing the vector entity associated with the gap elements.
nodeentity (Entity) – The object describing the orientatio node entity associated with the gap elements.
orient_x (double) – The x component of the orientation vector.
orient_y (double) – The y component of the orientation vector.
orient_z (double) – The z component of the orientation vector.
comps_flag (int) –
Flag to indicate if individual components are used in defining the orientation of the elements. Valid options:
0 - If individual components are not used.
1 - If individual components are used.
systementity (Entity) – The object describing the coordinate system entity used for orienting the gap elements.
Note
Orientation of the gap elements may be specified using either a vector, node, coordinate system or individual components
Example#
Project nodes with IDs 1 to 100 to shell elements with IDs 30 to 75 within a tolerance of 1.0 . The gap elements point to the property gapprop and use components ( 70,120,80 ) for their orientation#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the nodes with IDs 1-101 filter_nodes = hm.FilterByEnumeration(ent.Node, list(range(1, 101))) nodes_collection = hm.Collection(model, filter_nodes) # Creating a collection that contains the elements with IDs 30-75 filter_elements = hm.FilterByEnumeration(ent.Element, list(range(30, 76))) elements_collection = hm.Collection(model, filter_elements) model.nodetoelementgapscreate( gaps_location=nodes_collection, target_elems=elements_collection, face_nodes=hm.Collection(model, ent.Node, populate=False), break_angle=0.0, property_name="gapprop", tolerance=1.0, vectorentity=None, nodeentity=None, orient_x=70.0, orient_y=120.0, orient_z=80.0, comps_flag=1, systementity=None, )