Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-06-02 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Open => Solved

VG confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-06-02 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

VG posted a new comment:
Sure, Thanks Bruno. I have posted a new question for this packing related issue:
https://answers.launchpad.net/yade/+question/294792

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-06-02 Thread Bruno Chareyre
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Bruno Chareyre posted a new comment:
Please, one question at a time. If this one is answered mark it closed.
If you have other questions open them as new questions.
Bruno

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-06-01 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

VG posted a new comment:
Thanks a lot, Jan!

A combination of unloading the sample in compress.py and the use of
following in main simulation gets the desired packing and initial
conditions:

for b in O.bodies:
  if not isinstance(b.shape,Sphere):
continue
  b.dynamic = False

O.step()


for i in O.interactions:
i.phys.unp = i.geom.penetrationDepth

for b in O.bodies:
  if not isinstance(b.shape,Sphere):
continue
  b.dynamic = True

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-29 Thread Jan Stránský
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Varun,
as I mentioned before, I am not really familiar with CohFrictMat, but you
may check [1,2], it should be what you need
cheers
Jan

[1] https://answers.launchpad.net/yade/+question/257058
[2] https://answers.launchpad.net/yade/+question/266828


2016-05-30 0:42 GMT+02:00 VG :

> Question #293955 on Yade changed:
> https://answers.launchpad.net/yade/+question/293955
>
> Status: Answered => Open
>
> VG is still having a problem:
> Thanks a lot Jan, that did the trick!
>
> I am facing another challenge with the dense packing generated this way.
> When I use this packing in the main simulation, lot of cohesive bonds
> break even before I apply the actual loading. This is mostly because the
> initial packing has overlaps and is not stress-free. Now, I can think of
> two possible solutions to this:
>
> 1. The solution proposed by Luc Scholtest in #6 at
> https://answers.dogfood.paddev.net/yade/+question/164575 , i.e changing
> the interaction law such that the initial overlapping is utilized as
> equilibrium distance to compute the normal force Fn=k*(D-Deq). I tried
> to look into Yade documentation but I couldn't find much on this and how
> I can go about doing this.
>
> 2. In compress.py, after compressing the sample by
> compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-7
> O.run(5,True)
> compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5
> O.run(3,True)
>
> May be uncompress the sample by
> compressor.goal1 = compressor.goal2 = compressor.goal3 = 1e-5
> O.run(5, True)
>
>
> The second solution above would again make the packing loose, defeating
> the purpose. So really, if there is a possibility of somehow using the
> first solution above. Or if anyone can please provide some other suggestion
> ?
>
> Thanks
> Varun
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-29 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Answered => Open

VG is still having a problem:
Thanks a lot Jan, that did the trick!

I am facing another challenge with the dense packing generated this way.
When I use this packing in the main simulation, lot of cohesive bonds
break even before I apply the actual loading. This is mostly because the
initial packing has overlaps and is not stress-free. Now, I can think of
two possible solutions to this:

1. The solution proposed by Luc Scholtest in #6 at
https://answers.dogfood.paddev.net/yade/+question/164575 , i.e changing
the interaction law such that the initial overlapping is utilized as
equilibrium distance to compute the normal force Fn=k*(D-Deq). I tried
to look into Yade documentation but I couldn't find much on this and how
I can go about doing this.

2. In compress.py, after compressing the sample by 
compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-7
O.run(5,True)
compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5
O.run(3,True)

May be uncompress the sample by 
compressor.goal1 = compressor.goal2 = compressor.goal3 = 1e-5
O.run(5, True)


The second solution above would again make the packing loose, defeating the 
purpose. So really, if there is a possibility of somehow using the first 
solution above. Or if anyone can please provide some other suggestion ?

Thanks
Varun

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-27 Thread Jan Stránský
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Jan Stránský proposed the following answer:
Hi Varun,


> For translation, I was trying to use
>
> for s in sp:
>   s.state.pos[0] = s.state.pos[0] - 1.9603017657
>   s.state.pos[1] = s.state.pos[1] - 1.04086
>   s.state.pos[2] = s.state.pos[2] - 2.01932
>
> which doesn't work.
>

