I have a question about diffusion and i'm not sure how to tackle it.
A new processing method is being tried for a lithium battery cathode material -LiCoO2. the process leaves the ceramic oxygen deficient, which is causing problems. to counter this problem the LiCoO2 is annealed at low temp (400 K) in oxygen rich atmosphere to encourage oxygen take up. this generates a localised atmosphere of oxygen at the surface of $1.16\times 10^5 \pu{mol/m^3}$.
i. The initial concentration of oxygen in the cathode material is $9.64\times 10^4 \pu{mol/m3}$. The diffusion constant is $4.92\times 10^{-7} \pu{cm^2 s^-1}$ for the oxygen in the cathode material. calculate how long the material must be annealed for it to reach the desired concentration of $1.04\times 10^5 \pu{mol/m^-3}$ across the whole sample (which is 5 mm in depth).
ii. The oxygen is though to primarily diffuse into the material via a grain boundary diffusion mechanism, draw a diagram showing how the oxygen concentration would vary across the material and around the grain boundaries."
For part i. I have tried using $$c(x,t)=\frac{A_0}{\sqrt{\pi Dt}}\exp(-x^2/4Dt)$$ but ended up with negative time which doesn't make any sense, I have also tried solving it using error function table $$c(x,t)=0.5A_0[1-erf(\frac{x}{2 \sqrt{Dt}})]$$ but ended up with negative time too (different value)
Could someone advise me which equation to use