I need the normal vector of a special Face (with label faceI).
I have tried
but got the following:
error: ‘class Foam::fvMesh’ has no member named ‘faceNormals’.
Maybe someone can give me a hint how to use faceNormals.
The functionality is called Sf() and not faceNormals().
vector N = mesh.Sf()[faceI];
The length of N, i.e. Foam::mag(N) is the area of the face.
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().
My faceI is in [0...s1]
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].
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"?
|All times are GMT -4. The time now is 09:42.|