|
[Sponsors] |
November 2, 2004, 05:51 |
getting value from gui into UDF
|
#1 |
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. |
|
November 2, 2004, 08:31 |
Re: getting value from gui into UDF
|
#2 |
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.
|
|
November 2, 2004, 10:39 |
Re: getting value from gui into UDF
|
#3 |
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?
|
|
November 2, 2004, 11:28 |
Re: getting value from gui into UDF
|
#4 |
Guest
Posts: n/a
|
Yes but you need to use Scheme language.
HV |
|
November 3, 2004, 10:24 |
Re: getting value from gui into UDF
|
#5 |
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 |
|
November 3, 2004, 10:47 |
Re: getting value from gui into UDF
|
#6 |
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? |
|
November 4, 2004, 08:44 |
Re: getting value from gui into UDF
|
#7 |
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.
|
|
|
|
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 |