Solving the 1D Diffusion Equation: Boundary Conditions & Eigenvalues

In summary, the conversation discusses the speaker's interest in exploring the use of data from their biomedical engineering lab to fit to the solution of the 1D diffusion equation. They provide details about the problem, including constraints and boundary conditions, and discuss their approach using a separable solution. They also consider altering the boundaries of the problem to exhibit odd symmetry and discuss the use of Fourier analysis to determine the coefficients in their solution.
  • #1
osdes
2
0
Technically speaking, this is not a homework problem; it is something extra that I want to explore using data from my biomedical engineering class. We recently finished a lab involving testing the design of a micromixer; now comes the analysis of the data. No where in the lab are we instructed to find a fit for our data, nor are we instructed to solve the diffusion equation. The goal of the lab is not to test that the diffusion equation works, but to indicate how well our micromixer performed. I am interested in the former, not the latter. Hence, I want to fit lab data to the solution to the diffusion equation, given that diffusion must occur in a confined space. The steady state solution is trivial and obvious, so I want to find the solution.



Homework Statement



I've been trying to solve the 1D diffusion equation

[tex]D\frac {\partial^2 \phi}{\partial x^2} = \frac {\partial \phi}{\partial t}[/tex], where [tex]\phi(x,t)[/tex] is the "concentration" of a particular substance at position [tex]x[/tex] at time [tex]t[/tex], and [tex]D[/tex] is the diffusion coefficient.

This particular problem is subject to the following:

1) [tex]x[/tex] is limited to be between [tex]0[/tex] and [tex]L[/tex] inclusive, and time [tex]t \geq 0[/tex].
2) The Initial Condition is [tex]\phi(x,0) =[/tex] the step function centered on [tex]\frac {L}{2}[/tex], that is, for [tex]x\leq \frac {L}{2}[/tex], [tex]\phi(x,0) = 0[/tex], and for [tex]x > \frac {L}{2}[/tex], [tex]\phi(x,0) = 1[/tex].
3) [tex]\int_0^L \phi(x,t)dx = \frac {L}{2}[/tex], i.e. the total amount of substance is constant, all mass must remain between [tex]0[/tex] and [tex]L[/tex] for all time (Conservation of Mass).
4) The only boundary condition is [tex]\phi(\frac {L}{2},t) = \frac {1}{2}[/tex]; the value of [tex]\phi[/tex] is always changing at the edges [tex]x = 0[/tex] and [tex]x = L[/tex].
5) The steady state solution is [tex]\lim_{t\rightarrow\infty}\phi(x,t) = \frac {1}{2}[/tex].
6) If you were to subtract [tex]\frac {1}{2}[/tex] from the solution, the result should be an odd function about [tex]x = \frac {L}{2}[/tex].
7) I do not believe I can make any analogies between the symmetric semi-infinite version of this problem (which would be to start with an initial [tex]\phi[/tex] as square pulse of width [tex]\frac {L}{2}[/tex], and enforce a boundary condition at [tex]x = 0[/tex] that [tex]\phi = 0[/tex], because this would violate the conservation of mass.)
8) That said, perhaps one can enforce an additional boundary condition that mass does not flow across the boundaries [tex]x = 0[/tex] and [tex]x = L[/tex]. I'm not quite sure how to represent this as a differential equation that would be useful in this context, but maybe with further thought and some tips I could. I think that this condition is equivalent to #3; maybe this would be helpful in reformulating the problem.


Homework Equations



See above.

The Attempt at a Solution



Finding a separable solution for [tex]\phi[/tex] is only slightly enlightening. I believe I should be able to obtain eigenvalues and then form an eigenfunction basis in order to formulate the actual solution. Thus if I if assume a separable solution [tex]\phi(x,t) = X(x)T(t)[/tex], then I can write

