CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   FvPatchScalarField access operator (http://www.cfd-online.com/Forums/openfoam/60797-fvpatchscalarfield-access-operator.html)

maka May 7, 2008 09:43

operator Hi! I have fvPa
 
operator[]

Hi!

I have fvPatchScalarField& vsfp
I want to print the values and the coordinates of all face centers that belong to vsfp. I found operator like [] in the documentation but I do not know how to use it. Any idea how to do that? Thanks.

Best regards,
Maka.

hjasak May 7, 2008 10:02

Try: const vectorField& ctr
 
Try:

const vectorField& ctrs = vsfp.patch().Cf();

Enjoy,

Hrv

maka July 1, 2008 08:31

face order in patches. I no
 
face order in patches.

I noticed that if the patch is normal to z, the values of the scalar on the patch is ordered:
x1 y z1
x1 y z2
...
x2 y z1
x2 y z2

Is there a general rule of ordering such face value. I want to use this to average patch value over specified direction. Thanks.

Best regards,
Maka.

maka July 1, 2008 08:32

correction: I noticed .. norm
 
correction:
I noticed .. normal to Y.


All times are GMT -4. The time now is 08:04.