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

Point Interpolation

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 3 Post By ernsa
  • 1 Post By jameswilson620
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2011, 09:32
Default Point Interpolation
  #1
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi all,
is there a class to interpolate a vector or a scalar from the cells faces to the cells points or directly from the cell centers to the cells points? For example, How to get the gradient of a given quantity defined at the cells points?

thanks

andrea
Andrea_85 is offline   Reply With Quote

Old   June 16, 2011, 12:05
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
If you are using 1.6-extend, it is available in the volPointInterpolation class.

See a snippet here:

http://openfoamwiki.net/index.php/Op...tInterpolation

I can't find the class in 1.7.1, so I'm not sure where it went.
marupio is offline   Reply With Quote

Old   June 16, 2011, 12:33
Default
  #3
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi David,
thanks for reply!
I have already tried volPointInterpolation, but without success! In OF 1.7.1 is under src/finiteVolume/interpolation/volPointInterpolation.
I tried something like:

volVectorField gradA = fvc::grad(alpha1);
pointVectorField gradC = volPointInterpolate::interpolate(gradA);

maybe is not the correct syntax...Do you know which is the correct one to call this class?

thanks again

andrea
Andrea_85 is offline   Reply With Quote

Old   June 16, 2011, 20:23
Default
  #4
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
try volPointInterpolation::interpolate

I've never actually used it, though...
marupio is offline   Reply With Quote

Old   June 24, 2011, 11:16
Default
  #5
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi, sorry for the late response. Thanks for your help. I still get an error:

now i simply write

pointScalarField alphaC = volPointInterpolation::interpolate(alpha1_);
fo get the alpha values on the vertices. Here the error:

Making dependency list for source file interfaceProperties.C
SOURCE=interfaceProperties.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/interfaceProperties.o
interfaceProperties.C: In member function ‘void Foam::interfaceProperties::calculateK()’:
interfaceProperties.C:152: error: cannot call member function ‘Foam::tmp<Foam::GeometricField<Type, Foam:ointPatchField, Foam:ointMesh> > Foam::volPointInterpolation::interpolate(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) const [with Type = double]’ without object
interfaceProperties.C:152: warning: unused variable ‘alphaC’
make: *** [Make/linux64GccDPOpt/interfaceProperties.o] Error 1


Any idea of why??
Regards

andrea
Andrea_85 is offline   Reply With Quote

Old   August 25, 2011, 05:40
Default
  #6
New Member
 
Sandro E.
Join Date: Sep 2009
Posts: 2
Rep Power: 0
ernsa is on a distinguished road
Hi,

first you shoud define your "Vol to Point interpolator" in the following manner:

for example: interpolate a volScalarField s from cell to points

volPointInterpolation interpolateVolPoint (mesh);

pointScalarField sP = interpolateVolPoint.interpolate(s);


and don't forget to add

#include "volPointInterpolation.H"

Cheers,
Sandro
ernsa is offline   Reply With Quote

Old   May 18, 2015, 20:41
Default
  #7
Member
 
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 39
Rep Power: 12
jameswilson620 is on a distinguished road
Any luck Andrea????

Also, has anybody utilized/ported this code for new versions of OF? Im using OF230.

James
shackman287 likes this.
jameswilson620 is offline   Reply With Quote

Old   September 20, 2015, 09:33
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by jameswilson620 View Post
Also, has anybody utilized/ported this code for new versions of OF? Im using OF230.
For future reference:
  1. Sandro had already answered this question in the previous post #6. Namely that this is still present in OpenFOAM 2.3, but under a slightly different name and way of using it.
  2. James later answered his own question on another thread: http://www.cfd-online.com/Forums/ope...tml#post546806 - post #4
rajibroy and sdutta like this.
wyldckat is offline   Reply With Quote

Old   January 15, 2019, 05:07
Default
  #9
Member
 
Emad Tandis
Join Date: Sep 2010
Posts: 77
Rep Power: 16
EmadTandis is on a distinguished road
Quote:
Originally Posted by ernsa View Post
Hi,

first you shoud define your "Vol to Point interpolator" in the following manner:

for example: interpolate a volScalarField s from cell to points

volPointInterpolation interpolateVolPoint (mesh);

pointScalarField sP = interpolateVolPoint.interpolate(s);


and don't forget to add

#include "volPointInterpolation.H"

Cheers,
Sandro

Hello Sandro,
Have you had any experience in edgeCorrectedVolPointInterpolation class?
I cannot make any object of this class by :


const pointMesh& pMesh = pointMesh::New(mesh);
const volPointInterpolation& cpi2=edgeCorrectedVolPointInterpolation::New(mesh, pMesh);
EmadTandis 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
Surface interpolation schemes and parallelization jutta OpenFOAM Running, Solving & CFD 0 February 25, 2010 15:32
CFX Post: Problems with moving point cloud for changing time steps spatialtime CFX 0 December 7, 2009 05:56
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
[Gmsh] Gmsh and samplesurface touf OpenFOAM Meshing & Mesh Conversion 2 December 10, 2007 03:27
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 00:32.