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

Read txt file with udf

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 2 Post By dahmen
  • 1 Post By rayolau

Reply
 
LinkBack Thread Tools Display Modes
Old   April 30, 2013, 04:25
Default Read txt file with udf
  #1
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 5
rayolau is on a distinguished road
I need write a udf or open a file with velocity values... (like a the file created when I do Fille-->write-->profile) , asociated to boundary that I choose, and that these values will be the "conditions" in the boundary at the start of the each time step. Any idea?
Thanks in advance !


Laura
rayolau is offline   Reply With Quote

Old   April 30, 2013, 04:53
Default
  #2
New Member
 
adam
Join Date: Apr 2013
Posts: 7
Rep Power: 4
dahmen is on a distinguished road
Hi Laura!
About writing an output UDF u have to use the function hook "execut-at-and" and in the body of ur UDF u would includ a file for postprossecing as 'txt ro dat' format, then u will a have a file contain a postprocessing of the parameters that u need at each time step.
joy2000 and rayolau like this.
dahmen is offline   Reply With Quote

Old   April 30, 2013, 05:52
Default
  #3
Member
 
Join Date: Jun 2012
Posts: 32
Rep Power: 5
DonQuijote is on a distinguished road
Hi all!

I'm facing the same problem. I have a .txt file (with coordinates and variables (velocity) values) wich is changing every time step, so It's so frustrating to use GUI 'define profile' in each tstep.

I have thought of creating a UDF for that, but I have not found nor fluent manual either UDF manual how to do that... Do anyone know if it is really feasible??

Thank you in advance!!
DonQuijote is offline   Reply With Quote

Old   April 30, 2013, 07:36
Default
  #4
New Member
 
rayolau
Join Date: Aug 2012
Posts: 23
Rep Power: 5
rayolau is on a distinguished road
Quote:
Originally Posted by dahmen View Post
Hi Laura!
About writing an output UDF u have to use the function hook "execut-at-and" and in the body of ur UDF u would includ a file for postprossecing as 'txt ro dat' format, then u will a have a file contain a postprocessing of the parameters that u need at each time step.
Hi dahmen! Thanks for your reply.
I use an UDF with "execut-at-end" for save data of a boundary that I choose. But I need "read" these saved data, in other boundary. I think that I may do with DEFINE_ADJUST, but I don't have more ideas...

This is the part to write data, I need do something like that to read data into other id boundary.

DEFINE_EXECUTE_AT_END(name)
{
Domain *domain;
domain = Get_Domain(1);
file = fopen("2D_IZQUIERDA.PROF", "w");
name_void(domain, 10);
fclose(file);
}
joy2000 likes this.
rayolau is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
funkySetFields compilation error tayo OpenFOAM 39 December 3, 2012 06:18
GPU Linear Solvers for OpenFOAM gocarts OpenFOAM Announcements from Other Sources 35 March 1, 2012 21:41
mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 12 December 12, 2011 05:16
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
PHI file structure Eugene Phoenics 9 November 2, 2001 23:00


All times are GMT -4. The time now is 11:46.