# Limit to volume change in a discretized mathematical model?

I have set up a mathematical model describing the diffusion of ozone out of a gas bubble. The bubble is surrounded by a thin gas film. So actually, the model describes the diffusion of ozone through this gas film. The mathematical model is created by discretizing the volume from $V_0$ to $V_1$. Where $V_0$ represents the outer volume of the bubble, and $V_1$ represents the outer volume of the gas film (surrounding the bubble). The discretized scheme consists of $N$ equally spaced volume elements from $V_0$ to $V_1$ (finite difference method): \begin{equation} \Delta V = \frac{V_1 - V_0}{N} \end{equation} The volume of the bubble changes as a function of the amount of ozone leaving the bubble, which in turn changes as a function of time. The volume of the bubble and the amount of ozone inside the bubble is linked by the ideal gas law: \begin{equation} V_0 = \frac{n_\text{total}(t) \cdot R \cdot T}{P} \end{equation} $n_\text{total}$: the total amount of gas inside the bubble, $T$: the temperature, $R$: the gas constant, and $P$: the pressure.

The bubble does not only contain ozone. It also contains inert gases, so that: \begin{equation} n_\text{total} = n_\text{ozone}(t) + n_\text{inert} \end{equation} $n_\text{inert}$ will remain constant and only $n_\text{ozone}(t)$ will change over time.

There should be a limit for how much the volume can change before numerical errors will start to occur. Beyond this limit, the discretization scheme should break down and cause errors. How do I express this limit?

Is the limit given by: \begin{equation} \text{Ratio} = \frac{V_{0,\text{ initial}}}{V_{1,\text{ initial}}} \end{equation}

So that the volume change must not exceed the ratio of the two initial volumes of the bubble and the gas film?

Link to cross-posted question on CompSci.SE.

• You would normally use Fick's Laws to solve problems of this sort, in addition, in a bubble you will also have to account for the change in pressure and the bubble volume changes. Numerical stability may be the least of your problems. :) May 1, 2018 at 8:07
• @Siglis scicomp.stackexchange.com/q/29426/23791 crossposting is generally discouraged. I was actually going to say the question might be a better fit on Comp Sci. I personally don't mind the cross post, but I would recommend linking to the other post in this one. May 1, 2018 at 19:33
• In addition to what @porphyrin comments, when you use a finite difference method the number of finite differences is crucial, as numerical errors will depend on the size of your cells ($(V_1-V_0)/N$) more than on the size of the entire system you are simulating; too many cells and you will have a very costly simulation prone to numerical noise, too few and you will be smothering the diffusion phenomenon you want to describe. What are the exact equations that you are using for transport?
– user41033
May 2, 2018 at 11:49