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

getting value from gui into UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Andrew Garrard

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2004, 05:51
Default getting value from gui into UDF
  #1
Andrew Garrard
Guest
 
Posts: n/a
Does anyone know if it is possiable to obtain a value from the GUI and use it in a UDF. For example, if there is a variable in the UDF that the user has to specify, it can be inputted throught the Fluent GUI rather than having to alter the UDF source file. Like using a "scanf" or "cin" function in C++.

The follow up to this question would be, is it possibelt to create User defined panals or amend the menu system some way.

  Reply With Quote

Old   November 2, 2004, 08:31
Default Re: getting value from gui into UDF
  #2
scubme
Guest
 
Posts: n/a
Did you consider read your value from a text file in UDF? I think this is a effective way to resolve your problem.
  Reply With Quote

Old   November 2, 2004, 10:39
Default Re: getting value from gui into UDF
  #3
Andrew Garrard
Guest
 
Posts: n/a
Although that is not exactly what wanted, as you say, it may be an effective way to resolve my problem. I have never read from a text file in a UDF and I cannot find an example of one, would it be possiable for you to provide and example of how this is done?
  Reply With Quote

Old   November 2, 2004, 11:28
Default Re: getting value from gui into UDF
  #4
HVN
Guest
 
Posts: n/a
Yes but you need to use Scheme language.

HV
  Reply With Quote

Old   November 3, 2004, 10:24
Default Re: getting value from gui into UDF
  #5
D Harvey
Guest
 
Posts: n/a
I have done this...but what I use is a file filled with #define statements for all of my variables...this works very very well with a compilation routine that enters the UDF directories and deletes that old compilations then compiles the new ones. When I run a new case I can just adjust one file and all my source code can change to the new run. edit one rather than 20 or so

By the way...Andrew...are you still working with PEM FC's?

regards,

Dave Harvey
  Reply With Quote

Old   November 3, 2004, 10:47
Default Re: getting value from gui into UDF
  #6
Andrew Garrard
Guest
 
Posts: n/a
Thanks for this, but I don't fully understand what you are doing? I don't have a routine that compiles any UDF's. I create a UDF (with #defines at the top) and then test it in fluent.

I really wanted the message to appear in fluent saying something like "Enter your value" and then the user could enter a value and it would be used in the UDF. Anyway, I could create a separate file with #defines in. That would probably be a good solution.

On the second point I am still working on PEMFC's. I was thinking of starting a distinct bulletin board for Fuel Cell modelling? Do you think there would be a call for that?
  Reply With Quote

Old   November 4, 2004, 08:44
Default Re: getting value from gui into UDF
  #7
Andrew Garrard
Guest
 
Posts: n/a
I just got an email form the Fluent USC, who are very very good, and they directed me to chapter 6.8 of the manual, User-Defined Scheme Variables, which looks like it might have been what I am looking for.
ishan_ae likes this.
  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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 12:08.