CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Post-Processing

calcFvcGrad

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 2, 2013, 04:46
Default calcFvcGrad
  #1
New Member
 
Join Date: Apr 2011
Location: Magdeburg, Germany
Posts: 21
Rep Power: 4
Nico A. is on a distinguished road
Hello forum users,

I just wanted to use the new FunctionObjects in OF2.2.0. For calculating a gradient field during the simulation, there is the new calcFvcGrad post-Processing FunctionObject. I added it to my controlDict and started the simulation, but I got the following error:
Starting time loop


Code:
--> FOAM FATAL ERROR:
Unknown function type calcFvcGrad

Valid functions are :

18
(
cellSource
faceSource
fieldAverage
fieldCoordinateSystemTransform
fieldMinMax
fieldValueDelta
nearWallFields
patchProbes
probes
processorField
readFields
regionSizeDistribution
sets
streamLine
surfaceInterpolateFields
surfaces
turbulenceFields
wallBoundedStreamLine
)



    From function functionObject::New(const word& name, const Time&, const dictionary&)
    in file db/functionObjects/functionObject/functionObject.C at line 92.

FOAM exiting
So, does anyone have the solution to run that function? Did I may forgot to load a special lib?

I appreciate any response.

Best regards, Nico
Nico A. is offline   Reply With Quote

Old   May 2, 2013, 05:46
Default not compiled
  #2
New Member
 
Join Date: Apr 2011
Location: Magdeburg, Germany
Posts: 21
Rep Power: 4
Nico A. is on a distinguished road
Okay, I think this function is not compiled by default. So I added the string: "wmake $makeType fvTools" to the Allwmake file in the
$WM_PROJECT_DIR/src/postProcessing/functionObjects directory and I ran it once again.
Unfortunately an error occured:
Code:
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file calcFvcDiv/calcFvcDiv.C
Making dependency list for source file calcFvcDiv/calcFvcDivFunctionObject.C
Making dependency list for source file calcFvcGrad/calcFvcGrad.C
Making dependency list for source file calcFvcGrad/calcFvcGradFunctionObject.C
Making dependency list for source file calcMag/calcMag.C
Making dependency list for source file calcMag/calcMagFunctionObject.C
SOURCE=calcFvcDiv/calcFvcDiv.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/usrfem/femsys_local/OpenFOAM/OpenFOAM-2.2.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/usrfem/femsys_local/OpenFOAM/OpenFOAM-2.2.0/src/OpenFOAM/lnInclude -I/usrfem/femsys_local/OpenFOAM/OpenFOAM-2.2.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/calcFvcDiv.o
In file included from calcFvcDiv/calcFvcDiv.C:26:
calcFvcDiv/calcFvcDiv.H:158: error: ISO C++ forbids declaration of 'polyMesh' with no type
calcFvcDiv/calcFvcDiv.H:158: error: expected ',' or '...' before '&' token
make: *** [Make/linux64GccDPOpt/calcFvcDiv.o] Error 1
So finally that is the newer problem and I do not see why? Are there any suggestions for that?

Thanks in advance.

Best Regards, Nico
Nico A. is offline   Reply With Quote

Old   May 2, 2013, 08:36
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 4,228
Blog Entries: 31
Rep Power: 45
wyldckat has a spectacular aura aboutwyldckat has a spectacular aura about
Greetings Nico,

All does seem to indicate that the "fvTools" folder wasn't ready for production in OpenFOAM 2.2.0. You can fix this by running the following commands:
Code:
cd "$FOAM_SRC/postProcessing/functionObjects/fvTools"

wget "https://raw.github.com/OpenFOAM/OpenFOAM-2.2.x/master/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H" -O calcFvcDiv/calcFvcDiv.H

wget "https://raw.github.com/OpenFOAM/OpenFOAM-2.2.x/master/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H"  -O calcFvcGrad/calcFvcGrad.H

wget "https://raw.github.com/OpenFOAM/OpenFOAM-2.2.x/master/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H"  -O calcMag/calcMag.H

wclean libso
wmake libso
Here's an example for appending/adding to "system/controDict":
Code:
libs            ("libFVFunctionObjects.so"); //this force-loads the library

functions
{
    myCalc_calcFvcGrad
    {
        type            calcFvcGrad;
        libs            ("libFVFunctionObjects.so");
        fieldName       "U";
        resultName      "Ug";
    }
}
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 2, 2013, 09:32
Default
  #4
New Member
 
Join Date: Apr 2011
Location: Magdeburg, Germany
Posts: 21
Rep Power: 4
Nico A. is on a distinguished road
Hello Bruno,

thanks for your help. So there was just the class declaration for ployMesh missing, I did not recognize that. Now the tool is running, thanks again.

Best regards, Nico
Nico A. is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 22:24.