International audienceWe present a treatment of the cation exchange capacity (CEC) of clays in contact with an aqueous solution, during precipitation, using an ideal solid solution approach. It combines in a single calculation short term processes such as cation exchange and long term reactions like precipitation. This approach has been implemented and optimized in a new version of the NANOKIN code, which is thus now able to provide the time dependence of all particle sizes, composition and precipitated amount, as well as aqueous solution activities, pH and saturation states. It has been applied to the description of montmorillonite and illite precipitation from aqueous solutions at different temperatures and initial conditions: (1) an init...