read_restart & fix ave_spatial

I am doing a simulation with fluid in a channel with one oscillating wall. I am using fix ave spatial to average it.

I wanted to clarify how Lammps understands the time step during a read_restart and how the timestep should be used in fix ave_spatial command.

Initially if I am running a simulation upto 50,000 time steps. So if i want to run it for an additional 10,000 steps I would first use "read_restart" and then use "run 10,000". So as per my understanding the simulation would start from 50k th time step and is going to 60k(50k+10k) step. Since when I am writing the restart file agian using "restart.*.equil" thats what the time step that is mentioned.

Now when using "fix_ave spatial" should we define nfreq as 10k or 60k, I am a bit confused as to what exactly is the value of timestep being referred to for various functions in a simulation.

BR/Joseph

Fix ave/spatial knows nothing about the restart, nor does the
restart file store any info about that fix.

So from the persepctive of the fix ave/spatial command you
are running from step 50,000 to 60,000. Just as if you did this:

run 50000
fix ave/spatial ...
run 10000

You can also use the reset_timestep command after you
read the restart file if you wish to run from 0 to 10,000 (for example).

Steve

Thanxx..

But in one case that I ran I had the input file as

read_restart restart.1600000.equil
.
fix 5 flow ave/spatial 40000 2 80000 ....
.
run 80000

and it wrote an average file with time step as 1680000.

So the thing I am not certain is, should I write the Nfreq for fix ave spatial as 80000 or 1680000.

BR/Joseph

So the thing I am not certain is, should I write the Nfreq for fix ave spatial as 80000 or 1680000.

You want 80000 for your example. It doesn't matter what timestep the
simulation starts on. Fix ave/spatial will simply produce output
on steps that are a multiple of the specified N. N = 80000 will
work in your case.

Steve