CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Intelligent loop over cells (https://www.cfd-online.com/Forums/fluent-udf/243133-intelligent-loop-over-cells.html)

Pyrokrates May 31, 2022 08:04

Intelligent loop over cells
 
Hey,


I would like to solve some iterative equations on my cell centers (if there is no "good" way, faces would be ok too).


The problem is, for iteration step n+1 in cell i, I need the value of n+1 from cell i-1.


What I mean is, I do not only calculate iterative, I also need the value of my upstream previous cell to get the result in the next downstream cell. To do this, I need some intelligent looping where I first calculate the cells at my inlet (z=0), than the next "plane" (e.g. z=0.1), and so on... What makes it much more hard is, that the mesh in unstructured.


Does anybody know, if there is a way to loop over all cells by coordinates e.g.? Than I could loop over x,y (parallel to main flow direction) and than over z until I reach the outlet.


Thanks in advance.


Chris


All times are GMT -4. The time now is 13:16.