INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Perfect gas law for methan

Perfect gas law for methan

(OP)
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.

RE: Perfect gas law for methan

n1 = P1V/Z1RT
For Z use any valid EOS. The corresponding state theory is easy.

n2 = n1 + Δn
"I know how many lb moles of Methane are added" = Δn

P2 = n2Z2RT/V
On the first calculation use Z2 = Z1.
With that P2, calculate a new Z2.
Repeat last step until P2 and Z2 do not change (i.e. converge).


Good luck,
Latexman

Technically, the glass is always full - 1/2 air and 1/2 water.

RE: Perfect gas law for methan

(OP)
Thanks! Good idea. I will try it out.

RE: Perfect gas law for methan

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

RE: Perfect gas law for methan

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.

RE: Perfect gas law for methan

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

RE: Perfect gas law for methan

"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 n1 ≠ n2.

"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.

RE: Perfect gas law for methan

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..

RE: Perfect gas law for methan

(OP)
The expression for Z is the methane compressibility factor.

For Z, go to: http://excelcalculations.blogspot.com/2011/10/visc...

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.

RE: Perfect gas law for methan

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(Tr, Pr). I read this as “Z is equal to a function of Tr and Pr”. f ≡ 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.

RE: Perfect gas law for methan

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 smile

RE: Perfect gas law for methan

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close