CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Mesh for porous media (https://www.cfd-online.com/Forums/openfoam-pre-processing/124909-mesh-porous-media.html)

LB_K October 15, 2013 11:11

Mesh for porous media
 
Hello.

I have a binary array (1 - is void, 0 - rock). Is there any method to convert such array to foam mesh?

typical slice of pore - http://www.cfd-online.com/Forums/mem...9-b9-slice.png

olivierG October 16, 2013 08:54

hello,

I do not know if there is a straightforward tools for this task, but you may try this method:

1) create a mesh (with blockmesh or other) of a big box (should be the size of your domain array, or bigger ?)
NB: mesh should be fine enough to get small cavity.
2) try to map your binary data to a field: take a look at how we can export data from coordinate to the mesh structure. Don't know how to do this here, but this is possible.
3) with topoSet, you can create a cellset with source as a "fieldToCell": you can extract here void and rock cellset
4) then you can keep only void cells, or both is your are going to do multiregion. Use "subSetMesh" to get your mesh from the cellSet.
5) refine your mesh if needed with refineMesh.

As you can see, the only difficult part is n°2: mapping your field data in OF.

good luck,

regards,
olivier

elvis October 16, 2013 11:18

Hi,

i would suggest to read
"Simulation Of Displacement Efficiency In Micromodels"
T. Clemens*, K. Tsikouris**
from "Open Source CFD International Conference 2011"
usually you should get presentations http://www.opensourcecfd.com/conference2013/
but there are dead links!! so the "Previous Events" will not work as I tried today

jherb February 4, 2014 11:37

A talk with similar title was given here:
http://www.openfoamworkshop.org/6th_...m_Tuesday.html

LB_K February 4, 2014 14:22

Thanks for your answers. i've solved my problem by writing a script in python.


All times are GMT -4. The time now is 14:39.