CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

User defined labels in blockMeshDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2011, 09:02
Default User defined labels in blockMeshDict
  #1
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
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
AlmostSurelyRob is offline   Reply With Quote

Old   November 16, 2011, 04:49
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by AlmostSurelyRob View Post
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
gschaider is offline   Reply With Quote

Old   November 16, 2011, 09:57
Default
  #3
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
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.
AlmostSurelyRob is offline   Reply With Quote

Old   November 16, 2011, 20:27
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by AlmostSurelyRob View Post
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 View Post
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)
gschaider is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] Internal walls of zero thickness anger OpenFOAM Meshing & Mesh Conversion 23 February 6, 2020 18:25
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
user defined turbulence model manuutin STAR-CD 5 October 14, 2009 05:29
Gradient of a User defined Variable Ramadas CFX 2 August 21, 2007 09:19
User Defined Scalars - Returning Values Carlos V. FLUENT 0 April 19, 2006 18:18


All times are GMT -4. The time now is 23:41.