[lammps-users] set angular velocity

Is it possible to set just one component of the angular velocity? The set command does not take NULL argument for omega, and there’s no angular velocity in atom style variables so far as I know.

Thanks,
Thomas Leps
Satcom Engr South Pole Station

You can access angular velocity via compute property/atom.

Dr. Kohlmeyer,

Thanks! I attempted using a compute to make an atom style variable and then load that into the set command, however I get the error:

Compute used in variable between runs is not current

I looked it up in variable.cpp and was unable to figure out why I was throwing this error. The relevant code looks like this:

compute ox all property/atom omegax
compute oy all property/atom omegay
variable wx atom c_ox
variable wy atom c_oy
set group all omega v_wx v_wy ${omegaa}

What am I doing wrong?

Thanks,

Thomas Leps

Dr. Kohlmeyer,

Thanks! I attempted using a compute to make an atom style variable and then load that into the set command, however I get the error:

Compute used in variable between runs is not current

I looked it up in variable.cpp and was unable to figure out why I was throwing this error. The relevant code looks like this:’

computes are not executed unless something “consumes” their values and since many of them use data that is collected during the force computation, this has to happen during a run.

compute ox all property/atom omegax
compute oy all property/atom omegay
variable wx atom c_ox
variable wy atom c_oy
set group all omega v_wx v_wy ${omegaa}

What am I doing wrong?

this snippet can be simplified and updated to the following:

compute omg all property/atom omegax omegay
variable wx atom c_omg[1]
variable wy atom c_omg[2]

fix trigger all print 1 “$(c_omg[1][1])”

run 0 post no

unfix trigger
set group all omega v_wx v_wy ${omegaa}