// Copyright jr Licois et Fédération Denis Poisson // Variables du problème : // L'équation est définie dans le fichier digAB1B2.sci // constantes du problème c0=7.0; c1=15.0; k=log(4/3); kt=0.0; // on neglige l'absorption ? a=2.72; b=1.2346; c=7.0; kb=log(4/3); C1=1.5; C2=1.5; alpha=8.0/10; tau=8.0; K = 5.0; // tracé dans la fenetre 0 de la courbe de ph //xbasc(0); //fplot2d([0:0.05:18],ph) //xtitle('ph vs x') // resolution ODE // conditions initiales // x(0)=0,v(0)=1,A(0)=1,z(0)=1,B1(0)=0.25,B2(0)=0 init=[0;1;1;1;0.5;0]; t=0:0.01:5; y=ode("rkf",init,0,t,digABB); // tracé dans la fenetre 0 scf(0); xbasc(0); plot2d(t,y(3,:),style=1); // A plot2d(t,y(5,:),style=2); // B1 plot2d(t,y(6,:),style=3); // B2 plot2d(t,y(3,:)+y(5,:),style=4); // plot2d(t,y(3,:)+y(5,:)+y(6,:),style=5); legends(['Nutr','B1','B2','A+B1'],[1,2,3,4],"ur"); xtitle('Digestion'); scf(1); xbasc(1); plot2d(t,y(2,:),style=2); plot2d(t,y(1,:),style=3); xtitle('Vitesse et position vs temps'); // ********* affichage des constantes ************ ctes_nom = ["K =", msprintf('%4.2f',K) "a =", msprintf('%4.2f',a) "b =", msprintf('%4.2f',b) "c =", msprintf('%4.2f',c) "c0=", msprintf('%4.2f',c0) "c1=", msprintf('%4.2f',c1) "kb=", msprintf('%4.2f',kb) "C1=", msprintf('%4.2f',C1) "C2=", msprintf('%4.2f',C2) "kt=", msprintf('%4.2f',kt)]; scf(0); [w1,w2,w3,w4]=xgetech(); xstring(9*w2(3)/10,w2(4)/4,ctes_nom);