# Calculating pressure transfer between pipes

## Recommended Posts

staticVoid2    381

Hi,

I'm trying to write some code that simulates the transfer of pressure from an air compressed tank along a pipe of a certain diameter. I've looked at various different equations and they all have various different flaws, such as assuming incompressible gas etc.

I need to be able to sample the pressure along the pipe at a specific distance and also simulate the pressure drop in the compressed tank over time.

Could someone point me in the right direction?

Thanks.

##### Share on other sites
brucedjones    850

Bernoulli's equation is probably the best place to start.

##### Share on other sites
hobogoblin    179

An assumptionb of an incompressible gas is pretty much standard for this sort of thing.

##### Share on other sites
CombatWombat    673

If it's for a game, it's got to be a pretty strange game where the incompressible assumption causes problems.

If it's for an engineering problem, there are off the shelf products both paid and open to solve fluid problems.  Computational Fluid Dynamics code.

If it's purely to learn and play:

When you lose the incompressible assumption it becomes simultaneously a fluid dynamics and thermodynamics problem.

You will need to learn about:

Bernoulli / Energy equation

Thermodynamic Properties

The basic laws of thermodynamics

It's a big subject and it's hard to advise you more specifically without knowing where you are starting from.

##### Share on other sites
Mats1    1047

You can find some useful information here: http://petrowiki.org/Pressure_drop_evaluation_along_pipelines

For practical pipeline purposes, Eq. 11 can be simplified to
(Eq. 12)
where

P1 = upstream pressure, psia, P2 = downstream pressure, psia, S = specific gravity of gas, Qg = gas flow rate, MMscf/D, Z = compressibility factor for gas, dimensionless, T = flowing temperature, °R, f = Moody friction factor, dimensionless, d = pipe ID, in., and L = length, ft.