- #1
henxan
- 46
- 2
The problem statement
Based on an analytical solution for the concentration profile of a dissolving sphere, I am supposed to use a numerical method to find the time at which the sphere has fully dissolved. This is not so much a question about specific values - but about the technique by which I attain an answer, thus I have not given a lot of constants or source code. My question is more:
- Are there invalid logic in my thinking?
Relevant equations
Analytical solution to the concentration profile is given by:
$$
\begin{equation}
C(r, t) = C_s\cdot C_{int} \frac{R_0}{r^{\text{*}}} \left( 1 - \textbf{erf}\left( \frac{r^{\text{*}} - R_0}{2\sqrt{Dt}} \right) \right),
\end{equation}
$$
where ## r^{\text{*}} = R_0 + r.## The start volume of the sphere:
$$
\begin{equation}
V_0 = \frac{4}{3}\pi R_0^3
\end{equation}
$$
The concentration in this sphere is ##C_s = 1##, thus giving an initial amount of ##C_{tot}^0=V_0\cdot C_s = 1##. The inter-facial concentration is ##C_{int} = 0.0025##, ##R_0 = 2.5\cdot10^{-8}## and ##D=8.5542\cdot10^{-15}##.
An attempt at a solution
I make a matrix in Matlab with ##t\times C(r)##. I have also solved the concentration profile using Fick's second law, so I am pretty sure i get the correct diffusion profiles at different times. Since I now have a matrix of concentration profiles at different times, i use the following formula to element-wise solve the sum concentration at all my timesteps between 10 and 15 seconds:
$$
\begin{equation}
C_{tot} = \frac{4}{3}\pi \sum_{i=1}^m \left( r_{i+1}^3 - r_i^3 \right)\frac{\left(C_{i+1}+C_i\right)}{2},
\end{equation}
$$
where ##r = 0,1\cdot10^{-9},\ldots, 1\cdot10^{-6}##. My thinking is that when ##C_{tot}^0 = C_{tot}##, the particle is totally dissolved. Using this method i found a time for total dissolution of the particle at 10.643 s, using a ridiculous small ##\Delta r##. So, what is the problem with this? Well, the answer should lie between 14 and 14.5 seconds, thus I am very far off the mark.
Based on an analytical solution for the concentration profile of a dissolving sphere, I am supposed to use a numerical method to find the time at which the sphere has fully dissolved. This is not so much a question about specific values - but about the technique by which I attain an answer, thus I have not given a lot of constants or source code. My question is more:
- Are there invalid logic in my thinking?
Relevant equations
Analytical solution to the concentration profile is given by:
$$
\begin{equation}
C(r, t) = C_s\cdot C_{int} \frac{R_0}{r^{\text{*}}} \left( 1 - \textbf{erf}\left( \frac{r^{\text{*}} - R_0}{2\sqrt{Dt}} \right) \right),
\end{equation}
$$
where ## r^{\text{*}} = R_0 + r.## The start volume of the sphere:
$$
\begin{equation}
V_0 = \frac{4}{3}\pi R_0^3
\end{equation}
$$
The concentration in this sphere is ##C_s = 1##, thus giving an initial amount of ##C_{tot}^0=V_0\cdot C_s = 1##. The inter-facial concentration is ##C_{int} = 0.0025##, ##R_0 = 2.5\cdot10^{-8}## and ##D=8.5542\cdot10^{-15}##.
An attempt at a solution
I make a matrix in Matlab with ##t\times C(r)##. I have also solved the concentration profile using Fick's second law, so I am pretty sure i get the correct diffusion profiles at different times. Since I now have a matrix of concentration profiles at different times, i use the following formula to element-wise solve the sum concentration at all my timesteps between 10 and 15 seconds:
$$
\begin{equation}
C_{tot} = \frac{4}{3}\pi \sum_{i=1}^m \left( r_{i+1}^3 - r_i^3 \right)\frac{\left(C_{i+1}+C_i\right)}{2},
\end{equation}
$$
where ##r = 0,1\cdot10^{-9},\ldots, 1\cdot10^{-6}##. My thinking is that when ##C_{tot}^0 = C_{tot}##, the particle is totally dissolved. Using this method i found a time for total dissolution of the particle at 10.643 s, using a ridiculous small ##\Delta r##. So, what is the problem with this? Well, the answer should lie between 14 and 14.5 seconds, thus I am very far off the mark.