Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Sourav

ROLL NO. 20112069


Experiment -2
Objective-
Estimation of Molar Volume and compressibility factor for Vander Waals.

Problem statement-
Calculate the molar volume of saturated liquid water and saturated water vapour at 100
°C and 101.325 kPa using Vander Waals, Redlich-Kwong and Peng-Robinson cubic
equations of state. For water Tc = 647.1 K, Pc = 220.55 bar and w = 0.345.

Theory-
The molar volume of both the saturated vapour and saturated liquid can be calculated
using cubic equation of state. The cubic equations of state can have three real roots or
one real root and two complex roots.
When there is only one real root, then only one phase exists-liquid or vapour-and when
three real roots exist, then two there are two phases.
Then, smallest root is molar volume of saturated liquid, and the largest root is molar
volume of saturated vapour. The intermediate roof is of no physical significance.
To determine molar volume of liquid phase, the starting value taken is V=b. To determine
molar volume of vapor phase, the starting value is taken as V = 𝑅𝑇
𝑃
.
𝑅𝑇 𝑎
The Van-der Waal’s equation of state is 𝑃 = 𝑉−𝑏 = 2.
𝑉

The cubic form of Van-der wall equation of state is given by


𝑅𝑇 𝑎 𝑎𝑏
𝑉 3 − (𝑏 + 𝑃
) 𝑉2 +𝑃 𝑉− 𝑃
= 0.

Where,
27𝑅2 𝑇𝑐 2
𝑎=
64𝑃𝑐
𝑅𝑇𝑐
𝑏 = 8𝑃𝑐
Let us define a function as,
𝑅𝑇 2 𝑎 𝑎𝑏
𝑓 = 𝑉 3 − (𝑏 + )𝑉 + 𝑉 −
𝑃 𝑃 𝑃
At the given temperature and pressure and given critical properties of the substance, the
only unknown in this equation is the molar volume V. The derivative of the function f
with respect to the molar volume is given as
𝑅𝑇 𝑎
𝑓 ′ = 3𝑉 2 − 2 (𝑏 + )𝑉 +
𝑃 𝑏
A value of molar volume is assumed. At the assumed molar volume, the value of the
function f and its derivative f’ are determined and the new molar volume is determined
using Newton's method
𝑓
𝑉 𝑛+1 = 𝑉 𝑛 −
𝑓′

Thereafter, the new molar volume becomes the old molar volume, and f and f’ are
determined again at this molar volume. The procedure is repeated dill there is a very
small change between the new and old molar volume.

What is Newton Raphson Method ?


The Newton Raphson Method is referred to as one of the most used techniques for finding the
roots of given equations. It can be efficiently generalised to find solutions to a system of
equations.
Let x0 be the approximate root of f(x) = 0 and let x1 = x0 + h be the correct root. Then f(x1) = 0
⇒ f(x0 + h) = 0….(1)
By expanding the above equation using Taylor’s theorem, we get:
f(x0) + hf1(x0) + … = 0
⇒ h = -f(x0) /f’(x0)
Therefore, x1 = x0 – f(x0)/ f’(x0) .
Now, x1 is the better approximation than x0.
Similarly, the successive approximations x2, x3, …., xn+1 are given by
𝑓(𝑥 )
𝑥 𝑛+1 = 𝑥 𝑛 − 𝑓′ (𝑥𝑛 )
𝑛
This is called Newton Raphson formula
Code-
#include <iostream>
#include <math.h>
# define E 0.001
using namespace std;
double func (double p, double v, double r, double t, double a, double b)
{ double fx = v*v*v - ((b+((r*t)/p))*v*v) + ((a/p)*v) - ((a*b)/p);
return fx;
}
double deriv (double P, double v, double R, double T, double a, double b){
double f1x = (3*v*v) - (2*(b+((R*T)/P))*v) + (a/P);
return f1x;
}
double Valueofa (double R, double Pc, double Tc)
{
double a= ((27*R*R*Tc*Tc)/(64*Pc));
cout<<"Value of a = "<<a<<endl;
return a;
}
double Valueofb (double R, double Pc, double Tc)
{
double b = ((R*Tc)/(8*Pc));
cout<<"value of b = "<< b<<endl;
return b;
}
int main()
{
double P ,T, Pc,Tc;
cout<<"value of temperature in kelvin= ";
cin>>T; cout<<endl;
cout<<"value of pressure in Pascal= ";
cin>>P; cout<<endl;
cout<<"value of critical temperature in kelvin= ";
cin>>Tc; cout<<endl;
cout<<"value of critical pressure in Pascal= ";
cin>>Pc; cout<<endl;
double R = 8.314;
double a = Valueofa (R,Pc,Tc);
double b = Valueofb (R,Pc,Tc);
double vliquid =b;
double vvapour=(R*T)/P;
double h1 = func(P,vliquid,R,T,a,b)/deriv(P,vliquid,R,T,a,b);
while(h1>=E)
{
h1= func(P, vliquid,R,T,a,b)/deriv(P,vliquid,R,T,a,b);
vliquid = vliquid -h1;
}
double h2 = func(P,vvapour,R,T,a,b)/deriv(P,vvapour,R,T,a,b);
while(h2>=E)
{
h2= func(P, vvapour,R,T,a,b)/deriv(P,vvapour,R,T,a,b);
vvapour = vvapour -h2;
}
cout<<"Volume of saturated liquid by Van-Der Waal equation is "<<vliquid<<"m^3/mol
"<<endl;
cout<<"Volume of saturated Vapour by Van-Der Waal equation is "<<vvapour<<"m^3/mol
"<<endl;
return 0;
}

OUTPUT

You might also like