Model not running

Jaundre Venter jaundreventer at gmail.com
Tue Aug 2 11:01:30 CEST 2011


Hi all

I am busy programming a penicillin growth inside a fed batch reactor model
in SCILAB.

Now I have 9 ordinary differential equations where i am supposed to get 6
graphs from the 9 ordinary differential equations.

Now when using only the 6 main ordinary differential equations, then i am
getting six graphs but the graphs is wrong because the other 3 ordinary
differential equations is going to have a impact on the six graphs. As soon
as i am programming the other 3 ordinary differential equations my model
doesnt want to run graph 7 till 9.

it runs but only shows title name and y label and x label.

the error i am getting says the following.

"plot2d(t,y(7,:))
                !--error 21
Invalid index.
t line      58 of function f called by :
y=ode(x0, 0, t, f);"

i am not familiar with SCILAB so can someone assist me and explaining if i
should programm the last 3 ordinary differential equations differently?


the 9 equations are as follows.


dx(1)  = (((mu)*(x(1)))-((x(1))/(x(6)))*(dx_6)); // biomass concentration X
dx(2)  = z*(mu*x(1)-(F*x(1))/x(6))+QQ; // hydrogen ion concentration H+
dx(3)  = mupp*(x(1))-(K)*(x(3))-((x(3))/x(6))*(dx_6); // Penicilin
concentration P
dx(4)  = -mu/Yxs*x(1)-mupp/Yps*x(1)-mx*x(1)+Fsf/x(6)-x(4)/x(6)*dx_6; //
Substrate concentration S
dx(5)  = -mu/Yxo*x(1)-mupp/Ypo*x(1)-mo*x(1)+kla*(cll-x(5))-x(5)/x(6)*dx_6;
//dissolved oxygen concentration Cl
dx(6)  = F+Fab+Floss; //Culture Volume V
dx(7)  = ((rq1(x(1))*x(6))+(rq2*(x(1))*(x(6))));  //  Heat of reaction Qrxn

dx(8)  = ((((F/sf)(Tf-(x(8))))+(1/(x(6)*pcp)))*(QT));  //  Temperature T

dx(9)  = (a1*(dx_1)+a2*x(1)+a3);  //  CO2 evolution, CO2


As you can see that eqaution 7 till 9 has some effects on other ordinary
differential eqautions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110802/d851aaf4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graph.bmp
Type: image/bmp
Size: 2877422 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110802/d851aaf4/attachment.bmp>


More information about the users mailing list