The image you show has a cylinder with a pin and a link connecting to a plate. I assume the cylinder is what has the RPM setting, that the pin is eccentric from the rotation axis and that the gray plate is what will be set into a tranvserse vibration. Is that right?

If you are interested in simulating the nut loosening, and not the mechanism that causes the transverse vibration, delete the link, eccentric pin and rotating cylinder. Apply the intended motion directly to the end face of the top plate of the bolted connection.

RPM = revolutions per minute but the simulation uses seconds, so you will divide by 60. You just deleted the rotating shaft, but the relevant information was the radial dimension of the center of the pin to the rotation axis. That number is the amplitude of the vibration, A.

You need to define the boundary condition of the end face. Let's assume the face has a normal along the X axis. Apply a Displacement boundary condition to that face that has the form x = A*sin(wt) where w is calculated from the RPM and t is time in seconds.

Let's take the example of 1200 RPM = 20 revolutions/second.

You have to know if the sin() funtion takes input in degrees or radians. If the sin() function takes input in degrees, there are 360 degrees/revolution so that means w = 7200. If the sin() funtion takes input in radians, there are 2pi radians/revolution so that means w = 40pi.

This is a transient dynamics problem. Your choices are Transient Structural, Explicit Dynamics or LS-Dyna. Do you have access to all these? Use either Explicit Dynamics or LS-Dyna. When you choose one, look up if the sin() function takes input in degrees or radians.

In Explicit Dynamics, frictional contact is automatically created between all bodies.