This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programming Diversions and the fly likes To PI or not to PI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "To PI or not to PI" Watch "To PI or not to PI" New topic

To PI or not to PI

Leslie Chaim
Ranch Hand

Joined: May 22, 2002
Posts: 336
You had a 10" water line that broke down. Unfortunately, there's only 1" pipe available for replacement.

How many 1" pipes is needed (and why/how) to replace the one 10"?



Normal is in the eye of the beholder
Sonny Pondrom
Ranch Hand

Joined: Jun 05, 2001
Posts: 128
Does a 10" line have an inside diameter of 10 inches?
Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1888

fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11858

100. assuming that the flow isn't restricted by surface area of the pipe...

a 10" (i'm assuming this is the inside diameter) pipe has an area of PI * r^2. if our diam. is 10, our radius is 5. so the 10" pipe has a cross-section area of 25PI.

Each 1" pipe has a radius of 1/2", or an area of (1/4)PI. so, we need 100 pipes.

However, the first pipe has a surface area equal to 10PI (times the length, which we can ignore). the 100 pipes have a surface area of 100PI.

I am not a fluids engineer, but i would imagine that more surface area would result in more friction, slowing down the flow, but i have no idea how to calculate that.
[ July 02, 2004: Message edited by: fred rosenberger ]

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1888
Yes, I think so.Factor that determines is I think Reynold's numebr.Ratio of inertial force to viscous force.Bigger pipe will have more intertia.
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
I think Poiseuille's Law applies here.

which means that the flow is proportional to r^4

which means 100million 1" tubes!!
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
strike that - 10,000 is the answer
I agree. Here's the link:
subject: To PI or not to PI
It's not a secret anymore!