Modeling the growth of an altered layer in mineral weathering