Understanding how fluids flow through pipes is a often critical for a wide variety of applications, such as indoor plumbing or industrial fluid transport. When it is important to control the flow of the fluid at the outlet to be relatively constant, the whole piping system is typically kept under constant pressure, usually provided by a pump at the inlet of the piping system.
But how much pressure should be provided to the system? The greater the pressure difference between the inlet and the outlet, the faster fluid will move through the pipe. The relationship between this pressure difference and the flow rate can be described by the Hagen-Poiseuille Equation:
$$ \large Q = \frac{\Delta P A^{2}}{8 \pi \mu L} $$
Where:
Q is the volumetric flow rate of the fluidΔP is the pressure difference between the outlet of the pipe and the inlet of the pipeA is the cross-sectional area of the pipeπ is the ratio of a circle's circumference to its diameter (approximately 3.14159...)μ is the dynamic viscosity of the fluidL is the length of the pipe from the inlet to the outletThe use of this equation makes a number of assumptions that the system follows an ideal model, such as the fluid being incompressible, the pipe being uniform along is length, the fluid having Newtonian properites (constant viscosity), the fluid experiencing no external forces, and the fluid flow being laminar.
A fluid is laminar when the flow is smooth and even, as opposed to turbulent flow which is characterized by chaotic swirling eddies.
Smoke rising from a candle.
The lower portion exhibits smooth laminar flow, but as the smoke rises it increases in velocity
until it exhibits chaotic turbulent flow.
Visually it is somewhat apparent when flow is laminar or turbulent, but if we are unable to visually see inside the pipe then it would be valuable to be able to make predictions about the type of flow just given some information about the system. To do this we will calculate a dimensionless value known as Reynold's Number, and defined as:
$$ \large \text{Re} = \frac{\rho v D}{\mu} $$
Where:
Re is the Reynold's Numberρ is the density of the fluidv is the average velocity of the fluid in the pipeD is the diameter of the pipeμ is the dynamic viscosity of the fluidIf Re < 2300, then it is predicted that the flow of the fluid is laminar, and so
use of the Hagen-Poiseuille Equation should be valid. If Re > 2300, then the flow
will be too non-laminar and chaotic to be accurately modeled by the Hagen-Poiseuille Equation.
You are a chemical engineer working at a manufacturing plant in the United States.
You are designing a process which involves transporting a fluid through a system
at a controlled rate. The fluid flows through a long horizontal pipe having diameter
D in units of inches, and length L in units of feet, and the process requires
that the pipe delivers at least Q gallons of fluid every minute.
While the facility is located in the US, the fluid itself is manufactured in Europe
and so the documentation provided within the fluid's MSDS
reports that it has dynamic viscosity μ in units of Pascals * seconds, and
density ρ in units of kg / m^3. Your job is to determine the pressure differential
required between the inlet and outlet in order to achieve the desired flow rate.
Report the pressure in units of PSI.
Input Data
First line will be N, the quantity of testcases.
N lines will then follow, each with 5 space-separated values in the format D L Q μ ρ.
Answer
Should consist of N space-separated values, each corresponding to the pressure
differential required to achieve the flowrate in each case, by utilizing the
Hagen-Poiseuille Equation.
If the Hagen-Poiseuille Equation is not applicable due to non-laminar flow, return the character X instead.
Error should be less than 1e-3.
Example
input data:
2
0.5 6 7 0.89 1011
1 9 45 0.1 2000
answer:
163.284 X