Solving PDE with the pdepe solver

1 visualizzazione (ultimi 30 giorni)
Nana Yaw Angu
Nana Yaw Angu il 9 Nov 2020
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
  1. 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

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by