computing total torque on a mesh

Submitted by drheine on Mon, 02/01/2016 - 23:59

I am trying to extract the total torque on a mesh that rotates about the x axis and I'm having trouble getting the syntax right (LIGGGHTS-3.3). As an example, defining the wall as:
fix mixer all wall/gran model hooke tangential history mesh n_meshes 2 meshes cad1 cad2 store_force yes

can I access the stored forces as shown below?
variable torque atom force_mixer*sqrt(y*y+z*z)

If I try to reduce the x component of the total torque using:
compute c2 all reduce sum v_torque[1]

I get an "Invalid thermo keyword in variable formula" error. Is there a better way to utilize the stored forces from wall/gran?

Best regards,
David

richti83's picture

richti83 | Tue, 02/02/2016 - 18:01

usually you access the 4th/5th/6th component of a fix mesh/surface/stress:

variable tqX equal f_cad1[4] #f_ indicates to access a fix with name cad1, [] says component N of the output vector of this fix
variable tqY equal f_cad1[5]
variable tqZ equal f_cad1[6]
variable t equal step*dt
fix csvfile all print 1 "$t,${tqX},${tqY},${tqZ}" screen yes file torque.csv

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

saeedga74 | Sun, 10/04/2020 - 15:30

Hi richit
I use the way you mentioned but My problem is the difference between the results. When I use the tangential history on I get very odd results the busy graph full of Jump between positive and Negative. But when I use no_tangential history I get more reasonable results but to remove the tangential overlap is not reasonable. So which one should I use and why the First one gets very odd results full of positive Negative jumps?
Thanks for help