Hello,
How to use volPoint
Hello,
How to use volPointInterpolation? I had looked on the follows examples: OpenFOAM-1.3/applications/utilities/postProcessing/miscellaneous/sample/sample.C OpenFOAM-1.3/applications/utilities/postProcessing/dataConversion/foamToVTK/foam ToVTK.C But I not succeed to apply this to my case. I have the field volScalarField T ( IOobject ( "T", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Inside the program I use the lines: // Set up interpolation autoPtr<pointmesh> pMeshPtr(new pointMesh(mesh)); autoPtr<volpointinterpolation> pInterpPtr ( new volPointInterpolation(mesh, pMeshPtr()) ); How I can thus found pointScalarField Tp? |
Try:
pointMesh pMesh(mesh);
Try:
pointMesh pMesh(mesh); volPointInterpolation vpi(mesh, pMesh); pointScalarField Tp = vpi.interpolate(T); Enjoy, Hrv P.S. Get rid of all those autoPtrs for things that C++ will do for you anyway. |
Thank you,
It works.
Thank you,
It works. |
hello,
i've tried to change foamToVTK.C to write out the pointScalarfield of p for my problem. the code looks like this: PtrList<volScalarField> vsf; readFields(vMesh, vMesh.baseMesh(), objects, selectedFields, vsf); print(" volScalarFields :", Info, vsf); PtrList<volVectorField> vvf; readFields(vMesh, vMesh.baseMesh(), objects, selectedFields, vvf); print(" volVectorFields :", Info, vvf); PtrList<volSphericalTensorField> vSpheretf; readFields(vMesh, vMesh.baseMesh(), objects, selectedFields, vSpheretf); print(" volSphericalTensorFields :", Info, vSpheretf); PtrList<volSymmTensorField> vSymmtf;readFields(vMesh, vMesh.baseMesh(), objects, selectedFields, vSymmtf); print(" volSymmTensorFields :", Info, vSymmtf); PtrList<volTensorField> vtf; readFields(vMesh, vMesh.baseMesh(), objects, selectedFields, vtf); print(" volTensorFields :", Info, vtf); label nVolFields = vsf.size() + vvf.size() + vSpheretf.size() + vSymmtf.size() + vtf.size(); //*********************************************** //this i've added pointMesh pMesh(mesh); volPointInterpolation pInterp(mesh, pMesh); pointScalarField Pp(pInterp.interpolate(vsf.operator[])); fileName FileName ( fvPath/Pp + "_" + name(timeI) + ".dat" ); internalWriter write(pMesh, binary, FileName); write.write(Pp); //*********************************************** the error, which i get, is this one: foamToVTK.C:485: error: no matching function for call to 'Foam::internalWriter::internalWriter(Foam::pointM esh&, bool&, Foam::fileName&)' internalWriter.H:78: note: candidates are: Foam::internalWriter::internalWriter(const Foam::vtkMesh&, bool, const Foam::fileName&) internalWriter.H:59: note: Foam::internalWriter::internalWriter(const Foam::internalWriter&) foamToVTK.C:486: error: no matching function for call to 'Foam::internalWriter::write(Foam::pointScalarFiel d&)' make: *** [Make/linux64GccDPOpt/foamToVTK.o] Error 1 can someone please help me? |
Quote:
The Tp boundary field is always shown as "calculated".. Any ideas? |
Hi Daniel,
I ran into similar trouble as point values in my case are not interpolated at processor boundaries in parallel computations. Have you found a quick solution for it? Arne |
These are pressing questions for those running in parallel. Any progress?
|
for 2.3.0 I was able to add the appropriate headers and definitions to get a point interpolation of cell values. See:
http://www.cfd-online.com/Forums/ope...ue-access.html |
All times are GMT -4. The time now is 16:14. |