Analytical solution of diffusion equation for two layers
Hi I'm solving the diffusion-reaction equation to find the concentration profile within a simple 1D homogeneous layer with mixed boundary conditions:
C(x=0) = constant = c_max and the flux at the other end is zero.
I have an analytical solution for the steady state and it seems to work fine for one layer.
However what I really want is to have 2 layers, so the gas passes through layer 1 and then 2 - these layers being defined by diffusivity and rate constant values.
To calculate the concentration in the second layer I find the concentration at the base of the first layer and use this as c_max.
This gives me the wrong answer, I get a cusp in the concentration profile at the interface between the two layers rather than a smooth transition.
Can anyone tell me what I'm doing wrong?