Create Visual Basic function ffactor(Re, rr) that calculates the Darcy-Weisbach friction factor in a pipe or duct, where Re is the Reynolds No. and rr is the relative roughness, using Churchill''s expression. Verify your results using the data given.
1. Liquid ammonia (? = 0.4 cSt, SG = 0.65) is delivered from a large pipe at 300 kPa to a 2 cm nozzle through 150 m of 4 cm horizontal commercial steel pipe, 3 elbows, and a globe valve. The nozzle is 20 m above the supply pipe. The valve is fully open.
a) Solve for the flow using an initial guess of 1 L/s.
b) Solve for the required pipe diameter and K for the globe valve for a flow of 4 L/s. The pipe is available in 2 cm diameter increments.
Put (a) and (b) on separate worksheets labeled 1a, 1b.