ODE solvers for coupled differential equations

Iam using ODE15s solver to solve my coupled differential
> equations(dimensional form).
> dx/dt=k1*A*Y-k2*X*Y+k3*B*X-2*k4*x^2;
> dy/dt=-k1*A*Y-k2*X*Y+f*k5*Z;
> dz/dt=k3*B*X-k5*Z; where k1,k2,k3,k4,k5,A,B,F are constants.
> when I convert above differential equations to nondimensional(dimensionless) form and changed my initial conditions also.
the solutions of dimensional form and non dimensional are not matching.could you please suggest what care has to be taken, so that both solutions will match.
Code for non dimensional form:
s=77.27;
w=0.1610;
q=(2*k1*k4)/(k2*k3);
f=1;
fn = @(t,x) [s*(x(2)-x(1)*x(2)+x(1)-q*x(1)^2);(-x(2)-x(1)*x(2)+f*x(3))/s;w*(x(1)-x(3))];
t=0:1:320;
[tau,xa] = ode15s(fn,t,[1.5 1.5 1.5]);
figure (1); plot(tau,log10(xa(:,1)));
figure (2); plot(tau,log10(xa(:,2)));
figure (3); plot(tau,log10(xa(:,3)));
code for dimensional form:
k1=1.34;
k2=1.6e9;
k3=8000;
k4=4e7;
k5=1;
A=0.06;B=0.06;f=1;
fn1=@(t1,x)[k1*A*x(2)-k2*x(1)*x(2)+k3*B*x(1)-2*k4*x(1)*x(1);-k1*A*x(2)-k2*x(1)*x(2)+f*k5*x(3);...
k3*B*x(1)-k5*x(3)];
t=0:1:320;
[tau1,xa1] = ode15s(fn1,t1,[7.51e-11 4.53e-7 3.6e-8]);
xa2=[(k2*xa1(:,1))/(k1*A),k2*xa1(:,2)/(k3*B),(k2*k5*xa1(:,3))/(k1*k3*A*B)];
figure (1); plot(tau,log10(xa2(:,1)));
figure (2); plot(tau,log10(xa2(:,2)));
figure (3); plot(tau,log10(xa2(:,3)));

Answers (1)

Could you supply the transformation to make your equations dimensionless ?
Best wishes
Torsten.

1 Comment

Dear Torsten,
x=(k1*A/k2)*u1;y=(k3*B/k2)*u2;z=(k1*k3*A*B/k2*k5)*u3;t=tau/sqrt(k1*k3*A*B);
here u1,u2,u3 and tau are dimensionless variables
s=sqrt(k3*B/K1*A)=77.27;w=k5/sqrt(k1*k3*A*B)=0.1610;q=(2*k1*k4*A)/(k2*k3*B);

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!