Re: mass flow over an internal surface
Posted: Thu May 03, 2018 10:39 pm
Hello,
For internal faces, always use the "i_faces" variants. The selection criteria never lead to double counts, but internal faces on MPI process boundaries can be counted twice if you do not take any precautions. For a face "i", i_face_cells[0] < n_cells is true for one rank and false for the other, so this is how we test it.
I recommend using the higher level functions for mass flow, which you can find in the examples (cs_user_extra_operations-balance_by_zone.c); the Doxygen link for that file seems incorrect so just check in the SRC/EXAMPLES subdirectory of a given case) The cs_user_extra_operations-scalar_balance.c example details a lower-level solution (similar to what you are doing).
Regards,
Yvan
For internal faces, always use the "i_faces" variants. The selection criteria never lead to double counts, but internal faces on MPI process boundaries can be counted twice if you do not take any precautions. For a face "i", i_face_cells[0] < n_cells is true for one rank and false for the other, so this is how we test it.
I recommend using the higher level functions for mass flow, which you can find in the examples (cs_user_extra_operations-balance_by_zone.c); the Doxygen link for that file seems incorrect so just check in the SRC/EXAMPLES subdirectory of a given case) The cs_user_extra_operations-scalar_balance.c example details a lower-level solution (similar to what you are doing).
Regards,
Yvan