Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Perfect gas law for methan

Status
Not open for further replies.
Given that PV=ZnRT for a vessel. For a given Volume, Temp, and initial pressure, and Mole Weight of methane, the LbMoles of methane can be calculated.

Now, add some more methane to the vessel from a high pressure source. Now, the mole wt in the vessel has changed. Assuming no change in temperature, or volume, AND, I know how many lb moles of Methane are added, how do I calculate the new pressure? Z, being the compressibility factor, is a function of temp and pressure. New pressure is unknown and so is the new Z factor. ??? 1 equation, but 2 unknowns. Is there another equation for Z or P that I can use to solve for the 2 unknowns? I greatly appreciate the help.

PS, this is not a student question, but deals with fueling of a CNG vehicle.
 
n[sub]1[/sub] = P[sub]1[/sub]V/Z[sub]1[/sub]RT
For Z use any valid EOS. The corresponding state theory is easy.

n[sub]2[/sub] = n[sub]1[/sub] + [Δ]n
"I know how many lb moles of Methane are added" = [Δ]n

P[sub]2[/sub] = n[sub]2[/sub]Z[sub]2[/sub]RT/V
On the first calculation use Z[sub]2[/sub] = Z[sub]1[/sub].
With that P[sub]2[/sub], calculate a new Z[sub]2[/sub].
Repeat last step until P[sub]2[/sub] and Z[sub]2[/sub] do not change (i.e. converge).




Good luck,
Latexman

Technically, the glass is always full - 1/2 air and 1/2 water.
 
Latexman - i dont think you can solve this way:

P1V=n1Z1RT 1)
P2V=n2Z2RT 2)

1)/2) =>
P1/P2= n1*Z1/(n2*Z2)

Isolating <=>
P2=P1*n2*Z2/(n1*Z1), k=P1*n2/(n1*Z2) <=>
P2=k*Z2

Since both P2 and Z2 are unknow i dont think that this can be solved itteratively

But unless the added volume is large (and hence the pressure increase high) then i think its pretty safe to assume that the Z is const. Or unless the is a text book task - you could use a table for Z as a function of P/T, this should be fairly easy to get.

If Z assumes constant the problem reduces to:

P2=P1*n2/n1, where n2=n1+added methane
 
Corresponding States Theory -----> Z2 = f(P2) because T, MW, etc. is constant in this case.

PV=ZnRT -----> P2 = f(Z2) because V, n, and T are constant in this case.

It's the classic iteration of one variable until convergence.

Good luck,
Latexman

Technically, the glass is always full - 1/2 air and 1/2 water.
 
Yes, but then you need an equation to calculate a new Z - and i doubt that he has that based on the problem description? If you use Z2=z1 in the first equation you also get P1=P2, end of iteration. If you "guess" or assume thing else you would either have something that just bounces around, or perhaps returns to the original value of Z1 as far as i can see
 
"Yes, but then you need an equation to calculate a new Z - and i doubt that he has that based on the problem description?"

Are you saying more than one EOS is needed (for methane)? I hope not.

"If you use Z2=z1 in the first equation you also get P1=P2, end of iteration."

No, because n[sub]1[/sub] [&ne;] n[sub]2[/sub].

"If you "guess" or assume thing else you would either have something that just bounces around, or perhaps returns to the original value of Z1 as far as i can see

Z1 = f(T, n1, P1). Z2 = f(T, n2, P2). There should only be one value of Z2 (on the gas/vapor side of the phase envelope) for T, n2 and P2 in a well behaved EOS. Any reasonable guess should converge at Z2, not Z1.

Good luck,
Latexman

Technically, the glass is always full - 1/2 air and 1/2 water.
 
i missed that, but then your solution to Z would depned on the amount of C1 that you added. That is indeed that case - since the Z _will_ change with the preeusre. I just don't see how you can iterate your way to that.

Im not talking about a "special" EOS for methane, I'm saying that the original question assumed "perfect gas law" (in brackets because in the perfect gas law Z=1). So you don't have any predictive measure for calculating Z at all (its composition independent)

