Skip to content

Number of cross-sectional grains #355

Answered by rquey
sajutabraham asked this question in Q&A
Discussion options

You must be logged in to vote

You can slice the tessellation and count the number of grains:

neper -T -n 1000 -transform "slice(0.5,0,0,1)" -stattess cellnb -o d
more d.sttess

To get an average value, you can script:

neper -T -n 1000 -o 3d

rm -f vals
for z in `seq 0.01 0.01 0.99`
do
  neper -T -loadtess 3d.tess -transform "slice($z,0,0,1)" -stattess cellnb -o 2d
  more 2d.sttess >> vals
done

awk '{sum+=$1} END {print "average = "sum/NR}' vals

This is just an example. You will generally need more cells, etc. to get relevant statistics.

Needs version 4.2.1-22 (small fix).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sajutabraham
Comment options

Answer selected by rquey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants