Development of a Numerical Model for Single- and Two-Phase Flow Simulation in Perforated Porous Media