Solving PDE with the pdepe solver
显示 更早的评论
hello guys, anyone has an idea of how to add loops to the pdepe solver, will be much grateful if i could get some help. Thank you
- One of the terms in my pdefun is an array of numbers, when i run i get the error messgae below
Error using pdepe (line 248)
Unexpected output of PDEFUN. For this problem PDEFUN must return three column vectors of length 1.
Error in pdex1pde (line 22)
sol = pdepe(m,@pdefun,@pdeic,@pdebc,x,t);
Below are my code lines, FeCsat is an array of numbers
%% Defining the PDE function
function [c,f,s] = pdefun(x,t,u,DuDx)
c = 1;
f = [-v*u]*DuDx;
s = ((4*((0.5950*10^-7.667)/2))/0.0169*sqrt(t))-((0.05*u) - (0.05 .*FeCsat));
end
%% Defining the initial conditions
function u0 = pdeic(x)
u0 = 0;
end
%% Defining the boundary conditions
function [pL,qL,pr,qr] = pdebc(xL,uL,xr,ur,t)
pL = 0;
qL = 1;
pr = 0;
qr = 1;
end
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Boundary Conditions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!