Can I use pdepe to solve a nonlinear PDE system?
์กฐํ ์: 3 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
I'm trying to solve the following PDE system for ?(z,t) and v(z,t), using pdepe:
โ/โz [(1/? + A)*โv/โz - v*โ?/โz)] + [1/(1-?)]*[A*โv/โz *โ(1-?)/โz - B*v/?^2] = 0
โ?/โt = โ/โz[v*(1-?)]
where A and B are constants. The initial condition is
?(z,0) = 0.05
and the boundary conditions are
v(0,t) = 0
v(1,t) = - 0.1
The code I used is this [I use u(1) โก ? and u(2) โก v]:
function rbs
m = 0;
x = linspace(0,10,100);
t = linspace(0,10,100);
sol = pdepe(m,@rbs_pde,@rbs_ic,@rbs_bc,x,t);
u1 = sol(:,:,1);
u2 = sol(:,:,2);
% --------------------------------------------------------------
function [c,f,s] = rbs_pde(x,t,u,DuDx)
c = [0; 1];
f = [((1/u(1)) + (1/0.75))*DuDx(2) - u(2)*DuDx(1); (1 - u(1))*u(2)];
s = [-(1/(1 - u(1)))*DuDx(1)*DuDx(2) - (1/8000^2)*(1/(1 - u(1)))*u(2)/(u(1))^2; 0];
% --------------------------------------------------------------
function u0 = rbs_ic(x);
u0 = [1; 0];
% --------------------------------------------------------------
function [pl,ql,pr,qr] = rbs_bc(xl,ul,xr,ur,t)
pl = [0; ul(2)];
ql = [0; 0];
pr = [0; ur(2) + 1e-1];
qr = [0; 0];
However, I get the following error message:
Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial
derivative.
๋๊ธ ์: 1
Bill Greene
2018๋
9์ 7์ผ
What are the boundary conditions for ?? Your first equation has a second derivative of ? with respect to z so you need two boundary conditions.
๋ต๋ณ (0๊ฐ)
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
Help Center ๋ฐ File Exchange์์ Boundary Conditions์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!