0% found this document useful (0 votes)
21 views3 pages

Identitas Mahasiswa: Function

The document presents the solution to an engineering problem involving distillation calculations. It provides data on component properties and flow rates, shows the equations and functions used to model the distillation process, and gives the results of iterative calculations to determine the vapor and liquid compositions and dew point temperature.

Uploaded by

Luthfi Legoo
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)
21 views3 pages

Identitas Mahasiswa: Function

The document presents the solution to an engineering problem involving distillation calculations. It provides data on component properties and flow rates, shows the equations and functions used to model the distillation process, and gives the results of iterative calculations to determine the vapor and liquid compositions and dew point temperature.

Uploaded by

Luthfi Legoo
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/ 3

Table of Contents

........................................................................................................................................ 1
IDENTITAS MAHASISWA ................................................................................................. 1
DATA ............................................................................................................................... 1
SOLVING .......................................................................................................................... 1
HASIL PERHITUNGAN ...................................................................................................... 3

function tugassebelas

clc;
clear all;
close all;

IDENTITAS MAHASISWA
%Elang Pujangga Ruhpinesthi;
%17/410313/TK/45670;
%Prakom-C, Jum'at Siang;

DATA
F = 100; %gmol/menit
zA = 0.4;
zB = 0.3;
zC = 0.3;
Tf = 360; %K
Pt = 76; %mmHg
Q = 5e5; %cal/menit
CpAl = 30; %cal/gmol.K
CpBl = 35; %cal/gmol.K
CpCl = 40; %cal/gmol.K
CpAv = 25; %cal/gmol.K
CpBv = 30; %cal/gmol.K
CpCv = 35; %cal/gmol.K
LambdaA = 7e3; %cal/gmol
LambdaB = 8e3; %cal/gmol
LambdaC = 9e3; %cal/gmol

SOLVING
%Data Trial
Told = 375; %K
wold = 0.5;
tol = 1;
eror = 10;
epsT = 1e-4;
epsw = 1e-5;

1
%Perhitungan dan fungsi pada [J][d] = [F]
function Lailatul = Qadr(T,w)
PAo = exp(15.35-3764/T);
PBo = exp(16.07-4497/T);
PCo = exp(15.95-4934/T);
xA = zA/(w+PAo/Pt*(1-w));
xB = zB/(w+PBo/Pt*(1-w));
xC = zC/(w+PCo/Pt*(1-w));
yA = PAo/Pt*xA;
yB = PBo/Pt*xB;
yC = PCo/Pt*xC;
Hf = (zA*CpAl+zB*CpBl+zC*CpCl)*(Tf-298);
Hl = (xA*CpAl+xB*CpBl+xC*CpCl)*(Tf-298);
Hv = (yA*CpAv+yB*CpBv+yC*CpCv)*(Tf-298)+(yA*LambdaA+yB*LambdaB
+yC*LambdaC);
L = w*F;
V = F*(1-w);
Lailatul = zeros(2,1);
Lailatul(1) = Q+F*Hf-V*Hv-L*Hl;
Lailatul(2) = (xA+xB+xC)-1;
end

while eror>tol

%Menghitung nilai F dan J dengan metode Newton Multivariable


Fi = Qadr(Told,wold);
Fi = -Fi;
J = zeros(2,2);
fplus1 = Qadr(Told+epsT,wold);
fmin1 = Qadr(Told-epsT,wold);
fplus2 = Qadr(Told,wold+epsw);
fmin2 = Qadr(Told,wold-epsw);
J(:,1) = (fplus1-fmin1)/2/epsT;
J(:,2) = (fplus2-fmin2)/2/epsw;

%Menghitung nilai d dengan Cramer's rule


d = zeros(2,1);
d(1) = (Fi(1)*J(2,2)-Fi(2)*J(1,2))/(J(1,1)*J(2,2)-J(2,1)*J(1,2));
d(2) = (J(1,1)*Fi(2)-J(2,1)*Fi(1))/(J(1,1)*J(2,2)-J(2,1)*J(1,2));

%Menghitung nilai Tnew dan wnew


Tnew = Told + d(1);
wnew = wold + d(2);

%Menghitung relative error


erorT = abs((Tnew-Told)/Tnew)*100;
erorw = abs((wnew-wold)/wnew)*100;

if erorT>erorw
eror = erorT;
else
eror = erorw;
end

2
Told = Tnew;
wold = wnew;
end

HASIL PERHITUNGAN
fprintf('=============================\n\n')
fprintf('Suhu embun = %7.4f\n',[Tnew])
fprintf('Jumlah uap = %6.4f\n',[V])
fprintf('Jumlah cairan = %6.4f\n\n',[L])
fprintf('Komposisi uap:\n')
fprintf('\t\t yA = %5.4f\n',[yA])
fprintf('\t\t yB = %5.4f\n',[yB])
fprintf('\t\t yC = %5.4f\n\n',[yC])
fprintf('Komposisi cairan:\n')
fprintf('\t\t xA = %5.4f\n',[xA])
fprintf('\t\t xB = %5.4f\n',[xB])
fprintf('\t\t xC = %5.4f\n\n',[xC])
fprintf('=============================\n\n')

=============================

Suhu embun = 385.5242


Jumlah uap = 68.0742
Jumlah cairan = 31.9258

Komposisi uap:
yA = 0.5183
yB = 0.3070
yC = 0.1745

Komposisi cairan:
xA = 0.1477
xB = 0.2851
xC = 0.5676

=============================

end

Published with MATLAB® R2016a

You might also like