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

Problem with InterpolationScheme on cell faces?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2014, 02:00
Default Problem with InterpolationScheme on cell faces?
  #1
Member
 
Kasra
Join Date: Jun 2010
Location: USA
Posts: 44
Rep Power: 16
gary7 is on a distinguished road
Dear All,

I'm using an interpolation on the fly on a point in my field As:

Code:
autoPtr<interpolation<vector> > Uinterpol =interpolation<vector>::New(interpolationScheme, U);
vector pos(200,40,200);
label cellI = mesh_.findCell(pos);
vector Ui = Uinterpol_->interpolate(pos, cellI);

As long as the ponit (pos here) is on a cell face, If I choose interpolationScheme either "cellPoint" or "cellPointFace" it'll give me wrong interpolated value at the point, however, choosing "cell" works but the problem is that using "cell" is not accurate as it assumes constant value in each cell equal to cell center.
I was wondering how I can make the "cellPoint" or "cellPointFace" to work when the point may lay on the cell face?
I'd appreciate any input.

Cheers,
Kasra.
gary7 is offline   Reply With Quote

Old   June 19, 2014, 11:40
Default
  #2
Member
 
Kasra
Join Date: Jun 2010
Location: USA
Posts: 44
Rep Power: 16
gary7 is on a distinguished road
I found out that the problem is not just on cell faces it happens even inside a cell. if I choose "cell" as interpolationScheme, I'll get Ui which is a rough estimate at the desired point in the cell, since it assumes cell center value constant over cell. But if I use any other schemes e.g. "cellPoint", "cellPointFace", "ponitMVC", ... I'll get wrong values to have an idea let me give you an example: the position I have given in previous post, is for a point which is on the hexagonal cell vertex of a cell next to the top boundary, i.e. the top wall of couette flow (moving wall being a y-plane at y=41 ) which moving at velocity of V=(1,0,0), so the value at the specified point should be something close to (1,0,0) here are the values that I get using different interpolation schemes:

  • "cell" ----> (0.920479, -5.41529e-11, 2.61042e-13)
  • "cellPoint" ----> (0.5, 0, 0)
  • "cellPointFace" ----> (0.5, 0, 0)


Or if I use pos(200,40.75,200) then it's the same result for "cell" (which is right as it's still in the same cell) but for the rest it's:

  • "cellPoint" ----> (0.75, 0, 0)
  • "cellPointFace" ----> (0.75, 0, 0)


I have no clue what's happening and how to solve this issue:/. I'd be really appreciate it if you can help me to solve this issue.

Cheers,
Kasra.
gary7 is offline   Reply With Quote

Reply


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
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Meshing & Mesh Conversion 13 February 17, 2022 08:34
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 36 January 7, 2015 01:31
Journal file error magicalmarshmallow FLUENT 3 April 4, 2014 13:25
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


All times are GMT -4. The time now is 08:34.