|
[Sponsors] |
May 30, 2012, 15:46 |
pointVolInterpolation, How to use it?
|
#1 |
New Member
Jorge Meneses
Join Date: Feb 2012
Posts: 6
Rep Power: 14 |
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: Code:
volVectorField alpha ( IOobject ( "alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh ); 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 ( IOobject ( "beta", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh ); pointField pt = pointVolInterpolation interpPointVol (mesh); beta = interpPointVol.interpolate(pt); Hope you can help me. Thank you. Last edited by Goab; May 30, 2012 at 15:48. Reason: Information incomplete |
|
|
|