|
[Sponsors] |
September 5, 2012, 22:58 |
Interpolation on a curved patch
|
#1 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19 |
Hi,
I want to calculate values at points on a patch by interpolation using only the boundaryField values (not using internalField values at all). My target patch is a *curved* surface (not a plane) and the values at the nodal points on this patch are known. Is it possible to do above interpolation in OpenFOAM? If so, which utility should I use? Regards, Fumiya |
|
September 6, 2012, 04:29 |
|
#2 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Hi Fumiya,
you could use the primitivePatchInterpolation class. This class allows interpolation of data from patch face centre to patch points (and vice-versa). Here is an example: Code:
//- find label of patch label patchID = mesh.boundaryMesh().findPatchID("patchOfInterest"); if(patchID == -1) { FatalError << "Patch not found!" << exit(FatalaError); } //- create interpolator primitivePatchInterpolation myPatchInterpolator(mesh.boundaryMesh()[patchID]); //- perform interpolation of vectorField U from patch faces to points vectorField patchUAtPoints = myPatchInterpolator.faceToPointInterpolate<vector> ( U.boundaryField()[patchID] ); The primitivePatchInterpolation class uses the inverse-distance method to interpolate the data, so it is quite accurate on orthogonal grids but can have errors on meshes with considerably skewed/non-orthgonal faces/cells. Hope it helps, Philip |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 05:04 |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 05:38 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 03:34 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |