Model.blmesh_2d_input_bl#

Model.blmesh_2d_input_bl(fixed_collection, float_collection)#

Specifies boundary layer input for Model.blmesh_2d2(), Model.blmesh2d_computeblthickness() and Model.blmesh2d_computeblthickness1(). If this function is not called before either function, then all edges of the selected region are considered as boundary layer edges.

If Model.blmesh_2d_input_bl() is not called before either function, then all edges of the selected region are considered as boundary layer edges.

Parameters:
  • fixed_collection (Collection) –

    The collection containing the entities for fixed non-boundary layer. Valid entity types depend on the base_collection value specified in blmesh_2d2() (or on the others mentioned in the description).

    If the entities in base_collection are surfaces, then the only valid entities in the fixed_collection are lines.

    If the entities in base_collection are elements, then the only valid entities in the fixed_collection are nodes or elements. For elements, only elements of typename=PLOTEL are allowed.

  • float_collection (Collection) –

    The collection containing the entities for float non-boundary layer. Valid entity types depend on the base_collection value specified in blmesh_2d2() (or on the others mentioned in the description).

    If the entities in base_collection are surfaces, then the only valid entities in the float_collection are lines.

    If the entities in base_collection are elements, then the only valid entities in the float_collection are nodes or elements. For elements, only elements of typename=PLOTEL are allowed.

Examples#

Create a 5 layer boundary mesh with a quad dominated mesh of size 2.0 on surface with ID 10 , with the first layer be 0.15 thick and a growth rate of 1.2 , use boundary layer elements with IDs 10 and 11 as fixed and 12 and 13 as float , and non - boundary layer elements with IDs 1 and 2 as fixed and 5 and 6 as float#
import hm
import hm.entities as ent

model = hm.Model()

# Boundary layer elements
blFixedEl_collection = hm.Collection(model, ent.Element, [10, 11])
blFloatEl_collection = hm.Collection(model, ent.Element, [12, 13])

model.blmesh_2d_input_bl(
    fixed_collection=blFixedEl_collection, float_collection=blFloatEl_collection
)

# Non-Boundary layer elements
nonBlFixedEl_collection = hm.Collection(model, ent.Element, [1, 2])
nonBlFloatEl_collection = hm.Collection(model, ent.Element, [5, 6])

model.blmesh_2d_input_nonbl(
    fixed_collection=nonBlFixedEl_collection, float_collection=nonBlFloatEl_collection
)

# Generate the Boundary layer mesh
base_surf_collection = hm.Collection(model, ent.Surface, [10])

model.blmesh_2d2(
    base_collection=base_surf_collection,
    num_layers=5,
    first_layer_thickness=0.15,
    growth_rate=1.2,
    element_size=2.0,
    element_type="quads",
)
Create a 5 layer boundary mesh from elements with IDs 10 - 100 , with the first layer be 0.15 thick and a growth_rate of 1.2 , a core_to_BL_ratio of 2.5 , a corner_factor of 1.1 , and use non - boundary layer elements with ID 1 and 2 as fixed and 5 and 6 as float#
import hm
import hm.entities as ent

model = hm.Model()

# Non-Boundary layer elements
nonBlFixedEl_collection = hm.Collection(model, ent.Element, [1, 2])
nonBlFloatEl_collection = hm.Collection(model, ent.Element, [5, 6])

model.blmesh_2d_input_nonbl(
    fixed_collection=nonBlFixedEl_collection, float_collection=nonBlFloatEl_collection
)

# Generate the Boundary layer mesh
base_elem_collection = hm.Collection(model, ent.Element, list(range(10, 101)))

model.blmesh_2d_computeblthickness(
    base_collection=base_elem_collection,
    num_layers=5,
    first_layer_thickness=0.15,
    growth_rate=1.2,
    core_to_BL_ratio=2.5,
    corner_factor=1.1,
)