Experimental data fitting from numerical solution of PDE in Matalab
Mostrar comentarios más antiguos
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 comentario
Sean de Wolski
el 16 de Dic. de 2011
Can you please format your code and include the code you've tried, i.e. your setup and call to lsqcurvefit().
Respuesta aceptada
Más respuestas (2)
Marc
el 21 de Dic. de 2011
2 votos
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.
1 comentario
Jung
el 22 de Mzo. de 2012
Jung
el 18 de Dic. de 2011
0 votos
Categorías
Más información sobre Matrix Computations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!