Gravar-mail: Optimal design of curved and bifurcated flow pipes