A numerical model for isotopic patterns from thermal-extraction experiments