OpenFOAM section:
I have meshed a hollow cylinder shape in OpenFOAM. In this model, flow will be flow from outer cylinder wall to the inner cylinder wall; Right-Hand law is used for meshing points as below: I have tried to plot face normals by OpenFOAM compiled paraFoam, but I couldn't. It is possible to plot boundary mesh faces (which are on top, bottom, inner and outer cylinder walls) by Glyph normals, but not the internal mesh faces.
Q OpenFOAM: Is there any function code or way to plot them inside paraFoam?
Mesh file have been exported to be plotted inside python, as above right picture. As it is obvious, in this way, mesh faces on Start-End overlapping plane have opposite directions comparing to the other rotational face normals.
Q OpenFOAM: Do these face normal directions result in wrong results? or results are controlled, only, by Right-Hand rule? Is there any code or way to change these directions, if it is needed?
Note: I have imported this mesh file into python FiPy by Gmsh3D and used its faceNormals and cellCenters to plot the face normals by matplotlib.
FiPy section:
I have changed the clockwise Start-End mesh face normals direction to counterclockwise by the following code, due to my needs to use counterclockwise faceNormals direction:
for i in range(self.mesh.numberOfCells):
for f in self.mesh.cellFaceIDs.data.T[i]:
if self.mesh.faceCenters().T[f][0] > 0 > self.mesh.faceNormals.T[f][1] and self.mesh.faceCenters().T[f][1] == 0:
self.mesh.faceNormals.T[f] = np.multiply(np.array([-1, -1, 1]), self.mesh.faceNormals.T[f])
Q FiPy: Do these face normal direction changes have any effect on FiPy solving results? As I understood it from the recent explanation (I couldn't ask this question there duo to not having enough reputation quorum), FiPy considers cell faceNormal direction of a shared face outward to its corresponding neighbor cell, and faceNormal directions (which are shown in the picture using FiPy mesh.FaceNormals) have no effect on the solution, by themselves; This means that it can be considered in opposite directions by the solver depending on the circumstances. Is it right?? Is there any FiPy mesh modules to create such O'grid cylindrical type meshing system, in which x, y, and z coordinates of the nodes could be available? I have tried 'CylindricalGrid2D' for radial meshing, but it gives only r and z coordinates of the nodes.