Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

to get actual iteration in Scheme langage like N_ITER in UDF

    • Xile SHAO
      Subscriber

      Hello

      I want to build some function that can be actif at iteration N specifical during running.

      And it need to be different than "execute command/add-edit" existing 

    • Federico
      Ansys Employee

      Hello,

      there is no variable in the scheme language for the iteration number. 

      You can however create a command and execute it at repeated iteration intervals or execute it once at a specified iteration number.

    • Xile SHAO
      Subscriber

      Hello , thanks fo you reply .

      i find something like (client-inquire-iteration), but after testing in TUI , that always back 0 to me .

      They are very less document that explain this function , can it fill the similar than N_ITER (UDF) to TUI/Scheme ?

    • Federico
      Ansys Employee

      Actually, you're right! (client-inquire-iteration) does get the iteration number. 

      You can do something like:

      (make-new-rpvar 'n_iter (client-inquire-iteration) 'integer) ; this creates the rpvar n_iter. You will need to call this once

      (rpsetvar 'n_iter (client-inquire-iteration)) ; this sets the value of n_iter to the iteration number. You will need to call this each time before using n_iter

    • Xile SHAO
      Subscriber

      that work now.

      thanks :)

Viewing 4 reply threads
  • The topic ‘to get actual iteration in Scheme langage like N_ITER in UDF’ is closed to new replies.