How i can maximizing parameter in ODE

1 view (last 30 days)
Bosnian King
Bosnian King on 17 Aug 2019
Commented: Torsten on 19 Aug 2019
I solve one ODE dx/dt=Na0/((-rA*V)) using code:
function dtimedxa = ode_sys (xa,time)
Nao=5;
k=0.023;
Vo=10;
epsilon=1;
Cao=Nao/Vo;
Ca=Cao*(1-xa)/(1+epsilon*xa);
p=time*Ca;
ra=-k*Ca^2;
V=Vo*(1+epsilon*xa);
dtimedxa=Nao/((-ra)*V);
end
and script:
range=[0,0.75];
ICs=[1];
[xa,time]=ode23(@ode_sys,range,ICs);
figure
plot (xa,time(:,1))
title('dependence')
xlabel('conversion')
ylabel ('time')
Is it posible to solve equation above dt/dx=Na0/(-rA*V) maximizing t or p?
Thanks in advance.
  13 Comments
Bosnian King
Bosnian King on 19 Aug 2019
Edited: Bosnian King on 19 Aug 2019
xa is actualy x. when you start program you'll get t (time) in function of x ( xa). So my system is dt/dx=Na0/((*rA*V)). Did you try to start code from the begining? Is it posible to optimize values for Nao (or k, or Vo) for which the t (time) will be maximal?
Torsten
Torsten on 19 Aug 2019
Sure. Use "fminsearch".

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!