AMCAX Kernel 1.0.0.0
|
This tutorial provides detailed configuration methods for using mesh generation and two-dimensional boundary layers.
The boundary layer mesh generation creates a denser mesh distribution in regions near solid surfaces to better capture fluid velocity profile variations and viscous effects. Input: Selected boundaries; Output: Boundary layer mesh (quadrilateral elements).
Below is the basic JSON configuration. For more complex configurations, please refer to Advanced Json Example.
Class | Key | Required | Value Range | Default | Notes |
---|---|---|---|---|---|
BoundaryLayer | EntityType | Yes | [Face, Edge] | N/A | |
BoundaryLayer | EFPairs/SelectedEntities | Yes | N/A | ||
BoundaryLayer-Basic | GrowthRate | Yes | "Constant" "Variable" [1.0,2.0] | N/A | "Constant": Uses a fixed growth rate value for all layers, maintaining the same expansion ratio between consecutive layers. "Variable": Uses an array of growth rates, allowing different expansion ratios for each layer transition. |
BoundaryLayer-Basic | InitLayerHeight | Yes | Absolute:[eps,MaxSize] Aspect:[eps,1] | N/A | "Absolute": Initial layer height remains constant across the entire boundary layer, regardless of local mesh characteristics. "Aspect": Initial layer height is calculated as a factor multiplied by the local surface mesh length, adapting to local mesh size. |
BoundaryLayer-Basic | NLayers | Yes | [1,inf] | N/A | |
BoundaryLayer-Basic | ProblematicAreasTreatment | Yes | STOP、SQUEEZE、COLLAPSE、EXCLUDE | N/A | STOP:When boundary layer generation encounters issues, stop the process. SQUEEZE:Squeeze layers to overcome intersection, proximity, or quality issues. COLLAPSE:Collapse layers in local regions to overcome intersection, proximity, or quality issues. EXCLUDE:Exclude problematic local regions to overcome intersection, proximity, or quality issues. |
Generates quadrilateral mesh elements growing from selected boundary edges into the face interior, as shown in the figure below. "EntityType": "Edge" indicates 2D boundary layer generation from edges into faces. Specifies growth direction from source edge to target face. Example: growth from edge (tag=1) to face (tag=1). Note: The edge must be a boundary edge of the face.
Constant Growth Rate: Uniform growth factor between consecutive layers.
Variable Growth Rate: Independent growth rates for each layer starting from the second layer (Note: first layer growth rate is always 0 and must match the number of layers).
Absolute Mode: Fixed initial layer height for all nodes, independent of local surface mesh size (in contrast to Aspect mode). (Standard initial layer height reference: https://www.cfd-online.com/Tools/yplus.php)
Aspect Mode: Initial layer height defined as a factor of local surface mesh length, calculated by multiplying the local surface mesh size.
NLayers: Specifies the desired number of boundary layer mesh.
Methods used when layers cannot be generated due to local geometric features or insufficient space for growing all required layers.
When boundary layer generation encounters issues, stop the process.
Squeeze layers to overcome intersection, proximity, or quality issues.
Collapse layers in local regions to overcome intersection, proximity, or quality issues.
Exclude problematic local regions to overcome intersection, proximity, or quality issues.
Class | Key | Required | Value Range | Default | Notes |
---|---|---|---|---|---|
BoundaryLayer-Basic | AdditionalOuterLayers | No | [0,inf] | 0 | Additional outer layers to match the last boundary layer with nearby element size |
BoundaryLayer-Basic | LastAspect | No | [eps,1] | 0 | Last layer aspect ratio, active when additional layers are non-zero |
BoundaryLayer-SideTreatment | CollapseFreeEdges | No | true、false | false | Enables collapsing at free edges, active only in "COLLAPSE" mode |
BoundaryLayer-VectorTreatment | SmoothTopCapShellMesh | No | true、false | true | Allows vectors to deviate from original normal position; otherwise grows orthogonally |
BoundaryLayer-VectorTreatment | SmoothVectors | No | true,[0,180] or false | [true,45] | Maximum allowable angle deviation from initial position |
BoundaryLayer-VectorTreatment | SeparateVectors | No | true,[eps,180] or false | false | Separates boundary layer vectors at sharp edges (user-specified angle between faces) |
BoundaryLayer-VectorTreatment | SeparateNumber | No | [0,inf] | 0 | Number of vectors to separate at sharp edges |
BoundaryLayer-GrowthControls | MiniFirstLayerHeight | No | [0,inf] | 0 | Enable only in "SQUEEZE" mode, minimum allowed first layer height, defaults to 5% of initial height when set to 0 |
BoundaryLayer-GrowthControls | ProximityCheckFactor | No | true,[eps,inf] or false | false | Enable only in "SQUEEZE" mode, maximum aspect ratio |
BoundaryLayer-GrowthControls | ProximityCheckFactor | No | true,[eps,inf] or false | false | Proximity check factor, controls gap between opposing boundary layer regions |
BoundaryLayer-GrowthControls-SQUEEZE | MiniLayerAspect | No | true,[eps,inf] or false | false | Minimum aspect ratio, active only when "ProximityCheckFactor" is enabled and in "SQUEEZE" mode |
AdditionalOuterLayers: Number of additional boundary layers to match the last layer with nearby triangular elements. Defaults to 0 if the last layer size exceeds nearby triangular element size.
LastAspect: Aspect ratio of the last layer, configurable only when Additional is non-zero.
Allow collapsing at free edges when the angle between two faces exceeds a certain value, gradually reducing mesh layers near face intersection lines.
When enabled, this option allows growth vectors to deviate from their original normal positions. If disabled, layers grow orthogonally. This operation enables more layers to be generated as the mesh expands more in enclosed regions, though it may result in lower quality (less orthogonal) elements.
When enabled, users can specify the maximum allowable angle deviation from the original normal position. This operation allows more layers to be generated as the mesh expands in enclosed regions, though it may result in lower quality (less orthogonal) elements.
Separates boundary layer vectors at sharp edges (where the angle between two faces is user-specified). When disabled, boundary layers remain unsplit, resulting in a continuous layer mesh around sharp edges but with skewed elements. When enabled, the generated mesh has better quality elements, but the exposed sides will be meshed with triangular elements.
Minimum allowed height when squeeze is activated. If not specified (=0), the first layer height may compress to 5% of initial height before switching to COLLAPSE mode.
Maximum allowed aspect ratio when squeeze is activated. In absolute mode, layers may overgrow in areas with small surface element lengths, potentially becoming very tall. After specifying maximum aspect ratio, layer height remains constant once the allowed ratio is reached.
Enable this option to control gaps between opposing boundary layer regions. The minimum distance between boundary layers is defined as the proximity check factor multiplied by the sum of opposing mesh sizes. This option is crucial for ensuring sufficient space for generating high-quality triangular meshes.
When squeeze is activated with specified ProximityCheckFactor, defines maximum allowed aspect ratio for boundary layers. If the boundary layer's aspect ratio becomes less than this value with specified ProximityCheckFactor, the boundary layer will compress to the allowed minimum ratio before switching to COLLAPSE mode.
The following are the imported CAD model and the generated mesh model.
![]() | ![]() |
Now boundary layer mesh needs to be generated from edges 5, 6, 7, 8 towards face 1. At right angles, we want to have 3 normal directions, so under VectorTreatment, SeparateVectors is set to [true, 270] and SeparateNumber is set to 2. The generated boundary layer with these parameters may contact edge 10, so the problem area treatment method is set to COLLAPSE mode.
Click here example02 to get the full source code of the 2D boundary layer detailed JSON example. Everyone can download it as needed.