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

Terminating a list does not work in scheme

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 13, 2023, 06:21
Default Terminating a list does not work in scheme
  #1
Member
 
Join Date: Aug 2021
Posts: 63
Rep Power: 5
cons013 is on a distinguished road
I have the following scheme script:

(do ((x 1 (- x 0.2))) ((< x -2))
(ti-menu-load-string (format #f "display/objects/edit velocity-contour surfaces-list (z=~a) ()" x))
(format #f "/display/objects/display velocity-contour")
(set! x (* x 1000))
(ti-menu-load-string (format #f "/display/save-picture ./pictures/velocity-contour-z=~a" x))
(set! x (/ x 1000))
)

which breaks because after (z=~a) the () doesn't do anything. It continues thinking I'm entering a surface name, so the rest of the commands are entered as the string. I have spammed () everywhere, tried q, nothing works. Wtf is going on?
cons013 is offline   Reply With Quote

Old   August 13, 2023, 06:27
Default
  #2
Member
 
Join Date: Aug 2021
Posts: 63
Rep Power: 5
cons013 is on a distinguished road
More proof:

https://puu.sh/JNBox/a43f8b7b96.png
cons013 is offline   Reply With Quote

Old   August 13, 2023, 11:24
Default
  #3
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
The error is saying z=0 isn't a valid surface, not that () doesn't work in scheme
LuckyTran is offline   Reply With Quote

Old   August 13, 2023, 11:49
Default
  #4
Member
 
Join Date: Aug 2021
Posts: 63
Rep Power: 5
cons013 is on a distinguished road
Quote:
Originally Posted by cons013 View Post
Quote:
Originally Posted by LuckyTran View Post
The error is saying z=0 isn't a valid surface, not that () doesn't work in scheme
It is a valid surface though. I fixed the issue by adding \n after the empty list, not really sure why it works.
cons013 is offline   Reply With Quote

Old   August 13, 2023, 13:40
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
So you have proved that the error was not () not working in scheme, great!


You are using a formatted string, and if you look, you actually printed what you interpreted as two scheme commands as one line
LuckyTran is offline   Reply With Quote

Old   August 13, 2023, 13:57
Default
  #6
Member
 
Join Date: Aug 2021
Posts: 63
Rep Power: 5
cons013 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
So you have proved that the error was not () not working in scheme, great!


You are using a formatted string, and if you look, you actually printed what you interpreted as two scheme commands as one line
Could you please explain this a little? In my script the commands are in separate brackets and with a new line between them, but like you said it's as if the tui doesn't recognise that, which I don't fully understand
cons013 is offline   Reply With Quote

Reply


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
FLUENT Scheme to get Contour names as a list anan12345 Fluent UDF and Scheme Programming 1 February 2, 2022 20:32
can you tell me best gradient, pressure & momentum order selection in fluent sanjiiv FLUENT 6 February 14, 2020 07:07
LimitedCubic scheme does not work haoyuan OpenFOAM 0 August 11, 2017 11:37
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57
RP_Get_Real and the scheme list! Kamal FLUENT 1 December 2, 1999 22:53


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