# Fluid flow rate calculation

This topic is 4573 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I am planning on implementing a hydraulics simulator. What do I need and how do I calculate the rate of flow through a pipe with an arbitrary radius (meters) at an arbitrary pressure (pascals)?

##### Share on other sites
Bernoulli's equation is a good place to start.

##### Share on other sites
I perused through the wiki entry, and though most was gibberish to me, I did notice a link to another wiki entry called potential flow (which was also gibberish). Is this what I should be researching? I don't need anything fancy like turbulent flow. I am going for a plausible simulation of hydraulic machinery, not a prediction. This is, after all, for a game. :-)

##### Share on other sites
The first equation (under the heading 'Incompressible') is probably want you want.

##### Share on other sites
In the wikipedia article the first sentence is:

Bernoulli's principle states that in fluid flow, an increase in velocity occurs simultaneously with decrease in pressure.

What I am looking for the opposite: an increase in velocity occurs simultaneously with an increase in pressure (gradient).

Bernoullis's principle may have relevance, but I don't know what to do with it. I personally don't need to know the pressure of the fluid on the walls of the pipe (unless it is needed to determine maximum flow at a given pressure gradient) or take into account the effect of gravity or thermodynamics. Is there a simple, 'C' friendly equation for this?

##### Share on other sites
Jos Stam and Mark Harris have articles on how to model fluid flow on the CPU and GPU.

##### Share on other sites
Somewhat offtopic, but check out simulated fluids physics (and a bunch of other really nice videos) with the Ageia PhysX:
http://www.ageia.com/physx_in_action/tech_demos.html

##### Share on other sites
Quote:
 Original post by coder0xffIn the wikipedia article the first sentence is:Bernoulli's principle states that in fluid flow, an increase in velocity occurs simultaneously with decrease in pressure.What I am looking for the opposite: an increase in velocity occurs simultaneously with an increase in pressure (gradient).Bernoullis's principle may have relevance, but I don't know what to do with it. I personally don't need to know the pressure of the fluid on the walls of the pipe (unless it is needed to determine maximum flow at a given pressure gradient) or take into account the effect of gravity or thermodynamics. Is there a simple, 'C' friendly equation for this?

Bernoulli's equation is exactly what you want for this type of problem. It is extremely easy. I suggest that you actually do a search for Bernoulli's equation using google if you are having trouble with the concepts rather than blowing it off and trying to get people to provide code that you can cut-and-paste without any understanding.

##### Share on other sites
You might want to try searching for "energy equation for fluid flow" as well. It's basically the same deal as Bernoulli's, just some fluid mechanics books use the different name.

If you're trying to roughly simulate hydraulic systems, this IS what you use. You need the pressure "on the walls" as you put it to find the force acting on the pistons in your system! That's what makes things...go.

Same thing for flow rate through a pipe, although you also need "continuity equation" to go along with the energy equation there. They can all be applied with very simple algebra so long as you are not trying to derive where they come from.

##### Share on other sites
Even if you are deriving where they come from - conservation of energy and conservation of mass - it isn't that complex.

1. 1
Rutin
35
2. 2
3. 3
4. 4
5. 5

• 12
• 14
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633343
• Total Posts
3011431
• ### Who's Online (See full list)

There are no registered users currently online

×