Initial-boundary problem, time-dependent diffusion model

PMiKNoM seminars - class 8

Introduction

Time-dependent diffusion model - basic equations

Fick second Law
` \frac{\partial c}{\partial t} = D \frac{\partial^2 c}{\partial x^2}`
Second central derivative of concentration at point `x_i`
` \frac{\partial^2 c_i}{\partial x^2} = \frac{c_{i+1}-2c_i+c_{i-1}}{h^2}`
Explicit Euler's method
` c_i(t_{j+1}) = c_i(t_j)+ \Delta t \cdot \frac{dc_i}{dt}`
Final diffusion equation

After combining the three equations above, we obtain:

`c_i(t_{j+1}) = c_i(t_j)+ \frac{\Delta t}{h^2} D \cdot (c_{i+1}-2c_i+c_{i-1})`
Initial and boundary conditions
Initial condition:
`c(x,0) = 0`
Boundary conditions:
$$ \left\{ \begin{array}{l} c(0,t) = c_L = const \\ c(l,t) = c_R = const \end{array} \right. $$

Time-dependent diffusion model - the obtained software