Solving 2D Convection Diffusion Equation
Afficher commentaires plus anciens


I want to solve the above convection diffusion equation.
Can anybody help me?
function ConvectionDiffusion
m = 0;
x = linspace(0,0.025,10); %0~0.025の間を10個に等間隔でとるベクトル
t = linspace(0,10);
DATP = 2.36*10e-10; %m^2/s
sol = pdepe(m,@pdefun,@icfun,@bcfun,x,t);
h = 2*10e-4; %m
vvar = h*tau/6*mu;
y = 6*10e-6;
vy = 6*vvar*y/h*(1-y/h); %velocity in x direction
function [g,f,s] = pdefun(x,t,c,DcDx)
v = vy;
g = 1;
f = D*DcDx;
s = -v*DcDx;
end
function c0 = icfun(x)
c0 = 0;
end
function [pl,ql,pr,qr] = bcfun(xl,cl,xr,cr,t)
pl = -10*D;
ql = 1;
pr = 0;
qr = 1;
end
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Partial Differential Equation Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!