CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF problem

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

LinkBack Thread Tools Display Modes
Old   November 3, 2006, 15:39
Default UDF problem
Posts: n/a

How can I print a value that is calculated in the UDF? Something with print command in the UDF?

Thank you.
  Reply With Quote

Old   November 3, 2006, 16:43
Default Re: UDF problem
C. H.
Posts: n/a
print in file or on screen? There are of course other and maybe better possibilities but within my UDF's it works.

screen: Message0("Your Text %20.13e \n", Variable); %20.13e is the format for the value that would be written at this place. 20 is the whole length and 13 is the amount of numbers after . and e means it is written in 3.0000000000000e-03 for example. You can also use %f for a float number or %i for an integer. \n is End of line

file: File *pointer_to_file; pointer_to_file = fopen("test.dat", "w"); fprintf(pointer_to_file, "Text in file %20.13e \n", Variable); fclose(pointer_to_file);
  Reply With Quote


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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 October 18, 2017 07:17
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 06:56
UDF problem mansha goraya FLUENT 0 October 29, 2007 01:31
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
UDF problem chiseung FLUENT 4 January 10, 2002 10:58

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