|July 2, 2013, 11:37||
blockMeshDict for repeating geometry
Join Date: Apr 2013
Posts: 5Rep Power: 4
I am starting to use openFoam. I am trying to solve the flow in a pump suction sump. There are 20 pump suction pipes drawing water from the sump, all spaced equally apart in a line and all of the same diameter. There is a thin solid wall midway between each pair of adjacent pipes and all the walls are of identical size. So the vertices of the blocks are of the same pattern. If I write down the vertices for one bay, is there a simple method to generate vertices for the other 19 bays? Would be grateful for an answer
|July 20, 2013, 04:31||
Join Date: Apr 2013
Location: Behind a computer
Posts: 42Rep Power: 8
A way to do it would be to use a m4 script that generate the blockMest file for you.
m4 is a macro processor under Linux systems.
I usually see it use with pearl for the calculations parts.
You can find some examples in the openFoam tutorials:
grep -r m4 $FOAM_TUTORIALS
changecom(//)changequote([,]) dnl> define(calc, [esyscmd(perl -E 'use Math::Trig; print ($1)')]) dnl> define(VCOUNT, 0) define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) define(space, 10) define(vertexb20, ($1 $2 $3) vlabel(ba1$4) ($1 calc($2+space) $3) vlabel(ba2$4) ($1 calc($2+2*space) $3) vlabel(ba3$4) ($1 calc($2+3*space) $3) vlabel(ba4$4) ($1 calc($2+4*space) $3) vlabel(ba5$4) ($1 calc($2+5*space) $3) vlabel(ba6$4) ($1 calc($2+6*space) $3) vlabel(ba7$4) ($1 calc($2+7*space) $3) vlabel(ba8$4) ($1 calc($2+8*space) $3) vlabel(ba9$4) ($1 calc($2+9*space) $3) vlabel(ba10$4) . . . )
Hope it is clear enough an that it helps.
(do not hesitate to suggest other ways that may be easiest).
|Thread||Thread Starter||Forum||Replies||Last Post|
|Problem Importing Geometry ProE to CFX||fatb0y||CFX||3||January 14, 2012 20:42|
|2D geometry to 3D geometry||Sgonzalezg||ANSYS Meshing & Geometry||11||April 8, 2011 11:02|
|Import geometry from CAD||Giuseppe (Giuseppe)||OpenFOAM Pre-Processing||32||April 1, 2011 20:14|
|SnappyHexMesh meshes inside and outside of an STL geometry||villier||OpenFOAM Mesh Utilities||17||June 15, 2010 19:51|
|[GAMBIT] import terrain geometry||cfdworker||ANSYS Meshing & Geometry||2||May 24, 2009 21:40|