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

How to read data into my UDF???

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2006, 08:41
Default How to read data into my UDF???
  #1
Harshit Gupta
Guest
 
Posts: n/a
Hi,

Is there any way we can read data from console into our UDF(execute on demand udf, for example)???

like for example, the way we do by using scanf (and printf) in simple C programming??

i tried using scanf in my UDF to try and read from console, but it just hangs in runtime everytime i try to do so...

but if i try to print onto the console(using prinf()), it is working fine...

or is there any other way in FLUENT to read data into our UDF in runtime???

Thanks in advance.
  Reply With Quote

Old   June 14, 2006, 10:32
Default Re: How to read data into my UDF???
  #2
Aidan
Guest
 
Posts: n/a
you can use User-Defined Scheme Variables. section 6.8 in the udf manual. i have found them to be very slow though if u are calling them a lot in the udf.
  Reply With Quote

Old   June 14, 2006, 12:06
Default Re: How to read data into my UDF???
  #3
Harshit Gupta
Guest
 
Posts: n/a
thanx a lot...it worked for me....

but is this the best possible way??? isn't there any other method which is more 'user-friendly'...where the user(different from the programmer) just have to type in the values asked, instead of remembering the command everytime he needs to change the value of the variable.

Thanx...
  Reply With Quote

Old   June 15, 2006, 03:34
Default Re: How to read data into my UDF???
  #4
rom
Guest
 
Posts: n/a
Yes its the only possible way (i am not saying that its good) because the cortex (TUI/GUI written in scheme) and the fluent solver (written in C) are not directly coupled. Benefits are that you can use different front ends (classic Fluent TUI/GUI, Flowizard, Fluent for Catia...) for the same solver, the problem is the complicated coupling between solver and front end.

RoM
  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
accessing solver data with UDF macros Dushan FLUENT 1 April 22, 2017 22:05
UDF Data access problems Mosheraa FLUENT 4 June 17, 2011 14:16
UDF and experimental data in Fluent Rogerio Fernandes Brito FLUENT 0 November 25, 2008 10:32
Data logging in UDF carno FLUENT 2 October 6, 2008 02:43
read boundary conditions with udf Bernhardt FLUENT 0 May 31, 2007 10:46


All times are GMT -4. The time now is 22:15.