Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Execution of a loop in a CFD-Post session file be stopped

    • admin
      Ansys Employee

      Often loops are used in session files and sometimes these session files can take tens of minutes to run. A session file cannot be stopped with the CFD-Post “Stop” button, however having a method to break the loop in the session file can save time. The following Perl code can be inserted into the loop in the session file which will exit the loop if a specified file is detected. If the user wishes to stop the execution of the loop in the session file, they need to create that specified file. In the example below if the user creates the file “stop.txt” in “D:”, the loop will be exited. Note that the file does not need to contain any data and can be empty. ! if (-f "Dstop.txt") {#if the file “D:stop.txt” is found then… ! last;#last command will exit the loop !}

    • admin
      Ansys Employee

      How can the execution of a loop in a CFD-Post session file be stopped?

Viewing 1 reply thread
  • The topic ‘Execution of a loop in a CFD-Post session file be stopped’ is closed to new replies.