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

UDF problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2006, 14:39
Default UDF problem
  #1
Marijo
Guest
 
Posts: n/a
Hi,

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, 15:43
Default Re: UDF problem
  #2
C. H.
Guest
 
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

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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 06:05
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 00:31
udf compiling problem akr FLUENT 3 August 22, 2007 07:14
UDF problem chiseung FLUENT 4 January 10, 2002 09:58


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