Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
83 views8 pages

Ram Lakhan Meena CH18B060 Tutorial 1

The document contains Matlab code to calculate the number of trays required for distillation based on a Y vs X graph. It plots the actual operating line and minimum solvent flow operating line on the graph using data points for X and Y. It then fits a quadratic curve to the X and Y data and inverts it to find the value of x1. A second example plots another Y vs X graph and operating line to show a distillation with 7 trays.

Uploaded by

Ram Lakhan Meena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views8 pages

Ram Lakhan Meena CH18B060 Tutorial 1

The document contains Matlab code to calculate the number of trays required for distillation based on a Y vs X graph. It plots the actual operating line and minimum solvent flow operating line on the graph using data points for X and Y. It then fits a quadratic curve to the X and Y data and inverts it to find the value of x1. A second example plots another Y vs X graph and operating line to show a distillation with 7 trays.

Uploaded by

Ram Lakhan Meena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

AMT – TUTORIAL

Ram Lakhan Meena


CH18B060

Tutorial 1
Y vs X graph for calculating no. of trays required.

Matlab code:
clear all
clc
close all
x = [0.058 0.06 0.062 0.064 0.066 0.068 0.070];
p = [5.6 12.8 29 56 98.7 155 232];
P_t = 1.2 * 760;
y = p ./ P_t;
X = x ./ (1-x)
Y = y ./ (1-y)

% fitting X vs Y curve
p = polyfit(X,Y,2);
syms v w
f_x(v) = p(1)*v^2 + p(2)*v + p(3);
f_y = finverse(f_x);
x1 = double(f_y(0.1764))

figure

plot(X,Y,'LineStyle',"-",'Marker',"*","Color",'r')
xlabel('X'),ylabel('Y')
a = linspace(0.0616,0.076,500);
b = 0.1764;
hold on
plot(a,b*ones(size(a)),'LineWidth', 1,"Color","k")
hold on
% plotting min solvent flow operating line
X1 = linspace(0.0616,0.08,500);
Y1 = (0.0204-0.1764)/(0.0616-0.072185) .* (X1-0.0616) + 0.0204;
plot(X1,Y1,'LineStyle',"-","Color",'g')

hold on
% plotting actual solvent flow operating line
X_act = linspace(0.0616,0.08,500);
Y_act = (0.0204-0.1764)/(0.0616-0.0704) .* (X1-0.0616) + 0.0204;
plot(X_act,Y_act,'LineStyle',"-","Color",'b')

xlim([0.0616 0.0813])
ylim([0 0.343])
2)
No. of trays = 7
Matlab code:
clear all
clc
x = linspace(0,0.05,300);
y = linspace(0,0.03,300);

figure
plot(x,y,'LineStyle',"-")
xlabel('X')
ylabel('Y')
hold on
a = linspace(0,0.05,500);
b = 0.0204;
plot(a,b*ones(size(a)),'LineWidth', 1,"Color","k")

% operating line
hold on
X = linspace(0,0.0237,301);
Y = (147/176.4) .* (X -0.0237) + 0.0204;
plot(X,Y,'LineStyle',"-","Color",'r')

xlim([0 0.04])
ylim([0 0.024])

You might also like