# Analytical solution of 1D advection -diffusion equation

I am looking for the analytical solution of 1-dimensional advection-diffusion equation with Neumann boundary condition at both the inlet and outlet of a cylinder through which the fluid flow occurs. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$ with initial condition $$c(x,0) = C_i$$ and with Neumann boundary condition $$\frac{\partial C}{\partial x}=0\text{ at }t>0.$$

Could someone suggest a reference?

I had a chance to look at the answer posted here. Out of the solutions listed, I couldn't find the analytical solution for the transport equation with Neumann boundary condition at both the ends.

• Sorry if my comment is a bit naive, but isn't the solution $C(x,t)=C_i$ valid at all $x$ and $t$, if you are applying Neumann boundary conditions at both ends? In other words, your initial condition is also the steady-state solution, since both $\partial C/\partial x$ and $\partial^2 C/\partial x^2$ are zero everywhere. Or, if you really mean $C(x,0)=C_i(x)$ I suggest that you edit your question to make it clear. – user28077 Dec 19 '18 at 12:28
• @LonelyProf from your answer, I understand it wouldn't be correct to use Neumann boundary at both the ends. Sorry if it wasn't clear, I meant Ci at all x and not Ci(x). At time zero, the first derivative and second derivative of concentration is zero along the spatial direction.But I couldn't understand , how both the first and second derivatives are zero at all time. Could you please elaborate? – Natasha Dec 19 '18 at 16:55
• That's fine, so there is no need to edit your question. In that case, my comment is really an answer, and I've posted it below. If it isn't clear, please make a comment on the answer. Actually, for future reference, I suspect that discussions of exact solutions to PDEs will be considered off-topic for this site, so if you have more questions relating to exact solutions, you may find a better fit at math.stackexchange.com. – user28077 Dec 19 '18 at 18:53

Given the initial conditions $$C(x,0) = C_i \quad \forall x$$ and the boundary conditions $$\left . \frac{\partial C(x,t)}{\partial x} \right|_{x=0} = \left . \frac{\partial C(x,t)}{\partial x} \right|_{x=L} = 0 \quad \forall t$$ the right-hand side of the PDE vanishes at $$t=0$$, and hence the left-hand side does as well. So the initial concentration never evolves in time, $$\partial C(x,t)/\partial t=0$$ for all $$x$$, and the exact solution is the steady state $$C(x,t) = C_i$$ for all $$x$$ and $$t$$.
• While using C(x,0) =$C_i(x)$ in place of C(x,0) =$C_i$,the C at all x converges to a steady state solution that is the mean of C_i(x) at t=0(observed from simulation). Could you please suggest how this can be understood and interpreted in terms of the analytical solution? – Natasha Dec 20 '18 at 12:04
• As I'm sure you are aware, we can write the PDE as $\partial C/\partial t=-\partial F/\partial x$ where the flux $F=vC-D\partial C/\partial x$. If you integrate both sides over $x$, the time derivative of the total amount as a function of $t$ is given by the difference in fluxes at the boundaries. Your boundaries make the diffusive fluxes zero, but the advective fluxes are not zero, and would not cancel, in the most general case. Maybe you chose a symmetrical $C_i(x)$ to get this result. Anyway, I don't feel that I can say more; as I mentioned above, you should ask on Maths SE. – user28077 Dec 20 '18 at 13:19