a couple of questions

Submitted by msandli on Tue, 10/30/2012 - 19:33

2 questions:

1. Is there any way to change the moment of inertia for particles separate from changing the mass? I'd like to run granular simulations where the particles can't rotate as easily, but I don't want to give them an arbitrarily high mass (density). Does LIGGGHTS support this?

2. I'm sure I'm making a silly coding error, but I'm having trouble with the variable and/or fix_print commands. I'm trying to display the total mass I have in a simulation. I have one region and two particle types (groups). One type is the granwalls of my simulation, and the other type is the actual particles. I'm trying to display the mass of the mobile particles because I'm interested in the mass flow rate, and since they can only leave my simulation one way, I figure I don't need to come up with some complicated mass equation. My lines of code look thusly:

variable mass equal 1*mass(all)

fix data all print 1000 "$mass(all)"

running this gives me the "substitution for illegal variable" error in my output file. I've looked at the How-to file, but I can't really see what I'm missing, other than not defining a $t variable. Please tell me I'm making a simple syntax error.

Thanks for the help

richti83's picture

richti83 | Tue, 10/30/2012 - 20:03

The syntax is mass(groupID,regionID).
Lets call the mobile-particle-group 'mobile' and the measurement region 'mreg' than:

variable m equal mass(mobile,mreg) #not sure if a variable can be called mass because this should be a registered keyword for the mass function
fix data all print 1000 "${m}" # take care about the ${variableName} you mixed this up in your post !

should do it

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

msandli | Wed, 10/31/2012 - 15:34

That did it. Still new at linux syntax. Thanks a bunch!