Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Understanding Cell ID Numbering in ANSYS Fluent

    • Joan Rico
      Subscriber

      Hello, 

      I am running a a case on ANSYS Fluent 22v2 where I try to simulate outdoors dispersion of particles over a complex terrain. 

      On this simulations I am using a Lagrangian approach and injecting particles into my domain using the DPM models available in Fluent.

      As an output of my simulation I export an ASCII file every time step with the dpm-concentration over a user defined plane. 

       

      Everything is working as expected but I was wondering if anyone could give me some insights on how the plane's cell ID numbering works.

      On my ASCII file I get a list with the ID of each cell contained in the plane, its coordinates (of its center, I guess), and the value of interest for that cell. However I the IDs don't seem to follow any certain order. Moreover, if I stop and restart my simulation, the IDs of the cells change completely, so I was wondering how are they assigned. Is there a logic behind or is it randomly done?

      Thank you so much in advance!

    • Prashanth
      Ansys Employee

      Hello,

      Could you please add a screenshot of the output file or something to comment on?

    • Joan Rico
      Subscriber

      Hello and thanks for your answer. 

      I attach hereby a screenshot of an example of an output file that I get from the simulation. The command that I use to get such an output is: /file/transient-export/ascii "export-normal-plane-stack-wnwfarm-fs6.csv" (normal-plane-stack-wnwfarm) dpm-concentration q yes yes "export-normal-plane-stack-wnwfarm" time-step 50 flow-time 2

      I wanted to understand how the cellnumber variable is assigned.

       

      Kind regards, 

      Joan

    • Rob
      Forum Moderator

      It is logical, but if/when you repartition or reorder the mesh the IDs will change. It's why we generally recommend saving case & data where possible and why it's rare to use cell ID in any coding/workflows. 

    • Joan Rico
      Subscriber

      Okay that explains the issue I was facing. 

      I wanted to understand how the ID were assigned because I was having some issues with the postprocessing of data. 

      I found out that if I pause and restart a simulation the ID change, but now I understand it is because of the repartition, as I am using several CPUs to solve my simulation.

      I was using the IDs as they are unique, but now I solved the issue in my postprocessing by taking the coordinates into consideration instead. However, if there is a logical assignment of IDs why does it change with the repartition?

    • Rob
      Forum Moderator

      It changes because with the repartition you will get "partition" cells that are used to help with the data transfer. Simple explanation is we add a layer or few of cells from each partition to the adjacent ones to assist in data mapping and gradient calculation. Those also have an ID for the solver to work with. 

      There's also the fact that cell data is stored in RAM so it may or may not always be stored in the same order. It's logical, but that doesn't mean it's repeatable! 

    • Joan Rico
      Subscriber

      Okay, that makes comlete sense now! 

      Thank you very much for your time, Rob

      Have a nice day!

Viewing 6 reply threads
  • The topic ‘Understanding Cell ID Numbering in ANSYS Fluent’ is closed to new replies.