CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF macro to read the name of the case file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2013, 10:09
Default UDF macro to read the name of the case file
  #1
New Member
 
Rita Szijarto
Join Date: Oct 2013
Posts: 3
Rep Power: 13
polaritus is on a distinguished road
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.
polaritus is offline   Reply With Quote

Old   March 19, 2015, 09:56
Default
  #2
New Member
 
Join Date: Oct 2012
Posts: 8
Rep Power: 14
icemesh is on a distinguished road
I am looking for the same, did you find any answer?
Thanks
icemesh is offline   Reply With Quote

Old   March 23, 2015, 05:59
Default
  #3
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
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.
vasava is offline   Reply With Quote

Reply


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


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


All times are GMT -4. The time now is 14:40.