|
[Sponsors] |
November 3, 2006, 14:39 |
UDF problem
|
#1 |
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. |
|
November 3, 2006, 15:43 |
Re: UDF problem
|
#2 |
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); |
|
|
|
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 |