what happened to pointVolInterpolation?
How can I interpolate a pointScalarField to a volScalarField?
The forum thread http://www.cfd-online.com/Forums/ope...alarfield.html and http://openfoamwiki.net/index.php/PointVolInterpolation say that the pointVolInterpolation class can be used. But I can't find pointVolInterpolation in OpenFoam 1.6. Oskar |
As there seems to be no reply on this issue, I think I will mark pointVolInterpolation as broken for versions newer than 1.5 in http://openfoamwiki.net/index.php/Op...%28OpenFOAM%29 and http://openfoamwiki.net/index.php/Op...lInterpolation. Any objections?
I do appreciate recommendations how to replace the pointVolInterpolation functionality. thx Oskar |
Works beautifully in 1.6-ext.
Hrv |
How does it work?
Good Morning Dr. Jasak
I know it's been a while since you answered this thread, however since you've used pointVolInterpolation I'm sure you can help me. I've been reading thoroughly pointVolInterpolation.H, pointVolInterpolation.C and pointVolInterpolate.C and, unfortunately I'm still unable to use the function. Possibly is a silly mistake due to my lack of knowledge but still is giving me a hard time. What I'm trying to do is to interpolate a volVectorField to points, change the values with simple arithmetic and interpolate them back to a volVectorField (whether the same or a different one). What I have this far is: Code:
In an attempt to make it work, I wrote: Code:
const pointMesh pMesh(mesh); Code:
Thank you very much. Jorge. |
Quote:
pointVolInterpolation interpolates values from mesh points to mesh cell centres. I think you should use volPointInterpolation which interpolates from cell centres to points. You can use volPointInterpolation like this: Code:
// Create point mesh Best regards, Philip |
Fantastic
Hello Philip,
Thank you so much for you reply, I was getting worried. Regarding volPointInterpolation, I agree with you, that was the first part of my problem and I had it almost solved, of course, what you sent me will help me to enhance my solution, however, my real problem is with pointVolInterpolation, as you said, to interpolate mesh points to mesh cells. Hope you know and can help me. Regards, Jorge |
Hi Jorge,
I ran into the same trouble when trying to interpolate from point to volume values. As your last post is rather old, you might already have found the solution. If not, here we go: Your "betaP" is defined as a pointField, but is has to be a pointScalarField or pointVectorField, defined in the way already described by bigphil. Then you can use it in the same way as the volume->point interpolation - although I had to use a "temporary" copy field as the solver otherwise complained about incompatible meshes. The following snippet interpolates vol->points and back points->vol. Code:
scalarField gP = interpolateVolToPoints.interpolate(gammaM); Arne |
Quote:
I want to interpolated from face to point . when i create point mesh with pointMesh pMesh(mesh); the error occured as below: pFoam.C:141:31: error: variable ‘const Foam::pointMesh pMesh’ has initializer but incomplete type const pointMesh pMesh(mesh); what's the matter with it? Best regards Fan Fei |
Hi Fan Fei,
You must include the pointMesh.H header file at the top of your solver in order to use it: Code:
#include "fvCFD.H" You may have to write your own interpolator. Philip |
Quote:
Thank you for your reply, this problem has been solved now. I use primitivePatchInterpolation for interpolated from face to point. As i set pointScalarFiled. There're some errors as /home/administrator/foam/foam-extend-3.1/src/foam/lnInclude/GeometricField.H: In constructor ‘Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = Foam::Vector<double>; PatchField = Foam::pointPatchField; GeoMesh = Foam::pointMesh; Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::pointMesh]’: /home/administrator/foam/foam-extend-3.1/src/foam/lnInclude/GeometricField.H:304:73: error: incomplete type ‘Foam::pointPatchField<Foam::Vector<double> >’ used in nested name specifier const word& patchFieldType=PatchField<Type>::calculatedType() ^ pFoam.C:154:5: note: when instantiating default argument for call to Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = Foam::Vector<double>; PatchField = Foam::pointPatchField; GeoMesh = Foam::pointMesh; Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::pointMesh] ); ^ Is it lack of the pointFields.H, or some another mistake? [/SIZE] Best regards Fan Fei |
Hi Fan Fei,
Can you post your code segment that does not compile and then post the compilation error, please. Also be careful of the format of your post; you can use Code:
... code here ... Philip |
Quote:
Code ---------------------------------- pointMesh pMesh(mesh); pointVectorField pointField ( IOobject ( "wallpoint", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), pMesh, dimensionedVector("q_bed",sqr(dimLength)/sqr(dimTime),vector::zero) ); ----------------------------------------------------- the error is too long, it's about 502KB, and it can't be upload. ---------------------------------- GeometricField.H: In constructor ‘Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = Foam::Vector<double>; PatchField = Foam::pointPatchField; GeoMesh = Foam::pointMesh; Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::pointMesh]’ GeometricField.H:304:73: error: incomplete type ‘Foam::pointPatchField<Foam::Vector<double> >’ used in nested name specifier const word& patchFieldType=PatchField<Type>::calculatedType() ------------------------------------------------------------- Best regards FanFei |
Quote:
The problem has solved now. it's need to added the # include "pointFields.H" after the # include "fvCFD.H". Best Regards Fanfei |
All times are GMT -4. The time now is 02:41. |