Compute forces on a moving mesh

Submitted by Benoit56 on Mon, 02/09/2026 - 15:38

Hi everyone,
I'm trying to adapt the example case "examples\LIGGGHTS\Tutorials_public\movingMeshGran" so that it could compute the forces and momentum on the bucket moved on the particules.

I tried :

compute force_on_particles all reduce sum fx fy fz
fix 20 all ave/time 100 1 100 c_force_on_particles[1] c_force_on_particles[2] c_force_on_particles[3] file force_particles.txt

but I guess the force are not particulary applied on the bucket

Then I tried to write the STL file during its motion and read it to calculate forces on it, but I only got null force :


#moving mesh
fix movecad1 all move/mesh mesh cad1 linear -0.5 0.0 0.0
variable current_step equal step
dump dumpstlDYNAMIC all mesh/stl 1000 meshes/mesh_${current_step}.stl movecad1
fix messflaeche all mesh/surface/stress file meshes/mesh_${current_step}.stl type 1 scale 1000.0 stress on
variable time equal step*dt
variable fx equal f_messflaeche[1]
variable fy equal f_messflaeche[2]
variable fz equal f_messflaeche[3]
variable Mx equal f_messflaeche[4]
variable My equal f_messflaeche[5]
variable Mz equal f_messflaeche[6]
fix forceslog all print 1000 "${time},${fx},${fy},${fz},${Mx},${My},${Mz}" file post/forces.csv title "t,Fx,Fy,Fz,Mx,My,Mz" screen yes

Could anyone help ?