Experimental data fitting from numerical solution of PDE in Matalab
显示 更早的评论
Hello, I have tried to fit the experimental data by PDE equation. Can you teach me how to do it?
My parabolic PDE equations is dq/dt=(1/r^2)*d(D*(1/r^2)*(dq/dr)).
I.C. q(r,0)=0
B.C. dq(0,t)/dr=0
B.C. dq/dt=kl*(c-cs) at r=R, c=cs
I searched previous questions (optimaization toolbox-->lsqcurvefit). But, I need to have more detailed procedure.
Thank you for your help in advance.
1 个评论
Sean de Wolski
2011-12-16
Can you please format your code and include the code you've tried, i.e. your setup and call to lsqcurvefit().
采纳的回答
更多回答(2 个)
Marc
2011-12-21
2 个投票
This problem has been looked at in great detail by many. I recommend a group at Rutgers, led by Prof. Glasser. Their work looks at metal adsorption within oxide pellets and spheres.
Their research focuses on metal profiles after drying but their adsorption model is very complete. Plus the references they cite lead to more simplified approaches.
My recommendation is to transform the system of PDEs into ODEs using a finite difference approach in the spatial domain. Leaving a system of ODEs ( or DAE) easily solved in Matlab by ode15s.
You can then set up a function within your function something like this for nlinfit or lscurvefit....
function [t,y]=yourfunc(a,b,c)
tspan = [to tf];
[t,y] = ode15s(@odefunc,tspan,yo);
function dydt = odefunc(t,y)
dydt = zeros(some_value, 1); dydt(1) = a*.... your equations with parameters a,b and c you want to fit
end
end
I have left out ALOT of details as there are a lot of examples in the Matlab documentation on these functions.
Good luck.
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Computations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!