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/)
-   -   Syntax What does mean (https://www.cfd-online.com/Forums/openfoam-pre-processing/62247-syntax-what-does-mean.html)

evgenii November 23, 2005 07:55

Hi, everyone! I have a que
 
Hi, everyone!

I have a question about syntax. In anlitycalCylinder (from tutorials) I came across next code

U.boundaryField()[3][0].x()
U.mesh().boundary()[4].Cf()[0]

What do [3][0] in the first case and [4]...[0] in the second case mean? Is it a some kind of element indexing? I've read Guides very attentively, but unfortunately there is no information at all.

Hope to get some help.

eugene November 23, 2005 08:31

It is indeed indexing. U.bo
 
It is indeed indexing.

U.boundaryField()[3][0].x()
This is the x component of velocity for face number 0 from boundary region number 3. I.e. the first index accesses a specific boundary region of the U field, while the second addresses the face within that region.

U.mesh().boundary()[4].Cf()[0]
This is the face centre vector for face number 0 from boundary region number 4.

evgenii November 23, 2005 08:42

I was thinking something like
 
I was thinking something like that, but I wanted to be sure http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Thank you for reply


All times are GMT -4. The time now is 02:49.