CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF macro to read the name of the case file (https://www.cfd-online.com/Forums/fluent-udf/124718-udf-macro-read-name-case-file.html)

polaritus October 11, 2013 09:09

UDF macro to read the name of the case file
 
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.

icemesh March 19, 2015 08:56

I am looking for the same, did you find any answer?
Thanks

vasava March 23, 2015 04:59

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.


All times are GMT -4. The time now is 16:45.