step 1 (assumed Z1=Z0) =>

P1=P0*n1/n0, and insert into the first equation P=ZnRT gives P1=Z1n1RT=Z0n1RT - and this is true and i can't see where we go from there

What is this f function that you mention? There is no f function in the perfect gas equation for calculating Z. (am i falsely assuming that perfect=ideal gas law?)

I just want to understand your reasoning and where it is that i fail..
 
The expression for Z is the methane compressibility factor.

For Z, go to:
2 vessels, each with different volumes, and pressures transferring CH4 between them is the problem.
P*V = Z*N*R*T for high pressure methane, which is what I am dealing with. After a short flow time, a small amount (dm) of methane is transferred between 2 vessels. One vessel has slightly less methane, and the other, slightly more methane. The difference in N (lb moles) is the same (obviously) for both vessels. One vessel's pressure decreases, while the other increases. So, I am trying to determine the pressure drop and rise in the 2 vessels, based on the amount (lb moles) of methane transferred. V, R, and T are constant, while P and Z vary. I have not tried the substitution method yet, been so busy with other stuff. I do appreciate all the comments. Thanks so much.
 
MortenA,

The OP confused us with "perfect gas law" (PV = nRT with no Z) in the title, and speaking repeatedly of Z in PV=ZnRT in the first post. I assumed they meant to use the two parameter correlation PV = ZnRT, which they just said they did. Otherwise, as you said, the solution is unremarkable.

By two parameter correlation, Z = f(T[sub]r[/sub], P[sub]r[/sub]). I read this as “Z is equal to a function of T[sub]r[/sub] and P[sub]r[/sub]”. f [&equiv;] function.

Initially, the OP knows P1, V, and T. They can calculate Z1 directly from P1 and T. Then they calculate n1.

Then, a known quantity of CH4 is added to get n2 lb-moles of CH4 total. Now, they have to calculate P2.

P2 = Z2n2RT/V

All is known on the right hand side, except Z2. Z2 = f (Tr, Pr2) = f (T/Tc, P2/Pc). Since T and Tc and Pc are known, then in reality Z2 = f (P2). Anyone who has looked at Corresponding Theory’s generalized compressibility chart knows, Z is nonlinear with Tr and Pr. The classical solution to nonlinear algebraic equations is iterative.

First put the equation in this format: f(P2) = P2 - Z2n2RT/V = 0

Then, there are many techniques to solve it, like graphical, spreadsheet, regular falsi, Newton’s Rule, or successive substitution (requires P2 = Z2n2RT/V format).

My previous posts suggested successive substitution, because the generalized compressibility charts are not a single equation, but a chart, which is best handled numerically, which works nicely with successive substitution.

I also suggested to start with Z2(1) = Z1.
Then P2(1) = Z2(1)n2RT/V
Then Z2(2) = f(Tr, Pr2(1)) Generalized Compressibility Chart
Then P2(2) = Z2(2)n2RT/V
Then Z2(3) = f(Tr, Pr2(2)) Generalized Compressibility Chart
Then P2(3) = Z2(3)n2RT/V
Then Z2(4) = f(Tr, Pr2(3)) Generalized Compressibility Chart
Then P2(4) = Z2(4)n2RT/V
Then Z2(5) = f(Tr, Pr2(4)) Generalized Compressibility Chart
Then P2(5) = Z2(5)n2RT/V
Keep iterating until Z2 and P2 do not change significantly.

It works. I've done it many times.

Good luck,
Latexman

Technically, the glass is always full - 1/2 air and 1/2 water.
 
The i agree with the itteration approac (of course) - i just read the original post the way that he wanted to calculate Z by means of measuring and didnt want to use an quation to calculate Z 8based on P,T and composition) or chart or similar. So all in all we always agreed :)
 
Your gratitude is . . . underwhelming for such an experienced Eng-Tips patron.

Good luck,
Latexman

Technically, the glass is always full - 1/2 air and 1/2 water.
 
Status
Not open for further replies.
Back
Top