Cosine pressure in lammps

Hello all,

I found that while reading literature:ultrasound could be added in the form of alternating pressure waves,p =pm*cos(2pft),may I ask how pressure is controlled in this way at lambps?
image
image

Thank you!!!

Did the authors of the quoted simulation use LAMMPS or some other MD code?

If they did use LAMMPS, does it say somewhere that they modified LAMMPS or how exactly they realized the cosine pressure wave?

Does it say for how long their simulations were carried out?

At 2.5MHz a single period of the ultrasonic wave would take 400 nanoseconds or 400 million timesteps at a timestep of 1fs. At such a slow rate, you can just break down your simulation in many parts gradually change the target pressure for each change. That is easily done in LAMMPS with an equal style variable and using the “every” option to the “run” command or with a loop.

Thank you very much, and I wish you a happy life!