Drag and Lift coefficients

Hi Every Body,
I want to know how to calculate the drag and lift coefficients for three-dimensional flow past square cylinders using LBM.
If some one can put that part of the code written in any scientific language (c, Matlab, Fortran).
Thanks and Best Regards
Noor