1-d diffusion

Main Question or Discussion Point

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:

[tex]\frac{\partial u}{\partial t}[/tex]=D*[tex]\frac{(\partial)^{2}u}{\partial x^{2}}[/tex]

The initial condition is:
[tex]u(x,0)=0[/tex]

And the boundary conditions are:
[tex]\frac{\partial u(0,t)}{\partial x}[/tex]=[tex]\frac{\partial u(L,t)}{\partial x}[/tex]=0

I've been trying to solve this by seperation of variables, and letting [tex]u(x,t)=T(t)X(x)[/tex]I get the two equations:

[tex]\frac{dT}{dt}+DT=a^{2}[/tex]
and
[tex]\frac{d^{2}X}{dx^{2}}+X=a^{2}[/tex]

Then for my solutions I get:
[tex]T(t)=C_{1}e^{-a^{2}Dt}[/tex]
and
[tex]X(x)=C_{2}sin(ax)+C_{3}cos(ax)[/tex]

so then,
[tex]u(x,t)=T(t)X(x)=C_{1}e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))[/tex]

To apply my boundary/initial conditions, I then differentiate wrt x, and obtain the three simultaneous equations:

[tex]C_{1}(C_{2}sin(ax)+C_{3}cos(ax))=0[/tex]
[tex]C_{2}C_{1}e^{-a^{2}Dt}=0[/tex]
[tex]C_{1}e^{-a^{2}Dt}(C_{2}cos(aL)-C_{3}sin(aL))=0[/tex]

When I try to solve this, I find that the only possible solutions are [tex]C_{1}=C_{2}=C_{3}=0[/tex] but that can't be right.

What am I missing?
 

Answers and Replies

275
2
Overall, everything looks pretty good.
I don't think the initial condition works however, if at t = 0, U = 0 for all x... then there is nothing to diffuse.
Also, C1 shouldn't be there, if you distribute C1 to the sin and cos term, its absorbed into C2 and C3 (so there should only be 2 constants of integration), in addition to the constant a (which should be Pi*n/L for some integer n) --> and the solutions should actually be a sum over all n (in general)
 
Mute
Homework Helper
1,381
10
First, note that you don't actually need [itex]C_1[/itex]. It can be absorbed into [itex]C_3[/itex] and [itex]C_2[/itex]. That said, the boundary conditions are not going to place constraints on the C's, but on your constant [itex]a[/itex]. i.e., what values of [itex]a[/itex] are permitted such that your boundary conditions are satisfied?

You don't want to be looking for conditions on the [itex]C_i[/itex], since you should find that there will be an infinite number of possible values of [itex]a \equiv a_n[/itex] that satisfy your boundary conditions, and the general solution to the problem will in fact be an infinite sum:

[tex]\sum_{n=0}^{\infty}e^{-a_n^2Dt}\left\{A_n \cos a_n x + B_n \sin a_n x \right\}[/tex]
 
All right, everything you guys said makes sense, especially getting rid of one of the constants. But, I'm trying to apply this to a physical situation, so I need to find a way to get rid of the constants. There is nothing in the region of interest [0,L] at t=0, but at t>0, material diffuses thru the boundary regions into the region of interest. If [tex]a_{n}=\frac{n/pi}{L}[/tex], how do I go about finding the other constants?

The paper I'm looking at gives,
[tex]\lambda_{0}=0[/tex]
[tex]\lambda_{j}=(\frac{\pi j}{L})^{\frac{1}{2}}[/tex]
[tex]\psi_{0}(x)=(\frac{1}{L})^{\frac{1}{2}}[/tex]
[tex]\psi_{j}(x)=(\frac{2}{L})^{\frac{1}{2}})cos(\frac{\pi j x}{L})[/tex]

as eigenvalues and eigenfunctions. I thought these were obtained from the boundary and initial conditions, but apparently that isn't the case. I'm not seeing the eigenvalue equation that they derived these from...Where do these come from?
 
HallsofIvy
Science Advisor
Homework Helper
41,738
899
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:

[tex]\frac{\partial u}{\partial t}[/tex]=D*[tex]\frac{(\partial)^{2}u}{\partial x^{2}}[/tex]

The initial condition is:
[tex]u(x,0)=0[/tex]

And the boundary conditions are:
[tex]\frac{\partial u(0,t)}{\partial x}[/tex]=[tex]\frac{\partial u(L,t)}{\partial x}[/tex]=0

I've been trying to solve this by seperation of variables, and letting [tex]u(x,t)=T(t)X(x)[/tex]I get the two equations:

[tex]\frac{dT}{dt}+DT=a^{2}[/tex]
and
[tex]\frac{d^{2}X}{dx^{2}}+X=a^{2}[/tex]

Then for my solutions I get:
[tex]T(t)=C_{1}e^{-a^{2}Dt}[/tex]
and
[tex]X(x)=C_{2}sin(ax)+C_{3}cos(ax)[/tex]

so then,
[tex]u(x,t)=T(t)X(x)=C_{1}e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))[/tex]

To apply my boundary/initial conditions, I then differentiate wrt x, and obtain the three simultaneous equations:

[tex]C_{1}(C_{2}sin(ax)+C_{3}cos(ax))=0[/tex]
[tex]C_{2}C_{1}e^{-a^{2}Dt}=0[/tex]
[tex]C_{1}e^{-a^{2}Dt}(C_{2}cos(aL)-C_{3}sin(aL))=0[/tex]

When I try to solve this, I find that the only possible solutions are [tex]C_{1}=C_{2}=C_{3}=0[/tex] but that can't be right.

What am I missing?
The first thing you should do is combine that "C1" into C2 and C3. What you really have is
[tex]u(x,t)=T(t)X(x)=e^{-a^{2}Dt}(C_{2}sin(ax)+C_{3}cos(ax))[/tex]
with two unknown constants, not 3. Now, since the derivatives are to be 0 and x=0, and the derivative of sin(ax) is cos(ax) which is NOT 0 and x= 0, yes, yes C2= 0. That leaves you with
[tex]u_x(L, t)= e^{-a^2Dt}(-aC_3 sin(aL))= 0[/itex]
which requires that C3 be 0 unless sin(aL)= 0. If aL is a multiple of [itex]\pi[/itex]: that is if [itex]a= n\pi/L[/itex], you have non-trivial solutions. THEN pick C3 to satisfy "initial condition".

Because that initial condition is u(x,0)= 0 for all x, you do, in fact, get u(x,t)= 0 as the solution. If the initial temperature is 0 and no heat can diffuse in or out, the temperature stays 0!
 
466
4
lzkelley is right: with the boundary conditions you have specified, the answer is 0 at all times. Think of it this way: if u=0 at t=0, then du/dx = d^2u/dx^2 = 0. But then, by the diffusion equation, du/dt = 0, and so the solution cannot change with time.
 
damn, I see what you're saying. Thanks for your help! I emailed the author of the paper in hopes that he can shed some light on how he obtained his solution.
 

Related Threads for: 1-d diffusion

  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
5
Views
4K
Replies
1
Views
5K
Replies
7
Views
1K
Replies
0
Views
1K
Replies
0
Views
1K
Replies
8
Views
6K
Top