Solving PDE with the pdepe solver
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Boundary Conditions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!