You might be able to do this with the new “keyframe” feature, although the keyframe file would have to have an entry for each cycle of the vibration. You could use a Python script or similar to create the file. If you do it this way, you do not have to write any custom Fortran code.
It may also be helpful to review this thread for the non-keyframe (custom Fortran) approach:
https://mfix.netl.doe.gov/forum/t/vibrating-lower-boundary-how-to-implement/3979/4