Hi, do you want all capsules to be the same? Then simply prescribe the PSD function stepwise, something like psdPts=[(5e-3,0),(5e-3,1)] should work, and by hand calculate the shaftRadiusRatio, e.g. (2,2) will make all capsules with cylinder radius 5mm and (2*5mm shaft + 2*5mm on either side) = 20mm long end-to-end. Let me know if this answers your question. All the best, Vaclav.
Thank you for your answer! Yes I want them to be the same, which I already managed to do. However I couldn't find an option inside the generator to specify the dimensions, but the way to do it in this case is via the ShaftRadiusRatio? Then how do you know that the radius is 5mm, is that because of the first number in the psdPts?
Also, is it possible to somehow check these dimensions, so writing out the dimensions of the generated particles after the simulation?
It would make sense for me to somehow be able to specify the whole particle somewhere (so shape, material, density, dimensions) and then generate numbers of those particles to fill the column. However these specifications are somehow included in the PsdCapsuleGenerator I think, but how does this work exactly?
For easy reference, I will show you the code I am currently running below. I was also looking at an option to let all particles settle before ending the simulation, because before it just stopped somewhere in the middle while still generating new particles. I put maxNum on 1000 for this purpose, but I would rather like to tell the code something like: wait some time after generating the particles to let them all settle and after that end the simulation. Would this be easily possible?
Thanks in advance for answering all my questions! See the code below:
import woo.core, woo.dem, woo.utils, math, woo.paraviewscript
from minieigen import *
# add bottom and cylinder walls
woo.core.PyRunner('ubf=woo.utils.unbalancedForce(S)\nprint(ubf)\nif ubf<.05 and S.step>1000: done(S)',400),
with open('capsules.txt','w') as out:
for p in S.dem.par:
if not isinstance(p.shape,woo.dem.Capsule): continue
out.write('%g %g %g %g %g %g\n'%(a,a,a,b,b,b))
vtk(S) # trigger manually writing Paraview data files
# write paraview script and run it