You have to assign all pos at once:
##
b = sphere((1,2,3),1)
b.state.pos[0] = 10 # does not work
b.state.pos = (10,2,3) # works ok
b.state.pos = b.state.pos - (1.96,1.04,2.02) # also works ok
##


>
> Then, I noticed from the Yade user manual that there is a function
> translate((Vector3)arg2) which translate all spheres by given vector. I
> tried using it as:
> sp.translate(-1.96030,-1.04086,-2.01932)
>
> but this gives me the error: AttributeError: 'list' object has no
> attribute 'translate'. Mostly, I am using it wrong. Could you please
> point me to the correct usage ?
>
>
for this, you need SpherePack instance, not just list of particles (as the
error says). But the first approach works ok, so no need to use this
function

cheers
Jan

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-26 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

VG posted a new comment:
Thanks Jan!

So after using TriaxialStressController in compress.py, I get the position of 
the walls by using O.bodies[].state.pos.
This gives me the dimension and location of the granular sample. 
For example, starting from an initial dimension of (15,15,15), I get to the 
following locations for the walls:
0 -> Vector3(1.9603017656924078,7.5,7.5)
1 -> Vector3(13.213873202175382,7.5,7.5)
2 -> Vector3(7.5,1.0408600478483976,7.5)
3 -> Vector3(7.5,12.620020625453774,7.5)
4 -> Vector3(7.5,7.5,2.0193261962347355)
5 -> Vector3(7.5,7.5,13.575093096100462)

Now, I am trying to use this information in simulation.py to define the
size of the periodic cell and also to translate the granular sample so
that it lies perfectly within the periodic cell.

For translation, I was trying to use

for s in sp:
  s.state.pos[0] = s.state.pos[0] - 1.9603017657
  s.state.pos[1] = s.state.pos[1] - 1.04086
  s.state.pos[2] = s.state.pos[2] - 2.01932

which doesn't work.

Then, I noticed from the Yade user manual that there is a function 
translate((Vector3)arg2) which translate all spheres by given vector. I tried 
using it as:
sp.translate(-1.96030,-1.04086,-2.01932)

but this gives me the error: AttributeError: 'list' object has no
attribute 'translate'. Mostly, I am using it wrong. Could you please
point me to the correct usage ?

Thanks
Varun

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-25 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

VG posted a new comment:
Hello Jan,

I have a follow-up question: I modified the compress.py script a little
bit to generate a periodic packing. Now, how do I use this compressed
packing in my main periodic simulation (MWE posted in #1 above) ? The
specific problems are:

1. How to get the size of periodic cell for main simulation, since the
compressed sample is going to be of smaller dimensions.

2. How to fit the sample exactly in the periodic cell of main
simulation, since the locations are going to be different ?

3. I want periodicity in x and z directions, but I am using top and
bottom boxes in the vertical direction to restrict periodicity in y
direction. I need to place these plates such that they precisely fit the
periodic cell in x & z direction, and contain the granular sample in
y-direction. Now, if I get the solution to above two, that should be
doable.


Just in case, here is the modified script of compress.py:

##
# Compress the loose packing into dense packing. Each agglomerate is
# considered as clump in this stage
##
from yade import export,ymport
import random
random.seed(1)

O.periodic = True

# add walls first
dim = (15,15,15)
#walls = aabbWalls(((0,0,0),(dim)))
#wallIds = O.bodies.append(walls)

# load spheres from file, including information of their agglomerates
ids

sp = ymport.textExt('./cloud.txt')

for s in sp: O.bodies.append(s)

O.cell.setBox(dim)


O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],
allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
PeriIsoCompressor(
charLen = 2.,
stresses=[-100e5,-1e4],
maxUnbalanced=1e-2,
doneHook= 'O.pause();',
globalUpdateInt=5,keepProportions=True),
NewtonIntegrator(damping=.6),
]
O.dt = PWaveTimeStep()

# compress the sample

O.run()
O.wait()


# save the result
export.textExt('./compressed.txt')

try:
from yade import qt
qt.View()
except:
pass



Thanks
Varun

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-24 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

VG posted a new comment:
That's awesomeThanks Jan!

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-24 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Answered => Open

VG is still having a problem:
>yes, with dense pack you would have this problem by default.. You have to
> use some other trick :-) As there has been a couple of questions on this
> topic, I will prepare an example script on this.. will inform you.

