CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

pointVolInterpolation, How to use it?

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

LinkBack Thread Tools Display Modes
Old   May 30, 2012, 15:46
Default pointVolInterpolation, How to use it?
New Member
Jorge Meneses
Join Date: Feb 2012
Posts: 6
Rep Power: 7
Goab is on a distinguished road
Hello Foamers,

Possibly this is well known but I'm having a hard time making it work.

I've been searching throughout the forum and I've seen that apparently pointVolInterpolation works correctly ( what happened to pointVolInterpolation?) I already found it and I've been reading the code, however I haven't been able to use it.

I'm using simpleFoam and what I want to do is to take a volVectorField, get its points using volPointInterpolation and change them by multiplying them by a factor and adding some constants to each component (x,y,z), and finally, after that get again a volVectorField using those values.

What I have so far is:

volVectorField alpha

pointField P = interpVolPoint.interpolate(alpha);
point& pt = P[pointI]

forAll(P, pointI)
            double px=3.0*pt.x()+15;
            double py=2.0pt.y()+16;
            double pz=pt.z()+14;

volVectorField beta

pointField pt = pointVolInterpolation interpPointVol (mesh);
beta = interpPointVol.interpolate(pt);
When I use volPointInterpolation, even when I change the values, it works perfectly, however when I try to create again the volVectorField out of those values, it crashes.

Hope you can help me.

Thank you.

Last edited by Goab; May 30, 2012 at 15:48. Reason: Information incomplete
Goab is offline   Reply With Quote


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

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