Hi all,
In my simulation, I have particles with diameter d=0.1, 0.2, 0.5 and 1.0mm in the calculation region. I can obtain the total mass of all particle using the command "mass(all)". Now I want to know how to obtain the total mass of particle with d=0.1mm? Could anyone please give me any clues? Thanks ahead.
Best,
Rachel
richti83 | Fri, 06/08/2018 - 08:13
put them in different groups
put them in different groups and use mass(your-groupname)
e.g:
group verysmall initialize
group small initialize
group middle initialize
group large initialize
...
fix pts1 verysmall particletemplate/sphere ${prime1} atom_type 1 density constant ${dens} radius constant ${r1}
fix pts2 small particletemplate/sphere ${prime2} atom_type 1 density constant ${dens} radius constant ${r2}
fix pts3 middle particletemplate/sphere ${prime3} atom_type 1 density constant ${dens} radius constant ${r3}
fix pts4 large particletemplate/sphere ${prime4} atom_type 1 density constant ${dens} radius constant ${r4}
..
variable m1 equal mass(verysmall)
variable m2 equal mass(small)
variable m3 equal mass(middle)
variable m4 equal mass(large)