Numerical simulation and comparison of potential flow and viscous fluid models in near trapping of narrow gaps