Modified Algorithm for Surface Tension with Smoothed Particle Hydrodynamics and Its Applications