← Back to team overview

yade-users team mailing list archive

Re: [Question #706664]: Export Local Porosity to vtk file

 

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

    Status: Open => Answered

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

thanks for the code, now it is much more clear

> except for the last line

see below

> From the documentation I understood, that it is also calculating the
porosity for various subvolumina (in this case 200), but it is not clear
to me, how I can access this data.

No.
voxelPorosity calculates porosity in given cubic region (determined by coordinates of "start" and "end" corners). It returns one number.
200 here is resolution. In this case, it divides the region into 200x200x200 voxels and for each voxel it determines if it is particle or void. From these values, porosity is computed and returned.
The higher resolution, the more accurate is the result, but also the more RAM and more time is used.

> So I turned to defining subvolumina in the code

This is how I meant it to be used :-)

> which I find to be a tedious process.

In what sense is it tedious?
Code writing of each command separately? If so, use a for loop.

> My resort would be to save them as a txt document and convert it to
vtk.

good idea, or I think Paraview can just load the data from .txt file (?)

> so I tried to use the VTKExporter.
> The yade documentation says, with VTKExporter, the user is able to export any user defined variable.
> any variable, but related to existing spheres (taking spheres as the example). 

VTKExporter can export any value, but related to existing spheres (if spheres are exported).
So e.g. you can export sphere color, material properties, volume etc.
It is not meant to export literally any variables (e.g. here porosity defined in arbitrary points in space).

I would stick to the txt file first. If it does not work, you can
convert the txt file to vtk, or change export directly to vtk (either
"manually" as VTKExporter is implemented, or using some external
package)

Cheers
Jan

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