Optimization and design of underground embedded penstocks