← Back to team overview

yade-users team mailing list archive

Re: [Question #698860]: How to calculate 2D porosity or void ratio?

 

Question #698860 on Yade changed:
https://answers.launchpad.net/yade/+question/698860

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

please read [1] and provide MWE and more information

> I am simulating ... 2D soil

what is "2D soil"?
What overall shape does it have? rectangle? Something more complicated?
What particle shapes do you use (spheres, clumps, polyhedrons)?
Do the particles have significant overlaps?
... ?

> 1. It seems that utils.porosity() is only suitable for 3D model.

yes

> 2. Maybe utils.voxelPorosity() could work?

yes

> Could anyone please give some advice to use a proper function or code
to calculate the 2D porosity/void ratio?

There are many options, depending on your needs, your simulation (which we do not know much about), etc.
Here are 3 options:
a) use utils.voxelPorosity with "degenerated" dimensions (one coordinate of start and end would be equal or almost equal, you will have to experiment a bit)
b) write your own function voxelPorosity2D, basically working same way as voxelPorosity, but working just in 2D
c) write your own function porosity2D (if there are not significant overlaps) - just sum areas of your particles (resulting in "solid volume"). Then, knowing total area (being "total volume"), you can easily compute porosity, void ratio, ...

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

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