|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Apr 2011
Location: Magdeburg, Germany
Posts: 21
Rep Power: 4 ![]() |
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
I appreciate any response. Best regards, Nico |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2011
Location: Magdeburg, Germany
Posts: 21
Rep Power: 4 ![]() |
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 Thanks in advance. Best Regards, Nico |
|
|
|
|
|
|
|
|
#3 |
|
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 4,228
Blog Entries: 31
Rep Power: 45 ![]() ![]() |
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 Code:
libs ("libFVFunctionObjects.so"); //this force-loads the library
functions
{
myCalc_calcFvcGrad
{
type calcFvcGrad;
libs ("libFVFunctionObjects.so");
fieldName "U";
resultName "Ug";
}
}
Bruno
__________________
|
|
|
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2011
Location: Magdeburg, Germany
Posts: 21
Rep Power: 4 ![]() |
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 |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|