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

Infinite Loop Scheme Script Question

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2021, 20:51
Default Infinite Loop Scheme Script Question
  #1
New Member
 
Join Date: May 2021
Posts: 1
Rep Power: 0
zwong8 is on a distinguished road
Hello,
I recently wrote a quick script (attached below) to generate a number of lines across my domain. However, when I read this script in Fluent, the do loop is evaluated indefinitely - beyond the specified range.

I've run the code in a scheme IDE and it works as I expect it to, so I think the error is due to Fluent's implementation of the code. I was hoping someone could give me some insight into this matter and a few related questions:

1. When the loop was running, I tried to interrupt it with "ctrl+c" as suggested, but this did not work. Is there an updated way to pause a process through the Fluent terminal?
2. Does anyone have any suggestions on how to output the, say z-velocity, along each line into a single file?

Thank you very much!
Attached Files
File Type: txt Linesurface_Creation.txt (491 Bytes, 3 views)
zwong8 is offline   Reply With Quote

Old   May 16, 2021, 22:22
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,724
Rep Power: 28
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
(do ((n 0 (+ n 1))) ((> n N))  
(begin
    (define x (+ x0 (* n dx)))       
    (Ti-menu-load-string (format #f "surface/line-surface l=~ah=~a ~a ~a ~a ~a ~a ~a" x z x y0 z x y1 z))  
)  
)
you can get velocity using TUI commands, same as you made it here:
(Ti-menu-load-string (format #f "surface/line-surface l=~ah=~a ~a ~a ~a ~a ~a ~a" x z x y0 z x y1 z))
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
do loop, scheme file

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested loop macro question in tecplot Rannnnnnnn Tecplot 1 January 4, 2021 14:20
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
awk script question awk script question Main CFD Forum 0 March 28, 2005 02:06
question for MILES with TVD-MUSCL scheme. CFDnet Main CFD Forum 1 February 13, 2005 17:07
Question on Sediment Mass Conservation Scheme Wen Long Main CFD Forum 0 July 6, 2004 15:45


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