Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating a packing with few particles #8

Open
hhucyl opened this issue Oct 9, 2018 · 5 comments
Open

Generating a packing with few particles #8

hhucyl opened this issue Oct 9, 2018 · 5 comments

Comments

@hhucyl
Copy link

hhucyl commented Oct 9, 2018

Hi, I have been using your code to generate a random packing with very few particles (50~100). I have tried this generation.conf
Particles count: 100
Packing size: 10. 10. 10.
generation start: 1
boundaries mode: 1
contraction rate: 1e-4
The particles are overlapped with each other. Could please tell how to fix it? Or, is it possible to use your code to generate a random packing with very few particles?

@VasiliBaranov
Copy link
Owner

VasiliBaranov commented Oct 9, 2018

Hi,

one possible reason is that due to historical reasons the final particle diameters saved in the packing.xyzd file are equal to the initial particle diameters (specified in the user-provided packing.xyzd or diameters.txt files) and you have to rescale the diameters linearly to get the "real" final particle diameters. Please see this section for more details and sample code. Hope rescaled particles will have no intersections.

Best,
Vasili

@hhucyl
Copy link
Author

hhucyl commented Oct 10, 2018

Hi,
Thanks for your quick reply. I did forget to rescale it, however when I use this generation.conf
Particles count: 80
Packing size: 5. 5. 5.
Generation start: 1
Seed: 341
Steps to write: 1000
Boundaries mode: 1
Contraction rate: 1.5e-004

  1. boundaries mode: 1 - bulk; 2 - ellipse (inscribed in XYZ box, Z is length of an ellipse); 3 - rectangle
  2. generationMode = 1 (Poisson, R) or 2 (Poisson in cells, S)
    The results still overlap with each other. And it comes wit this results in the terminal:
    Checking...
    Calc. porosity is 0.313706
    Theoretical porosity is 0.664897
    Checking min particle distance in a naive way...
    Finish:
    Calc. porosity is 0.313705899228934
    Theoretical porosity is 0.664897
    Inner diameter ratio is 1.26992251534201
    Time: 46.8032 s, iterations are 8284
    Since the calculated porosity is not equal to the theoretical one, I suppose something is wrong. The visualized result is in the attachment. This I do remember to scale it. Many thanks for your time.
    packiong

@hhucyl
Copy link
Author

hhucyl commented Oct 11, 2018

Hi,
Somehow, I suspect that my post processing drawing script is wrong, I used matlab function ellipsoid to visualize to the result. Could you please tell me how you visualize it?

@VasiliBaranov
Copy link
Owner

Hi,

Since the calculated porosity is not equal to the theoretical one, I suppose something is wrong.

Actually, this is not a problem. The theoretical porosity is the expected porosity, the one calculated from original diameters (which are unity by default). The FBA algorithm uses this expected porosity as a parameter. But it will not always be able to reach it. The LS algorithm doesn't use it at all. So the calculated porosity can have any value.

As i tried to explain in the Readme (section referenced before), you have to multiply particle diameters by (finalDensity / theoreticalDensity)^(1/3) = ((1 - finalPorosity) / (1 - theoreticalPorosity))^(1/3). I think it shall be enough. The only other thing that comes to mind is you can make sure that if your visualization function accepts radii, you pass radii there, not diameters.

I was using some Visual Molecular Dynamics software for visualization actually, but it's probably an overkill. But you can check this reply.

Best,
Vasili

@hhucyl
Copy link
Author

hhucyl commented Oct 12, 2018

Dear Vasili

Thanks for your quick reply. I have confused the diameter with radii. Sorry for all this trouble.

Cheers
Chen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants