|
[Sponsors] |
October 16, 2007, 07:24 |
Hello,
How to use volPoint
|
#1 |
New Member
Oleg Weinstein
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 6
Rep Power: 17 |
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? |
|
October 16, 2007, 07:42 |
Try:
pointMesh pMesh(mesh);
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
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.
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
October 19, 2007, 06:34 |
Thank you,
It works.
|
#3 |
New Member
Oleg Weinstein
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 6
Rep Power: 17 |
Thank you,
It works. |
|
August 24, 2009, 04:34 |
|
#4 |
New Member
Join Date: Aug 2009
Posts: 4
Rep Power: 16 |
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:ointM 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:ointScalarFiel d&)' make: *** [Make/linux64GccDPOpt/foamToVTK.o] Error 1 can someone please help me? |
|
April 20, 2012, 09:22 |
|
#5 | |
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21 |
Quote:
The Tp boundary field is always shown as "calculated".. Any ideas?
__________________
~ Daniel WEI ------------- Boeing Research & Technology - China Beijing, China |
||
October 11, 2012, 08:27 |
|
#6 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 17 |
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 |
|
May 18, 2015, 19:51 |
|
#7 |
Member
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 39
Rep Power: 11 |
These are pressing questions for those running in parallel. Any progress?
|
|
May 27, 2015, 12:24 |
|
#8 |
Member
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 39
Rep Power: 11 |
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 |
|
|
|