Model.addedgesorfaces#
- Model.addedgesorfaces(entity, collection=Collection(), face_indices=hwIntListList(), edge_indices=hwIntListList(), reversenormal=0, main=1)#
Adds faces of solid elements or edges of shell elements using a specific edge/face number to a segment set or contact surface. Creates interface elements on edges of shell elements or faces of solid elements using specific edge/face numbers.
- Parameters:
entity (Entity) – The object describing the entity.
collection (Collection) – The collection containing the shell/solid element entities.
face_indices (hwIntListList) – The face indices of solid elements.
edge_indices (hwIntListList) – The edge indices of shell elements.
reversenormal (unsigned int) –
Determines if the secondary elements should be reversed when created. Applicable for contact. Valid options are:
0 - Along element normal
1 - Opposite element normal
main (unsigned int) –
Determines if main or secondary interface elements are created. Applicable for contact. Valid options are:
1 - Main
0 - Secondary
Examples#
Add faces with IDs [ 1 , 2 ] of solid elements with IDs 10 , 11 to segment set with ID 1#import hm import hm.entities as ent model = hm.Model() input_col = hm.Collection(model, ent.Element, [10, 11]) model.addedgesorfaces( entity=ent.Set(model, 1), collection=input_col, face_indices=hm.hwIntListList([hm.hwIntList([1, 2]), hm.hwIntList([1, 2])]), reversenormal=1, )
Add edges with IDs [ 1 , 2 ] of shell elements with ID 10 , 11 to segment set with ID 1#import hm import hm.entities as ent model = hm.Model() input_col = hm.Collection(model, ent.Element, [10, 11]) model.addedgesorfaces( entity=ent.Set(model, 1), collection=input_col, edge_indices=hm.hwIntListList([hm.hwIntList([1, 2]), hm.hwIntList([1, 2])]), reversenormal=1, )
Add edges with IDs [ 1 , 2 ] of shell elements with ID 10 , 11 to contactsurf with ID 1#import hm import hm.entities as ent model = hm.Model() input_col = hm.Collection(model, ent.Element, [10, 11]) model.addedgesorfaces( entity=ent.Contactsurf(model, 1), collection=input_col, edge_indices=hm.hwIntListList([hm.hwIntList([1, 2]), hm.hwIntList([1, 2])]), reversenormal=1, )
Create secondary interface elements on faces with IDs [ 1 , 2 ] of solid elements with ID 10 , 11 on interface ( group ) with ID 1#import hm import hm.entities as ent model = hm.Model() input_col = hm.Collection(model, ent.Element, [10, 11]) model.addedgesorfaces( entity=ent.Group(model, 1), collection=input_col, face_indices=hm.hwIntListList([hm.hwIntList([1, 2]), hm.hwIntList([1, 2])]), reversenormal=1, main=0 )