CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   PrimitiveMesh intersection point computation (

leosding August 9, 2005 00:33

Mr Henry, I have a question a
Mr 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[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?

mattijs August 9, 2005 13:56

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.

hjasak August 9, 2005 14:44

This is one of mine. The issu
This 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.



All times are GMT -4. The time now is 15:39.