babagoslow
- 13
- 0
I'm trying to implement a numerical code for the diffusion equation with moving boundaries. I have no problems with the numerical implementation, but with the transformation of coordinates. In spherical coordinates, the diffusion equation is
[itex]\frac{\partial c}{\partial t} = D \left(\frac{2}{r}\frac{\partial c}{\partial r} + \frac{\partial^2 c}{\partial r^2} \right)[/itex].
After scaling these equations with [itex]\phi = c/C_0, \tau = Dt/R_0^2, x = (r-R_0)/R_0[/itex] I get
[itex]\frac{\partial\phi}{\partial \tau} = \frac{2}{1+x} \frac{\partial\phi}{\partial x} + \frac{\partial^2 \phi}{\partial x^2}[/itex]
Now transform the [itex]x[/itex] coordinate to the Landau (not that Landau) coordinate [itex]\eta(x,\tau)[/itex] defined as
[itex]\eta(x,\tau) = \frac{x - X(\tau)}{X_\infty - X(\tau)}[/itex].
The idea of the transformation is to move the boundary [itex]X(\tau)[/itex], which is variable only in time [itex]\tau[/itex] and keep the length scale [itex]X_\infty[/itex] fixed. This is particularly useful, for instance, in problems involving a gas bubble losing volume by diffusion, where the bubble's radius is variable in time.
There's a paper out there (Fischer, Zinovik and Poulikakos 2009) which suggests that the final result should be
[itex]\frac{\partial \phi}{\partial \tau} = \left[ \frac{2}{(X_\infty - X(\tau))(1+\eta (X_\infty - X(\tau))+ X)} + \frac{1-\eta}{X_\infty - X(\tau)}\frac{dX}{d\tau} \right] \frac{\partial\phi}{\partial\eta} + \frac{1}{(X_\infty - X(\tau))^2} \frac{\partial^2 \phi}{\partial \eta^2}. [/itex]
However, I have some trouble reproducing this result. Can someone guide me through the change of coordinates? I have problems particularly with the second partial derivative.
[itex]\frac{\partial c}{\partial t} = D \left(\frac{2}{r}\frac{\partial c}{\partial r} + \frac{\partial^2 c}{\partial r^2} \right)[/itex].
After scaling these equations with [itex]\phi = c/C_0, \tau = Dt/R_0^2, x = (r-R_0)/R_0[/itex] I get
[itex]\frac{\partial\phi}{\partial \tau} = \frac{2}{1+x} \frac{\partial\phi}{\partial x} + \frac{\partial^2 \phi}{\partial x^2}[/itex]
Now transform the [itex]x[/itex] coordinate to the Landau (not that Landau) coordinate [itex]\eta(x,\tau)[/itex] defined as
[itex]\eta(x,\tau) = \frac{x - X(\tau)}{X_\infty - X(\tau)}[/itex].
The idea of the transformation is to move the boundary [itex]X(\tau)[/itex], which is variable only in time [itex]\tau[/itex] and keep the length scale [itex]X_\infty[/itex] fixed. This is particularly useful, for instance, in problems involving a gas bubble losing volume by diffusion, where the bubble's radius is variable in time.
There's a paper out there (Fischer, Zinovik and Poulikakos 2009) which suggests that the final result should be
[itex]\frac{\partial \phi}{\partial \tau} = \left[ \frac{2}{(X_\infty - X(\tau))(1+\eta (X_\infty - X(\tau))+ X)} + \frac{1-\eta}{X_\infty - X(\tau)}\frac{dX}{d\tau} \right] \frac{\partial\phi}{\partial\eta} + \frac{1}{(X_\infty - X(\tau))^2} \frac{\partial^2 \phi}{\partial \eta^2}. [/itex]
However, I have some trouble reproducing this result. Can someone guide me through the change of coordinates? I have problems particularly with the second partial derivative.