Kraynik and Reinelt boundary condition

Hello all ,
I want to build a uniaxial flow field using K-R (Kraynik and Reinelt) boundary condition( x dimension is expanding and y dimension is compressing). Is there any idea to have the rotated box in amount of theta at the start of simulation and recovering the box in the specific time steps( K-R boundary condition) ?

I don't know what you mean by a rotated box.
But you can use fix deform to dilate in one dimension
and contract in another. You can also use the fix move
command to rotate atoms during a simulation.