Computational Mesh

AeroSim uses a fixed Cartesian grid as its computational mesh. Unlike finite-volume solvers that require body-fitted volume meshes, the Lattice Boltzmann Method operates on a regular lattice where every node has the same connectivity to its neighbors. There is no volume meshing step - the grid fills the entire domain automatically, and solid bodies are represented separately through the Immersed Boundary Method.

The domain is organized into cubic blocks arranged in an octree hierarchy. This block structure supports local mesh refinement: regions that need higher resolution are subdivided into smaller blocks with finer spacing, while the rest of the domain stays at the base resolution.

See also

For how solid bodies interact with the Cartesian grid, see Geometry Representation with IBM.

The Cartesian lattice

The LBM lattice is a uniform grid with equal spacing \(\Delta x\) in all directions within each refinement level. Every node stores the same set of macroscopic quantities (density, velocity, stress), and the solver advances them using the same collision and streaming operations everywhere.

../../_images/mb-nodes.svg

The LBM discretizes space on a regular lattice. Each node connects to its neighbors through a set of discrete velocity directions (shown here for the D2Q9 and D3Q19 velocity sets).

Because the grid is Cartesian, no mesh generation or topology repair is needed for the fluid domain. The geometry pipeline only involves the surface triangulation of solid bodies, which is handled by the geometry discretization and IBM stages.

The grid spacing \(\Delta x\) at the coarsest level (level 0) is determined by the physical-to-lattice conversion chosen by the user. Finer levels created through refinement have progressively smaller spacing: \(\Delta x_n = \Delta x_0 / 2^n\), where \(n\) is the refinement level.

Block-based domain decomposition

The domain is divided into cubic blocks of a fixed size \(d\) (by default, 8 nodes per edge). These blocks are the elementary units of the simulation’s octree structure.

Every block in the domain, regardless of its refinement level, contains the same number of LBM nodes. When a block is refined, it subdivides into 8 child blocks at the next level. Each child has half the physical spacing but the same \(d^3\) nodes, effectively doubling the resolution in that region.

../../_images/refinement.svg

A block at level 0 subdivides into 8 child blocks at level 1, each with the same number of nodes but half the physical spacing.

Note

The block structure is recursive: the same rules that govern a level 0 -> level 1 transition apply identically to level 1 -> level 2, and so on. This recursiveness ensures consistent behavior at every level interface.

Domain size and refinement

The domain dimensions are specified in lattice units at level 0, and the software automatically adjusts the dimensions to be compatible with the block size.

AeroSim supports local mesh refinement through a multiblock approach. Refinement uses a fixed 2:1 ratio - each level doubles the resolution:

\[\Delta x_n = \frac{\Delta x_0}{2^n}\]

where \(n\) is the refinement level. Level 0 is the coarsest (base) grid, and higher levels are progressively finer.

../../_images/res_change.png

Velocity field showing two refinement levels. The finer grid near the body captures smaller flow structures, while the coarser outer region reduces computational cost.

Note

Level transitions must be gradual. Neighboring blocks can differ by at most one refinement level. If you define a level 3 region, the solver automatically creates intermediate level 1 and level 2 buffer zones around it.

Communication between levels

When blocks of different refinement levels share a boundary, information is exchanged at every time step to ensure that the macroscopic quantities (density \(\rho\), velocity \(u_\alpha\), stress \(\sigma_{\alpha\beta}\)) remain continuous across the transition. The coarse level provides boundary data to the fine level through spatial and temporal interpolation (cubic and Lagrange schemes, respectively), and the fine level feeds back averaged macroscopic quantities to the coarse level.

../../_images/mb-straight.svg

Communication at a straight interface between levels. Blue nodes indicate coarse-to-fine (C2F) transfer, orange nodes indicate fine-to-coarse (F2C) transfer.

Important

The F2C overlap controls how many coarse nodes receive updates from the fine level. For turbulent flows, use an overlap of at least 2. Insufficient overlap can produce checkerboard patterns in the pressure field at level transitions. For highly turbulent LES simulations, an overlap of 3 may further improve stability.

Time stepping across levels

AeroSim uses acoustic scaling for the temporal discretization: the time step at each level scales with the grid spacing.

\[\Delta t_n = \frac{\Delta t_0}{2^n}\]

This means finer levels advance more time steps per coarse-level step. For each coarse-level iteration, the finest level runs \(2^N\) sub-iterations (where \(N\) is the maximum refinement level). Not all levels run on every sub-iteration - a level \(k\) runs every \(2^{(N-k)}\) sub-iterations.

Important

Each additional refinement level doubles the total number of sub-iterations per coarse step. A simulation with 4 levels requires 16 sub-iterations for every coarse-level time step. Use the minimum number of refinement levels needed for your application.

Scaling of physical quantities

To maintain physical consistency across refinement levels, several quantities are automatically rescaled at level transitions:

  • Viscosity: the mesoscopic kinematic viscosity doubles at each finer level (\(\nu_f = 2\nu_c\)) to keep the Reynolds number constant.

  • Force density: the mesoscopic body force scales as \(F_n = F_0 / 2^n\), ensuring a consistent physical force value across all levels.

  • Mach number: remains constant across levels because acoustic scaling preserves the ratio \(\Delta x / \Delta t\).

These scalings are handled entirely by the solver. No user configuration is required.

Practical implications

Planning refinement zones

Each additional refinement level doubles the computational cost in that region. Use the minimum number of levels that provides sufficient resolution for the flow features you need to capture.

The refinement zone should extend far enough around the region of interest so that level transitions do not affect the flow quantities you are measuring. The solver enforces gradual transitions, so a level 3 zone will automatically be surrounded by level 2, then level 1 buffer blocks.

Level transitions near bodies

The diffusive layer of the IBM (approximately 1.5 lattice cells from the body surface) must be entirely within one refinement level. A level transition cutting through the diffusive layer will degrade the accuracy of the boundary condition. When configuring refinement around a geometry, ensure the finest level extends at least one block beyond the body surface in all directions.

See also