Thanks Jan, I will be looking forward to this solution.

Regards
Varun

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-24 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Answered => Open

VG is still having a problem:
Hi Jan,

Thanks a lot for your response.

I will study this more and try to figure out how I can set up my
simulation this way. Are there any example scripts which I can look at,
that use this kind of arrangement - i.e. generate the sample in one
simulation and then use that to run the main simulation.

If I understand this procedure correctly, then there might be a problem 
described as follows:
 if I generate a dense packing using this procedure, aggregates will be closely 
packed and the particles from different aggregates will come in contact. Then, 
the automated way of setting cohesive bonds will lead to cohesive bonds between 
particles of two different aggregates as well. 

In my current setting (in MWE), the aggregates are initially far enough
that there is no cohesive bond formation between particles of different
aggregates when I run it for one step. After running it for one step,
then the aggregates come close together due to application of loading
but no new cohesive bond formation takes place. So I am essentially able
to achieve the setting I want, except that the overall packing is not
dense.

Now, is there a possibility of doing something like:

1. Do the steps I am doing right now in MWE, run it for one step to
establish the desired cohesive bonds. Set the cohesive bond strength
very high initially, so that the cohesive bonds don't break when I run
the PeriIsoCompressor engine in next step.

2. Run the PeriIsoCompressor engine upto the desired stress levels to
obtain dense packing. It will lead to some reduced dimension of the
periodic cell- I am not sure how to get those dimensions.

3. Somehow disable the PeriIsoCompressor engine. Add top and bottom
plates to the scene based on the dimensions of the periodic cell. Reset
the value of the cohesive bond strength to the original and more
realistic value, like how it is being done in the current MWE script.

4. Then run the simulation in a regular way.


I am not sure if these above steps are feasible. Also, due to my limited 
understanding of how the flow of engines work, I don't know exactly how to set 
up this procedure.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-24 Thread Jan Stránský
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Varun,

first, I vote for Jerome's suggestion to make each step independently,
saving/loading intermediate steps.

to compress the sample, one option is to use slightly modified code from
randomDensePack [1], which uses PeriIsoCompressor internally. Something
like:
#
O.periodic=True
O.materials.append(FrictMat(young=30e9,frictionAngle=.5,poisson=.3,density=1e3))
loadParticlesFromPreviousStep() # some function to create / load already
created particles using makeCloud and pack.inSphere approach
x1,y1,z1 = somehowComputedDimensions() # dimensions of all sample,
sufficiently enlarged
O.cell.setBox((x1,y1,z1))
O.engines=[
  ForceResetter(),
  InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),
  InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
  ),

PeriIsoCompressor(charLen=2*radius,stresses=[-100e9,-1e8],maxUnbalanced=1e-2,doneHook='O.pause();',globalUpdateInt=5,keepProportions=True),
  NewtonIntegrator(damping=.6)
]
O.dt=utils.PWaveTimeStep()
O.run(); O.wait()
saveTheResults()
#

In the compression phase, as it is just sample preparation, I think making
each aggregate a clump is good approach (in actual simulation, you use
elastic bonds instead). But actually it does not matter, it should work in
both ways, clumps or not.

So with this approach, you can compress your loose packing created by
makeCloud. For actual simulation, there are two options:
- use the resulting dimensions (which are not known apriori, but with the
same input data should not differ too much so you can set the inputs to gat
approximatelly what you want)
- make slightly larger initial packing and then crop it for your simulation

HTH
Jan

[1] https://github.com/yade/trunk/blob/master/py/pack/pack.py#L382


2016-05-21 2:16 GMT+02:00 VG :

> Question #293955 on Yade changed:
> https://answers.launchpad.net/yade/+question/293955
>
> Status: Answered => Open
>
> VG is still having a problem:
> Hello Jerome,
>
> Thanks for your response.
>
> By using the above MWE script, I am able to create the cohesive bonds
> the way I want which also required some tweaks.
>
> Now, the problem is that the final packing I get is not as dense or
> mechanically stable as I would prefer.
>
> So, its only the third step in my above post: "3) apply some compression
> to make the packing of aggregates denser", that I am not sure how to
> pursue.
>
> Also, once the granular sample is compressed, I would probably have to
> change the location and dimension of the plates I am using to apply
> loading to the sample. Is there a way to do that  ?
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-20 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Answered => Open

