0
$\begingroup$

The advection diffusion equation is the partial differential equation $\frac{\partial C}{\partial t} = D\frac{\partial^2 C}{\partial x^2} - v \frac{\partial C}{\partial x}$ with the boundary conditions $\lim_{x \to \pm \infty} C(x,t)=0$ and initial condition $C(x,0)=f(x).$

C(x,t)=Q/(2*square-root(D*pi*t))*exp((-(x-v*t)^2)/4*D*t), Q is the mass.

Here D is the diffusivity and v is the advection velocity. How can plot with Matlab or Maple for Q = 1 and D = 1, C(x, t) at t = 1 for v = 0, v = 0.1 and v = 1.0. Superimpose the three curves on the one axis.

Thanks for any help.

  • 0
    This wasn't created by me, but I thought you might enjoy trying to reproduce it in matlab: http://www.youtube.com/watch?v=Zdxzxcibk90 :)2012-05-01

1 Answers 1

2

This seems to do the trick in maple...

Diffuse := (t, x) -> 1/(2sqrt(Pi t))exp(-(x-v t)^2/4 t); plot([subs(v = 0, Diffuse(1, x)), subs(v = .1, Diffuse(1, x)), subs(v = 1, Diffuse(1, x))], x = -2 .. 2, colour = [red, blue, green]) 

enter image description here

  • 0
    @user1332075 you are very welcome! Good luck with your heat equation.2012-05-01