Dense pack Irregular Shape

Asked by Luis Barbosa on 2020-11-05

Hi all,

I am creating real soil aggregate shapes filled with spherical particles and using a cohesive law to form this aggregate.

For this I am using:

import gts
from yade import pack
surf=gts.read(open('agg.gts'))
pred=pack.inGtsSurface(surf)
spheres=pack.randomDensePack(pred,radius=0.003)
O.bodies.append(spheres)

The point is: in order to get a random particle orientation and a dense pack (with particles overlaping) I am using RandomDensePack.
However, the aggregate I get as a result has no overlatping particles at all.

Do you know what could be the problem?

Kind regards,
Luis

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2020-11-10
Last reply:
2020-11-26

This question was reopened

Luis Barbosa (luis-pires-b) said : #1

Just more information:

when using the code:

ag=O.bodies.append(pack.randomDensePack(pred, radius=0.003, returnSpherePack=True))

I got the message:

no registered converter was able to produce a c++ rvalue of type boost::shared_ptr<yade::Body>from this Python object of type tuple

It seems a boost problem, despite creating a pack, RandomDensePack does not apply the triax compression. (I guess).

Versions I am running:
Yadedaily 20201104-4350 bionic1
Python 3.6.9

Jan Stránský (honzik) said : #2

Hello,

> in order to get a random particle orientation and a dense pack (with particles overlaping) I am using RandomDensePack.
> However, the aggregate I get as a result has no overlatping particles at all.

I consider randomDensePack as a tool for creating NON-overlaping particles, although there are some settings leading to overlaps.

So the problem is either misuse or wrong parameters.

Concerning the second error, pack.randomDensePack(...., returnSpherePack=True) returns (as the parameter name suggests) SpherePack instance.
O.bodies.append expects a list of bodies, not SpherePack
Try:
sp = pack.randomDensePack(...., returnSpherePack=True)
O.bodies.append([sphere(c,r) for c,r in sp])
or
sp.toSimulation()

If it does not work, please provide MWE and complete error message

cheers
Jan

Luis Barbosa (luis-pires-b) said : #3

Thank you Jan,

I was able to create the pack using:

sp = pack.randomDensePack(...., returnSpherePack=True)
sp.toSimulation()

However, the particles inside the pack are not even touching each other.

Before an actualiyzation of YADE (Change from Python2 to 3), I was using the same script to creat dense pack with overlaping particles. Much different from what I am getting now using the same parameters though.

Here E you have the link to the GTS surface:
https://drive.google.com/file/d/1w_r_q438jZAqzgL5DaQEprZr9Mroazq6/view?usp=sharing

Here you have the MWE:

from yade import plot
import gts,yade.pack
######################################Material#################################################
O.materials.append(JCFpmMat(type=1,young=70e4,poisson=0.3,frictionAngle=radians(30),density=0.0025,tensileStrength=194,cohesion=194,jointNormalStiffness=0,jointShearStiffness=0,jointCohesion=194,jointFrictionAngle=radians(30),jointDilationAngle=0.0,label='spheres'))
######################################Selector#################################################

surf=gts.read(open('agg18.gts'))
pred=pack.inGtsSurface(surf)
sp=pack.randomDensePack(pred,radius=0.025,returnSpherePack=True)#memoizeDb='/tmp/gts-triax-packings.sqlite'spheresInCell=200,
#O.bodies.append(sp)
sp.toSimulation()

O.bodies.append(pack.gtsSurface2Facets(surf,wire=True))

######################################Engine#################################################
O.engines=[
  ForceResetter(),

 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
  [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
  [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True)]
 ),

# TranslationEngine(ids=p2,translationAxis=[0,0,-1],velocity=0.03),
  GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=500,timestepSafetyCoefficient=0.5),
  NewtonIntegrator(damping=0.1,gravity=[0,0,-981]),#cm/s2
]

######################################Exporting#################################################

from yade import qt
qt.View()
qt.Controller()
#export.text("agg18.txt")

#exit()

Jan Stránský (honzik) said : #4

The difference in results is for:
- python 2 -> 3 of your scripts?
- python 2 -> 3 Yade compilation?
- same or different Yade versions?

thanks
Jan

Luis Barbosa (luis-pires-b) said : #5

- python 2 -> 3 of your scripts?
I did not change my script. It seems to work fine in python2 and 3.

- python 2 -> 3 Yade compilation?
Yes. After atualization of Yade compilation.

- same or different Yade versions?
Before I was using Yade version (2018.02b).
Then I actualized to Yadedaily 20201104-4350 5ef06bf

Luis Barbosa (luis-pires-b) said : #6

Hi guys,

Just by curiosity I uninstalled yade daily and instaled yade 2018.02b.
And now the compaction promoted by the Aperiodic RandonDensePack is evidente.

There is something wrong or in Yadedaily 20201104-4350 5ef06bf or Yade version (2018.02b) when using this function.

Cheers,
Luis

Jan Stránský (honzik) said : #7

Hi Luis,
please collect information from several questions here and open an issue on gitlab [1]
cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/issues

Launchpad Janitor (janitor) said : #8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.