CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

PrimitiveMesh intersection point computation

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   August 9, 2005, 00:33
Default Mr Henry, I have a question a
Join Date: Mar 2009
Posts: 51
Rep Power: 10
leosding is on a distinguished road
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?
leosding is offline   Reply With Quote

Old   August 9, 2005, 13:56
Default It is an approximation of the
Super Moderator
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 18
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Old   August 9, 2005, 14:44
Default This is one of mine. The issu
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,810
Rep Power: 25
hjasak will become famous soon enough
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.


Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Polyline at intersection of two planes Francesco CFX 2 July 29, 2009 08:03
Documentation of class primitiveMesh attached jaswi OpenFOAM Running, Solving & CFD 0 November 4, 2008 03:02
how to avoid self intersection:Proam bala Siemens 5 March 6, 2008 05:23
meshing at a pipe intersection cyn FLUENT 0 December 20, 2006 03:16
Non manifold intersection zone Dimitri FLUENT 2 July 26, 2002 02:20

All times are GMT -4. The time now is 07:59.