  A thermodynamic framework has been developed for a class of amorphous
polymers used in fused deposition modeling (FDM), in order to predict the
residual stresses and the accompanying distortion of the geometry of the
printed part (warping). When a polymeric melt is cooled, the inhomogeneous
distribution of temperature causes spatially varying volumetric shrinkage
resulting in the generation of residual stresses. Shrinkage is incorporated
into the framework by introducing an isotropic volumetric expansion/contraction
in the kinematics of the body. We show that the parameter for shrinkage also
appears in the systematically derived rate-type constitutive relation for the
stress. The solidification of the melt around the glass transition temperature
is emulated by drastically increasing the viscosity of the melt.
  In order to illustrate the usefulness and efficacy of the derived
constitutive relation, we consider four ribbons of polymeric melt stacked on
each other such as those extruded using a flat nozzle: each layer laid
instantaneously and allowed to cool for one second before another layer is laid
on it. Each layer cools, shrinks and warps until a new layer is laid, at which
time the heat from the newly laid layer flows and heats up the bottom layers.
The residual stresses of the existing and newly laid layers readjust to satisfy
equilibrium. Such mechanical and thermal interactions amongst layers result in
a complex distribution of residual stresses. The plane strain approximation
predicts nearly equibiaxial tensile stress conditions in the core region of the
solidified part, implying that a pre-existing crack in that region is likely to
propagate and cause failure of the part during service. The free-end of the
interface between the first and the second layer is subjected to the largest
magnitude of combined shear and tension in the plane with a propensity for
delamination.
