|
[Sponsors] |
April 24, 2013, 11:46 |
How to define macros in Dictionary files?
|
#1 | |
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14 |
Hi Foamers,
as the newest version of OpenFOAM 2.2.x supports Dictionary Macro Expansion, I wonder if it can be used for blockMeshDict: .... xSize 10; ySize 18; zSize 15; ... hex (0 22 24 11 37 47 35 40) (xSize ySize zSize) simpleGrading (0.5 0.5 1); .... But when runing blockMesh, it says Quote:
Best, David Edit1: Using predefined variables needs '$' . Edit2: It would be great if mathematical operation is supported via macros, e.g. a 5; b 6; c = $a + $b; Last edited by keepfit; April 24, 2013 at 16:30. |
||
April 26, 2013, 21:29 |
|
#2 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings David,
Quote:
Best regards, Bruno
__________________
|
||
April 27, 2013, 16:38 |
|
#3 | |
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14 |
Quote:
Now it's very straightforward to define parameters in blockMeshdict, other than using .m4 file or blender Swiftblock. Edit1: Does it support c++ math functions: e.g. sin( ), sqrt( ), log( ), etc. Last edited by keepfit; April 28, 2013 at 21:30. |
||
December 16, 2013, 16:13 |
|
#4 | |
New Member
bhushan
Join Date: Feb 2011
Location: Erlangen, Gremany
Posts: 9
Rep Power: 15 |
Quote:
|
||
Tags |
dictionary, macros |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Run time Selection Mechanism - Some help required to understand | jaswi | OpenFOAM Programming & Development | 3 | October 29, 2015 14:42 |
OpenFOAM15 paraFoam bug | koen | OpenFOAM Bugs | 19 | June 30, 2009 11:46 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 12:48 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
Results saving in CFD | hawk | Main CFD Forum | 16 | July 21, 2005 21:51 |