The electric field in porous materials calculated with the grain consolidation model