Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
我正在尝试解决与此类似的问题: 在Matlab中求解微分方程
但是,这次的情况不是将药物注射到皮下组织中并随后溶解,而是更简单的情况,即允许悬浮液溶解在900 ml的溶解浴中。 function dydt=odefcnNY_v12(t,y,D,Cs,rho,r0,N,V) dydt=zeros(2,1); dydt(1)=(-D*Cs)/(rho*r0^2)*(1-y(2))*y(1)/(1e-6+y(1)^2); % dr*/dt dydt(2)=(D*4*pi*N*r0*(1-y(2))*y(1))/V; %dC*/dt end 即吸收项Af y (2)被去除。 化合物也不同,因此MW(分子量)以及其他参数(例如W(质量))也不同。为了允许这些更改,ode113调用更改为: MW=336.43; % molecular weight D=9.916e-5*(MW^-0.4569)*60/600000 %m2/s - [D(cm2/min)=9.916e-5*(MW^-0.4569)*60], divide by 600,000 to convert to m2/s rho=1300; %kg/m3 r0=9.75e-8; %m dv50 Cs=0.032; %kg/m3 V=0.0009;%m3 900 mL dissolution bath W=18e-6; %kg 18mg N=W/((4/3)*pi*r0^3*rho); % particle number tspan=[0 200*3600]; %s in 200 hours y0=[1 0]; [t,y]=ode113(@(t,y) odefcnNY_v12(t,y,D,Cs,rho,r0,N,V), tspan, y0); plot(t/3600,y(:,1),'-o') %plot time in hr, and r* xlabel('time, hr') ylabel('r*, (rp/r0)') legend('DCU') title ('r*'); plot(t/3600,y(:,1)*r0*1e6); %plot r in microns xlabel('time, hr'); ylabel('r, microns'); legend('DCU'); title('r'); plot(t/3600,y(:,2),'-') %plot time in hr, and C* xlabel('time, hr') ylabel('C* (C/Cs)') legend('DCU') title('C*'); 当前的问题是此代码已运行了3个小时,但仍未完成。现在与上面链接中的上一个问题有什么不同,就是要花这么长时间? 谢谢 更多&回答... |
![]() |
![]() |