Sum of velocities for each brownian particle(2 dimension) for each timestep and for run time?

i have output values for velocities(vx, vy) for each atom in lammps calculation…
but I also want sum of velocities vx ( all particles) for each timestep and for total run time…

You can use compute reduce to get the sum and output it via fix print, or just compute the sum in post-processing from the individual velocities in your dump file.

1 Like

Thank you… i try it…

hello sir
i have this input script, vx are the output values of x components…then I want to calculated sum of vx, according to your instructions…but how I print its out put… fix print not give me output

compute xvel all property/atom vx
compute sumvx all reduce sum c_xvel

compute yvelocity all property/atom vy
compute sumvy all reduce sum c_yve
fix 5 all enforce2d
dump DUMP all custom 100 dump.lammpstrj id type x y z &
vx vy vz fx fy fz
dump dum1 all custom 500 dump_output.dat id type x y z &
vx vy vz fy
dump dum2 all custom 500 vxdump_output.dat c_xvel
dump dum4 all custom 500 vydump_output.dat c_yvel

There is an entire howto section discussing different forms of output and pointing to relevant parts of the manual. There also are plenty of examples using different kinds of output methods.

There is no fix print command here. If a command doesn’t work as expected, you either are not using it correctly (most likely) or there is a mismatch between the documentation and the behavior.
I the former case, you have to study and follow the documentation more carefully, in the second case, you need to provide a proper, minimal(!) input deck that documents the mismatch so it can be corrected (either the documentation or the code).

thank you… i have output with …
thermo_style custom step c_sumvx c_sumvy c_sumsqvx c_sumsqvy