On the synthesis of two-phase flow in random media