Model.adaptive_wrapper_mesh#

Model.adaptive_wrapper_mesh(mesh_type, OrganizeWrapElemsByBaseComps=0, DoRemesh=0, RemeshGrowthRate=0.0, IncludeVolumeForLargestCavityIndex=0, IncludeVolumeSeedNodeCollection=Collection(), ExcludeVolumeSeedNodeCollection=Collection(), ConsiderCavityByCompsCollection=Collection(), MaxSmoothIterations=0, ConformalMesh=0, SplitAtFeatures=0, SpanAngle=0.0, AcousticResponceNodes='', AcousticMeshType=1, AcousticMeshQualityTetCollapse=0.0, AcousticMeshQualityHexJacobian=0.0)#

Generates an adaptive wrap mesh.

This function must be called after Model.adaptive_wrapper_build() and must be followed by Model.adaptive_wrapper_end().

Parameters:
  • mesh_type (int) – 0 - Quad dominant

  • OrganizeWrapElemsByBaseComps (int) – If set to 1, organize the wrap mesh according to the base mesh components, by creating new components with the same base comp name with the suffix _Wrap. If DoRemesh=1, the suffix is _Wrap_Remesh instead. New assemblies are also created for these components, named Wrapped_Components and Wrapped_Remeshed_Components.

  • DoRemesh (int) –

    0 - Do not remesh the wrap mesh with adaptive tria mesh.

    1 - Remesh the wrap mesh with adaptive tria mesh.

  • RemeshGrowthRate (double) – If DoRemesh=1, this is the specified growth rate to reuse for remeshing.

  • IncludeVolumeForLargestCavityIndex (int) – Volume index to wrap.

  • IncludeVolumeSeedNodeCollection (Collection) – The collection containing the seed node entities used to specify the volumes to wrap.

  • ExcludeVolumeSeedNodeCollection (Collection) – The collection containing the seed node entities used to specify the volumes to exclude from wrapping.

  • ConsiderCavityByCompsCollection (Collection) – The collection containing the component entities that will be sent for meshing and they are displayed during preview phase.

  • MaxSmoothIterations (int) – Maximum number of smoothing iterations to perform on the wrap mesh.

  • ConformalMesh (int) – Reserved for future development.

  • SplitAtFeatures (int) – Reserved for future development.

  • SpanAngle (double) – If DoRemesh=1, this is the specified span angle to use during remeshing.

  • AcousticResponceNodes (hwString) – Reserved for future development.

  • AcousticMeshType (unsigned int) –

    The type of acoustic cavity mesh.

    1 - Hex-tet mesh

    2 - All tet mesh

  • AcousticMeshQualityTetCollapse (double) – The tet-collapse target cut off value used for all tet cavity meshing.

  • AcousticMeshQualityHexJacobian (double) – The Jacobian target cut off value used for hex-tet cavity meshing.

Example#

Usage of the adaptive_wrapper_build functions#
import hm
import hm.entities as ent

model = hm.Model()

# Initialization of wrapper mesh with base mesh
elems = hm.Collection(model, ent.Element)
model.adaptive_wrapper_init(collection=elems, clean_intersection=1, wrap_type=0)

# Define features
model.adaptive_wrapper_set_features(
    feature_type=1,
    collection=elems,
    feature_angle=30.0,
    clean_features=1,
    clean_tol=1.0,
)

# Set various meshing and refinement parameters
model.adaptive_wrapper_set_params(
    max_elem_size=10.0,
    min_elem_size=0.1,
    string_array=[
        "LeakCheckNodes: 20 24 19",
        "GapPatchTolerance: 3.0",
        "HolePatchTolerance: 10.0",
        "RefineByBoxCompIds: 4 5 6",
        "RefineByNodeCurvature: 1",
        "RefineByFeatureProximity: 0",
        "RefineByAllElemSize: 1",
    ],
)

# Proximity options
model.adaptive_wrapper_proximity_params(
    self_proximity_for_all=1,
    prox_lower_bound=0.2,
    string_array=[
        "WithinGroup: 0.5 1 3 10 12 13",
        "WithinGroup: 1.5 3 9 20",
        "AcrossGroup: 0.5 3 10 12 13 4 9 8 7 19",
    ],
)

# Build skeletal octree structure
model.adaptive_wrapper_build()

# Generate mesh
model.adaptive_wrapper_mesh(mesh_type=0, DoRemesh=1, RemeshGrowthRate=1.2)

# End of wrapper mesh
model.adaptive_wrapper_end()