# makeCloud question

Asked by ehsan benabbas on 2020-01-13

Hi everyone,

I am using Ubuntu 18.04, and Yade 2019-08-08.git-775ae74
I use the Triaxial code by Bruno Chareyre [1] to understand how it works.
For now,
I am reading [2] for makecloud function and have some questions

1- why the "rMean" is negative? as I know rMean is the mean value of particle radii it should be something like 0.2 mm

2- the way these variables are used in makecloud function is to just put them in order and separate them by " , " ? I mean it is not possible to define: porosity = 0.4 ? I tried it in this way and got an error.

3- in [1] we define the term "targetporosity" at the beginning of the code while it has never been used in the scripts. What if I want to say my initial model has a specific porosity.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

My goal is to define a packing with "20mm*20mm*20mm" dimensions, initial porosity of 0.4, 2e4 number of particles, minimum radius=0.1, and maximum radius=0.3

4- is the following ok if I change [1] in this way?
>> sp.makeCloud(mn,mx,rMean=0.2,rRelFuzz=0.5,periodic=False,num=num_spheres,porosity=targetPorosity,seed=1)

Thank you,
bests

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
2020-01-15
Last query:
2020-01-15
2020-01-15
 Jérôme Duriez (jduriez) said on 2020-01-14: #1

Hi,

1. rMean = -1 in your [2] is just a default value (search on the internet some reference stuff about Python functions).
Obviously radii will never be negative (even though I doubt there always are 0.2 mm), and this negative default value is to trigger some other determination of mean radius in the cloud when mean radius is not user-imposed (and then still equal to the default value)

2. I'm not sure I understand what you tried with porosity = 0.4 or the error you obtained.
Anyway, the best here again is to search on the internet some reference stuff about Python functions to increase your confidence using Python / Yade. For instance, obeying the order of attributes is not necessary if you adopt the "function(attribute = value)" syntax, as opposed to just "function(value)"

3. In your [1] targetPorosity is defined at [*] and used at [**] (a complete sample preparation requires to uncomment some stuff in your [1]). I thus disagree with your comment that it is never used.

4. As said many many times on this mailing list, and in the doc at your [2] makeCloud alone can not reach "solid-like" porosities of 0.4. It's only intended to make an initial "gas" (something like the clouds in the sky !) that should afterwards be compressed to make a solid particle.
See" Create random very loose packing [..] a gas-like state (see Cloud denomination) with no contacts between particles. Usually used as a first step for packing generation, before subsequent mechanical loading that will confer a solid-like nature to the packing." in your [2].

 ehsan benabbas (ehsanben) said on 2020-01-14: #2

About those rejected posts, I asekd questions and then realized I can merged them in one and that is why I tried to remove them. sorry if that bothered you and anybody else and thank you for letting me know. The only reason was that I could not find the remove or delete option because sometimes we want to delete our questions for any possible reason. Rejection was the only choice I found.

1- I want to define particles with radius between 0.1 mm and 0.3 mm. that is why in makecloud function I used like the following
sp.makeCloud(mn,mx,0.2,0.5,num_spheres,False, 0.95,seed=1)
which this line comes from [2]. I just realized 0.2 should be rMean and 0.5 should be RelFuzz which leads to partitcles' radius between 0.1mm and 0.3mm.

2- when I use it like "function(attribute = value)" I get error in this line and by "function( value)" it works so that's way I was wondering about the order of "values" .

3- Oh tahnk you. I searched it by ctrl+f but strangely couldn't find it.

4- This is my main question actually and my goal. If this command
sp.makeCloud(mn,mx,rMean=0.2,rRelFuzz=0.5,periodic=False,num=num_spheres,porosity=targetPorosity,seed=1)
is just a cloud, and liek an initial guess. then how should we get our target sample? I am using the reaching porosity section of [2] by the following line for define the packing
sp.makeCloud(mn,mx,0.2,0.5,num_spheres,False, 0.95,seed=1)
but It seems cannot be converged and it seems like to change the frictional angle to reach the porosity which is not ok. Still I am wondering how to define a packing with 30 degree for frictional angle, "20mm*20mm*20mm" dimensions, initial porosity of 0.4, 2e4 number of particles, minimum radius=0.1, and maximum radius=0.3 because this is the sample I want to study.

 Robert Caulk (rcaulk) said on 2020-01-15: #3

>> seems like to change the frictional angle to reach the porosity which is not ok

You will see in the code that it reduces the friction angle while reaching the specified porosity, then resets it to the desired friction value after [1].

 Jan Stránský (honzik) said on 2020-01-15: #4

Hello,

2)
> got an error.
> I get error

4)
> it seems like to change the frictional angle to reach the porosity which is not ok

why it is not OK?
I think it is a standard method. The material parameters for packing preparation are (can be) completely independent on actual simulation.

cheers
Jan

 ehsan benabbas (ehsanben) said on 2020-01-15: #5

Thanks Robert Caulk, that solved my question.