# Diagnostic fields¶

Some stand-alone functions are available in the diagnostics.py file for computing flow diagnostics.

## Courant number¶

The Courant number diagnostic computes the field defined by

$\frac{||\mathbf{u}||\Delta t}{\Delta x},$

where $$\Delta t$$ is the time-step size and $$\Delta x$$ is the element size (more specifically, it is twice the element’s circumradius).

## Grid Reynolds number¶

The Reynolds number (whose length scale is relative to the element size $$\Delta x$$) is defined by

$\mathrm{Re} = \frac{\rho||\mathbf{u}||\Delta x}{\mu},$

where $$\rho$$ is the fluid density, $$\mu$$ is the dynamic viscosity, and $$||\mathbf{u}||$$ is the magnitude to the velocity field. Alternatively,

$\mathrm{Re} = \frac{||\mathbf{u}||\Delta x}{\nu},$

where $$\nu$$ is the kinematic viscosity.

## Divergence¶

This diagnostic field computes the divergence

$\nabla\cdot\mathbf{u},$

of a vector field $$\mathbf{u}$$.