CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   User defined labels in blockMeshDict (http://www.cfd-online.com/Forums/openfoam-pre-processing/94384-user-defined-labels-blockmeshdict.html)

AlmostSurelyRob November 14, 2011 10:02

User defined labels in blockMeshDict
 
Dear All,

could you tell me if there is any way of specifying user defined labels for vertices in blockMeshDict? It would be great to have such functionality since adding a point in the middle of the list wouldn't upset the sequences in further commands e.g. blocks or patches.

Please let me know,
Robert

gschaider November 16, 2011 05:49

Quote:

Originally Posted by AlmostSurelyRob (Post 332018)
Dear All,

could you tell me if there is any way of specifying user defined labels for vertices in blockMeshDict? It would be great to have such functionality since adding a point in the middle of the list wouldn't upset the sequences in further commands e.g. blocks or patches.

Please let me know,
Robert

Not out of the box I'm afraid. You may be able to abuse the replacement-facility in OF by defining entries

vertexLinksOben 23;

and later using that with

($vertexLinksOben 0 0 )

But the actual problem (keeping track of the numbers) remains

Otherwise you'll have to write a solution in some scripting language. There is an example in m4 on the Wiki (if you know that language. I don't)

Personally if I HAVE to edit a blockMesh I use pyFoamDisplayBlockMesh and just append new vertices (that way I don't have to bother witrh renumbering)

Bernhard

AlmostSurelyRob November 16, 2011 10:57

Thanks for your reply. I do not know m4 language, but this might be what I was looking for.

Currently, my modus operandi was to write perl scripts that output blockMeshDict. A script would take various parameters and allow refinements, change lengths or angles between different components etc.

It is only when I create a blockMeshDict from scratch that labels would be useful. Since sometimes you think "oh, I would use this point between the other two" and on the other hand I like to keep them in a certain order.

GUI would probably work for me, but I think I got used to text editing and I kind of enjoy it. If it was possible to extend it for a couple of features it would work better than GUI for me, but that this just my personal preference.

Thanks again for your reply.

gschaider November 16, 2011 21:27

Quote:

Originally Posted by AlmostSurelyRob (Post 332339)
Thanks for your reply. I do not know m4 language, but this might be what I was looking for.

Currently, my modus operandi was to write perl scripts that output blockMeshDict. A script would take various parameters and allow refinements, change lengths or angles between different components etc.

Personally I would say for these things you could stick with perl (don't see much advantage for m4 there - the syntax is even more obfuscated than Perl).
Quote:

Originally Posted by AlmostSurelyRob (Post 332339)
It is only when I create a blockMeshDict from scratch that labels would be useful. Since sometimes you think "oh, I would use this point between the other two" and on the other hand I like to keep them in a certain order.

GUI would probably work for me, but I think I got used to text editing and I kind of enjoy it. If it was possible to extend it for a couple of features it would work better than GUI for me, but that this just my personal preference.

pyFoamDisplayBlockMesh is not really a GUI. It assists you during the editing of the blockMesh by displaying the vertices, blocks and patches that are in the file. The actual editing still happens in the text file (if you ever had to sketch the vertices on a piece of paper to get the order in the blocks right etc then it might help you. If you can handle 20+ vertices in your head then it is of no use for you)


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