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

wondering about patch.nf() and mesh.Sf().boundaryField()[patchID]

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By codder

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2014, 13:08
Default wondering about patch.nf() and mesh.Sf().boundaryField()[patchID]
  #1
Member
 
Eric Bryant
Join Date: Sep 2013
Location: Texas
Posts: 44
Rep Power: 12
codder is on a distinguished road
Ultra confused by simple question...

Is the vectorField result of the following two expressions always identical ?

Within a patch I can access an ordered field of face normals:
Code:
patch.nf()
For that same patch with ID "patchID" but now within a solver, I can get face normals using:
Code:
mesh.Sf().boundaryField()[patchID] / mesh.magSf().boundaryField()[patchID]
I.e., are both these vectorFields ordered in the same sequence ??

I would like it very much if they are !! Thank you
randolph likes this.
codder is offline   Reply With Quote

Old   October 31, 2014, 04:08
Default
  #2
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 13
vigneshTG is on a distinguished road
Dear Eric,

I also have the same doubt, did you find out the answer ? One more thing, can you tell me, how to access the normal vectors of a patch using patch.nf() ?
__________________
Thanks and Regards

Vignesh
vigneshTG is offline   Reply With Quote

Old   October 31, 2014, 07:14
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
They should have the same order as far as I know (but differences between single core and decomposed mesh may exist). Incase you want to access the cells next to the boundary, you will need a different index which can be found with the faceCells() function.
chriss85 is offline   Reply With Quote

Old   October 31, 2014, 13:12
Default yes it's true!
  #4
Member
 
Eric Bryant
Join Date: Sep 2013
Location: Texas
Posts: 44
Rep Power: 12
codder is on a distinguished road
Sorry for not updating to this thread earlier. I'm not 100% sure (I didn't track down the C++) but having assumed them same for awhile I've never gone wrong.

So yes they share the same ordering.
codder is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[mesh manipulation] How to create patch after snappyHexMesh hsieh OpenFOAM Meshing & Mesh Conversion 33 July 17, 2017 08:15
IcoLagrangianFoam and particle forces davidpalko OpenFOAM Running, Solving & CFD 33 December 2, 2013 02:39
Relative Fluxes in icoDyMFoam deepsterblue OpenFOAM Running, Solving & CFD 7 July 20, 2012 02:39
IcoTopo mixerMeshslide Foam Code pilot OpenFOAM Running, Solving & CFD 6 September 19, 2006 13:31
just wondering. puck FLUENT 3 August 19, 2002 23:08


All times are GMT -4. The time now is 12:57.