CFD Online Logo CFD Online URL
Home > Forums > FLUENT

Looping in Journals error

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

LinkBack Thread Tools Display Modes
Old   September 29, 2008, 05:03
Default Looping in Journals error
Kai Wohlfahrt
Posts: n/a
I am doing some 2d simulation of wings, and I am trying to write a journal file that will allow me to automate solving for a set of angles.

However, in the following section of code I get the error

Error: eval: unbound variable

Error Object: /define/boundary-conditions/velocity-inlet

The relevant code is here, if it is not too much trouble to check it...

(define ang 0)

(define angmin -5)

(define angmax 5)

(define angstep 5)

(define window 1)

(define save "ggsf_naca4102_at")

(define degtorad 0.0174532925)

------------{here is a long section that sets up the solver and runs one simulation and saves the data, I don't think there are errors here}-----------

(set! ang angmin)

(let tiltup ((ang angmin))

(if (> ang angmax) (display "DDDOOONNNEEE")


(define angstr "-5")

(define angrad (* ang degtorad))

(define savefile (string-append save "at" angstr "deg" "030" "ms"))

(define savefiledat (string-append savefile ".dat"))

(define ycomp (sin angrad))

(define xcomp (cos angrad))

/define/boundary-conditions/velocity-inlet 6 yes yes no 30 no xcomp no ycomp yes no 0.001

/solve/monitors/force/clear-all-monitors-data yes yes yes

/solve/monitors/force/lift-coefficient yes 4 () yes no yes 2 no ycomp xcomp

/solve/monitors/force/drag-coefficient yes 4 () yes no yes 1 no xcomp ycomp

/solve/initialize/compute-defaults/velocity-inlet 6


/solve/iterate 200 10 1

(cx-gui-do cx-activate-item "MenuBar*WriteSubMenu*Data...")

(cx-gui-do cx-set-text-entry "Select File*Text" savefiledat)

(cx-gui-do cx-activate-item "Select File*OK")

(tiltup (+ ang angstep)))))

;end angle loop

Thanks for any help!

(Sorry about the empty lines, but I can't figure out how to add line breaks)
  Reply With Quote

Old   September 30, 2008, 08:06
Default Re: Looping in Journals error
Kai Wohlfahrt
Posts: n/a
Nevermind the problem, I found out that I have to use (ti-menu-load-string "blabla")

Now I am getting the error:

Error: CAR: invalid argument [1]: wrong type [not a pair] Error Object: ()

Somewhere in the following lines of code:

(ti-menu-load-string (format #f "/define/boundary-conditions/velocity-inlet 6 yes yes no 30 no ~a no ~a yes no 0.001" xcomp ycomp)) (newline) (ti-menu-load-string (format #f "/solve/monitors/force/clear-all-monitors-data yes yes yes")) (newline)

I have a suspicion that it might be due to a different syntax in fluent 6.3, as that line was from an older tutorial.
  Reply With Quote

Old   September 30, 2008, 09:03
Default Re: Looping in Journals error
Kai Wohlfahrt
Posts: n/a
Correction: the error is in this line (atleast it turns up when this one is added):

(ti-menu-load-string (format #f "/solve/monitors/force/lift-coefficient yes 4 () yes no yes 2 no ~a ~a ") ycomp xcomp)(newline)

Many thanks, Kai
  Reply With Quote

Old   October 2, 2008, 08:23
Default Fixed. Now how to return a default value?
Kai Wohlfahrt
Posts: n/a
I found my error, miscounted prompts somewhere :P.

How do I script the default value to be returned for a prompt?

  Reply With Quote


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
Qns abt AIAA journals submission KK Main CFD Forum 3 December 1, 2008 08:33
about journals ranking John Main CFD Forum 6 September 17, 2007 15:26
Looping over nodes of a cell (UDF) error Manoj FLUENT 2 December 1, 2005 01:30
American journals R Main CFD Forum 0 November 6, 2004 07:17
CFD Journals Andy FLUENT 1 August 28, 2002 13:26

All times are GMT -4. The time now is 14:42.