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

How is porosity calculated #24

Open
rpshi opened this issue Dec 8, 2020 · 1 comment
Open

How is porosity calculated #24

rpshi opened this issue Dec 8, 2020 · 1 comment

Comments

@rpshi
Copy link

rpshi commented Dec 8, 2020

For a given packing size, for example, [nx,ny,nz], the generated particles may occupy in a region outside of the box defined by nx, ny and nz. I am just wondering how the final porosity is calculated? are you using the volume defined by the packing size defined in generation.conf? or the actual domain size occupied by the generated particles.

Thanks for the great tool!

Best,

@VasiliBaranov
Copy link
Owner

Hi,

sorry for a long time to reply.

The code assumes periodic boundary conditions: https://en.wikipedia.org/wiki/Periodic_boundary_conditions

So a particle can cross the boundary of the box, but "the same" particle (a periodically shifted copy of a particle) is crossing the box from another side. So the particle and its periodic copies occupy in one box exactly the same volume as one particle that is completely inside the box (4/3 pi R^3)

So you can calculate the density as \sum_i 4/3 pi R_i^3 / (nx * ny * nz) (where sum happens over all particles). Porosity is then 1 - density.

Hope this helps!

Best Regards,
Vasili

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