novaphy.solvers.SolverLBM¶
Sparse-block Lattice Boltzmann fluid solver. Its authoritative fluid state is
owned by the solver rather than stored in SimState.particle_*.
Optional CUDA backend
The class and SolverLBM.Config are available in every build, but the
numerical backend requires NOVAPHY_WITH_LBM_CUDA=ON. There is no
top-level has_lbm_cuda() function; inspect the model-bound solver's
has_cuda_backend property before seeding, exporting, or stepping.
model = novaphy.ModelBuilder().finalize()
solver = novaphy.solvers.SolverLBM(model)
assert not novaphy.is_scaffold(solver)
if not solver.has_cuda_backend:
raise RuntimeError("Rebuild with NOVAPHY_WITH_LBM_CUDA=ON")
Use seed_box() or add_block_needs() to activate fluid blocks.
try_get_velocity_density() queries SI-space fields, and the dense-grid
export methods provide visualization snapshots. The current runtime supports
one model world per solver and optional immersed-boundary rigid coupling.