  A lattice Boltzmann scheme able to model the hydrodynamics of phase
separation and two-phase flow is described. Thermodynamic consistency is
ensured by introducing a non-ideal pressure tensor directly into the collision
operator. We also show how an external chemical potential can be used to
supplement standard boundary conditions in order to investigate the effect of
wetting on phase separation and fluid flow in confined geometries. The approach
has the additional advantage of reducing many of the unphysical discretisation
problems common to previous lattice Boltzmann methods.
