# Massflow rate from Pressure, Temperature, and Value placement

1. Jul 16, 2013

### btb4198

so this is what i know:
m=ρ*V*A
ρ = 0.669 ρ (kg/m3) for Methane (gas) I think...
A = flow area = ( D^2/pi) units are m^2 I think for a pipe I really think this is wrong
V = M * sqrt (gam * R * T)
R = Universal Gas Constant = 8314 J/kmol-K.
T = temperature
gam = K = 1.304 for Methane I think
M= I do not understand what M is???

where does DP come in at ? do you need DP?
and where does Pressure come in at?
if you have Value Placement 40 % open how will that change Mass flow?

what other information do I need?
I am writing a simulator in C#
I am simulating natural gas in a pipe line from a well

2. Jul 16, 2013

### SteamKing

Staff Emeritus
M is the Mach number. It is the ratio of the speed of a fluid to the speed of sound in that same fluid.

If you know the internal diameter of a pipe (D), then the area A = (pi/4)*D^2

3. Jul 16, 2013

### btb4198

How to do solve for M?

4. Jul 16, 2013

### SteamKing

Staff Emeritus
It's not clear from the OP how your simulation will work, i.e., what sort of inputs will you be using to determine the properties of the methane flowing from the well. Do you know the flow rate out of the well? Its temperature, pressure, ...?

5. Jul 16, 2013

### btb4198

User input

so the user can enter temperature or Pressure or DP or anything else needed...

6. Jul 16, 2013

### SteamKing

Staff Emeritus
M is going to depend on the velocity of the gas and its temperature.

7. Jul 16, 2013

### btb4198

so how do you determine the velocity of the gas ?
does that have something to do with dp / ΔP?

8. Jul 16, 2013

First, in your equation, $R$ is not the universal gas constant, but the specific gas constant for the gas at hand.

Also, why are you having trouble trying to calculate your velocity? You have it as something you are solving for up top with the equation listed if you give it a certain Mach number. Otherwise, to calculate it without knowing the Mach number a priori (in which case there is no reason seemingly for you to have Mach number even listed up top there), then you need to give us more information on what you are actually trying to solve, or rather the physical system it pertains to.

Perhaps start by telling us what variables you want to have as user inputs and what values you are hoping to get out in return.

9. Jul 16, 2013

### btb4198

ok

Temperature, Pressure, and DP are user inputs

It will be Natural gas going in to a flow meter ...
a orifice

also there is a value at the end of the pipe
the value open from 0% to 100%

0% is close and means no flow

what is a good size for a value?

10. Jul 17, 2013

### btb4198

I just learned that there are sensors that can tell you = Volumetric flow...
so I am going to use this equation:
Mass flow rate = ((m *P)/(nRT))*QX;
which Given:
Q = 200 cm3
/min
m = 28.0134 g in 1 mole of N2
n = 1 mole
P = 1 atm
R = 82.1 (cm3 • 1 atm)/(mole • °K)
T = 273.15 °K(0 °C)
ok now
I think I will multiply Mass flow rate but the output of the value .
to mass flow rate * 0 = 0 and that is when the value is close
and Mass flow rate * 100 is when it is fully open..

do you think would be a good simulation of gas coming out of a value to in a tank ?
or is there a better way I should do it ?

also I would still like to know how to solve from V with only Temperature, Pressure I know it has something to do with Bernoulli's principle

11. Jul 17, 2013

### SteamKing

Staff Emeritus
'value' = a quantity, a number
'valve' = a mechanical device to regulate the flow of a fluid

12. Jul 17, 2013

### btb4198

yeah I know...
sorry it was a typo

13. Jul 17, 2013

### SteamKing

Staff Emeritus
Q = 200 cc/min is not even a breeze to a flea.