I used a "fix deform" command to change my simulation box such that the length of the box follows a triangular sinusoidal path using the following "variable" command. (L0 is the initial box length. Tp is the time period.)