faceNormals
Hi,
I need the normal vector of a special Face (with label faceI). I have tried mesh.faceNormals()[faceI] but got the following: error: ‘class Foam::fvMesh’ has no member named ‘faceNormals’. Maybe someone can give me a hint how to use faceNormals. B.r., M. 
The functionality is called Sf() and not faceNormals().
So do: vector N = mesh.Sf()[faceI]; The length of N, i.e. Foam::mag(N) is the area of the face. Best regards, Niels 
Hello Niels,
thank you for your answer, but I have not used .Sf() because I am worried about the fact that the number of faces is not equal to the number of vectors of mesh.Sf(). s1=mesh.nFaces(); s2=mesh.Sf().size(); s2<s1; My faceI is in [0...s1] B.r.,M. 
Hi Martin
This is because mesh.Sf() returns the internal faces, hence mesh.Sf().size() = mesh.nInternalFaces(). If you are working on all the faces, the additional faces on the boundaries needs to be accessed using mesh.Sf().boundaryField()[patchi]. Best regards, Niels 
Thanks a lot, Niels,
do you know how OpenFoam is counting the faces? To clarify my question: let's assume a field consists of 800 internal faces and 200 boundary faces. I'm using "mesh.edgeFaces()[edgeI]" and get a list of face numbers between 0 and 999. Is it true that if the number is less than 800 the corresponding face is an internal face? If not how is the counting of the "internal faces" connected to the counting of "all faces"? B.r.,M. 
Quote:

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