# Theoretical Modelling of Ion Exchange Processes in Glass: Advances and Challenges
## 2 Basic Model
### Boundary Conditions  
When an external medium is in contact with the glass surface, each type of cation present in the glass and/or in the medium can either cross or not cross the glass/medium interface. This depends on the nature of such a medium. If a cation crosses the interface, a thermodynamic equilibrium is assumed between the crossing cations at both sides. Otherwise, the normal component of its flux density cancels. Therefore, the different boundary conditions for the Equations (14), (16) and (17) are obtained for a mask/air, a silver or copper film and a molten salt mixture, when none, one or both cations, respectively, cross the interface. Moreover, when the external medium is a conductor (metallic film or fused salt), its electric potential can also be chosen and directly affects the boundary condition of the potential \(\phi\) through Equation (18).  
In Tables 1 and 2, we summarize the boundary conditions for IE processes from molten salt mixtures and films, as well as under a mask or in air. The equations that govern these processes are also shown. Note that boundary conditions for other common IE processes as annealing or secondary ion exchanges are included in these cases. Indeed, boundary conditions for annealing processes are the same as for \"mask/air\", and the ones for secondary ion exchanges are included in the \"salt\" case, just using a different constant \"C\", which depends on the dopant concentration in the salt mixture and temperature through an equilibrium equation [40; 41; 42; 43]. Moreover, the final concentration of the first process is the initial condition for the second one.  
We show, in these tables, the two alternative forms presented in Section 2.1. In Table 1, the problem is formalized in terms of the normalized concentration of dopant cations \(c_{A}\) and the total flux density \(\mathbf{J}_{0}\). This is a more straightforward form, which makes it easier to understand the physical problem of ion exchange. However, for resolution purposes, the form given in Table 2 is simpler because it is written in terms of \(c_{A}\) and a scalar function \(\phi\), which can be seen as an effective electric potential [30].  
The basic model of this section implicitly assumes an ideal cation behaviour in the glass. Therefore, for the sake of consistency, the same assumption was made in the electrochemical potentials to obtain the theoretical equations for the boundary conditions of Tables 1 and 2. However, the corresponding condition for \(c_{A}\) in a glass-salt interface, as a function of the salt composition, must contain non-ideal terms on the glass side, as we will show in the next section. Owing to the molten salt being homogeneous, \(\left.c_{A}\right|_{S}\) is constant along the surface. Hence, a mixed theory can be a pragmatic approach; similarly, experimental values for \(\left.c_{A}\right|_{S}\) can be used to feed the numerical algorithms that model the ion exchange. On the other hand, the boundary conditions for \(\phi\) are sometimes irrelevant (thermal diffusion) or they can be approximated to those of \(V\) (diffusion assisted with strong fields). As a result, they were often ignored in models and experiments in the context of waveguide fabrication.