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

getting value from gui into UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 2, 2004, 06: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, 09: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, 11: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, 12: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, 11: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, 11: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, 09: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.
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 09:25.