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

Scheme if statement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2020, 18:15
Default Scheme if statement
  #1
Member
 
j
Join Date: Apr 2020
Posts: 34
Rep Power: 0
buckngnr11 is on a distinguished road
I'm just starting to use some scheme language but I can't find the correct way to implement an if function. I attached my code, which works fine generally. You'll see in line 28 it pushes the "ok" button if the dialog box pops up that warns that the mesh and settings have changed. I want to put this operation in a if statement. If that warning doesn't appear right now, the process fails at that line. How do I put it into an if statement such that if the warning dialog box appears, click ok, if it doesn't, continue.
Attached Images
File Type: jpg Screen Shot 2020-04-29 at 5.09.36 PM.jpg (121.3 KB, 15 views)
buckngnr11 is offline   Reply With Quote

Old   April 30, 2020, 06:57
Default if Condition
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Actually, you can replace whole of the code with Scheme and Journal Commands, such as, using command

(ti-menu-load-string "define user-defined execute-on-demand "nameOfFunction" ")

to execute Execute On Demand function.

As far as if in Scheme is concerned, it is straightforward

(do ((i 0 (+ i 2)))((> i 10))
(if (> i 4)
(format #t "~a\n" i)
))

i is printed only if its value is greater than 4. Of course, do loop is just used to explain; if condition use is

(if (condition to check)
commands if true)
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm 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
how to understand high resolution scheme and high order scheme iilw1314 Main CFD Forum 7 April 12, 2022 13:29
Crank Nicolson scheme implemented wrong? rajibroy OpenFOAM Programming & Development 10 May 5, 2020 10:57
can you tell me best gradient, pressure & momentum order selection in fluent sanjiiv FLUENT 6 February 14, 2020 07:07
2nd order upwind scheme (Fluent and CFX) Far FLUENT 0 May 22, 2011 02:50
extrapolation in MUSCL scheme Chandra Main CFD Forum 6 February 14, 2007 12:21


All times are GMT -4. The time now is 19:26.