strangequark
- 37
- 0
Hey all,
I'm wondering if someone can help me understand how to apply the boundary conditions to the diffusion equation in one dimension. Diffusion equation is:
\frac{\partial u}{\partial t}=D*\frac{(\partial)^{2}u}{\partial x^{2}}
The initial condition is:
u(x,0)=0
And the boundary conditions are:
\frac{\partial u(0,t)}{\partial x}=\frac{\partial u(L,t)}{\partial x}=0
I've been trying to solve this by separation of variables, and letting u(x,t)=T(t)X(x)I get the two equations:
\frac{dT}{dt}+DT=a^{2}
and
\frac{d^{2}X}{dx^{2}}+X=a^{2}
Then for my solutions I get:
T(t)=C_{1}e^{-a^{2}Dt}
and
X(x)=C_{2}sin(ax)+C_{3}cos(ax)
so then,
u(x,t)=T(t)X(x)=C_{1}e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))
To apply my boundary/initial conditions, I then differentiate wrt x, and obtain the three simultaneous equations:
C_{1}(C_{2}sin(ax)+C_{3}cos(ax))=0
C_{2}C_{1}e^{-a^{2}Dt}=0
C_{1}e^{-a^{2}Dt}(C_{2}cos(aL)-C_{3}sin(aL))=0
When I try to solve this, I find that the only possible solutions are C_{1}=C_{2}=C_{3}=0 but that can't be right.
What am I missing?
I'm wondering if someone can help me understand how to apply the boundary conditions to the diffusion equation in one dimension. Diffusion equation is:
\frac{\partial u}{\partial t}=D*\frac{(\partial)^{2}u}{\partial x^{2}}
The initial condition is:
u(x,0)=0
And the boundary conditions are:
\frac{\partial u(0,t)}{\partial x}=\frac{\partial u(L,t)}{\partial x}=0
I've been trying to solve this by separation of variables, and letting u(x,t)=T(t)X(x)I get the two equations:
\frac{dT}{dt}+DT=a^{2}
and
\frac{d^{2}X}{dx^{2}}+X=a^{2}
Then for my solutions I get:
T(t)=C_{1}e^{-a^{2}Dt}
and
X(x)=C_{2}sin(ax)+C_{3}cos(ax)
so then,
u(x,t)=T(t)X(x)=C_{1}e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))
To apply my boundary/initial conditions, I then differentiate wrt x, and obtain the three simultaneous equations:
C_{1}(C_{2}sin(ax)+C_{3}cos(ax))=0
C_{2}C_{1}e^{-a^{2}Dt}=0
C_{1}e^{-a^{2}Dt}(C_{2}cos(aL)-C_{3}sin(aL))=0
When I try to solve this, I find that the only possible solutions are C_{1}=C_{2}=C_{3}=0 but that can't be right.
What am I missing?