Jawaban No 6.docx

  • Uploaded by: Muktafa Akmal
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Jawaban No 6.docx as PDF for free.

More details

  • Words: 54
  • Pages: 2
% Jawaban no 6.11 (a)

global k1 k2 k3

Ca0=0.02; Cr0=0; Cs0=0; k1=0.00108; k2=0.00119; k3=0.00159; t0=1; tf=1500;

tspan=[t0 tf]; CaCrCs_vector=[Ca0 Cr0 Cs0];

[t,CaCrCs]=ode45(@persamaan,tspan,CaCrCs_vector); t_Ca_Cr_Cs=[t CaCrCs]

%Membuat grafik konsentrasi tiap komponen plot(t,CaCrCs(1:end,1),'b',t,CaCrCs(1:end,2),'g',t,CaCrCs(1:end,3),'r') title('Profil Konsentrasi Tiap Komponen') xlabel('waktu') ylabel('konsentrasi') legend('Ca','Cr','Cs')

function dCaCrCsdt=persamaan(t,CaCrCs_vector) global k1 k2 k3 Ca=CaCrCs_vector(1);

Cr=CaCrCs_vector(2); Cs=CaCrCs_vector(3);

dCadt=-k1*Ca; dCrdt=(k1*Ca)-(k2*Cr)-(k3*Cr*Cs); dCsdt=(k2*Cr)-(k3*Cr*Cs);

dCaCrCsdt=[dCadt dCrdt dCsdt]'; end

Related Documents


More Documents from "suryaningsih.inchi"