- **OpenFOAM Running, Solving & CFD**
(*https://www.cfd-online.com/Forums/openfoam-solving/*)

- - **PrimitiveMesh intersection point computation **
(*https://www.cfd-online.com/Forums/openfoam-solving/60530-primitivemesh-intersection-point-computation.html*)

Mr Henry,
I have a question aMr Henry,
I have a question about primitiveMesh class. In primitiveMeshCheck.C the private member function checkFacesSkewness(const bool report, labelHashSet* setPtr) const, to compute the intersection point between the vector PN and the face, the code in FOAM as below: scalar dOwn = mag(faceCtrs[faceI] - cellCtrs[own[faceI]]); scalar dNei = mag(faceCtrs[faceI] - cellCtrs[nei[faceI]]); point faceIntersection = cellCtrs[own[faceI]]*dNei/(dOwn+dNei) + cellCtrs[nei[faceI]]*dOwn/(dOwn+dNei); following the code, the point isn't the point wanted, it is the point of the intersection point of the bisector line of vector dOwn and vector dNei with the vecter PN. Is my view right? |

It is an approximation of the It is an approximation of the intersection of the owner-neighbour vector with a plane normal to this vector and through the face centre.
It is correct for zero skewness. |

This is one of mine. The issuThis is one of mine. The issue is that the face integral is done by using the mid-point rule, and in order for the integral to be second order accurate, the "mid-point" has got to be in the middle of the face, right?
At the same time, the face value is calculated y interpolation from the cells around it. Therefore, the face integral will be second order only if the PN line hits the face in the centroid; if it misses, discretisation loses accuracy. The skewness error measures this by evaluating the distance between the intersection and the actual centroid, and normalises it with the PN distance. In principle, you can add skewness correction, but for real cases, this just increases the amount of numerical noise you get (because of the increased molecule), so typically it's not worth having. Enjoy, Hrv |

All times are GMT -4. The time now is 19:42. |