Snip calculate field value at point

From OpenFOAMWiki
Revision as of 20:23, 7 June 2005 by Bgschaid (Talk | contribs)

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