Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mesh resolution and controls

Vanellus combines geometry, size limits, boundary-layer estimates, and quality controls to create the three node arrays described in Rectilinear meshing.

These are limits (e.g. max_cell_size) or targets (e.g. target_wall_distance), not exact sizes. The smallest overlapping limit wins.

Mesh controls at a glance

ControlUnits or typePrimary effect
mesh_settings.max_cell_sizemeters or nullBackground cell-size limit
component max_cell_sizemeters or nullLimit inside a cuboid or CAD bounding box
boundary mesh_resolutionpositive integerCell count across a boundary
fuse_thresholdmetersMerges nearby fixed mesh planes
bbox_cull_thresholdmetersRemoves sufficiently small cuboids
CAD preserve_cad_verticesbooleanFixes planes at imported CAD vertices
target_wall_distancedimensionlessEstimates the first wall-normal cell size
boundary_layer_growth_ratedimensionless ratioGrows cells through the estimated boundary layer
max_growth_ratedimensionless ratioLimits growth throughout each axis
max_aspect_ratiodimensionless ratioLimits stretching between axis spacings

Local limits refine but cannot coarsen the background mesh. Growth controls spread that refinement; aspect-ratio correction can add it on other axes.

Global and component cell sizes

mesh_settings.max_cell_size accepts a single value that applies to all three axes, or separate [x, y, z] values. Set an axis to null to leave it without an explicit limit. Directional sizing avoids unnecessary refinement when only one direction—such as a thin component or passage—needs it.

A component max_cell_size applies within its bounding box. On each axis, the smaller finite global or component value wins.

For CAD, the finest global or component limit also controls STEP tessellation accuracy before voxelization.

Fusing, culling, and CAD planes

These controls alter geometry, not just mesh density. Set them from the smallest feature or gap that is safe to discard.

Fusing. fuse_threshold avoids sliver cells by merging fixed coordinates closer than the threshold. These coordinates include domain bounds, cuboid faces, boundary extents, and preserved CAD vertices.

Fusing combines coordinates per axis. It averages interior groups and snaps coordinates near a domain edge to that edge, then rebuilds cuboid bounds from the result. It can therefore move faces, change thicknesses, close gaps, or shift boundary extents. If opposite faces merge, a component can collapse to zero cells and meshing can fail.

Use fusing for near-coincident numerical noise or detail below the intended geometric tolerance. Do not increase it just to reduce cell count without checking affected features.

Culling. bbox_cull_threshold removes a cuboid when its largest dimension is below the threshold, so all three dimensions must be smaller. A long, thin component is not culled just because it is thin.

The cuboid is removed from the meshed component set; its solid and material region disappear rather than becoming coarser. Cull only geometry intended to be negligible, and check that meaningful small components remain.

CAD vertex planes. With preserve_cad_vertices: true, imported vertices become fixed planes. This better preserves predominantly cuboidal parts, but detailed or curved geometry can add many close planes, increasing cell count and interacting with fuse_threshold. When disabled, CAD representation depends on voxelization and the global or component size limits.

CAD voxelization explains which vertices are preserved and why oblique surfaces remain stepped.

Always inspect these geometry-changing effects in a dry run.

Boundary resolution

A boundary can add local refinement wherever it is defined. mesh_resolution is a cell count across its submitted dimensions; the mesher converts it into two in-plane size limits:

  • rectangle: size[0] / mesh_resolution and size[1] / mesh_resolution;
  • circle: 2 * radius / mesh_resolution in both directions;
  • annulus: 2 * (outer_radius - inner_radius) / mesh_resolution in both directions;
  • full: each full-face dimension divided by mesh_resolution.

This gives at least mesh_resolution cells across a circle’s diameter, or mesh_resolution / 2 through one radial thickness of an annulus. The boundary region also fixes planes at its bounds. Circular boundaries remain voxelized: higher resolution improves their representation but does not create curved cells.

Turbulent boundary-layer resolution

target_wall_distance is a mesh target, not a solver constraint:

  • Refinement applies only to domain exterior faces and retained cuboid faces, not CAD surfaces.
  • The target becomes a cell size before a flow solution exists, so the final wall coordinate is not guaranteed to match it.
  • k–ω SST wall functions do not use target_wall_distance; they recalculate the wall coordinate from the finished mesh and current solution.

The target is a dimensionless \(y^+\); smaller values request finer wall-normal cells. The mesher estimates first-cell width and layer thickness using flat-plate correlations for boundary-layer thickness and skin friction. It uses the smaller in-plane face dimension as its length scale, plus a representative inlet speed and the fluid’s reference kinematic viscosity.

boundary_layer_growth_rate controls cell-width growth through this estimated layer. Lower values retain fine spacing longer and usually add cells. Neither it nor target_wall_distance sets an inflation-layer count; that follows from the estimated first-cell width and thickness, surrounding geometry, and other size limits.

This estimate is generated for every flow model, so it can also affect laminar meshes.

During each k–ω SST iteration, Vanellus recalculates the actual wall coordinate from the finished wall-normal width and current local turbulent kinetic energy, density, and viscosity. Wall functions use this dynamic value to select and evaluate viscous-sublayer or log-law treatment.

SST blending uses another quantity: the geometric distance from each fluid-cell center to its nearest wall. It comes from the finished mesh and is not target_wall_distance.

Global growth rate and aspect ratio

max_growth_rate limits realized cell-width growth along each axis. It governs transitions away from component refinement, boundaries, fixed planes, and estimated boundary layers. Lower values smooth transitions but usually add cells.

max_aspect_ratio compares the widest spacing on each axis with the narrowest on the others. If the ratio is too high, Vanellus tightens that axis and regenerates the mesh. This can improve solver behavior, but one tiny interval may add planes across another whole axis. Removing an unintended feature or gap is often cheaper than lowering this limit.

See also