Counting the number of particles experiencing a force greater than 10N

Submitted by chrishewitt78 on
moritzhoefert

You could do that in a post-processing step. If you use dump custom and dump the force components as, say, 13th, 14th and 15th item into files called state* you can count the particles as follows:

cat state1000 | awk '/^ *[0-9]+ +[0-9]+/ {if($13*$13+$14*$14+$15*$15 > 100) print "something"}' | wc -l

Cheers,
Moritz

Fri, 15 Jun 2012 - 18:53 Permalink
chrishewitt78

In reply to by anonymous_stub (not verified)

Thanx for you suggestions, on balance I'd prefer to use paraview as this would allow me to make a good jugment of the threshold based on the visulisation, prior to post processing. Also really I want to plot the number of particle over a threshold vs time to ensure i've reached a steady state. Can I do this with the "treshold" filter in paraview?

Mon, 18 Jun 2012 - 16:51 Permalink
msbentley

In reply to by anonymous_stub (not verified)

Don't forget that you can use pizza.py not only for converting to VTK, but to manipulate the dump files afterwards - you can filter and extract all sorts of information, and then directly plot it etc. from within python using e.g. matplotlib.

Mon, 25 Jun 2012 - 15:18 Permalink

Hi I've created a simulation where a small fraction of the overall number of particle in the simulation experience a large force relative to the other particle in the simulation. Does anyone know if it is possible to get LIGGGHTS to count the number of particles experiencing a force greater than say fior example 10N? I guess this could be done using a logic statment but i'm not sure how to go about it.