UDF Cell Loop Macro Considerations

In a udf that is looping the cells in a volume, keep in mind which kind of cell looping macro that is being used. There are several variants of the begin_c_loop macro. This includes the begin_c_loop_int, end_c_loop_rext, end_c_loop_eext, end_c_loop_ext and end_c_loop_int_ext. These all include different sets of cells inside and outside of partitions. If you’re looping to sum or integrate the volume over several partitions which is usually the case using the wrong one can lead to the wrong net volume being used or calculated. For example the end_c_loop includes both interior and the regular exterior cells which means that the sum of volume of all cells in that loop would overestimate the total volume when summed up in total. To avoid this use the interior version of the cell loop, begin_c_loop_int. The specific definitions of the cell looping macros are documented in the fluent customization manual, link to the 25R2 version of that is here: Link do description in the online documentation