Massflow rate from Pressure, Temperature, and Value placement

AI Thread Summary
The discussion revolves around simulating natural gas flow in a pipeline using C#. Key equations and variables are highlighted, including mass flow rate, Mach number (M), and the specific gas constant for methane. Users can input temperature, pressure, and differential pressure (DP) to determine flow characteristics, with a focus on how valve position affects mass flow. The simulation aims to model gas exiting a valve into a tank, with considerations for flow area and velocity calculations. Clarifications on the equations and user inputs are sought to enhance the accuracy of the simulation.
btb4198
Messages
570
Reaction score
10
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
 
Science news on Phys.org
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
 
How to do solve for M?
 
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, ...?
 
User input

so the user can enter temperature or Pressure or DP or anything else needed...
 
M is going to depend on the velocity of the gas and its temperature.
 
so how do you determine the velocity of the gas ?
does that have something to do with dp / ΔP?
 
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.
 
ok

Temperature, Pressure, and DP are user inputs

It will be Natural gas going into 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
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
'value' = a quantity, a number
'valve' = a mechanical device to regulate the flow of a fluid
 
  • #12
yeah I know...
sorry it was a typo
 
  • #13
Q = 200 cc/min is not even a breeze to a flea.
 
Back
Top