Fluids

Fluids

Report Definition “Sum” and DEFINE ADJUST macro

    • Sayantan Biswas
      Subscriber

      I'm working on Euler-Euler two-fluid (water-air system) transient simulation. I wish to store number the number of numerical cells which satisfy a specified condition. For example when the liquid TKE magnitude is greater than 0.001 and less than 0.003, store such number of cells (total number) at every time step.

      For this purpose, I'm using Define ADJUST macro.

      if (C_K(cell,pt[0])>0.001 && C_K(cell,pt[0])<=0.003)

      {  C_UDMI(cell,cell_threads,0)=1; /assign value 1 to all such cells that satisfy the above conditions, and storing in a UDMI, 0 represent water, 1 represent air*/

      }

      else

      C_UDMI(cell,cell_threads,1)=0;


      Now, I have created a report definition, 'Sum' of CUDMI 0. What I expect, if at any time instant lets say there are 100 cells which satisfied the mentioned condition, '1' will be assigned to those cells and stored in UDMI, now, summing UDMI will write 100 in the output file i.e. total number of such numerical cells.

      However, implementing this, the value is continuously increasing as time progress.


      Is this approach incorrect? How do I store number of cells which satisfy certain conditions? I want to plot the time evolution of such number of cells.

    • Karthik R
      Administrator
      Hello Are you resetting this UDMI to 0 every timestep?
      Karthik

Viewing 1 reply thread
  • You must be logged in to reply to this topic.