Model.defaultmeshsurf_growth#

Model.defaultmeshsurf_growth(collection, elem_size, elem_type, elem_type_2, previous_settings, comp_mode, size_control, skew_control, mesh_type, keep_mesh, min_size, max_size, chordal_dev, max_angle, growth_rate, id_array, size_array)#

Generates surface meshes using surface deviation parameters with growth ratio transitions given by refinement sizes defined on points, edges and surfaces.

Parameters:
  • collection (Collection) – The collection containing the surface entities to mesh.

  • elem_size (double) – The default element size used to calculate element densities along edges (when necessary).

  • elem_type (int) –

    Flag indicating the elements generated for mapped meshing algorithms. Valid values are:

    0 - trias

    1 - quads

    2 - mixed

    3 - right trias

    4 - quads only

  • elem_type_2 (int) –

    Flag indicating the elements generated for free meshing algorithms. Valid values are:

    0 - trias

    1 - quads

    2 - mixed

    3 - right trias

    4 - quads only

  • previous_settings (int) –

    Flag indicating whether to break, keep or redo connectivity between neighboring surfaces. Valid values are:

    0 - Keep previous settings and do not break connectivity between neighboring surfaces.

    1 - Break connectivity between neighboring surfaces.

    2 - Keep connectivity between neighboring surfaces.

    3 - Redo connectivity between neighboring surfaces by expanding surface selection by one layer of adjacent surfaces.

  • comp_mode (int) –

    Parameter specifying how entities are organized into components. Valid values are:

    0 - Elements are created in the current component.

    1 - Elements are created in the same components as their parent surfaces.

  • size_control (int) –

    Flag indicating whether to create uniformly sized elements. Valid values are:

    0 - Do not create uniformly sized elements.

    1 - Create uniformly sized elements.

  • skew_control (int) –

    Flag indicating whether to create optimally shaped elements when using mapping algorithms. Valid values are:

    0 - Do not create optimally shaped elements.

    1 - Create optimally shaped elements.

  • mesh_type (int) –

    Parameter specifying the meshing algorithm for edge/surface meshing. Valid values are:

    34 - Proximity and curvature based surface meshing.

    35 - Curvature based surfaced meshing.

    36 - Proximity and curvature based meshing with free edge deviation.

    37 - Curvature based surface meshing with free edge deviation.

  • keep_mesh (int) –

    Determines whether any existing mesh is preserved. Valid values are:

    0 - Do not keep existing mesh.

    1 - Keep existing mesh.

  • min_size (double) – The minimum edge size.

  • max_size (double) – The maximum edge size.

  • chordal_dev (double) – The chordal deviation value.

  • max_angle (double) – The maximum angle (in degrees) between edges.

  • growth_rate (double) – The growth rate of the refinement size transition.

  • id_array (hwIntList) – A list of integers that contains the refinement geometry IDs. The first three integers indicate the number of source points, lines (edges) and surfaces entities. The next set of integers are the point IDs, followed by the edge IDs, followed by the surface IDs.

  • size_array (hwDoubleList) – A list of doubles that contains the refinement geometry sizes. The values must correspond to the same order as the IDs in the id_array.

Example#

Create a tria mesh with chordal deviation settings use a growth rate of 1.23 with refinement sources defined at point ID 93 , size 1 , edge ID 35 , size 1.5 and surface ID 2 , size 2.1#
import hm
import hm.entities as ent

model = hm.Model()

inp_col = hm.Collection(model, ent.Surface)
refgeom_ids = [1, 1, 1, 93, 35, 2]
refgeom_sizes = [1.0, 1.5, 2.1]

model.defaultmeshsurf_growth(
    collection=inp_col,
    elem_size=5.0,
    elem_type=0,
    elem_type_2=0,
    previous_settings=2,
    comp_mode=1,
    size_control=1,
    skew_control=1,
    mesh_type=35,
    keep_mesh=0,
    min_size=0.5,
    max_size=5.0,
    chordal_dev=0.1,
    max_angle=15.0,
    growth_rate=1.23,
    id_array=refgeom_ids,
    size_array=refgeom_sizes,
)