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

automatic interpolation of field on call

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 29, 2013, 09:54
Default automatic interpolation of field on call
  #1
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20
romant is on a distinguished road
I have a question. Let's say I have a field
Code:
const volScalarField& k
and I have a some labels, let's call them
Code:
label faceI        // surface between two cells
label faceCellI   // cell center
when I now call
Code:
k[faceCellI]
I get the value of k at the cell center, as the label points to a cell center. When I call
Code:
k[faceI]
do I get the interpolated value from the face? I always thought that I would need to interpolate the field first and then call the interpolated field in order to get my value at the interface between two cells. However, after implementing it this way, I still get a value, which also seems reasonable.

Now the question, does OpenFOAM automatically interpolate in these cases? I wonder if the same also works for volVectorFields, when retrieving a value from the interface between two neighboring cells (through a label) that it then interpolates.
__________________
~roman
romant is offline   Reply With Quote

 


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
Setting an external B0_x field in MHD module fferroni FLUENT 11 August 1, 2022 08:20
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
How to get the velocity field from the pressure field Hermano Main CFD Forum 2 November 29, 2011 08:32
automatic call a function in a program gerado OpenFOAM 9 June 29, 2009 02:30
2D CFD code using SIMPLE algorithm bfan Main CFD Forum 3 June 22, 2002 22:01


All times are GMT -4. The time now is 11:28.