In engineering design, the volume and weight of a number of systems consisting of valves and plumbing lines often need to be minimized. In current practice, this is facilitated under empirical experience with trial and error, which is time-consuming and may not yield the optimal result. This problem is intrinsically difficult due to the challenge in the formulation of optimization problem that has to be computationally tractable. In this research, we choose a sequential approach towards the design optimization, i.e., first optimizing the placement of valves under prescribed constraints to minimize the volume occupied, and then identifying the shortest paths of plumbing lines to connect the valves. In the first part, the constraints are described by analytical expressions, and two approaches of valve placement optimization are reported, i.e., a two-phase method and a simulated annealing-based method. In the second part, a three-dimensional routing algorithm is explored to connect the valves. Our case study indicates that the design can indeed be automated and design optimization can be achieved under reasonable computational cost. The outcome of this research can benefit both existing manufacturing practice and future additive manufacturing.