Skip to content

Gridding Block

The Gridding Block specifies the mesh distribution for the simulation, controlling how grid density varies across the domain. It offers five grid-generation options, including a uniform grid, a center-refined grid, a boundary-refined grid, a hyperbolic-tangent-refined grid, and a fully custom grid, allowing users to tailor local resolution to key flow regions.

Warning

This block is mandatory for all simulations.


Flags Overview

Note

All flags and their description are included in the table below. A detailed description of which values are possible for each input flag follows.

Flag Required Description
XGRID_TYPE Yes grid type in \(x\) direciton.
YGRID_TYPE Yes grid type in \(y\) direciton.
ZGRID_TYPE Yes grid type in \(z\) direciton.
TAU_STR_CENTER_X No stretching ratio for a center-refined grid in x-direciton.
TAU_STR_CENTER_Y No stretching ratio for a center-refined grid in y-direciton.
TAU_STR_CENTER_Z No stretching ratio for a center-refined grid in z-direciton.
REF_CENTER_X No center of refinement [meter] in x-direciton.
REF_CENTER_Y No center of refinement [meter] in y-direciton.
REF_CENTER_Z No center of refinement [meter] in z-direciton.
BETA_G_BOUND No stretching ratio for a boundary-refined grid.
VALS_TANH_x No parameters for a hyperbolic-tangent-refined grid.
VALS_TANH_y No parameters for a hyperbolic-tangent-refined grid.
VALS_TANH_z No parameters for a hyperbolic-tangent-refined grid.

Flags Details

GRID_TYPE
  • Type: integer
  • Default: 1
  • Description: 1 represents a uniform grid, 2 represents a center-refined grid, 3 represents a boundary-refined grid, 4 represents a hyperbolic-tangent-refined grid, 5 represents a fully custom grid. Note: Use GRID_TYPE = 5 with caution, because if the Jacobian transformations (and its first or second derivatives) associated with the stretched mesh are not continuous, it may lead to numerical errors.

TAU_STR_CENTER
  • Type: real
  • Default:
  • Description: positive real variables. This variable is only used when GRID_TYPE=2.

REF_CENTER
  • Type: real
  • Default:
  • Description: nonnegative real variables. This variable is only used when GRID_TYPE=2.

BETA_G_BOUND
  • Type: real
  • Default:
  • Description: positive real variables. This variable is only used when GRID_TYPE=3.

VALS_TANH
  • Type: real
  • Default:
  • Description: groups of three parameters (ratio, tp, delta). This variable is only used when GRID_TYPE=4.
    Each group defines one refinement region. ratio: refinement strength. Values > 1 locally compress the grid, while values < 1 stretch it. tp: the center position of the refinement region. delta: the stretching width; larger \(abs(delta)\) produces smoother, wider transitions.
    For example, the full parameter set (40, 0.000150, -0.00001, 40, 0.007849, 0.00001, 0, 0, 0) corresponds to two active hyperbolic-tangent refinement zones. First refinement region: ratio=40, tp=0.00150, delta=-0.00001. Second refinement region: ratio=40, tp=0.007849, delta=0.00001. Last triplet: ratio=0, tp=0, delta=0, which is unused.

Example:

&NML_GRIDDING
    XGRID_TYPE=1,
    YGRID_TYPE=1,
    ZGRID_TYPE=1,
    TAU_STR_CENTER_X=2.d0,
    TAU_STR_CENTER_Y=2.d0,
    TAU_STR_CENTER_Z=2.d0,
    REF_CENTER_X=5.d-3,
    REF_CENTER_Y=6.d-3,
    REF_CENTER_Z=2.d0,
    BETA_G_BOUND=0.5d0,
    VALS_TANH_x = 28.0,0.00077,-0.0001,28.0,0.0094,0.0001,
    VALS_TANH_y = 24.0,0.00125,-0.0007,24.0,0.019,0.0005,
    VALS_TANH_z = 10,0.1,0.05,10,0.9,-0.05,
/