Adding sharp edges detection to viscous simulation