# Scalar Transport Nassu can solve the advection-diffusion equation (ADE) for one or more passive scalars $\phi$ on top of the fluid simulation. Typical applications include temperature in atmospheric and urban-scale flows, pollutant or tracer concentration, and any quantity transported by the resolved velocity field with linear diffusion. The ADE solved by nassu is $$\partial_t \phi + u_\alpha \partial_\alpha \phi = D \nabla^2 \phi + S$$ where $u_\alpha$ is the fluid velocity (read from the LBM step), $D$ is the molecular diffusivity (with an LES subgrid component when active), and $S$ is an optional source term. ## Method The scalar is solved with a **Double Distribution Function** (DDF) lattice Boltzmann scheme: a second set of populations $g_i$ on a velocity set independent from the fluid lattice evolves under streaming and a recursive regularised collision, recovering the ADE in the macroscopic limit. ```{figure} /_static/img/theory/scalar_transport/ddf_concept.svg --- width: 65% align: center --- The double distribution function. The scalar rides its own populations $g_i$ on the same grid as the fluid $f_i$, with its own collision, streaming and transport coefficient. It reads the fluid velocity $u_\alpha$ as its advection field; in one-way coupling the fluid does not read the scalar back. ``` ```{admonition} Key idea: the scalar rides its own distribution function --- class: note --- The scalar does not modify the fluid. It carries its own populations $g_i$ on a separate, smaller lattice and reads the fluid velocity $u_\alpha$ at each node. This decoupling lets the scalar reuse the fluid's velocity field while keeping its own diffusivity, sound speed, and boundary treatment independent. ``` The scalar is decoupled from the fluid (except optionally through Boussinesq buoyancy, see {doc}`thermal`) and reads the fluid velocity at every step: $$g_i(\mathbf{x} + \mathbf{c}_i \Delta t,\, t + \Delta t) = g_i(\mathbf{x},t) + \Omega_i^{(\phi)}, \qquad \phi = \sum_i g_i.$$ The pages below cover the velocity set and unit system, the collision and macroscopic state, LES coupling, the Boussinesq path, boundary conditions, solid-body boundaries via voxelization, and integration with multiblock, initialisation, and IBM. ```{toctree} --- maxdepth: 1 hidden: --- Velocity sets and units Collision and state storage LES subgrid coupling Thermal extension Boundary conditions Solid-body voxelization Coupling with other modules ```