I need help with a material balance problem.

4 views (last 30 days)
Nicole Jackson
Nicole Jackson on 20 Feb 2019
Commented: Torsten on 21 Feb 2019
FUNCTION:
function [A, B, C, D, E, F] = material_balance (Ao, Bo, Co, Do, Eo, Fo)
[A, B, C, D, E, F] = Ao+Bo+Co+Do+Eo+Fo
k21 =0.2;
k31 =0.1;
k32 =0.1;
k34 =0.1 ;
k54 =0.05;
k64 =0.2 ;
k12 =0.1 ;
k13 =0.05 ;
k23 =0.05;
k43 =0.2 ;
k45 =0.1;
k46 =0.2;
k65 =0.1;
k56 =0.1;
x = [ -(k21+k31) k12 k13 0 0 0
k31 k32 -(k13+k23+k43) k34 0 0
0 0 0 k54 -(k45-k65) k56
k21 -(k12+k32) k23 0 0 0
0 0 k43 -(k34+k54+k64) 0 k45
0 0 0 k64 k65 -(k46+k56)];
b = [0
0
0
0
0
0];
[A B C D E F]= inv(x)*b
SCRIPT:
clear, clc, close all
Ao =1.0;
Bo =0;
Co =0 ;
Do =0 ;
Eo =1.0;
Fo= 0;
[A, B, C, D, E, F] = material_balance (Ao, Bo, Co, Do, Eo, Fo)
Please Help!
Screen Shot 2019-02-19 at 9.46.09 PM.png
  5 Comments
Torsten
Torsten on 21 Feb 2019
You set the time derivatives to zero and solved
x*[A;B;C;D;E;F] = 0
But you are told to solve
x*[A;B;C;D;E;F] =[dA/dt;dB/dt;dC/dt;dD/dt;dE/dt;dF/dt].
Try an ODE integrator to do so, e.g. ODE15S.

Sign in to comment.

Answers (0)

Categories

Find more on Chemistry in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!