A continuum method for modeling surface tension