CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] Reading Vertices from another file (https://www.cfd-online.com/Forums/openfoam-meshing/144604-reading-vertices-another-file.html)

hwsv07 November 17, 2014 14:48

Reading Vertices from another file
 
is it possible to read the vertices in BlockMeshDict from another file?

I saw a blockMeshDict that the vertices were referenced in this manner

Code:

vertices
(
    ( $x0 $y0 $z0 )
    ( $x1 $y0 $z0 )
    ( $x1 $y1 $z0 )
    ( $x0 $y1 $z0 )
    ( $x0 $y0 $z1 )
    ( $x1 $y0 $z1 )
    ( $x1 $y1 $z1 )
    ( $x0 $y1 $z1 )
    ( $x2 $y0 $z0 )
    ( $x3 $y0 $z0 )
    ( $x3 $y1 $z0 )
    ( $x2 $y1 $z0 )
    ( $x2 $y0 $z1 )
    ( $x3 $y0 $z1 )
    ( $x3 $y1 $z1 )
    ( $x2 $y1 $z1 )   
);

how does it work? is there anywhere I can read on how to do this?

thank you.

cutter December 15, 2014 12:24

Hi,

your sample snippet uses variables for parametrization of the blockMeshDict file, have a look at
https://sites.google.com/site/snappy.../blockmeshdict for further information.

As far as I know it's not possible to read vertices from other files (beside including another dict and using the variables defined in there). You may use any scripting or programming language to create a blockMeshDict though. This script/program could read the vertices, process them and write an appropriate blockMeshDict. Have a look at http://www.cfd-online.com/Forums/ope...ctions-m4.html for a sample using the Python scripting language (needs to be extended to write the whole blockMeshDict).

Have fun!

Cutter


All times are GMT -4. The time now is 05:30.