[tex]\frac {X''(x)}{X(x)} = \frac {1}{D}\frac {T'(t)}{T(t)} = - k^2[/tex]. It might be helpful to set up the problem so that it repeats periodically in [tex]x[/tex] so that [tex]\sin(kx)[/tex] and [tex]\cos(kx)[/tex] eigenfunctions can be used: Then the eigenfunctions for [tex]X(x)[/tex] would be [tex]\sin(kx)[/tex] and [tex]\cos(kx)[/tex]. The solution for [tex]T(t) = Ce^{ - k^2Dt[/tex].

Then:
[tex]\phi(x,t) = C_o + \sum_{n = 0}^\infty (A_n \cos(k_n x) + B_n(k_n x))e^{ - k_n^2Dt}[/tex], where [tex]C_o[/tex] is either 0 or [tex]\frac {1}{2}[/tex] depending on where we position the problem.

I need to find the coefficients and the eigenvalues, but I am stuck, unsure about how exactly I should utilize the conditions set in this problem to find them. The lack of boundary conditions I think makes this difficult. However, if this problem is made to periodically go through zero, this might help. I could shift the system so that initially at ([tex]t = 0[/tex]) [tex]\phi[/tex] is an periodic odd square wave: from [tex]x = 0[/tex] to [tex]x = L[/tex], [tex]\phi = \frac {1}{2}[/tex]; from [tex]x = - L[/tex] to [tex]x = 0[/tex], [tex]\phi = - \frac {1}{2}[/tex]. This repeats. And then the region of interest would be between [tex]x = - \frac {L}{2}[/tex] and [tex]x = \frac {L}{2}[/tex].

I think this setup would take care of #3 and #8 due to symmetry, in which case perhaps it might be possible to solve this using an alternative method with the mentioned above setup as the initial condition and the Green's function for the diffusion equation, which isn't separable.

So overall, can anyone give me insight on whether or not my approach(es) is(are) correct in solving for [tex]\phi(x,t)[/tex] for this particular case?
 
Physics news on Phys.org
  • #2
Hi osdes, welcome to PF. Your problem description is very clear. Maybe it will help to note that from the constraint of zero mass flow at [itex]x=0[/itex] and [itex]x=L[/itex], we also have the boundary conditions

[tex]\left.\frac{\partial \phi}{\partial x}\right|_{x=0,L}=0[/tex]

which is an outcome of applying Fick's first law.
 
  • #3
Ok, so I decided to solve via a separable solution. From [tex] D\frac {\partial^2 \phi}{\partial x^2} = \frac {\partial \phi}{\partial t}[/tex], assume that [tex]\phi(x,t) = X(x)T(t)[/tex]. I can write [tex] D\frac{X''(x)}{X(x)}=\frac{T'(t)}{T(t)}=-\lambda [/tex]. A solution for [tex]X(x)[/tex] is [tex]X(x) = A\cos(\sqrt{\frac{\lambda}{D}}x) + B\sin(\sqrt{\frac{\lambda}{D}}x)[/tex], where [tex]A[/tex] and [tex]B[/tex] are constants. Also, [tex]T(t) = e^{-\lambda t}[/tex]. The product of these is a solution for [tex]\phi(x,t)[/tex].

Here, I decided to alter the boundaries for the problem. The problem is now exhibits odd symmetry about the origin, [tex]x=0[/tex]; the initial left and right boundaries are [tex]\phi(\pm \frac{L}{2},0) = \pm \phi_o[/tex], with the plus and minus corresponding. Applying the boundary conditions and initial state of the problem, we know that the [tex]X(x)[/tex] solution must exhibit odd symmetry. Thus, [tex]A=0[/tex] and [tex]B\neq0[/tex]. This requires that [tex]\cos(\sqrt{\frac{\lambda}{D}}\frac{L}{2}) = 0[/tex], leading to [tex]\sqrt{\frac{\lambda}{D}} = \frac{(2n+1)\pi}{L}[/tex], where n is a non-negative integer. Each value of n generates a solution to the diffusion equation, so
[tex]\phi_n (x,t) = B_n \sin(\frac{(2n+1)\pi}{L}x)e^{-\frac{D(2n+1)^2\pi^2}{L^2}t}[/tex] is a solution, meaning that [tex]\phi(x,t) = \sum_{n=0}^{\infty}B_n \sin(\frac{(2n+1)\pi}{L}x)e^{-\frac{D(2n+1)^2\pi^2}{L^2}t}[/tex] is a solution. To determine [tex]B_n[/tex], apply the I.C. and use orthogonality (i.e. Fourier). To do this, I extended the problem to infinite and made it periodic with a period of [tex]2L[/tex]--I made the problem have odd symmetry about [tex]x=0[/tex] and have even symmetry about [tex]x=\frac{L}{2}[/tex].
 

1. What is the 1D diffusion equation?

The 1D diffusion equation is a mathematical model that describes the spread of a substance or quantity in a one-dimensional space. It is commonly used in physics, chemistry, and engineering to study phenomena such as heat transfer, mass transfer, and chemical reactions.

2. What are boundary conditions in the 1D diffusion equation?

Boundary conditions are constraints that are imposed on the solution of the 1D diffusion equation at the boundaries of the system. These conditions can include the initial distribution of the substance or quantity, as well as the behavior of the substance or quantity at the boundaries over time.

3. How do boundary conditions affect the solution of the 1D diffusion equation?

Boundary conditions play a crucial role in determining the behavior of the solution to the 1D diffusion equation. They can affect the shape, magnitude, and rate of change of the solution, and can also lead to the formation of boundary layers or other interesting phenomena.

4. What are eigenvalues in the context of the 1D diffusion equation?

Eigenvalues are a set of numbers that are associated with the boundary conditions of the 1D diffusion equation. They represent the values of the solution that satisfy the boundary conditions and are used to determine the behavior of the solution over time.

5. How do eigenvalues impact the solution of the 1D diffusion equation?

The eigenvalues of the 1D diffusion equation determine the stability and behavior of the solution over time. They can also be used to calculate important quantities such as the diffusion coefficient and the amount of substance or quantity that will be present at a certain point in space and time.

Similar threads

  • Advanced Physics Homework Help
Replies
7
Views
865
  • Advanced Physics Homework Help
Replies
0
Views
453
  • Advanced Physics Homework Help
Replies
3
Views
381
  • Advanced Physics Homework Help
Replies
6
Views
293
Replies
1
Views
802
  • Advanced Physics Homework Help
Replies
5
Views
1K
  • Advanced Physics Homework Help
Replies
4
Views
941
  • Advanced Physics Homework Help
Replies
10
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
317
  • Advanced Physics Homework Help
Replies
3
Views
684
Back
Top