This paper describes Ludwig, a versatile code for the simulation of Lattice
-Boltzmann (LB) models in 3D on cubic lattices. In fact, Ludwig is not a si
ngle code, but a set of codes that share certain common routines, such as I
/O and communications. If Ludwig is used as intended, a variety of complex
fluid models with different equilibrium free energies are simple to code, s
o that the user may concentrate on the physics of the problem, rather than
on parallel computing issues. Thus far, Ludwig's main application has been
to symmetric binary fluid mixtures. We first explain the philosophy and str
ucture of Ludwig which is argued to be a very effective way of developing l
arge codes for academic consortia. Next we elaborate on some parallel imple
mentation issues such as parallel I/O, and the use of MPI to achieve full p
ortability and good efficiency on both MPP and SMP systems. Finally, we des
cribe how to implement generic solid boundaries, and look in detail at the
particular case of a symmetric binary fluid mixture near a solid wall. We p
resent a novel scheme for the thermodynamically consistent simulation of we
tting phenomena, in the presence of static and moving solid boundaries, and
check its performance. (C) 2001 Elsevier Science B.V. All rights reserved.