A theoretical model of the formation morphologies of porous silicon