← Back to team overview

yade-users team mailing list archive

Re: [Question #685375]: Converting polyhedron body to Potential Particle or Potential Block

 

Question #685375 on Yade changed:
https://answers.launchpad.net/yade/+question/685375

    Status: Open => Answered

Vasileios Angelidakis proposed the following answer:
Hi Ali,

Nice arch :) 
This thread is getting too lengthy, so I would advise to open a new question if you need to ask something else.

> the input parameters such as sampleX, how are they used?

See [1,2].
The PotentialBlockVTKRecorder does not record the actual polyhedral particle shape. What it records is a rounded version of the particle, close to the shape of the inner PP, which is used to calculate the contact normal. To do that, the PotentialBlockVTKRecorder considers a cubic drawing space, deriving its dimensions from the attributes: PotentialBlock.minAabb, PotentialBlock.maxAabb (it considers the maximum absolute x,y,z values). This cubic space is discretized into a grid, using the sampleX, sampleY, sampleZ parameters (i.e. the size of the grid.). Large sampleX,Y,Z values will give you better detail, but will make the output larger and slower to write.

So, what you can do is assign the values below, right after defining each particle shape:
bbb.shape.minAabb=Vector3(bbb.shape.R, bbb.shape.R, bbb.shape.R)
bbb.shape.maxAabb=Vector3(bbb.shape.R, bbb.shape.R, bbb.shape.R)

Having in mind how these values are used now, you can increase/decrease them per direction until you get a decent visualisation.
Also make sure to create a "vtk" folder, as I see you don't create one at the moment in your script.

In general, the PotentialBlockVTKRecorder can be slow if very detailed
visualisation is requested, but it is very helpful to assess visually
how rounded the inner Potential Particle is (the one used to calculate
the contact normals) and if the chosen "r" radius is appropriate in
relation to the dimensions of each particle.

* A different question: Have you reduced the r values from the d arrays,
i.e. d[i]=d[i]-r? If not, your particles will be oversized by r, in
every dimension. In case you have done this manually, I would advise to
do this in the working script, so in case you decide to change "r", the
"d" values are updated too.


> "analytic centre did not converge"

This can happen for a number of reasons. The most probable:
1. The chosen radius "r" is too small
2. The particles are exactly touching, without practically any initial overlap (which is the case here).
This warning is not the end of the world, since you will see it happens for a few timesteps, when the particles do not have enough overlap for the analytic centre (i.e. the contact point) to be calculated, but then the code starts to converge.

To solve 2, there is a trick/workaround you can do: You can increase the
size of the particles by a very very small value, which will then be
deducted from the penetrationDepth in the contactlaw [3], to achieve the
actual contact conditions.

To do this, set these variables:
initialOverlap=1e-8                                 # a very small distance in comparison with the dimensions of the problem  
chosenR=0.0001+initialOverlap           # particles are enlarged by initialOVerlap 

and then inside the contact law, use: 
initialOverlapDistance=initialOverlap # the contact law assumes a negative (tensile) gap equal to initialOverlap

These two practically cancel each other out, while contact is
established from a geometrical perspective.

> and I need more information about input parameters for BP contact law
and also about PotentialBlockVTKRecorder.

Please be more specific if you don't want me to start explaining the
code line by line :) A good read of the documentation and the source
code will help on this.

Best of luck,
Vasileios

[1] https://yade-dem.org/doc/potentialparticles.html#axis-aligned-bounding-box
[2] https://gitlab.com/yade-dev/trunk/blob/master/pkg/common/Gl1_PotentialBlock.cpp#L1052
[3] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/KnKsPBLaw.cpp#L204

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.