0% found this document useful (0 votes)
27 views4 pages

Program Basib B: Dasar Komputasi Proses

The document discusses basic computer processing programs and multi-step predictor corrector and Runge-Kutta numerical integration methods. It was written by five students from the Chemical Engineering Department, Faculty of Industrial Technology at the Bandung Institute of Technology in 2017.

Uploaded by

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

Program Basib B: Dasar Komputasi Proses

The document discusses basic computer processing programs and multi-step predictor corrector and Runge-Kutta numerical integration methods. It was written by five students from the Chemical Engineering Department, Faculty of Industrial Technology at the Bandung Institute of Technology in 2017.

Uploaded by

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

DASAR KOMPUTASI PROSES

PROGRAM BASIB B

Disusun Oleh :
Dea Winsy Puti (142015009)
Erwin Afriansyah (142015022)
Siddiq Azmul Fathan (142015026)
Alvin Setyo Budi (142015027)
Fanny Faulina (142015030)

JURUSAN TEKNIK KIMIA


FAKULTAS TEKNOLOGI INDUSTRI
INSTITUT TEKNOLOGI NASIONAL
BANDUNG
2017
MULTISTEP PREDICTOR CORRECTOR N=5

alfa = 4
n = 10
a=1
b=2
i=5
do
1901 2774 2616 1274 251
y(i + 1)p = yi + h( fi fi 1 + fi 2 fi 3 + fi 4)
720 720 720 720 720
475 1427 798 482 173 27
y(i + 1) = yi + h(1440 fip + 1 + 1440 fi 1440 fi 1 + 1440 fi 2 1440 fi 3 + 1440 fi 4)

i=i+1

loop while (i n + 1)
RUNGE-KUTTA 5 (RK 5)

a=1
b=2
n = 10
alfa = 4
h = (b a)/n
ii = 5
yii = alfa
do
t ii = a + (ii 1)h

k1 = f(xii , yii )

1 1
k 2 = f (xii + h, yii + hk1 )
4 4
1 1 1
k 3 = f (xii + h, yii + hk1 + hk 2 )
4 8 8
1 1
k 4 = f (xii + h, yii hk 2 + hk 3 )
2 2
3 3 9
k 5 = f (xii + h, yii + hk1 + hk 4 )
4 16 16
3 2 12 12 8
k 6 = f (xii + h, yii hk1 + hk 2 + hk 3 hk 4 + hk 5 )
7 7 7 7 7
1
yii+1 = yii + h [90 (7k1 + 32k 3 + 12k 4 + 32k 5 + 7k 6 ]

ii = ii + 1

loop while (ii n + 1)


ELIMINASI GAUSS
function x = gauss_elim(A, b)
% fungsiuntukmelakukaneliminasi Gauss untukmenyelesaikanSistem
% Persamaan Linear Ax = b, dengan input:
% A = matrikskoefisien
% b = vektorruaskanan
% Dan outputnyaadalah
% x = vektorjawaban
[n m] = size(A);
if n~=m
error('jumlahbaristidaksamadenganjumlahkolom');
return
end
l = length(b);
if l~=n
error('jumlahbaristidaksamadenganjumlahelemendari b');
return
end
baris = (1:n);
fori=1:n-1
% proses vipoting
ib = baris(i);
maxi = abs(A(ib,i));
bar = i;
ibx = ib;
for bars=i+1:n
ib= baris(bars);
if (abs(A(ib,i))) > maxi
maxi = abs(A(ib,i));
bar = bars;
ibx = ib;
end
end
ib = baris(i);
baris(i) = ibx;
baris(bar) = ib;
% proses eliminasi
ib = baris(i);
for j=i+1:n
ibx = baris(j);
m = -A(ibx,i) / A(ib,i);
for k=i:n
A(ibx,k) = A(ibx,k) + m*A(ib,k);
end
b(ibx) = b(ibx) + m*b(ib);
end
end
%subsitusibalik
ib = baris(n);
x(n) = b(ib)/A(n,n);
fori=n-1:-1:1
ib = baris(i);
sum = b(ib);
for j=i+1:n
sum = sum - A(ib,j)*x(j);
end
x(i) = sum /A(ib,i);
end
return

You might also like