Model.elemoffset_thinsolid#

Model.elemoffset_thinsolid(collection_source, collection_target, collection_along, modes, density, biasing, string_array, batchmesh_source)#

A thin solid is a volume defined either by a solid entity or enclosed by a combination of elems and surfs, in that the volume faces are well separated into source, destination, and along groups either by the feature angle with the auto-detection option, or by user manual selection. The source, destination, and along face groups are related to each other similar to that used for solid map, except each face group here can have multiple faces with more arbitrary connectivity. In the resulting mesh, the unsuppressed edges inside each group are not preserved.

There are some rules for how entities can be specified:

  1. Confined to the valid entity types for each face group, not all combinations of selections are valid; among the 3 face groups, only one can be solid and not more than 2 can be surfs.

  2. If solids are one of the selections, the 2 non-solid selections must be of surfs. If, in addition, auto-detection is on, the 2 surfs selections can be empty and, internally, these will be auto-detected.

Parameters:
  • collection_source (Collection) – The collection containing the source entities. Valid enitity types are solids, surfaces, and elements.

  • collection_target (Collection) – The collection containing the target entities. Valid entity type is surfaces.

  • collection_along (Collection) – The collection containing the along entities. Valid entity types are solids, surfaces and elements.

  • modes (int) –

    An integer used as bit field flags to define mesh modes.

    Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + Bit2-Bit3 + 16*Bit4 + 32*Bit5 + Bit6-Bit7 + 256*Bit8). The bits not listed below are unused or for internal use (e.g. called in other functions). Valid Bit options are:

    Bit0

    Reserved.

    Bit1

    Organizational. Valid values are:

    0 - Elements to original component.

    2 - Elements to current component.

    Bit2-Bit3

    Bias style. Valid values are:

    0 - Linear

    4 - Exponential

    8 - Bell curve

    Bit4

    Layer type. Valid values are:

    0 - Create solid element layers.

    16 - Create shell element layers.

    Bit5

    Layer normal. Valid values are:

    0 - Use smooth normal to generate element layers.

    32 - Use simple layer normal to generate element layers.

    Bit6-Bit7

    Manual or auto-detection mode. Used only when one input is solids. Valid values are:

    0 - Reserved, use manual selections as-is.

    64 - Use manual selections as-is. You must ensure all 3 selections are correct.

    128 - Do auto selection determination, then mesh the thin solids.

    192 - Do auto selection determination, but no not do meshing. Instead, save the auto-detected selections to the input marks for all 3 inputs.

    Bit8

    Auto-detection save. Used only when one input is solids. Valid values are:

    0 - Do not save auto-detected selections.

    256 - Save auto-detected selections.

    Show Bit value calculator
    Radio Button Table
    Option Name Value
    Organizational (Bit1)
    Bias style. Valid values are 0, 4, 8 (Bit2-Bit3)
    Layer type (Bit4)
    Layer normal (Bit5)
    Manual or auto-detection mode. Valid values are 0, 64, 128, 192 (Bit6-Bit7)
    Auto-detection save (Bit8)
    Calculated argument value: 0

  • density (int) – The number of elem layers to be creates in the along direction.

  • biasing (double) – The biasing intensity value. The bias style is encoded in the modes flags.

  • string_array (hwStringList) – The list of strings that contains the array of meshing parameters.

See the Model.tetmesh() string_array argument CFD, 2D and pars strings for supported syntax and options.

Parameters:

batchmesh_source (int) –

The flag indicating whether the source surfaces should be meshed using the batchmesher or not.

0 - Source surfaces are meshed with the general mesh.

1 - Source surfaces are meshed using the batchmesher.

Example#

Mesh solid with ID 1 by auto thin - solid detection with 5 layers of solid elems to the current component. The 2D source mesh size is to be 2.2.#
import hm
import hm.entities as ent

model = hm.Model()

solids = hm.Collection(model, ent.Solid, [1])

surf1 = hm.Collection(model,ent.Surface, populate=False)

surf2 = hm.Collection(model,ent.Surface, populate=False)

model.elemoffset_thinsolid(
    collection_source=solids,
    collection_target=surf1,
    collection_along=surf2,
    modes=130,
    density=5,
    bias=0.0,
    string_array=["pars: bl_iter_max=300 bl_res_thr=0.03", "2d: 1 2 1 2.2 0.22 30 1"],
    batchmesh_source=0)