CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   How to access fields from neighbour cells with swak4Foam (https://www.cfd-online.com/Forums/openfoam-pre-processing/223798-how-access-fields-neighbour-cells-swak4foam.html)

Hugoles January 27, 2020 07:08

How to access fields from neighbour cells with swak4Foam
 
Hello,

I need to integrate the field values of cells along columns in a certain direction. Does someone know whether this is possible to do with swak?

More specifically, I need to sum a scalar field along a vertical column of cells up to a given height, so I need to access the field values of all cells below. The operation needs to be repeated for every cell layer below such height. Ideally, the calculation should look for the cells in the layers below since in the region of interest, the cell vertices are not aligned with the xyz directions (bottom surface is a terrain with varying elevation).

With this information, I need to create another field that does not change in time, so I could create it with funkySetFields. However, it would be also very useful to know if there are any function objects that can get access to cell neighbours information (besides those next to patches) during run time.

Thank you for the help!

Hugo


All times are GMT -4. The time now is 20:17.