LBSim: a fluid dynamics simulator using the lattice Boltzmann method