|
[Sponsors] |
String or Identifier Replacement with Macro Expansion |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 3, 2022, 19:53 |
String or Identifier Replacement with Macro Expansion
|
#1 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Macro expansion is very useful but I see it mostly in use for replacing numbers. I'm wondering it there's a way to use it also for other types of text replacement in dictionaries, such as:
Code:
// setFieldsDict identifier PhaseName Foo; defaultFieldValues (volScalarFieldValue alpha.$PhaseName 0); // transportProperties dictionary phases ($PhaseName1 $PhaseName2); // fvSolution regular expression solvers { "alpha.$PhaseName.*" { ... } } // controlDict systemCall function object startTime 123; MySystemCall { ... writeCalls ("doStuff.sh postProcessing/ResultsFile$startTime.txt"); ... } If this works it would save time by allow to specify a few things that I need to adjust often in one central place and avoid having to correct them in many different places every time. Thanks for any suggestions! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chemkin Reader for 9 polynomial coefficient CEA | sanjeev_adhikari | OpenFOAM Running, Solving & CFD | 0 | January 6, 2021 20:37 |
[blockMesh] Create internal faces as patch in blockMesh | m.delta68 | OpenFOAM Meshing & Mesh Conversion | 14 | July 12, 2018 14:43 |
Undeclared Identifier Errof UDF | SteveGoat | Fluent UDF and Scheme Programming | 7 | October 15, 2014 07:11 |
Errors in UDF | shashank312 | Fluent UDF and Scheme Programming | 6 | May 30, 2013 20:30 |
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) | Yogini | Fluent UDF and Scheme Programming | 7 | October 3, 2012 07:24 |