CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

OF 3.0.x: The tetLambda() function in particleTemplates.C

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 18, 2016, 10:44
Default OF 3.0.x: The tetLambda() function in particleTemplates.C
  #1
Member
 
Join Date: Jul 2011
Posts: 50
Rep Power: 7
A_Pete is on a distinguished road
Hey everyone,

I am right now trying to understand the hitWallFaces() function in particleTemplates.C of the lagrangian tree. It is checked whether a particle hits a face that belongs to a wall or not. I think that I understand most of the code until the tetLambda() function is called as follows:

Code:
scalar tetClambda = tetLambda
(
    tetIs.tet(mesh_).centre(),
    toPlusRNHat,
    0,
    n,
    f[tetIs.faceBasePt()],
    cellI_,
    fI,
    tetIs.tetPt(),
    lambdaDistanceTolerance
);
Where IMO tetIs.tet(mesh_).centre() is the centre of the considered tetrahedron and
Code:
toPlusRNHat = to + r*nHat
is defined before. "to" is the position the particle is supposed to move to after the time step, "r" is the particle radius and "nHat" is the normalized normal vector of the considered triangle.

What tetLambda now does (as far as I've understood and please correct me if I'm wrong) is to check whether "toPlusRNHat" is behind the considered wall face outside of the domain. I have checked for multiple triangles and I see that the triangle normal vector "nHat" is always pointing into the simulation domain. To me this means that "toPlusRNHat" is always more inside of the domain than "to" (the wanted position of the particle when there is no hit of a face) is. To my understanding it would make more sense if
Code:
toPlusRNHat = to - r*nHat
(see the minus sign in front of the second term instead of a plus sign).

Since then the particle would mean to hit a face as soon as its outer radius hits the face.

Does anybody have any expierence with this class? Thank you very much in advance.

Best regards,
Andreas
A_Pete is offline   Reply With Quote

Old   May 24, 2016, 02:57
Default
  #2
Member
 
Join Date: Jul 2011
Posts: 50
Rep Power: 7
A_Pete is on a distinguished road
Has anybody worked on this and some hints for me?

In my opinion, since the normal vector "n" of a triangle points inwards into the domain (this may be contrary to face normal vectors), toPlusRNHat should be defined as:

Code:
toPlusRNHat =to - r*nHat
So that the actual position the particle wants to move to is shoved towards the face by one radius in normal direction.
A_Pete is offline   Reply With Quote

Reply

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
Lets talk about relaxation factor optimization chriss85 OpenFOAM Running, Solving & CFD 32 July 1, 2015 10:00
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 07:59
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 23:08.