# Thread: One dimensional Diffusion Equation with time-dependent BC

1. ## One dimensional Diffusion Equation with time-dependent BC

Hi everyone! I have been struggling with this problem. Im trying to find an analytical solution to the problem below:

All coefficients are known constants.

I know that it has been solved using Laplace transforms, but the source I have doesn't explain how, and the publications my source are reffering to are impossible to find.

I am having trouble when applying the boundary condition at z=0. When I Laplace transform the boundary condition i get:
z=0:
dF/dz = (VMK/ZRTDA)*Fs
where F(x,s)=L{C(x,t)}

Can anybody give me a little help as to how I should solve this?

2. You're going to have fun with that one. The overall procedure (you can find this in the book The Mathematics of Diffusion, by J. Crank) is to take the Laplace Transform of the DE, which gives you a second-order ODE. You'll also take the LT of the boundary conditions, as you've done. Solve the resulting system. The result is a function of $\displaystyle z$ and the LT variable $\displaystyle s.$

Then you have to take the inverse LT. This is where the fun and games begin, because most likely, you can't use a table to just find the inverse LT. You'll have to go back to the definition of the inverse LT using the complex line integral, and then use residue calculus to compute the integrals.

This is a fairly involved problem, it looks like. Is this for a class?

Its not for a class per se, I am doing these calculations in connection with my master thesis in petroleum engineering. That equation should describe some experiments being done at my university where co2 diffuses into water.

I have done as you said, taken the LT of the equation and the boundary conditions, but the resulting equation makes no sense. The image below shows what i've done. F is the Laplace transform of C with the first boundary condition applied.

I dont understand what ive done wrong in my methods, if anything.

4. I agree with the first line. You can throw out the $\displaystyle c_{2}e^{\sqrt{s/D}\,z}$ solution because $\displaystyle C=0$ when $\displaystyle z\to\infty$ for $\displaystyle t\ge 0.$ When you do the LT of the boundary condition and you do some solving for constants, might you be confusing the $\displaystyle c_{1}$ of the previous LT with the LT of the boundary condition? You're certainly not guaranteed that they'll be the same.

5. Its definitely the same constant. The c1 comes the derivative of F. I just equate the derivative F (0 put in for z after derivation) with dF/dz as given by the boundary condition.

6. Yeah, I can see you did that. But is that allowed? Might you not need to solve the boundary condition DE separately?

Incidentally, I suppose I should ask this question: what about your solution doesn't make sense to you?