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

access field value at boundary face and nearest cell in boundary condition class

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2015, 19:02
Default access field value at boundary face and nearest cell in boundary condition class
  #1
Member
 
Mehtab
Join Date: Jan 2015
Posts: 41
Rep Power: 11
mehtab is on a distinguished road
Hi,

I want to know how can I access a field value eg Temperature at a patch (boundary face) and how can I do the same for nearest boundary cell.

Code:
const fvMesh& mesh = patch().boundaryMesh().mesh();
const volScalarField& T= mesh.lookupObject<volScalarField>("T");
The above code is accessing value at boundary face or nearest cell? And What should be the code for other case?

Thanks
Maqs
mehtab is offline   Reply With Quote

Old   October 22, 2015, 00:09
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
This post should help accessing patch face values directly:
http://www.cfd-online.com/Forums/ope...ces-patch.html
kmooney 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
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 11:58
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 15:38
UPWIND scheme: boundary condition ? Lionel S. Main CFD Forum 2 July 17, 2007 06:39


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