How to add the time-dependent pair force

Dear everyone,

We are trying to modify the source code pair_sdpd_taitwater_isothermal.cpp to introduce the time-dependent pair force of the selected particle on the other.
We have added the time-independent force and it worked well.
In the next step, we would like to add the time-dependent force instead of the time-independent one. Unfortunately, there is no time parameter mentioned in the *.cpp file, therefore we do not know how to introduce the time-dependent pair force in the source code.
If possible, could you please show me how to resolve this problem? Which source code is related to?

Thank you very much in advance!

Is this related to this post? Time-dependent external force

If you want meaningful and competent advice, you need to provide more information about this.
Within the pairwise force computation there generally is no time dependence per se. So what is this time dependent force representing? What does “time” refer to and how is it determined and what does time == 0 represent?

The most common case of a time dependent simulation is where a per-type parameter is changed over time with fix adapt. This does not require a change of the pair style, unless the parameter in question is not yet available via Pair::extract(). The second case would be a per-atom parameter like charge, that becomes subject to a scaling factor.

Another common case of a time dependent force is using an external force via fix addforce or similar. This is the preferred option if the time dependent force has no connection to pairwise parameters. Here the time dependence is achieved by including the simulation time step number or accumulated simulation time into the variable expression that is used to define the force.

Yet another option is a force computed from an external program, that can be implemented via fix external and initializing the necessary callback function to copy the force.

In general, such operations are usually dependent on the time step count, which can be different from simulation time if the size of the time step varies.