Professional Documents
Culture Documents
Bonus Assignement No1 Sanjay Dubey
Bonus Assignement No1 Sanjay Dubey
Question 1. Use steam table to determine ‘a’ and ‘b’ for Water at some temperature.
To evaluate minimum objective function for set of experimental data.
Experimental data:
I have use the data from the superheated steam table. Steam Table is enclosed with the Email.
Pressure: [P1 P2 P3 P4 P5…Pn]
Volume: [V1 V2 V3 V4 V5 …Vn]
Temperature: [T1 T2 T3 T4 T5…Tn]
Tool Used: MATLAB Code and Excel Sheet. Both can be used to evaluate the Minimum Objective Function
Theory:
Where P is Pressure and R, T is Molar Gas Constant and Temperature respectively. Generally, all the gases in
nature behave non-ideal since they occupy some molecular volume and interact with each other. This additional
factor was considered in the Van der Waals equation [1].
𝑎
Van Der Waals gas: (𝑝 + 𝑉 2 ) (𝑉 − 𝑏) = 𝑅𝑇
To calculate Volume:
To evaluate the volume of a real gas, V in term n2a/V2 can be approximated as: nR/TP
as ideal gas.
V = nR3T3/(PR2T2+aP2) + nb
To calculate Pressure:
P = nRT/(V - nb) - n2a/V2
Tc = 647.096 K and Pc= 220.639Bar from the Saturated Steam Table [2]:
a and b are computed from the above equation:
Check the units
a = (0.4) *(8.3142)2*(647.096)2/ (22063912.8)
= 0.524741 J·m3/mol2 = 0.524741 J·m3/mol2 *10=5.247414571 L2·bar/mol2
b = (0.125) *(8.3142) *(647.096)/ (22063912.8)
= 3.04801E-05 m3/mol = 3.04801E-05 *1000 =0.03048(L/mol) (Since m3/mol=1000Lit/mol)
Minimum Objective function: In order to simulate the Phase behavior simulation for reservoir hydrocarbon
using the available EOS results in erroneous answer. Especially for the fluid near the critical region, reservoir
hydrocarbon consists of multicomponent. Various compositional analysis does not provide trusted value for the
calculation. Industry encounter this problem with tuning the some of the variable. Thumb rule set as to minimise
the difference between the predicted and Measure value.
Goal of this assignment is to minimise the objective function, defined as the sum of weighted square deviation.
Formula detail can also be refer from the Ali Danesh book (Eq.9.20)
wj is the weighted difference its value is selected base on the number of data point, reliability and importance of
the variable in the model.
wj=1.0
Δ=∑𝑛𝑖=1{(Pexp − Pred)/Pexp}2
Objective function in the below code is given “Rsum” and Tuning variable is “a” and “b” in the assignment.
I had used the simple approach to demonstrate the use of MATLAB code to evaluate the Minimum objective
function for just 6 data point with different value of a and b. Later on the code has been extended for the n number
of data point and various value of a and b. Including its combination.
A. Simple Approach:
pe=[10 50 100 200 300 400] %Experimental Pressure from the steam table database
pe=1000.*pe %Pressure in Pascals
t=[50 100 150 200 250 250] %Experimental Temperature from the steam table database
t=t+273.15
v=[14.674 3.418 1.9364 1.08034 0.79636 0.59512 ] %Volume For the 1kg of water
r=8.314 %SI Units Gas Constant
n=55.5 %Number of moles of water for 1.0kgof water
Fig 1: a =0.1 and b=0.1; Rsum=13.8050 Fig 2: a=0.001 and b=0.004; Rsum=0.6241
Fig 3: a=0.0001 and b=0.0001; Rsum= 0.0016 Fig4: a=0.55 & b=3.04801e-05; Rsum= 3.6550e-04
Observation:
• Rsum value get more lower for the value coming closer to the theoretical value.
• With the increase of the following data point like from 6 to 9 Rsum value was reduced.
Rsum:3.6550e-04 from fig 4 to Rsum= 3.4878e-04
B. General Approach
In this approach we input the various of value of a and b and try with the various combination of the a and b
to compute the Rsum. Each combination a and b will generate the one Rsum. So for the 3 set of a and b
possible combination will give 9 Rsum value in matrix order. We have taken 36 PVT data point from the
steam table also MATLAB file is enclosed with this assignment.
v=[31.063 6.209 3.1026 1.5493 1.03151 0.77262 0.61728 0.51372 0.38426 0.30659
0.2548 0.2178 0.19005 0.16847 0.1512 0.1201 0.09936 0.08453 0.07341 0.06475 0.05781
0.04739 0.03993 0.03432 0.02993 0.02641 0.02 0.015649 0.0124477 0.0099423
0.006004 0.00279 0.0021 0.0019017 0.0017309 0.0016335];
t=[673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15
673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15
673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15 673.15
673.15 673.15 673.15 673.15];
Important step: Here a and b can be input according to various range and different number of interval. We can
also use random number input. I prefer to use linspace syntax to carry out my operation.
lower_a=0.1;
upper_a=1;
lower_b=2.5e-5;
upper_b=3.5e-5;
n_a=50;
n_b=50;
a_set=linspace(lower_a,upper_a,n_a);
b_set=linspace(lower_b,upper_b,n_b);
Part A: Datapoints used :6-PVT datapoints for a=0.1 to 1 and b= 2.5e-5 to 3.5e-5 for 50 subintervals. The
minimum value is at (a,b)=(0.54082,2.7449e-05) and the value is = 6.7311e-08. Value of “a” value is quite like
mention in literature and b value is not so similar
Simulated Value:
a=0.54082,
b=2.7449e-05
Theoretical Value:
a= 0.524741
b=3.04801E-05
Simulated Value:
a=0.54949,
b=2.9091e-05
Theoretical Value:
a= 0.524741
b=3.04801E-05
Part C: Datapoints used :36-PVT datapoints for a=0.1 to 1 and b= 2.5e-5 to 3.5e-5 for 50 subintervals. The
minimum value is at (a,b)=(0.43061,2e-05) and the value is = 1.2108. Value of “a” is quite like mention in
literature and b value is not so similar. Rsum=f(a,b), It seem from simulation that f isn’t monotonic
function and hence there could me multiple extrema i.e. minima or maxima.
Simulated Value:
a=0.43061,
b=2.0000e-05
Theoretical Value:
a= 0.524741
b=3.04801E-05
References:
1. Smith, J. M. (1950). Introduction to chemical engineering thermodynamics.
2. ASME Steam Table Web link: http://www.steamshed.com/pdf/034SteamTablesAsme.pdf
3. Chang, Raymond (2014). Physical Chemistry for the Chemical Sciences. University Science Books. p. 14. ISBN 978-1-
891389-69-6.
4. David R. Lide, Editor-in-Chief, CRC Handbook of Chemistry and Physics 86th Edition (Boca Raton, FL:
Taylor&Francis Group, 2005), p. 6-33