Difference between revisions of "Snip calculate field value at point"

From OpenFOAMWiki
 
(nah, I'll leave it out of the coding guide category for now. Undo revision 14198 by Wyldckat (talk))
 
(18 intermediate revisions by 13 users not shown)
Line 1: Line 1:
 
+
The original question (as posten on [http://openfoam.cfd-online.com/forum/messages/1/438.html the Message board]) was: ''Given a position as (x,y,z), I want the u or p value in this point by using interpolation.''
The original question (as posten on [ the Message board]) was: ''Given a position as (x,y,z), I want the u or p value in this point by using interpolation.''
+
  
 
== Doing the interpolation by yourself ==
 
== Doing the interpolation by yourself ==
Line 19: Line 18:
  
 
TODO
 
TODO
 +
 +
[[Category:Incomplete pages]]

Latest revision as of 11:30, 2 November 2013

The original question (as posten on the Message board) was: Given a position as (x,y,z), I want the u or p value in this point by using interpolation.

1 Doing the interpolation by yourself

 
vector probePoint(x,y,z);
label probeCell = mesh.findCell(probePoint);
 
const labelList& probeCellNeighbours = mesh.cellCells()[probeCell];
 
forAll(probeCellNeighbours, cellI)
{
  // Do your stuff
}

2 Using OpenFOAM's interpolation classes

TODO