Diffusion-reaction model
PMiKNoM seminars - class 10
Introduction
- Diffusion of chlorides and its relation to porosity and binding.
Model we've discussed on seminar 8 assumed that the transport of chloride ions occurs in the uniform, continuous system. However, in reality the concrete sample is a porous systems, and diffusion of ions occurs primarily in the porous liquid, inside the pores of concrete. In order to include the information about porosity in the model, the left side of Fick's Law must be multiplied by the porosity coefficient `\phi`:
Additionally, the adsorption reaction occurs and some of the ions are bound in the solid phase:
Adsorption (reaction term) can be described using three isotherms: linear, Langmuir or Freunlich. We will use the latter. Details of the model including equations, numerical solution and programs algorithm can be found below.
Time-dependent diffusion-reaction model - basic equations
Diffusion and binding
After including the information about porisity of concrete and chloride binding in solid phase, the mass ballance equation takes the form:
The reaction term, `r` is calculated using Freundlich isotherm:
The density of the solid phase in concrete, `\rho_s` is calculated using the weighted sum:
Initial and boundary conditions
We assume the constant concentrations at the boundaries (Dirichlet boundary conditions):
At the beginning of the process, there is no chlorides in the sample:
The total concentration of chlorides
The total concentration of chlorides (rescaled to `kg`/`kg` of concrete) is a sum of free and bound chlorides:
Diffusion-reaction model - Numerical solution
Numerical solution of the above equations is based on the Method of Lines (MoL) and on the explicit Euler method.
Method of Lines
We divide the considered segment into `n+1` sub-segments, each having the length `h`, to obtain the discrete points `x_0` to `x_{n+1}`. Let's then define `c_i \equiv c(x_i)` and `C_{b,i} \equiv C_b(x_i)`. The second derivative can be now substituted with the finite difference. That leads to the following set of equations:
Eulers Method
If `c_{i}` and `C_{b,i}` denote the concentrations at time `t_j`, while `\overline c_{i}` and `\overline C_{b,i}` denote the chloride concentrations at time `t_{j+1}` then:
After inserting the time derivative, one obtains:
Diffusion-reaction model - programs algorithm
- Declare the global constants `c_L`, `c_R`, `l`, `D`, `t_{end}`, `n`, `m`, as well as `row`, `roc`, `fi`, `k`, `Kb` and `eta`.
- Begin the main procedure with declarations of variables `h`, `dt`, `ros`, `\alpha`, `\beta`, `\gamma`, `i`, `j`, and arrays `c(0 \text{ to } n+1)`, `c_\text{new}(1 \text{ to } n)` and `C_b(0 \text{ to } n+1)`.
- Calculate the step value `h`, the time-step value `dt`, the density `ros` and the variables `\alpha`, `\beta`, `\gamma`.
- Write the initial condition for every point: `c(i)=0` and `C_b(i)=0`.
- Write the boundary condition: `c(0)=c_L` and `c(n+1)=c_R`.
- Execute the loop, in which for every time-step (`j=1` to `m`) three inner loops will be executed:
- Program calculates the new values of concentration of free chlorides, and assign them to the array `c_\text{new}`, i.e.:
for `i = 1` to `n` `c_{\text{new},i} = c_{i} + \alpha ( c_{i+1}-2c_i+c_{i-1} ) - \beta ( c_i - (C_{b,i} \text{/} K_b)^{1\text{/}\eta} )`. - Program calculates the new values of concentration of bound chlorides, and assign them to the array `C_b`, i.e.:
for `i = 0` to `n+1` `C_{b,i} = C_{b,i} + \gamma ( c_i - (C_{b,i} \text{/} K_b)^{1\text{/}\eta} )`. - Program switches the arrays, i.e.:
for `i = 1` to `n` `c_i=c_{\text{new},i}`.
- Program calculates the new values of concentration of free chlorides, and assign them to the array `c_\text{new}`, i.e.:
- Display results, in columns containing: `i \cdot h`, `C_{f r e e}(i)`, `C_{b o u n d}(i)`, `C_\{t o t}(i)`. (See equation 2.3.)
Diffusion-Reaction model - the obtained software
- Diffusion-Reaction - implementation in VBA.
- Comparison of the results with application written in JavaScript.