Structural averaging of flow processes in nonhomogeneous porous media