Spacial discretization has failed
이전 댓글 표시
function mod_sim
global k Da v ua0 ual;
k = 200;
Da = 10^-9;
v = 1;
ua0 = 2453;
ual = 300;
tend =10;
m=0;
L = 1;
x = linspace(0,L,200);
t = linspace(0,tend,50);
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
end
function [c,f,s] = pdex1pde(x,t,u,DuDx)
global k Da v
c=1;
f = Da*DuDx;
s =-k*u;
end
function u0 = pdex1ic(x)
u0 =0;
end
function [pl,ql,pr,qr] = pdex1bc(xl,ul,xr,ur,t)
global ua0 ual;
pl=ul-ua0;
ql = 0;
pr = ur -ual;
qr=0;
end
Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial
derivative.I don't know why this error is showing .Can anybody help me why and how to rectify it.
댓글 수: 1
Torsten
2019년 4월 26일
Start with k = 0 , ua0 = 1 and ual = 0 and slowly make changes in the settings towards your real problem.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Eigenvalue Problems에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!