2D permeability calculation

Dear friends;

I am working on simulating non-Newtonian fluid flow in porous media.
I have tried to convert the 2D Carreau model to 3D but it seems a little bit complicated; So I decided to run the simulation in 2D.
The problem is that I do not know how to convert permeability in 3D (the one in the tutorial) to 2D and also how to provide appropriate 2D .dat images for the Palabos from .bmp images.
Could you please comment your experiences about this matter or share your code if it is possible?

Many thanks;