Ansys Learning Forum › Forums › Discuss Simulation › Fluids › to get actual iteration in Scheme langage like N_ITER in UDF › Reply To: to get actual iteration in Scheme langage like N_ITER in UDF
December 1, 2023 at 1:50 pm
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