The variation of vapor pressure p in units of mm Hg of benze

The variation of vapor pressure p (in units of mm Hg) of benzene with temperature in the range of 0 lessthanorequalto T lessthanorequalto 42 degree C can be modeled with the equation (Handbook of Chemistry and Physics, CRC Press) log_10P = b - 0.05223a/T where a = 34172 and b = 7.9622 are material constants and T is absolute temperature (K). Write a program in a script file that calculates the pressure for various temperatures. The program should create a vector of temperatures from T = 0 degree C to T = 42 degree C with increments of 2 degrees, and display a two- column table p and T, where the first column temperatures in degree C, and the second column the corresponding pressures in mm Hg.

Solution

MATLAB CODE:

temp=zeros(1,22);   
press=zeros(1,22);
k=2;
for i=2:2:42 %For taking temperature values in array   
temp(k)=i;
k=k+1;
end
for i=1:22
r=7.9622-((0.05223*34172)/(temp(i)+273)); %caculating pressure
press(i)=10^r;
end
disp(temp);
disp(press);

Output:

Columns 1 through 20

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38

Columns 21 through 22

40 42

Columns 1 through 12

26.5741 29.6487 33.0268 36.7328 40.7930 45.2349 50.0877 55.3825 61.1518 67.4302 74.2541

81.6617

Columns 13 through 22

89.6934 98.3914 107.8003 117.9666 128.9392 140.7692 153.5100 167.2175 181.9501 197.7684

 The variation of vapor pressure p (in units of mm Hg) of benzene with temperature in the range of 0 lessthanorequalto T lessthanorequalto 42 degree C can be mo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site