Numerical solutions to some free surface flows through nonhomogeneous media