# Computation of 2nd and 3rd Virial Coefficients

1. Jan 26, 2014

### amattiol

1. The problem statement, all variables and given/known data
Compute the 2nd and 3rd Virial coefficients at 300K of Ar. Experimental parameters are mentioned in xlist and ylist below :)

2. Relevant equations
My professor has given a hit, which is as follows: "Use the data to determine the (z) compressability (sp?) and plot Z as a function of the reiprocal of molar volume."

3. The attempt at a solution

In Maple this is where I am at:

xlist := [.4, .5, .6, .8, 1, 1.5, 2, 2.5, 3, 4];
ylist := [6.2208, 4.9736, 4.1423, 3.1031, 2.4795, 1.6483, 1.2328, .98357, .81746, .60998];
xylist := zip(proc (x, y) options operator, arrow; [x, y] end proc, xlist, ylist);
xylist:= [[0.4, 6.2208], [0.5, 4.9736], [0.6, 4.1423], [0.8, 3.1031], [1, 2.4795], [1.5, 1.6483], [2, 1.2328], [2.5, 0.98357], [3, 0.81746], [4, 0.60998]]

Then I have done non linear fitting for 7 Virial coefficients with the resulting equation of fit:
f(x) =0.733475918379429/x^6-5.86019434244588/x^5+18.1883313118305/x^4-27.6759879335724/x^3+21.3651589091868/x^2-5.25691168982818/x+1
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Jan 26, 2014

### epenguin

Why fit with 7 terms when you are asked for only 3?

Not strong on the statistical theory but I think you positively lose information by fitting to too many terms.

3. Jan 26, 2014

### amattiol

epenguin, I fit 7 terms because it was such a good fit I couldn't resist keeping it fit to the 8th coefficient. If I reduce the fit eqn to z = 1 + B/Vbar + C/(Vbar^2) then B and C would be the 2nd and 3rd coefficients correct? Then I use those to calculate Z?
Thanks for the response...I realize I didn't format the question very well.

4. Jan 27, 2014

### Staff: Mentor

When fitting polynomials, the more coefficients you use, the better fit you will get. When number of coefficients equal number of data points the curve will go exactly through all the points (think why), but it will be useless between points.

5. Jan 27, 2014

### epenguin

Exactly what I was about to say. and fitting 10 points with 6 coefficients you are getting that way.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted