Model.section_plane_mesh#

Model.section_plane_mesh(collection, mesh_type, elem_size, connectivity, elem_collection, tol)#

Generates a shell mesh from a selection of planar boundary elements.

Parameters:
  • collection (Collection) – The collection containing the entities to use as input for the boundary.Valid entities are component entities and element entities.

  • mesh_type (int) –

    Flag indicating the type of mesh to generate. Valid values are:

    0 - trias

    1 - quads

    2 - mixed

    3 - right trias

    4 - quads only

  • elem_size (double) – The target element size.

  • connectivity (int) –

    Manage the connection with input boundary/overlay elements. Valid values are:

    0 - Generate mesh using given element size. Ignore elem_mark_id.

    1 - Manage connection with the user given boundary elements. Ignore elem_mark_id.

    2 - Manage connection with elements specified with elem_mark_id. Elements on elem_mark_id should be part of collection as well.

    3 - Manage connection with boundary elements which are not on elem_mark_id.

    4 - Manage connection with overlapped elements on elem_mark_id. Overlapped elements should not be tagged as boundary elements on collection.

    5 - Manage connection with boundary elements which do not overlap elem_mark_id elements. Overlapped elements should not be tagged as boundary elements on collection.

  • elem_collection (Collection) – The collection containing the element entities used to manage the connectivity.

  • tol (double) – The tolerance to use for overlay check. If set as 0, the tolerance will attempt to be automatically detected.

Example#

Create a section plane quad mesh of size 2.0 , use the elements with IDs 10 - 30 as boundary input , and the elements with IDs 1 - 5 as overlapped#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements used as boundary input
filter_input_elements = hm.FilterByEnumeration(ent.Element, list(range(10, 31)))
input_elements_collection = hm.Collection(model, filter_input_elements)

# Creating a collection that contains the elements used as overlapped
filter_overlapped_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 6)))
overlapped_elements_collection = hm.Collection(model, filter_overlapped_elements)

model.section_plane_mesh(
    collection=input_elements_collection,
    mesh_type=1,
    elem_size=2.0,
    connectivity=4,
    elem_collection=overlapped_elements_collection,
    tol=0.0,
)