Mesh Generation#

This tutorial assumes a live session between XCOMPUTE-CLIENT and XCOMPUTE-SERVER, with the interface set on the Geometry tab.

  • Nodal points specify where data is stored and transported across adjacent elements; it is important to efficiently place the desired number of nodes to resolve desired spatial physics.

  • Default preferences can be customized in compute.cfg, accessible in XCOMPUTE-CLIENT from the file menu: Settings>Compute Server.

  • Start with surfaces imported from STL, OBJ, MSH.

  • The process is similar for tetrahedral and hexahedral meshes.

References and Spatial Domain#

To start the meshing process, activate the desired system or select one or more surfaces. The associated system(s) will be used to size the bounding domain.

  • The mesh will be generated as a child the active system.

  • Watertight surfaces are required to generate reliable SDF. Surfaces can be self-intersecting and overlapping, but inverted and missing faces can lead to downstream errors.

  • To separate surfaces manifolds (for applying boundary conditions), right click for the context menu tools>segment. Or during import, check the auto-segment option. Regions will colorize, and will be mapped to following generated meshes.

Note:

  • A single surface enables study in proximity to the surface.

  • Multiple surfaces enables study across those surfaces.

  • Domains can be adjusted in the meshing dialog.

Tet Mesh#

After selecting the references, right click to show the context menu New>Tet Mesh. The tet mesh dialog will appear to set meshing parameters. The major categories are described below:

Solid vs Fluid#

The meshing dialog provides presents for Solid and Fluid, which also sets defaults/ranges for the Sizing Parameters (below).

  • CFD generally requires more extreme element size ratios than structural FEA. The dialog sliders adjust ranges as such.

Interior vs Exterior#

By default, a solid mesh is defined in the interior (negative boundary normal), while a fluid mesh is defined in the exterior (positive boundary normal).

Quantity vs Quality#

The shape field resolution is independent from the fineness of elements to be generated in the mesh, and separate from the element quality.

Node Count#

Set the desired target node count for the generated mesh. A typical engineering mesh may have 10k-10M nodes. Start with 30k-100k and increase as fidelity requires.

  • Tet meshes have an average of ~6 tet elements per node.

  • Hex meshes have an average of ~1 hex elements per node.

  • Such unstructured meshes consume 2-3kB per node.

Shape Resolution#

A fully-structured background grid is constructed to solve the SDF. A value of 16M will resolve many shapes, but this value can be safely increased to 100M on most hosts.

  • Smallest resolved feature limited by grid dh

  • Such structured grids consume ~64B per node.

Equalization Steps#

After the SDF and derived fields are defined, nodal points are injected and triangulated to facilitate iterative equalization. The number of equalization steps drives the smoothness and quality of the resulting mesh.

  • 300 steps is okay, 500 is better, and 1000 is best.

  • Downstream numerics (e.g. FEA or CFD) have unique sensitivities to mesh quality, driving convergence.

Sizing Parameters#

The net volumetric element size is the product of distance and curvature effects.

  • Smallest has a relative length defined to be 1.0

  • Largest has a relative length >1.0, usually 3-10 or higher.

Distance#

The SDF provides the critical metric for driving element size as a function of distance to/from the implicit boundary.

The distance sizing function is monotonic with higher nodal density near the surface and lower density in the farfield. The relative density profile is controlled with three parameters:

  • distance size ratio (relative length ratio, usually 3-10)

  • distance decay rate (standard deviations to farfield, usually 2-4)

  • distance supra-exponent (1: exponential, 2: Gaussian)

Curvature#

The curvature sizing function is monotonic with higher nodal density near negative curvatures and no effect for positive curvature. The relative sizing and density profile is controlled with three parameters:

  • curvature size ratio (relative length ratio, usually 2-3)

  • curvature decay rate (standard deviations to farfield, usually 2-4)

  • curvature supra-exponent (1: exponential, 2: Gaussian)

Hex Mesh#

After selecting the desired surface(s) to use a mesh references, right click to show the context menu New>Hex Mesh. The hex mesh dialog will appear to specify meshing parameters.

  • set the domain min/max

  • set a baseline grid resolution

Execute Job#

When the tet or hex mesh parameters are set, press Submit in the dialog box. The Job Manager will appear with the meshing job. Press the green arrow to execute the job.

  • It can take a minute or two to solve the SDF for complex shapes and/or high resolutions. Following this, the progress indicator will proceed until the job is finished and the generated mesh will appear onscreen.

Batch Process#

It is also possible to invoke “headless” mesh-gen via an XCOMPUTE-SERVER batch process with similar requirements, without launching an interactive session, like so:

./xcompute-server --batch onething.stl anotherthing.obj ...

Although lacking fine-grain control, some options are available for server-only batch mode, such as:

  • --estimate (the job time)

  • --interior or --exterior

  • -x -y -x (symmetries)

To learn more, type ./xcompute-server --batch --help