We’re updating our badges platform. Badge issuance is temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

How does define_adjust macro work exactly during iteration??

    • m.shafiee1374
      Subscriber

      Hello,

      I'm using the define_adjust macro below to read velocity at the first iteration of each time step (Fluent 19.5 in serial mode):

      DEFINE_ADJUST(name,domain)

      {

        if (first_iteration)

        {

         /*loop over cells, find the cell and read its velocity here*/

         Message("\nVelocity = %f \n", V) ;

        }

      } 

      But the result for the first iteration looks like this:

      iter    continuity    x-vel     etc.

      Velocity = 0.0000 

      Velocity = 6.0000             /*this is the value that i'm looking for*/

      1    residual values.....

       

      Looks like the macro is running twice for the first iteraton? But why? :/

    • Amine Ben Hadj Ali
      Ansys Employee

      Can you add 

       

      Message("\nVelocity = %f \n on this node %d", V , myid) ;

    • m.shafiee1374
      Subscriber

      update:

      I fixed this issue by editing parts of my code, I didnt figure out what the problem was though.

      But thanks for your quick response.

Viewing 2 reply threads
  • The topic ‘How does define_adjust macro work exactly during iteration??’ is closed to new replies.