- #1

- 10

- 4

- TL;DR Summary
- Trying to use Laplace Transform method to solve a 1D diffusion problem with a time-dependent boundary condition. Looking for help identifying my error.

Hi everyone,

I am trying to solve the 1 dimensional diffusion equation over an interval of 0 < x < L subject to the boundary conditions that C = kt at x = 0 and C = 0 at x = L. k is a constant. The diffusion equation is

[tex]\frac{dC}{dt}=D\frac{d^2C}{dx^2}[/tex]

I am using the Laplace transform method, which I have applied successfully to solve similar diffusion problems.

Briefly, when applying the Laplace transform and solving the subsidiary equation with the stated boundary conditions, I arrive at the solution:

[tex]\bar C=\frac{k \sinh{q(L-x)}}{p^2 \sinh{qL}}[/tex]

Where q^2 = p/D and p is the transform variable.

To get the inverse transform, I’m using the partial fraction approach, basically expanding the hyperbolic sine functions as infinite products, finding the roots, and going from there. A method to do this is laid out in Crank’s book

Anyway, the solution I’m getting using this approach is:

[tex]C=kt \frac{L-x}{L}+k\frac{(L-x)^3}{8LD}+\frac{2kL^2}{D\pi^3}\sum_{n=1}^{\infty}\frac{1}{n^3}\sin{\left( \frac{n \pi x}{L} \right)}\exp{\left( -\frac{Dn^2 \pi^2 t}{L^2}\right)}[/tex]

Unfortunately the second term of this solution does not satisfy the boundary conditions, so I’ve done something wrong.

I did solve the problem a different way using a heat transfer book as a guide and the correct solution seems to be:

[tex]C=kt \frac{L-x}{L}-\frac{kL^2}{D}\left(\frac{x}{3L}-\frac{x^2}{2L^2}+\frac{x^3}{6L^3}\right)+\frac{2kL^2}{D\pi^3}\sum_{n=1}^{\infty}\frac{1}{n^3}\sin{\left( \frac{n \pi x}{L} \right)}\exp{\left( -\frac{Dn^2 \pi^2 t}{L^2}\right)}[/tex]

The good news is I can get a solution to my diffusion problem, but I’d still like to know what I’m doing wrong with my inverse transform, because this is usually my method of choice. It has something to do with the triple zero root in the denominator of the subsidiary eqn solution because that gives rise to the second term that is wrong. But I’ve gone over my work a zillion times and I can’t find my error.

If anyone has any suggestions, I’d really appreciate it. Happy to supply my intermediate math if that’s helpful for troubleshooting.

I am trying to solve the 1 dimensional diffusion equation over an interval of 0 < x < L subject to the boundary conditions that C = kt at x = 0 and C = 0 at x = L. k is a constant. The diffusion equation is

[tex]\frac{dC}{dt}=D\frac{d^2C}{dx^2}[/tex]

I am using the Laplace transform method, which I have applied successfully to solve similar diffusion problems.

Briefly, when applying the Laplace transform and solving the subsidiary equation with the stated boundary conditions, I arrive at the solution:

[tex]\bar C=\frac{k \sinh{q(L-x)}}{p^2 \sinh{qL}}[/tex]

Where q^2 = p/D and p is the transform variable.

To get the inverse transform, I’m using the partial fraction approach, basically expanding the hyperbolic sine functions as infinite products, finding the roots, and going from there. A method to do this is laid out in Crank’s book

*Mathematics of Diffusion*and the method almost always works for me. But not this time.Anyway, the solution I’m getting using this approach is:

[tex]C=kt \frac{L-x}{L}+k\frac{(L-x)^3}{8LD}+\frac{2kL^2}{D\pi^3}\sum_{n=1}^{\infty}\frac{1}{n^3}\sin{\left( \frac{n \pi x}{L} \right)}\exp{\left( -\frac{Dn^2 \pi^2 t}{L^2}\right)}[/tex]

Unfortunately the second term of this solution does not satisfy the boundary conditions, so I’ve done something wrong.

I did solve the problem a different way using a heat transfer book as a guide and the correct solution seems to be:

[tex]C=kt \frac{L-x}{L}-\frac{kL^2}{D}\left(\frac{x}{3L}-\frac{x^2}{2L^2}+\frac{x^3}{6L^3}\right)+\frac{2kL^2}{D\pi^3}\sum_{n=1}^{\infty}\frac{1}{n^3}\sin{\left( \frac{n \pi x}{L} \right)}\exp{\left( -\frac{Dn^2 \pi^2 t}{L^2}\right)}[/tex]

The good news is I can get a solution to my diffusion problem, but I’d still like to know what I’m doing wrong with my inverse transform, because this is usually my method of choice. It has something to do with the triple zero root in the denominator of the subsidiary eqn solution because that gives rise to the second term that is wrong. But I’ve gone over my work a zillion times and I can’t find my error.

If anyone has any suggestions, I’d really appreciate it. Happy to supply my intermediate math if that’s helpful for troubleshooting.