Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial derivative. error

조회 수: 1 (최근 30일)
my boundries are
a(1)=1 a'(0)=0
b(1)=0 b'(0)=0
the code i used is
function [pl,ql,pr,qr] = pdex4bc(~,ul,~,ur,~)
pl = [0;ul(1)-1];
ql = [1;0];
pr = [0;ur(2)];
qr = [1;0];
but i get this following error
Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial derivative
what is the wrong i did
  댓글 수: 3
Mallikarjuna M
Mallikarjuna M 2022년 3월 4일
I appled another boundary value for the same system i get the output but for only this boundary i couldn't get the boundary
function steady
m = 0;
x = linspace(0,1);
t = linspace(0,1000);
sol = pdepe(m,@pdex4pde,@pdex4ic,@pdex4bc,x,t);
u1 = sol(:,:,1);
u2= sol(:,:,2);
%figure
plot(x, u1(end,:),'r')
hold on
%title('u1(x, t)')
%xlabel('Distance x')
%ylabel('u1(x,t)')
%figure
% --------------------------------------------------------------
function [c,f,s] = pdex4pde(~,~,u,DuDx)
phi=0.1;al=0.1; %These parameter values are used in Fig.2
c = [1;1];
f = [1;1].* DuDx;
F1=-9.*phi.^2.*(u(1)./1+u(1)+u(2));
F2=-9.*al.^2.*(u(2)./1+u(1)+u(2));
s = [F1;F2];
% --------------------------------------------------------------
function u0 = pdex4ic(~)
u0 = [0; 0];
% --------------------------------------------------------------
function [pl,ql,pr,qr] = pdex4bc(~,ul,~,ur,~)
pl = [0;ul(1)-1];
ql = [1;0];
pr = [0;ur(2)];
qr = [1;0];
Torsten
Torsten 2022년 3월 4일
pl = [0;0];
ql = [1;1];
pr = [ur(1)-1;ur(2)];
qr = [0;0];
sets
a'(0) = 0, b'(0) = 0, a(1) = 1, b(1) = 0
And I think
F1=-9.*phi.^2.*(u(1)./1+u(1)+u(2));
F2=-9.*al.^2.*(u(2)./1+u(1)+u(2));
should read
F1=-9.*phi.^2.*u(1)./(1+u(1)+u(2));
F2=-9.*al.^2.*u(2)./(1+u(1)+u(2));

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 PDE Solvers에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by