Text this: Determination of Pipe Diameter Using Optimization Method