|
[Sponsors] |
Adding Custom Tab in FLUENT using Scheme Code |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 14, 2009, 16:10 |
Adding Custom Tab in FLUENT using Scheme Code
|
#1 |
New Member
Dhiman
Join Date: May 2009
Posts: 4
Rep Power: 17 |
Hi ,
I have a scheme code with which I can add a custom tab in FLUENT for inputting my GLOBAL variables for an automation code (again in Scheme). The Tab works fine in GUI but I get junk values of those global variables when I try to retrieve them. I want to be able to access the values of those global variables at all times. The Code is ----------------------------------------------------------------------- Code:
;------------ Create RPVARS for Input parameters---------------------- (if (not (rp-var-object 'c_1))(rp-var-define 'c_1 550 'real #f)) ;corresponds to default mainstream gas temp (if (not (rp-var-object 'c_2))(rp-var-define 'c_2 60 'real #f)) ;corresponds to default mainstream velocity (if (not (rp-var-object 'c_3))(rp-var-define 'c_3 1.5 'real #f)) ;corresponds to default turbulent intensity (if (not (rp-var-object 'c_4))(rp-var-define 'c_4 300 'real #f)) ;corresponds to default coolant gas temp ;------------------------------------------------------------------------------- (define Tgas) ; 4 Global variables (define Vgas) (define I) (define Tcool) ;-------------------------------------------------------------------------------- (define gui-icht (let ((panel #f)) (define (update-cb args) ;update panel fields (cx-set-real-entry Tgas (rpgetvar 'c_1)) (cx-set-real-entry Vgas (rpgetvar 'c_2)) (cx-set-real-entry I (rpgetvar 'c_3)) (cx-set-real-entry Tcool (rpgetvar 'c_4)) ) (define (apply-cb args) (rpsetvar 'c_1 (cx-show-real-entry Tgas)) (rpsetvar 'c_2 (cx-show-real-entry Vgas)) (rpsetvar 'c_3 (cx-show-real-entry I)) (rpsetvar 'c_4 (cx-show-real-entry Tcool)) ) (lambda (args) (if (not panel) (let ((table) (form)) (set! panel (cx-create-panel "ICHT PANEL" apply-cb update-cb)) (set! table (cx-create-table panel "" 'border #f 'below 0 'right-of 0)) (set! form (cx-create-frame table "" 'border #f)) (set! Tgas (cx-create-real-entry table "Tg" 'width 14 'row 1 'col 0 )) (set! Vgas (cx-create-real-entry table "Vg" 'width 14 'row 2 'col 0 )) (set! I (cx-create-real-entry table "Tu%" 'width 14 'row 3 'col 0 )) (set! Tcool (cx-create-real-entry table "Tc" 'width 14 'row 4 'col 0)) ) (set! *cx-exit-on-error* #f) ) (cx-show-panel panel)) ); END OF LET SCOPE ); END OF FUNCTION DEFINITION (let ((menu (cx-add-menu "ICHT-GUI-Beta" #\U ))); end of let list (cx-add-item menu "PARAMATERS" #\U #f cx-client? gui-icht) (cx-add-item menu "START PROGRAM" #\O #f and (lambda ()(load "main.scm"))); Starts the main automation code (set! *cx-exit-on-error* #f) ) (set! *cx-exit-on-error* #f) I wish to load the custom tab ... Update the values .. and Retrieve the values anywhere in the main program. But when I try doing that get a Junk Value. ;----------------------------------------------------------------------------- Please help me out with this Regards Dhiman |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Integrating Scheme with a FLUENT journal file | Pete Willemsen | FLUENT | 0 | May 19, 2006 18:00 |
Adding a pause to a fluent journal | Baoun | FLUENT | 0 | April 24, 2006 05:44 |
Central Differencing Scheme in Fluent | alice | FLUENT | 2 | March 21, 2004 08:30 |
Open source CFD code development, possible? | Dr. Yazid Bindar | Main CFD Forum | 27 | July 18, 2000 01:18 |
Fluent Code (4.2 V) Limitations | John Peter | Main CFD Forum | 1 | July 25, 1998 05:51 |