CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] Creating similar multiplte geomentry by m4

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2015, 05:44
Default Creating similar multiplte geomentry by m4
  #1
New Member
 
Warning
Join Date: Jan 2015
Posts: 15
Rep Power: 11
range_rover is on a distinguished road
Hey Foamers

I am trying to develop an m4 blockMeshDict script for 15 similar pipes attached to each other, if i start writing co ordinates and building blocks it may take lots of time.i have attached the geomentry below.

Is there any command in m4 or example where we can repeat the blocks of same dimensions repeatedly.


please do reply
Thanks in advance
Attached Images
File Type: jpg blockpipe.jpg (35.8 KB, 23 views)
range_rover is offline   Reply With Quote

Old   March 21, 2015, 09:52
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings range_rover,

In the m4 manual: http://www.gnu.org/software/m4/manual/m4.html - check the section "Conditionals, loops and recursion".

AFAIK, there is no example available in public for doing what you're asking for. Nonetheless, it feels like it would be better for you to use an easier programming language for creating the final dictionary file. Have a look at the list of examples provided here: http://openfoamwiki.net/index.php/Bl...MeshDict_files

Using Python or MATLAB might be the easiest solutions.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 23, 2015, 04:35
Default
  #3
New Member
 
Warning
Join Date: Jan 2015
Posts: 15
Rep Power: 11
range_rover is on a distinguished road
thnks bruno for your help and advice,

are there any examples of developing Matlab scripts for openfoam ?
range_rover is offline   Reply With Quote

Old   March 28, 2015, 17:01
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi range_rover,

The only example I know about for MATLAB is already listed on the wiki page and is this one: http://www.cfd-online.com/Forums/ope...blockmesh.html

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Tags
blockmeshdict block mesh, gnu m4, openfoam


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
Heat Sink Meshing Olds88 Pointwise & Gridgen 15 December 13, 2024 08:29
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 14:38
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 10:28
Problems running laminarSmoke r08n OpenFOAM Running, Solving & CFD 1 September 27, 2013 20:27


All times are GMT -4. The time now is 13:44.