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

interpolationCellPoint not consistent?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2011, 14:57
Default interpolationCellPoint not consistent?
  #1
Member
 
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17
nikwin is on a distinguished road
Hello,

I'm using the interpolationCellPoint class to interpolate cell values to points, which are not necessary located at the nodes of the field. I'm using the code below in OF 1.6. However, the problem is that I'm not getting consistent results, i.e at some points the interpolation routine gives me values that are not consistent with the field that I'm interpolating from.

Am I using the correct syntax for the interpolation? Is there a different way to perform an interpolation? What kind of interpolation routine is used in this case? And, is the interpolation routine changed in OF-1.7.1, since according to the doxygen manual for 1.7.1 there are several new member functions?

interpolationCellPoint<vector> UInt(U);
point p1(0.0550,0.0048,0.0001);
Info << "p1=" << UInt.interpolate(p1,meshPhys.findCell(p1)) << endl;

Thanks
/NW

For testing I used 6 points closely located with the following results, (p3 deviates)
p1= (0.055 0.0048 0.0001) U(p1) = (49.32435609 -0.487422855 0.0005173166021)
p2= (0.0551 0.0048 0.0001) U(p2) = (49.27461082 -0.4875524205 0.0005564675199)
p3= (0.0552 0.0048 0.0001) U(p3) = (48.38065493 -0.4683060613 0.0005972628526)
p4= (0.0553 0.0048 0.0001) U(p4) = (49.13672163 -0.4864052464 0.001304037682)
p5= (0.0554 0.0048 0.0001) U(p5) = (49.08416 -0.4862573532 0.001257339119)
p6= (0.0555 0.0048 0.0001) U(p6) = (48.99065904 -0.485661105 0.0004215057358)
nikwin is offline   Reply With Quote

Old   June 14, 2011, 09:02
Default
  #2
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 70
Rep Power: 17
David* is on a distinguished road
Hi Niklas,
did you figured something out regarding this issue? In my case, I observed a fluctuating behavior of Uint.interpolate at the cell edges. Is it possible that your position x = 0.0552 is such an edge?
Regards,
David
David* is offline   Reply With Quote

Old   June 17, 2011, 08:47
Default
  #3
Member
 
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17
nikwin is on a distinguished road
Hello,

Yes that's possible. Since it doesn't really work close to the boundary etc.where there are strong gradients I implemented an interpolation routine, which you can find at,

http://www.ems-i.com/gmshelp/Interpo..._Functions.htm

All the Best
/NW
nikwin is offline   Reply With Quote

Old   June 17, 2011, 11:34
Default
  #4
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 70
Rep Power: 17
David* is on a distinguished road
Hi Niklas,
that is a very interesting information, as I experienced a somewhat strange behaviour of the interpolation at the boundary, too.
Thanks for the formulas you linked. But would you mind sharing your implemented code with us? I fully understand if you don't want/are not allowed to, but it would save me a lot of time and frustration
Nice weekend,
David
David* is offline   Reply With Quote

Old   January 4, 2012, 11:17
Default
  #5
Senior Member
 
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 17
deji is on a distinguished road
Hello guys. Is it possible for you to share the code you implemented to interpolate cell values to points within a cell? I will need such values near the boundary as well, where there are high gradients.

Thanks.
deji 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
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation tommymoose ANSYS Meshing & Geometry 48 April 15, 2013 05:24
[Other] Consistent mesh for fluid flow in fractured porous media bemgeomechanic OpenFOAM Meshing & Mesh Conversion 0 March 14, 2011 09:46
[ICEM] how can i create a consistent transitions between tet and hex? specifically my model? snailstb ANSYS Meshing & Geometry 3 March 15, 2010 21:26
Monitor engineering data - Mflux not consistent? ricapag STAR-CD 0 July 28, 2009 14:02
error analysis and consistent splitting method Isi Main CFD Forum 0 August 2, 2007 06:57


All times are GMT -4. The time now is 03:46.