CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Interpolation on a curved patch

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 5, 2012, 21:58
Default Interpolation on a curved patch
  #1
Senior Member
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 169
Rep Power: 7
fumiya is on a distinguished road
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
fumiya is offline   Reply With Quote

Old   September 6, 2012, 03:29
Default
  #2
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 568
Rep Power: 19
bigphil will become famous soon enoughbigphil will become famous soon enough
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]
       );
Place the line #include "primitivePatchInterpolation.H" at the top of your program under #included "fvCFD.H".

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
bigphil is offline   Reply With Quote

Old   September 11, 2012, 06:29
Default
  #3
Senior Member
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 169
Rep Power: 7
fumiya is on a distinguished road
Hi Philip,

Thank you for your information. I'll give it a try.

Thanks,
Fumiya
fumiya is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
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
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


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