How to generate mixed grains with large size differences? #503
-
Thanks for your great tools. @rquey , Could you explain or make a tutorial on how to generate mixed grains with large size difference.
The goal is to generate some small grains around a large grain in the center,but it always ends in failure.Please point out the error of my code and provide some suggestions. By the way , the coo2.txt is generated by python |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi , @rquey
By the way, I use python to generate the 5169 seeds. And the figure is: It's so ugly.😂 I want to know whether it have the way to control grain size more accurately. I want the grain in the middle to be larger.I have controlled it by mean diameq. But the result is so unbelievable. |
Beta Was this translation helpful? Give feedback.
-
By using
you are interpolating the grain size data between 0.09, 0.3 and 0.6, which is not what you want. (Plus, Neper expects equally spaced x values.) To specify two (or more) grain sizes, provide a bimodal (or multimodal) size distribution, as in
However, this gives you no control on the position of the large grain... Coming back to your experiments, the problem is that you are not assigning weights to the seeds. As you used a "rejection distance" from the central seed, you should set the seed weight to that distance. Actually, you can even start simpler and play only with the weights:
This works better, bit it will generally generate small cells on the ring of the big grain. This can be solved by setting a rejection area:
|
Beta Was this translation helpful? Give feedback.
By using
-morpho "diameq:custom(mydisturb.txt)"
withyou are interpolating the grain size data between 0.09, 0.3 and 0.6, which is not what you want. (Plus, Neper expects equally spaced x values.)
To specify two (or more) grain sizes, provide a bimodal (or multimodal) size distribution, as in
-morpho "diameq:1*dirac(0.6)+1000*lognormal(0.09,0.02)"
- when the grain sizes are very different from each other,-morphooptiini coo:packing
helps: