CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Homogeneous Average (https://www.cfd-online.com/Forums/openfoam-solving/58459-homogeneous-average.html)

lhcamilo November 22, 2012 10:22

I remember getting an error like that and it was gone after I renumbered the Mesh.

If that does not work, then I would recommend you double check your sampleDict settings.

gl

owayz November 22, 2012 10:26

I guess renumbering the mesh would mean I will have to generate it again with different block topology, since I am using blockMesh.
Well that will be a problem for me since the simulation is very long and I already have the results.
Anways thanks for your reply.
Regards,
Awais

mmmn036 June 20, 2014 20:14

Hello Frederic,

I am using OpenFoam 2.2.2. I couldn't compile the sampleAvergarePlane utility as you instructed in the README file. Do i need to do something to complie in this version of OpenFoam?

I would appreciate your feedback.

Thanks MMMN

lhcamilo June 21, 2014 06:55

Having used sampleAvergarePlane, I understand that it averages fields in a single direction and projects them into a plane in vtk format.

I have been wondering if simply using mapFields, from a 3D grid into a 2D grid in the same computational domain would not achieve the same result (nx,ny,nz) -> (nx,ny,1).

syavash July 21, 2015 17:46

Quote:

Originally Posted by fcollonv (Post 373889)
Hello Gerhard,



The attached version compiled on 2.0.x but I didn't try it. If you use it please send me a feedback.

Thanks to Gerhard, a bug fix for the version 2.1 was found:

in sampledAveragePlaneTemplates.C, replace the line 62:
Code:

meshSearch searchEngine(mesh(), true);
by
Code:

meshSearch searchEngine(mesh());
Frederic

Dear Frederic,

I have encountered the following error when compiling using wmake libso:

Code:

sampledSurface/sampledAveragePlane/sampledAveragePlane.C: In constructor ‘Foam::sampledAveragePlane::sampledAveragePlane(const Foam::word&, const Foam::polyMesh&, const Foam::dictionary&)’:
sampledSurface/sampledAveragePlane/sampledAveragePlane.C:110:39: error: no matching function for call to ‘Foam::coordinateSystem::coordinateSystem(const Foam::dictionary&, const Foam::polyMesh&)’
        coordinateSystem cs(dict, mesh);
                                      ^
sampledSurface/sampledAveragePlane/sampledAveragePlane.C:110:39: note: candidates are:
In file included from /home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystems.H:60:0,
                from lnInclude/sampledSurface.H:66,
                from sampledSurface/sampledAveragePlane/sampledAveragePlane.H:50,
                from sampledSurface/sampledAveragePlane/sampledAveragePlane.C:27:
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:185:9: note: Foam::coordinateSystem::coordinateSystem(Foam::Istream&)
        coordinateSystem(Istream&);
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:185:9: note:  candidate expects 1 argument, 2 provided
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:181:9: note: Foam::coordinateSystem::coordinateSystem(const Foam::objectRegistry&, const Foam::dictionary&)
        coordinateSystem(const objectRegistry&, const dictionary&);
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:181:9: note:  no known conversion for argument 1 from ‘const Foam::dictionary’ to ‘const Foam::objectRegistry&’
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:177:9: note: Foam::coordinateSystem::coordinateSystem(const Foam::dictionary&)
        coordinateSystem(const dictionary&);
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:177:9: note:  candidate expects 1 argument, 2 provided
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:174:9: note: Foam::coordinateSystem::coordinateSystem(const Foam::word&, const Foam::dictionary&)
        coordinateSystem(const word& name, const dictionary&);
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:174:9: note:  no known conversion for argument 1 from ‘const Foam::dictionary’ to ‘const Foam::word&’
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:165:9: note: Foam::coordinateSystem::coordinateSystem(const Foam::word&, const point&, const vector&, const vector&)
        coordinateSystem
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:165:9: note:  candidate expects 4 arguments, 2 provided
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:157:9: note: Foam::coordinateSystem::coordinateSystem(const Foam::word&, const point&, const Foam::coordinateRotation&)
        coordinateSystem
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:157:9: note:  candidate expects 3 arguments, 2 provided
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:150:9: note: Foam::coordinateSystem::coordinateSystem(const Foam::word&, const Foam::coordinateSystem&)
        coordinateSystem
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:150:9: note:  no known conversion for argument 1 from ‘const Foam::dictionary’ to ‘const Foam::word&’
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:147:9: note: Foam::coordinateSystem::coordinateSystem()
        coordinateSystem();
        ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:147:9: note:  candidate expects 0 arguments, 2 provided
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:86:7: note: Foam::coordinateSystem::coordinateSystem(const Foam::coordinateSystem&)
 class coordinateSystem
      ^
/home/syavash/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude/coordinateSystem.H:86:7: note:  candidate expects 1 argument, 2 provided
make: *** [Make/linux64GccDPOpt/sampledAveragePlane.o] Error 1

I have proceeded as the steps in the Read me file suggested, but I do not know how to resolve the error/

Thanks,

Syavash

bmikuz August 26, 2015 07:58

Hi Frederic!

Thanks for this utility. It works fine with OpenFOAM 1.7.1, but it doesn't compile on latest versions of OpenFOAM, i.e. 2.3.0 or 2.4.0. The problem seems to be related to changed names of some functions that are called within the program... Do you have also an updated version of this utility, which works on newer versions of OpenFOAM?

Cheers,
Blaz

bmikuz August 26, 2015 10:42

1 Attachment(s)
At first I didn't realize that this thread is so long. Now, I have tried also the version posted on July 27, 2012. It works fine with OpenFOAM 2.1.1, but it doesn't compile on OpenFOAM 2.3.0. The error seems to be related with coordSet.H file. Error is in the attachment.

Any help is appreciated.

agustinvo March 22, 2016 07:56

1 Attachment(s)
For those who are concerned

I have modified the proposed application here in order to be used in OpenFOAM 2.3.1, so I suposse it would work in 2.4 as well.

It gives the values in the mesh nodes, when the sample tools of surfaces gives values in the center of the cells. Do you know how to achieve that?

I share with you this modified tool.

mugabe2204 October 3, 2017 11:42

Dear Frederic,

In these years, Did you try to update this spanwise averaging function Object for any recent openfoam versions ? Its a very nice utility for OpenFoam.

Thanks.

Edit : Sorry for my mistake. This was for another thread


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