Two-dimensional modeling of the self-limiting oxidation in silicon and tungsten nanowires