%assign1.m
% Assignment 1 Given to CH303 Class on 
% 20-July-2001
% M.Subramanian

global w1 Tr Pr Zo Z1

load pvt_data.mat;
load CompressFactor.mat


for i=1:32
   w1 = data_list(i,4)
   calc_data(i,:) = pvt(data_list(i,5),data_list(i,6),data_list(i,2),data_list(i,3));
	   
end

save pvt_result.mat calc_data;
save pvt_result.dat calc_data -ascii;
%dependent files:
% pvt.m; v_vander.m; v_redlich.m; Z.m;
%****************************************
%	Chemical		MW	Tc	Pc
%	------------------------------------
%	Methane			16.04	190.6	45.99
%	Propane			44.1	369.8	42.48
%	n-Butane			58.12	425.1	37.96
%	n-Pentane		72.15	469.7	33.7
%	n-Hexane			86.18	540.2	27.4
%	n-Heptane		100.2	540.2	27.4
%	n-Octane			114.23	568.7	24.9
%	Ethylene			28.04	282.3	50.4
%	Propylene		42.08	365.6	46.65
%	Acetylene		26.04	308.3	61.39
%	Benzene			78.11	562.2	48.98
%	Toluene			92.14	591.8	41.06
%	Acetone			58.08	508.2	47.01
%	Methanol			32.04	512.6	80.97
%	Ethanol			46.07	513.9	61.48
%	HydrogenChloride	36.41	324.7	83.1
%	Acetic Acid		60.05	592	57.86
%	CCl4				153.82	556.4	45.6
%	Chloroform		119.38	536.4	54.72
%	Argon				39.95	150.9	48.98
%	Krypton			83.8	209.4	55.02
%	Xenon				165.03	289.7	58.4
%	Hydrogen			2.016	33.19	13.13
%	Oxygen			32	154.6	50.43
%	Nitrogen			28	126.2	34
%	Chlorine			70.9	417.2	77.1
%	Carbon Monoxide	28.01	132.9	34.99
%	Carbon dioxide		44.01	304.2	73.83
%	Carbondisulfide	76.14	552	79
%	Sulfur dioxide		64.065	430.8	78.84
%	Nitricoxide(NO)	30.006	180.2	64.8
%	Ammonia			17.03	405.7	112.8
%**********************************************************