|
[Sponsors] |
[blockMesh] blockMeshDict for repeating geometry |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 2, 2013, 12:37 |
blockMeshDict for repeating geometry
|
#1 |
New Member
Rama Prasad
Join Date: Apr 2013
Posts: 5
Rep Power: 13 |
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, 05:31 |
|
#2 |
Member
Yosmcer Mocktai
Join Date: Apr 2013
Location: Behind a computer
Posts: 50
Rep Power: 17 |
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: Code:
grep -r m4 $FOAM_TUTORIALS Example: Code:
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). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Holes in complex ICEM geometry | alecbann | ANSYS Meshing & Geometry | 2 | April 4, 2019 04:40 |
[Workbench] Workbench 18.2 SpaceClaim->Mechanical geometry accuracy/tolerance problem | sultzan | ANSYS Meshing & Geometry | 0 | December 13, 2018 18:41 |
Export geometry file from ansys mechanical | browns6 | Structural Mechanics | 0 | August 27, 2013 17:19 |
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 12:02 |