DEF modelling based on thermodynamic equilibria and ionic transfers for structural analysis