Model.blmesh_2d#

Model.blmesh_2d(base_collection, bl_collection, num_layers, first_layer_thickness, growth_rate, element_size=0.0, element_type='')#

Generates a 2D boundary layer mesh on surfaces/elements.

Parameters:
  • base_collection (Collection) – The collection containing the entities to be used for the base. Valid entities are surfaces and elements.

  • bl_collection (Collection) –

    The collection containing the entities to be used for the boundary layers. Valid entity types for collection depend on the base entity type:

    If the base_collection entity is surfaces then for the bl_collection valid entity type is lines.

    If the base_collection entity is elements then for the bl_collection valid entity type are elements or nodes. For the collection only elements of typename=PLOTEL.

  • num_layers (int) – The number of boundary layers to generate.

  • first_layer_thickness (double) – The thickness value of the first layer.

  • growth_rate (double) – The growth rate of the boundary layers.

  • element_size (double) – The size of elements in desired mesh.

  • element_type (hwString) – The type of elements in desired mesh.

Example#

Create 5 layer boundary mesh with a quad dominated mesh of size 2.0 on surface 10 use lines with IDs 20 , 21 , 25 , 26 , 37 and 38 , with the first layer be 0.15 thick and a growth rate of 1.2#
import hm
import hm.entities as ent

model = hm.Model()

# Create input paramaneters for boundy layer mesh
line_collection = hm.Collection(model, ent.Line, [20, 21, 25, 26, 37, 38])

model.blmesh_2d(
    base_collection=hm.Collection(model, ent.Surface, [1]),
    bl_collection=line_collection,
    num_layers=5,
    first_layer_thickness=0.15,
    growth_rate=1.2,
    element_size=2.0,
    element_type="quads",
)