Fluids

Fluids

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? :/

    • DrAmine
      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
  • You must be logged in to reply to this topic.