VG is still having a problem:
Hello Jerome,

Thanks for your response.

By using the above MWE script, I am able to create the cohesive bonds
the way I want which also required some tweaks.

Now, the problem is that the final packing I get is not as dense or
mechanically stable as I would prefer.

So, its only the third step in my above post: "3) apply some compression
to make the packing of aggregates denser", that I am not sure how to
pursue.

Also, once the granular sample is compressed, I would probably have to
change the location and dimension of the plates I am using to apply
loading to the sample. Is there a way to do that  ?

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-20 Thread Jérôme Duriez
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Open => Answered

Jérôme Duriez proposed the following answer:
Then, if the use of "setCohesionNow = True" is not convenient for you, I
would suggest you define by hand the cohesive bonds you would like (or
cancel the cohesive feature of interactions between different
aggregates) modifying yourself "cohesionBroken" and other attributes.

For this purpose you may search for "setCohesionNow" in
https://github.com/yade/trunk/blob/48fcf94a46f449dfb1ecda36f69eb8397d08d29d/pkg/dem/CohesiveFrictionalContactLaw.cpp
to be sure what are all the operations involved to define consistently a
cohesive bond

And then perform yourself the trick from python interface.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-20 Thread VG
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Answered => Open

VG is still having a problem:
Hi Jerome,


In my simulation, I am not using clumps because clump would have rigid 
aggregate of individual particles. Instead, the aggregates I am using in the 
simulation are essentially individual particles glued with cohesive bonds and 
the bonds can break depending on the load.

In my understanding, the .spheres file exported after first simulation 
"generationProcedure.py would have information about all the sub-particles of 
the packing. So what I meant was that in "mainSimulation.py", if I try to 
assign cohesive bond using setCohesionNow = True, then sub-particles from 
different aggregates would also end up getting connected through cohesive bonds.
However, I want that distinction between different aggregates such that I could 
have a dense packing of the aggregates but have cohesive bonds between 
particles lying within an aggregate only.

Just to summarize, I think the initial set up of my problem should
probably have the following three steps:

 1) use makeCloud to create aggregates
 2) use randomDensePack to divide each aggregate into a set of spherical 
particles (all connected by cohesive bonds)
 3) apply some compression to make the packing of aggregates denser

I already have the first two steps, but I am not sure how to incorporate
step 3 in my simulation.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-20 Thread Jérôme Duriez
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Open => Answered

