|
[Sponsors] |
October 11, 2013, 10:09 |
UDF macro to read the name of the case file
|
#1 |
New Member
Rita Szijarto
Join Date: Oct 2013
Posts: 3
Rep Power: 13 |
I would like to open a file and save data in it every timestep with a UDF. I would use simply:
char filename[]="outlet.out"; fopen("filename","mode") For the filename, I would like to use the same expression as for the case file. Let's say my case file is CASE01.cas, and I would like to name my outlet file as CASE01_outlet.out. My question is, how can I do it with an UDF? Does exist a macro which would read the name of the case file, and store it as a parameter? Thank you for your help. |
|
March 19, 2015, 09:56 |
|
#2 |
New Member
Join Date: Oct 2012
Posts: 8
Rep Power: 14 |
I am looking for the same, did you find any answer?
Thanks |
|
March 23, 2015, 05:59 |
|
#3 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
You can do this using a journal files. Have a look at this link http://www.cfd-online.com/Wiki/Fluen...ournal_file.3F. There is also an example somewhere on the same webpage.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |