UDF - DEFINE_GRID_MOTION

I want to describe the motion of a 2D flat plate which is lengthening and shortening with time, perpendicular to onset flow. Can a UDF be used for this, is the DEFINE_GRID_MOTION UDF appropriate? My programming skills are unfortunately limited.