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

if statement in execute commands

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2020, 06:27
Default if statement in execute commands
  #1
New Member
 
mohamad ali mirzaei
Join Date: Feb 2017
Posts: 27
Rep Power: 9
mohamadalimirzaei1994 is on a distinguished road
I want to check a variable each time step and do some changes to the case file if the value is higher than a specific number. to do so, I am using execute command each time step using following command:

(if (<= 3500.0 (string->number (pick-robust "/report/volume-integrals/maximum 20 231 () phase-1 viscosity-ratio no"))) (/solve/set/transient-controls/time-step-size 0.01))

but I receive the following error as I run the simulation and when the command is executed:

Error: eval: unbound variable

Error Object: /solve/set/transient-controls/time-step-siz
e



Do you know what is the problem and how I can resolve the problem?
mohamadalimirzaei1994 is offline   Reply With Quote

Old   July 23, 2020, 03:01
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
where did you get it?
Code:
pick-robust
try following command
Code:
(if (<= 3500.0 (string->number (pick-a-real "/report/volume-integrals/maximum 20 231 () phase-1 viscosity-ratio no"))) (/solve/set/transient-controls/time-step-size 0.01)())
__________________
best regards


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

Old   July 23, 2020, 04:25
Default
  #3
New Member
 
mohamad ali mirzaei
Join Date: Feb 2017
Posts: 27
Rep Power: 9
mohamadalimirzaei1994 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
where did you get it?
Code:
pick-robust
try following command
Code:
(if (<= 3500.0 (string->number (pick-a-real "/report/volume-integrals/maximum 20 231 () phase-1 viscosity-ratio no"))) (/solve/set/transient-controls/time-step-size 0.01)())
nothing changed. I guess the issue is with the other part (/solve/set/transient-controls/time-step-size 0.01) do you have any comment on that?

regards.
mohamadalimirzaei1994 is offline   Reply With Quote

Old   July 23, 2020, 05:14
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Code:
(if (<= 3500.0 (string->number (pick-a-real "/report/volume-integrals/maximum 20 231 () phase-1 viscosity-ratio no"))) (ti-menu-load-string (format #f "solve set t-s 0.01"))())
__________________
best regards


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

Reply

Tags
execute commands, if statement, tui


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
calculation activities, execute commands Starcatcher Main CFD Forum 0 December 22, 2017 20:40
Fluent Execute Commands: Syntax for return pisykl FLUENT 0 June 16, 2016 21:45
Save picture from Execute commands and journal files FJSJ FLUENT 0 January 29, 2015 09:56
OpenFOAM14 for Mac OSX Darwin 104 gschaider OpenFOAM Installation 118 July 20, 2008 06:19
Execute Commands from input file Greg Z FLUENT 1 May 24, 2006 17:56


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