Matlab pdepe homogeneous surface diffusion
古いコメントを表示
Hi guys. I'm trying to model the diffusion equation below using matlab pdepe function.
dq/dt=D/r2 *d[r2(dq/dt)/dr
Initial condition: at t=0, q=0
BC1: at r=0, dq/dr=0
BC2: at r=R, Ddq/dr = kf(C-Cf)
kf, C, and Cf are unknown, so we need this equation:
dC/dt = -3kf*Vm/RV*(C-Cf) , subject to t=0, C=C0 vs*dq/dt = vl*dC/dt
How should I write the boundary condition then?
I used, Ddq/dr - vs*RV/(3*vl*Vm)* dq/dt = 0
so in the matlab file, I wrote:
sol = pdepe (m,@pdex1pde,@pdex1ic,@pdex1bc,x,t); surf (x,t,sol) ---- function [pl,ql,pr,qr] = pdex1bc(xl,ul,xr,ur,t) global sol
pr= vs*RV/(3*vl*Vm)*sol;
end
but I just got a linear plane in the plot of x vs t for sol. Could you please point out where/what is wrong with my coding?
Thanks a lot.
1 件のコメント
Mathischan Maheswaran
2020 年 11 月 24 日
Hello,
I cannot help you but i am also stuck with the resolution of intraparticle diffusion in pdepe. Did you solve it at the end ?
If yes can you show me?
Thank you
Math
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Numerical Integration and Differential Equations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!