Modeling the Etching of Nanostructures