How do I plot z = f(x,y) in 2D cartezian coordinates ?

T

Tim

"Z" factor that I want to plot is a function of temperature and pressure. z
=f(p,t)
Is it possible to plot "Z" values in a pressure - temperature 2D graph by
adding a secondary vertical axis?

Thanks

Tim
 
D

Del Cotter

"Z" factor that I want to plot is a function of temperature and pressure. z
=f(p,t)

_3D Surface Chart_ will get you a sort of contour plot, but the x and y
scales are category scales, so you'll have to be careful choosing your x
and y values.

Alternatively, you could make an _XY (Scatter) Chart_, using the
built-in y axis as your z axis, and plot a number of XZ curves to show
the evolution of the function z=f(x,y) for various values of y. Create a
dummy series with invisible markers and visible data labels, to be the
labels for the different curves.

What's the function?
 
T

Tim

Thank you for the quick answer,

Before posting here I tried with _3D Surface Chart_ but no success. I will
try with second method described from you (However, if you have the time can
you pleaaaase be more descriptive in the re. this method)


The fuction that I am truin to plot is called Gas compressibility factor
"Z", Can be calculated with Brill and Beggs or Hall-Yarborogh correlation.

Tim
 
D

Del Cotter

Before posting here I tried with _3D Surface Chart_ but no success. I will
try with second method described from you (However, if you have the time can
you pleaaaase be more descriptive in the re. this method)

It's just several XY lines on one XY chart, each one with a different
value of the second independent variable (temperature or pressure, as
you prefer). You should see examples in textbooks on subjects like
thermodynamics, where the text is illustrating some dependent variable
that is a function of two independent variables. Here your y-value is Z,
your x-value is temperature (or pressure) and your series are different
values of pressure (or temperature). It ends up looking like a black and
white contour map of the two-dimensional surface of the function.
The fuction that I am truin to plot is called Gas compressibility factor
"Z", Can be calculated with Brill and Beggs or Hall-Yarborogh correlation.

I meant the equation and some sample coefficients.
 
T

Tim

Corelations are long and cannot be put in one formula.
Below are Hall-Yarborogh steps used to come to the result:

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
 
K

khalid

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



EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top