How how do I select only some of the cells?

Hi all,
I am working with the permeability example ( and I have to compute density of the fluid cells, without to take into account the porous medium cells. How do I select only the fluid cells? I guess that I could use the array “geometry”, and to create a Box3D with the only fluid cell, but I don’t know in what way.

Thanks in advance.