Thermomechanical Modeling of Successive Material Deposition in Layered Manufacturing