Volume fraction -nan

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Volume fraction -nan

willstring
Another question:

I tried running the compute volume fraction plugin and it says:

Volume fraction is : -nan %ion... [OK]

Moreover, even when I run it only in the pre-processing stage it slows the rest of the computation down substantially?  Any reason for this?  Even slower when I put in in the main processing loop, even with IterLoop=100 or so.

You can take a look at all of the code if you like, its just a vibrating half-box with some cubes in it (here i've removed computeVolumeFraction):

https://www.dropbox.com/s/setsi5khc34axn0/cubes.zip?dl=0

I'd just like to compute the packing density basically; ideally it would automatically construct some imaginary closed bounding surface that best fits around all of the elements, then simply take the ratio of DEM element volume to total volume of the bounding surface.  Is this close to what computeVolumeFraction does?  Maybe i'm using it wrong??

Thanks again for all the help y'all!


Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

Damien André
Administrator
Hello, The volume fraction allows you to compute a local volume fraction without any boundary shapes. It involves a local voronoi tesselation able to compute a total volume (without void) noted V.

The formula is simple : Vf = sum(v) / V
where 'Vf' is the volume fraction and 'v' the volume of a discrete element.

So, note that this method is an advanced method abe to work without bounding shape and for any discrete element shapes even arbitrary polyhedron.

Making a Voronoi tesselation during a simulation is not a good idea because it slows down your computation and the plugin was designed to be triggered only one time during post-processing.

What I suggest to solve your problem :
 - Run your simulation and make several *.gdd files
 - After the simulation, parse all the given *.gdd file and compute the volume fraction with the PlugIn.

GOOD LUCK ! Hope this help. Damien.
Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

willstring
Thank you for the response.

However it is still computing as -nan, at least this is what shows up in the linux terminal output when I run the simulation.

Do you think parsing the .gdd files will fix this or?  

Additionally, I'm not sure how to parse/postprocess the .gdd files as you mentioned... do you mean from the same xml script that ran the simulation? E.g., in the <postprocessing> section?  Is there an example somewhere that might point me in the right direction?

Thank you again y'all are a great help
Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

Damien André
Administrator
Yes I think it will fix this issue.
In order to automatize this process, you can write a small python script file. But you have to build your own tool because this kind of treatment does not exist in GranOO.

Hope this help, Damien.
Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

willstring
Hello again,

I tried loading the .gdd file in a completely separate script (pasted below) that I ran after the main simulation, and i'm still getting the error "Volume fraction is : -nan %ion... [OK] ".  For now I'm just trying to get it to work on the first frame:

<GranOO Version="2.0" TotIteration="40000" TimeStep="0.000250000000" OutDir="Results_014">

<PreProcessing>
</PreProcessing>

<Processing>
</Processing>

<PostProcessing>
<PlugIn Id="_ReadDomain" FileName="Results_014_20/domain-0000000000000.gdd" Set="init"/>
<PlugIn Id="_ComputeVolumeFraction" Set="init"/>
</PostProcessing>

</GranOO>

Am I missing something here? If you like you can take a look at the domain-0000000000000.gdd file:

https://www.dropbox.com/s/fdvhtogf1f562yf/domain-0000000000000.gdd?dl=0






Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

Damien André
Administrator
Sorry for the late answer,
This is a very experimental feature, so this plugin is not well documented.  You may be more lucky if you put the length Lx, Ly, Lz, and the center of a boundary box. It restricts the location of the computation. It should give something like :

<PlugIn Id="_ComputeVolumeFraction" Lx="0.1" Ly="0.1" Lz="0.1" Center="(0,0,0)" Set="init"/>


Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

willstring
Okay getting somewhere here, It now gives me a number for the volume fraction but I'm not sure how to interpret it.

I tried throwing a uniformly spaced lattice of cubes at it (10x10x10), unit spacing and unit dimensions, which has a theoretical volume fraction of 12.5%, but granoo gives around 2.61%, see the following output:

Init voronoi tesselation
construct 1000 polyhedral elements
Volume fraction is : 2.613377e+00 %OK  

Am I missing something here?  For a large number of cubes shouldn't it be close to the theoretical? (albeit not perfect)


Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

Damien André
Administrator
Hi, can you share with me your gdd file ?
I give you my special trick :) . You can do online volumic fraction measurements with the 'granoo-viewer' program :
 - open a discrete element *.gdd file
 - press the 'w' key
 - draw a rectangle for selecting a group of element
 - choose "compute volumic fraction" in the popup menu when you release the mouse

Can you try it ?
Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

willstring
Thanks again for the help.

I tried the trick you mentioned and it computed the same volume fraction as before: 2.61%, which is quite low for a uniform lattice of cubes-- see image below.  Here is a link to the .gdd file if you want to take a look:

https://www.dropbox.com/s/zatezcpenhtehg6/domain-0000000000000.gdd?dl=0


Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

Damien André
Administrator
Something is wrong in the computation... I will try to debug it !
ty
Reply | Threaded
Open this post in threaded view
|

Re: Volume fraction -nan

willstring
Thank you for looking into this, and let me know if you have any news!