[lammps-users] wall movement and force calculation

New to Lammps and need some help. I am trying to set up an simulation with polymer melt confined between two flat walls (perpendicular to the z direction). Then I want to pull the upper wall at a constant velocity Vz and calculate the force needed. The script i used is something like:

fix 1 boundary setforce 0.0 0.0 0.0
velocity upper set 0 0 0.3 units box
velocity lower set 0 0 0 units box

Constant pull is achieved but the information of forces acting on the walls is lost since I set them to zero. Is there any way to retrieve the forces acting on the top wall before I set the force to zero since they should be calculated anyway by Lammps? Or is there any other way to move the wall ?

thanks a lot;


you can add a few lines to fix_set_force.cpp to dump the total force in a file before it is set to zero (or you can add your own post force fix doing both).


I think adding some code to fix_set_force.cpp is your best bet.
You could sum up the forces there and print out the result. Once
they are zeroed, it's too late for other LAMMPS options to print
them out.