# Calculating the velocity of fluid in a pipe

How can I calculate the steady state velocity of air inside a long pipe just knowing the pressure at the inlet and outlet?

• You know Bernoulli's principle? Commented Aug 16, 2018 at 14:16
• There are standard software packages that can calculate flow rate for compressible flow. Do you have access to one of those packages? Commented Aug 16, 2018 at 15:02
• @DavidWhite I was hopping to find a method to compute it by hand. I can download OpenFoam, but that's a learning cuerve I dont want to deal with right now Commented Aug 16, 2018 at 16:44
• @user3408085, the calculation is "trial and error" for compressible flow rates, and is related to Reynold's number, pipe roughness, fluid velocity, etc. If you don't need high accuracy (e.g., +/- 20%), the Bernoulli equation may work. How accurate does your estimation have to be? Commented Aug 16, 2018 at 17:06
• pipeflowcalculations.com/pipe-valve-fitting-flow/… Commented Aug 17, 2018 at 0:13

If you have a laminar flow you can use Hagen-Poiseulle law: $$Q=\frac{\pi R^4}{8\mu}\frac{\Delta p}{L}$$ where $Q$ denotes the volumetric flow rate, $R$ the radius of the pipe, $\mu$ the dynamic viscosity, $\Delta p$ the pressure difference and $L$ the length of the pipe. But $$Q=v\cdot A = v\cdot \pi R^2$$ where $v$ is the averaged velocity and $A$ the cross-sectional area of the pipe. By combining these two equations you will get the velocity as $$v = \frac{R^2}{8\mu}\frac{p_i-p_o}{L} .$$