Output using ave/spatial


Thanks for everyone who has helped me to get my simulation working. However, now my simulation is working, I wondered if anyone can tell me how to output the following data from LAMMPS, maybe something along the lines of this for velocity in the x-direction?

fix 4 flow ave/spatial 100 10 2000 y 0.0 1.0 vx ave running file vel.profile

Is there an equivalent statement for these quantities for a 2D Couette flow?:

solid volume fraction (-) versus y
velocity fluctuation (m/s) in the x direction versus y
local shear rate (1/s) versus y
pressure (Pa) normal to a moving wall versus x
shear stress (Pa) along a moving wall versus x

Kind regards,


These is a 2d Couette flow example script in examples/flow.

I suggest you add commands to compute each quantity

in your list, one at a time. Start with just instantanoues

values, then worry about time averaging and output the

ave. For quantities that have spatial dependence, you

will have to use per-atom values (e.g. per-atom stress/pressure)

and spatially average them via fix ave/chunk.