Jérôme Duriez proposed the following answer:
I'm not really familiar to clumps, but the problem you've just described
(in #2) does not sound to me as related with the issue of playing with
export / ymport text files.

>From a general point of view, you should be able to tailor precisely
your interaction network in any case, using e.g. https://yade-
dem.org/doc/user.html#individual-interactions-on-demand if necessary
(see also the paragraph just above)

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-20 Thread Jérôme Duriez
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955

Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi,

As for myself, I most often separate the generation procedure (involving
indeed makeCloud and compaction procedure) from the main simulation
itself, using text files describing the packing and export.text and
ymport.text functions:

- at the end of a first simulation "generationProcedure.py", I save my packing 
in a ".spheres" files using export.text
- then, the main simulation is done in a second simulation "mainSimulation.py" 
that imports (using ymport.text) this .spheres file

It seems you have similar functions for clumps:
https://yade-dem.org/doc/yade.export.html#yade.export.textClumps
https://yade-dem.org/doc/yade.ymport.html#yade.ymport.textClumps
so, hopefully, it could give you some ideas.

Jerome

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #293955]: How to generate dense packing of aggregates

2016-05-19 Thread VG
New question #293955 on Yade:
https://answers.launchpad.net/yade/+question/293955

Hello everyone,
I am generating a pack of spheres (lets call them aggregates), using makeCloud. 
Each of those spheres consists of a packing of smaller particles glued together 
using cohesive material model. I am using randomDensePack to generate this 
packing of particles within each sphere.

Now, how can I get an overall dense and mechanically stable packing of this 
system ? Going through some previous questions, I understand that I might have 
to use some type of compaction or triaxial controller, but I am not sure how it 
will fit in the overall flow of my simulation. Here is my minimal working 
example script:

 
from yade import pack

#
# Set up run
#
run_name="PeriodicCohesive_MWE"
data_root_dir="."


#
# Materials
#
plate_material=FrictMat(
young=200e9
   ,poisson=0.3
   ,density=8000
   ,frictionAngle=radians(30)
   ,label='plate_mat')
O.materials.append(plate_material)


sample_material=CohFrictMat(
young=4e9
   ,poisson=0.25
   ,density=1400
   ,frictionAngle=radians(30)
   ,normalCohesion=1e8*1.2*1e10
   ,shearCohesion=.4e8*1.2*1e10
   ,momentRotationLaw=True
   ,label='sample_mat')
O.materials.append(sample_material)



#
# Component dimensions and operating condition
#
# Coal dimension
sample_diameter=0.825e-3
sample_radius=sample_diameter/2.0
# Sub-particle dimension
particle_diameter=200.e-6
particle_radius=particle_diameter/2.

# 
# grinding plate dimension
#

rotvel=2./3.*pi*(1.5+0.5)*.254


#
# Periodic Geometry
#


# Set up periodic boundary conditions
O.periodic=True
xExt=7*sample_diameter
yExt=5.*sample_diameter*2 #to block the periodicity in y direction
zExt=xExt
xLim=xExt
yLim=yExt/4
zLim=zExt
O.cell.hSize=Matrix3(
  xExt, 0, 0,
  0, yExt, 0,
  0, 0, zExt)


length=xExt
height=yExt
width=zExt

# Top and bottom plate thickness
thickness=0.1*height



#
# Bottom
#

bottomBoxes = []
for ix in (0,1,2):
 for iz in (0,1,2):
   bottomBoxes.append(box( # create 3x3 boxes with 1/3 cell size
   center=(xExt/6.*(1+2*ix),yLim - thickness/2.0,zExt/6.*(1+2*iz))
   ,extents=(xExt/6.,thickness/2.0,zExt/6.)
   ,wire=False
   ,material='plate_mat'
   ))

bottom_id,bottom_ids = O.bodies.appendClumped(bottomBoxes) # bottom_id is the 
clump id,


O.bodies[bottom_id].state.blockedDOFs='xyzXYZ'


#
# Particle Packing
#

min_corner= (0,yLim,0)
max_corner= (xLim, yExt-yLim, zLim)

sp=pack.SpherePack()
sp.makeCloud( min_corner,max_corner, psdSizes = 
[500e-6,600e-6,700e-6,800e-6,1000e-6,1200e-6,1400e-6,], 
psdCumm=[0.0977,0.1,0.12,0.18,0.39,0.68,1.0], periodic=False, seed =1)

print "Generated ",len(sp)," aggregates"

###
# Sample
###
for s in sp:
  sphere=pack.inSphere((s[0][0],s[0][1],s[0][2]),s[1])
  sp1=pack.randomDensePack(
  sphere
 ,spheresInCell=5000
 ,radius=particle_radius
 ,memoizeDb='/tmp/bigParticlesCache.sqlite'
 ,returnSpherePack=True
 )

  sp1.toSimulation(material='sample_mat',color=(0.9,0.8,0.6))
  print 'Generated ',len(sp1),' particles'

Gl1_Sphere(stripes=True)


#
 # Top
#
topBoxes = []
for ix in (0,1,2):
 for iz in (0,1,2):
   topBoxes.append(box( # create 3x3 boxes with 1/3 cell size
   center=(xExt/6.*(1+2*ix),yExt - yLim + thickness/2.0,zExt/6.*(1+2*iz))
   ,extents=(xExt/6.,thickness/2.0,zExt/6.)
   ,wire=False
   ,material='plate_mat'
   ))

top_id,top_ids = O.bodies.appendClumped(topBoxes) # top_id is the clump id,


O.bodies[top_id].state.blockedDOFs='xzXYZ'



one_ball_downforce= -15.0 # kg total

O.forces.addF(top_id,(0,one_ball_downforce,0),permanent=True)


#
# Run the simulation
#
r_int = 1.1 # interaction radius

itercheck=1
iterwrite=1
iterforceCheck = 10
iterStart=0 
tStart=0.


O.dt=0.5*PWaveTimeStep()

O.engines=[
  ForceResetter(),
  InsertionSortCollider([