0% found this document useful (0 votes)
6 views5 pages

Pengisian H2SO4 dan CH3COOH

The document describes a MATLAB program for simulating liquid filling processes. The program allows the user to choose between filling sulfuric acid (H2SO4) or acetic acid (CH3COOH) and then inputs flow rate parameters to model the process. It generates a graph of flow rate versus discharge and a table showing flow rate, discharge, volume, and fill time at each time step.

Uploaded by

Hassan Assaqaf
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)
6 views5 pages

Pengisian H2SO4 dan CH3COOH

The document describes a MATLAB program for simulating liquid filling processes. The program allows the user to choose between filling sulfuric acid (H2SO4) or acetic acid (CH3COOH) and then inputs flow rate parameters to model the process. It generates a graph of flow rate versus discharge and a table showing flow rate, discharge, volume, and fill time at each time step.

Uploaded by

Hassan Assaqaf
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

PROGRAM UAS

clear all
clc
%('ANDIKA RAHMAN 1431010014')
disp('PROGRAM UAS PENGISIAN CAIRAN')
disp('====================>>>>>>>>>>')
disp('Pilihlah Opsi Berikut !!!')
disp('1. Pengisian H2SO4')
disp('2. Pengisian CH3COOH')
a=input('Ketiklah Pilihan Anda (1/2) : ');
switch a
case 1
clc
disp('1. Pengisian H2SO4')
disp('')
b=input('Masukkan kecepatan aliran pipa awal (m/s) = ');
e=input('Masukkan kecepatan aliran pipa akhir (m/s) = ');
f=input('Tentukan interval kecepatan pipa (m/s) = ');
c=input('Masukkan luas penampang kran (m2) = ');
d=input('Masukkan volume wadah (l) = ');
x=[b:f:e];
y=x*c;
plot(x,y,'-sb');
title('Grafik Pengisian H2SO4');
xlabel('Kecepatan Aliran Pipa (m/s)');
ylabel('Debit (l/s)');
disp('------------------------------------------------------------------------------------------
------')
disp('Kecepatan (m/s) Luas Penampang (m2) Debit (l/s) Volume (l)
Waktu (s)')
while b<=e
q=b*c;
t=d/q;
fprintf('%7.0f %23.1f %20.2f %18.0f %20.2f\n',b,c,q,d,t);
b=b+f;
d=d+1;
end
disp('------------------------------------------------------------------------------------------
------')
case 2
clc
disp('2. Pengisian CH3COOH')
disp('')
b=input('Masukkan kecepatan aliran pipa awal (m/s) = ');
e=input('Masukkan kecepatan aliran pipa akhir (m/s) = ');
f=input('Tentukan interval kecepatan pipa (m/s) = ');
c=input('Masukkan luas penampang kran (m2) = ');
d=input('Masukkan volume wadah (l) = ');
x=[b:f:e];
y=x*c;
plot(x,y,'-sb');
title('Grafik Pengisian CH3COOH');
xlabel('Kecepatan Aliran Pipa (m/s)');
ylabel('Debit (l/s)');
disp('------------------------------------------------------------------------------------------
------')
disp('Kecepatan (m/s) Luas Penampang (m2) Debit (l/s) Volume (l)
Waktu (s)')
while b<=e
q=b*c;
t=d/q;
fprintf('%7.0f %23.1f %20.2f %18.0f %20.2f\n',b,c,q,d,t);
b=b+f;
d=d+2;
end
disp('------------------------------------------------------------------------------------------
------')
otherwise
disp('tidak cocok')
end

HASIL RUN
FLOWCHART

START

disp('PROGRAM UAS
PENGISIAN CAIRAN')
disp('==================
==>>>>>>>>>>')
disp('Pilihlah Opsi Berikut !!!')
disp('1. Pengisian H2SO4')
disp('2. Pengisian CH3COOH')

a=input('Ketiklah
Pilihan Anda (1/2) : ');

case 1 case 2

disp('1. disp('2.
Pengisian Pengisian
H2SO4') CH3COOH')

b=input('Masukkan kecepatan aliran b=input('Masukkan kecepatan aliran pipa


pipa awal (m/s) = '); awal (m/s) = ');
e=input('Masukkan kecepatan aliran e=input('Masukkan kecepatan aliran
pipa akhir (m/s) = '); pipa akhir (m/s) = ');
f=input('Tentukan interval kecepatan f=input('Tentukan interval
pipa (m/s) = '); kecepatan pipa (m/s) = ');
c=input('Masukkan luas penampang c=input('Masukkan luas penampang
kran (m2) = '); kran (m2) = ');
d=input('Masukkan volume wadah (l) d=input('Masukkan volume wadah
= '); (l) = ');

x=[b:f:e];
y=x*c; x=[b:f:e];
y=x*c;

plot(x,y,'-sb'); plot(x,y,'-sb');
title('Grafik Pengisian H2SO4'); title('Grafik Pengisian
xlabel('Kecepatan Aliran Pipa (m/ CH3COOH');
s)'); xlabel('Kecepatan Aliran Pipa (m/
ylabel('Debit (l/s)'); s)');
disp('---------------------------------- ylabel('Debit (l/s)');
----------------------------------------------- disp('----------------------------------
---------------') -----------------------------------------------
disp('Kecepatan (m/s) Luas ---------------')
Penampang (m2) Debit (l/s) disp('Kecepatan (m/s) Luas
Volume (l) Waktu (s)') Penampang (m2) Debit (l/s)
Volume (l) Waktu (s)')

1 3
2 4

q=b*c; q=b*c;
t=d/q; t=d/q;

fprintf('%7.0f fprintf('%7.0f
%23.1f %20.2f %23.1f %20.2f
%18.0f %20.2f\ %18.0f %20.2f\
n',b,c,q,d,t); n',b,c,q,d,t);

b=b+f; b=b+f;
d=d+1; d=d+2;
YES YES

while while
b<=e b<=e

NO NO

disp('---------------- disp('----------------
---------------------- ----------------------
---------------------- ----------------------
---------------------- ----------------------
--------------') --------------')

end

You might also like