Planning, design, and analysis of tailings dams