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

How to restrict fvc::interpolate to faces on patch

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mtgoncalves

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2018, 11:56
Default How to restrict fvc::interpolate to faces on patch
  #1
New Member
 
Join Date: Aug 2016
Posts: 19
Rep Power: 10
mtgoncalves is on a distinguished road
I want to "interpolate" (actually extrapolate) the cell-centered values of a volScalarField to face centers on a patch. Naively, I could do that like this:

Code:
surfaceScalarField pFace = fvc::interpolate(p);
surfaceScalarField::Boundary& pFaceOnPatch = pFace.boundaryFieldRef();
However, this approach will also interpolate to internal faces. Is there a more efficient approach, such that I only interpolate to faces that are on a patch?
the_ichthyologist likes this.
mtgoncalves is offline   Reply With Quote

Old   June 13, 2018, 00:36
Default
  #2
Member
 
Martin
Join Date: Dec 2011
Posts: 40
Rep Power: 14
msaravia is on a distinguished road
I am not sure but I think that p.boundaryField() will give you the field in the boundary faces.
msaravia is offline   Reply With Quote

Old   June 13, 2018, 06:15
Default
  #3
New Member
 
Join Date: Aug 2016
Posts: 19
Rep Power: 10
mtgoncalves is on a distinguished road
True, but that value is determined via the boundary condition imposed for p. It is not necessarily an extrapolation of the internalField of p.
mtgoncalves is offline   Reply With Quote

Reply

Tags
cell-to-face, extrapolate, interpolate


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] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 09:26
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) Aadhavan OpenFOAM Meshing & Mesh Conversion 2 March 8, 2018 02:47
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library aylalisa OpenFOAM Installation 23 June 15, 2015 15:49
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11


All times are GMT -4. The time now is 02:31.