CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Data logging in UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 1, 2008, 05:45
Default Data logging in UDF
  #1
carno
Guest
 
Posts: n/a
Hi,

I am calculating many parameters in UDF used in transient analysis and I want to plot their graph with respect to time. I am not able to log the parameters in file directly from UDF. I have solved the problem temporarily by 'messaging' it out (printing on screen) and writing transcript file and opening that file in excel. It is very cumbersome and additionally excel has limitation of ~65000 rows.

I am sure this is not very difficult problem and might be faced by many. Can anybody send me the UDF script for data logging?

Thanks in advance for help.
  Reply With Quote

Old   October 3, 2008, 13:27
Default Re: Data logging in UDF
  #2
grisu
Guest
 
Posts: n/a
FILE *filepointer; /*First you need to define your filepointer*/

filepointer=fopen(filename,"a"); /*next open the file with filename for _a_ppending*/

fprintf(filename,"your-text, %5d\n", your-var); /*output a variable with leading text + newline*/

.... /*output whatever you want*/

fclose(filepointer); /*finally close the file*/

At least for my udf this is doing the job
  Reply With Quote

Old   October 6, 2008, 01:43
Default Re: Data logging in UDF
  #3
carno
Guest
 
Posts: n/a
Great.. I will check this.
  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
Getting Time Series data from saved unsteady data Atul FLUENT 4 November 26, 2008 06:12
TUI commands logging??? carno FLUENT 6 August 23, 2007 01:21
how to save case data and data during iteration? JOHN FLUENT 3 October 10, 2006 19:40
Residual logging HS FLUENT 1 March 14, 2006 10:04
Where can find airfoil data with pressure distribution or aerodynamic data Ahlo Main CFD Forum 5 January 12, 1999 23:45


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