CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

Creating similar multiplte geomentry by m4

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 3
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, 17 views)
range_rover is offline   Reply With Quote

Old   March 21, 2015, 09:52
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
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: 3
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NREL SOWFA ABLTerrainSolver tutorial problem cico0815 OpenFOAM Running, Solving & CFD 18 February 1, 2016 19:16
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 14:38
Failed to simulate wind turbine based on wingmotion tutorial with pimpleDyMFoam gohome OpenFOAM Running, Solving & CFD 0 July 8, 2014 04:12
Fluent3DMeshToFoam simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 05:20
How to speed up the simulation of a large amount of similar steady state cases tss Main CFD Forum 4 November 5, 2010 15:36


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