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 assign different values for every cells in a part of the domain (https://www.cfd-online.com/Forums/openfoam-pre-processing/169011-how-assign-different-values-every-cells-part-domain.html)

clktp April 1, 2016 11:45

How to assign different values for every cells in a part of the domain
 
Hi,

I'm trying to assign different values for a specific part of the domain and the values have an order. For instance I have a flat plate domain, and my domain have 1000 cells as 10x10x10. I wanna assign values from 1 to 100 for all the first cells.

I tried to modify setFields but I couldn't do it. I used funkySetFields before, but I don't know how to do it for this case. Does anyone know how to do it, or have an idea? Actually I can do it manually, but I don't wanna do it.

My former adviser modified the setFields to help me, but I lost the code and I can't remember how he did it because I was so sicked of it that I didn't even take a look at the code.

Cheers,
clktp


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