Re: [問題] 非線性PDE已回收

看板MATLAB作者 (幫解MATLAB難題囧)時間14年前 (2009/11/09 20:06), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《mlfish (阿飄 )》之銘言: : 你好~~想請問各位版大 : 非線性的擴散方程如何解 : u=u(x,t) : u_t=d/dx((D/(1-au))*u_x) : initial condition : u(x,0)= C for x<0 : = 0 for x>0 : 自己算是matlab新手 : 只會解簡單的擴散方程 : 困擾了好多天~~~ : 有會的大大~~~就麻煩你們幫忙一下 : 謝謝 很久沒解了.看一下吧 function pttex131 m = 0; x = linspace(0,1,20); t = linspace(0,2,5); sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t); % Extract the first solution component as u. u = sol(:,:,1); % A surface plot is often a good way to study a solution. surf(x,t,u) title('Numerical solution computed with 20 mesh points.') xlabel('Distance x') ylabel('Time t') % A solution profile can also be illuminating. figure plot(x,u(end,:)) title('Solution at t = 2') xlabel('Distance x') ylabel('u(x,2)') % -------------------------------------------------------------- function [c,f,s] = pdepttfun(x,t,u,DuDx) a = 1.5; D = 0.8; c = 1; f = (D/(1-a*u))*DuDx; s = 0; % -------------------------------------------------------------- function u0 = pdepttic(x) u0 = 2; % -------------------------------------------------------------- function [pl,ql,pr,qr] = pdepttbc(xl,ul,xr,ur,t) pl = ul; ql = 0; pr = ur; qr = 0; 大致上是這樣 不過解的方法是有限元素法 我還有自己寫 METHOD OF LINE 不過我最近沒空 你先看這個吧 -- 1.MATLAB programming 2.ASPEN process simulation package 3.FORTRN programming 4.Advance Engineering Mathematics 5.Process Control Theory 6.Chemical Engineering Basic Theory(Kinetic.thermodynamics.transport) 7.Numerical Method and Analysis 8.MATLAB Toolbox.Simulink system basic design -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 202.132.126.154
文章代碼(AID): #1A-0NG5K (MATLAB)
討論串 (同標題文章)
文章代碼(AID): #1A-0NG5K (MATLAB)