PC Review


Reply
Thread Tools Rate Thread

calculate the z factor automatically

 
 
khalid khalid1111
Guest
Posts: n/a
 
      20th Aug 2007
How do I calculate the z factor automatically by using Hall-Yarborogh equation without changing (Y) every time to reach F=0 ?
if any body know .please answer me.

Thank you very much

khalid
INPUT DATA:
T 68 oF
p 1000 psia
SGFG 0.5 air=1

CALCULATE CRITICAL AND REDUCED TEMPERATURE AND PRESSURE:
Tpc=169.0+314.0*SGFG Ppc=708.75-57.5*SGFG
Tpr=(T+460.0)/Tpc t=1/Tpr
Ppr=p/Ppc


CALCULATE TEMPERATURE DEPENDENT TERMS:
A=0.06125*t*EXP(-1.2*(1.-t**2)
B=t*(14.76-9.76*t+4.58*t*t)
C=t*(90.7-242.2*t+42.4*t*t)
D=2.18+2.82*t


CALCULATE REDUCED DENSITY Y
Y = ASSUMED 0.324006985
F=-A*Ppr+(Y+Y*Y+Y**3-Y**4)/(1.-Y)**3-B*Y*Y+C*Y**D
USE goal seek MACRO SOLUTION: goal seek (F) = 0 by changing (Y)

CALCULATE Z-FACTOR:

Z=A*Ppr/Y

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
Reply With Quote
 
 
 
 
Harlan Grove
Guest
Posts: n/a
 
      20th Aug 2007
<khalid khalid1111> wrote...
>How do I calculate the z factor automatically by using Hall-Yarborogh
>equation without changing (Y) every time to reach F=0 ?

....
>INPUT DATA:
>T 68 oF
>p 1000 psia
>SGFG 0.5 air=1


Following formulas changed to Excel operators.

>CALCULATE CRITICAL AND REDUCED TEMPERATURE AND PRESSURE:
>Tpc = 169.0 + 314.0 * SGFG
>Ppc = 708.75 - 57.5 * SGFG
>Tpr = (T + 460.0) / Tpc
>t = 1 / Tpr
>Ppr = p / Ppc
>
>CALCULATE TEMPERATURE DEPENDENT TERMS:
>A = 0.06125 * t * EXP(-1.2 * (1 - t^2))


I'm assuming you left off the final right parenthesis above.

>B = t * (14.76 - 9.76 * t + 4.58 * t^2)
>C = t * (90.7 - 242.2 * t + 42.4 * t^2)
>D = 2.18 + 2.82 * t
>
>CALCULATE REDUCED DENSITY Y
>Y = ASSUMED 0.324006985
>F = -A * Ppr + (Y + Y^2 + Y^3 - Y^4) / (1 - Y)^3 - B * Y^2 + C * Y^D


>USE goal seek MACRO SOLUTION: goal seek (F) = 0 by changing (Y)
>
>CALCULATE Z-FACTOR:
>
>Z = A * Ppr / Y


So the desired Y value makes F(Y) = 0.

0 = -A * Ppr + (Y + Y^2 + Y^3 - Y^4) / (1 - Y)^3 - B * Y^2 + C * Y^D

A * Ppr = (Y + Y^2 + Y^3 - Y^4) / (1 - Y)^3 - B * Y^2 + C * Y^D


There's no analytical/algebraic solution for Y in terms of A, Ppr, B, C, and
D. So you MUST ALWAYS vary Y in order to produce F(Y) = 0 in order to solve
for Z.


 
Reply With Quote
 
Dana DeLouis
Guest
Posts: n/a
 
      21st Aug 2007
Hi. I may be wrong, but this site suggest the following:

http://www.peteng.com/jmm/zfc02.html

> A=0.06125*t*EXP(-1.2*(1.-t**2)


Looks to me like temp. variable 'A should be:

A =-.06125*Ppr*t*Exp(-1.2*(1-t)^2)

The T (Temperature) said that it's valid only for T >100 (vs your 68)

A few other small differences.

Again, I'm not familiar with the topic to know if the above applies.
--
Dana DeLouis


<khalid khalid1111> wrote in message news:(E-Mail Removed)...
> How do I calculate the z factor automatically by using Hall-Yarborogh
> equation without changing (Y) every time to reach F=0 ?
> if any body know .please answer me.
>
> Thank you very much
>
> khalid
> INPUT DATA:
> T 68 oF
> p 1000 psia
> SGFG 0.5 air=1
>
> CALCULATE CRITICAL AND REDUCED TEMPERATURE AND PRESSURE:
> Tpc=169.0+314.0*SGFG Ppc=708.75-57.5*SGFG
> Tpr=(T+460.0)/Tpc t=1/Tpr
> Ppr=p/Ppc
>
>
> CALCULATE TEMPERATURE DEPENDENT TERMS:
> A=0.06125*t*EXP(-1.2*(1.-t**2)
> B=t*(14.76-9.76*t+4.58*t*t)
> C=t*(90.7-242.2*t+42.4*t*t)
> D=2.18+2.82*t
>
>
> CALCULATE REDUCED DENSITY Y
> Y = ASSUMED 0.324006985
> F=-A*Ppr+(Y+Y*Y+Y**3-Y**4)/(1.-Y)**3-B*Y*Y+C*Y**D
> USE goal seek MACRO SOLUTION: goal seek (F) = 0 by changing (Y)
>
> CALCULATE Z-FACTOR:
>
> Z=A*Ppr/Y
>
> EggHeadCafe - .NET Developer Portal of Choice
> http://www.eggheadcafe.com



 
Reply With Quote
 
joeu2004
Guest
Posts: n/a
 
      21st Aug 2007
On Aug 20, 11:08 am, khalid khalid1111 wrote:
> How do I calculate the z factor automatically by using
> Hall-Yarborogh equation without changing (Y) every time
> to reach F=0 ?


As I noted in the other threads on the same subject that you
started ....

This relates to a high-specialized area of engineering. If you
posted
the formulas here, __maybe__ someone could help you. But I suspect
this requires more knowledge of the science than of Excel. You might
get some "hint" by looking at z.xls that apparently comes with the
book "Petroleum Production Engineering" by Boyun Guo (2007).




 
Reply With Quote
 
Harlan Grove
Guest
Posts: n/a
 
      21st Aug 2007
"joeu2004" <(E-Mail Removed)> wrote...
....
>This relates to a high-specialized area of engineering. If you
>posted the formulas here, __maybe__ someone could help you. . . .


You didn't notice the OP did post formulas?

>But I suspect this requires more knowledge of the science than of Excel.

....

So?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I calculate the z factor automatically khalid Microsoft Excel Worksheet Functions 7 21st Aug 2007 01:52 PM
How do I calculate the z factor automatically ? khalid Microsoft Excel Discussion 1 20th Aug 2007 07:10 PM
calculate the z factor automatically khalid khalid1111 Microsoft Excel Discussion 0 20th Aug 2007 07:06 PM
How do I calculate the z factor automatically khalid khalid Microsoft Excel Charting 0 20th Aug 2007 07:01 PM
calculate the z factor automatically khalid Microsoft Excel Charting 0 20th Aug 2007 06:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 PM.