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

printing values from udf!!!

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 1 Post By Shekhar
  • 6 Post By ap

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2004, 05:50
Default printing values from udf!!!
  #1
Shekhar
Guest
 
Posts: n/a
how can i print the values returned by an udf in the fluent console window.....i want to check whether my udf is giving the correct values or not... hi shekhar
Lucrecio likes this.
  Reply With Quote

Old   January 13, 2004, 10:16
Default Re: printing values from udf!!!
  #2
Manoj
Guest
 
Posts: n/a
you can write in your udf the printf statement as you do in C programming. it will print whatever values you want.
  Reply With Quote

Old   January 13, 2004, 12:49
Default Re: printing values from udf!!!
  #3
ap
Guest
 
Posts: n/a
You can use the command:


Message ("Text %g \n", var_name);


where:


- Text is a string.

- %g is the placeholder where the value of the variable var_name will be written. %g is for real values, if you want to write an integer (int) value, use %d.

- \n is the new line command.


For example, if you want to write two variables i (int) and s (real), viewing something like this in the console:

"The value of i is 9 and the value of s is 3.5."

you have to write the command:

Message("The value of i is %d and the value of s is %g\n",i,s);

Hi

ap
  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
How to access only one phase in multiphase model by UDF wersoe Fluent UDF and Scheme Programming 1 January 4, 2017 08:11
Accessing node values using a UDF Nico FLUENT 2 December 20, 2007 03:50
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12:29
udf language + UDMI values chary FLUENT 0 October 5, 2007 07:58
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


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