A mathematical model for internal oxidation