CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   fixedMeanValue execution problem (http://www.cfd-online.com/Forums/openfoam-programming-development/81898-fixedmeanvalue-execution-problem.html)

siddharameshwara November 10, 2010 02:42

fixedMeanValue execution problem
 
Hi to every one,


I am trying to include fixedMeanValue boundary condition to cavitating Foam solver when i execute it .It is showing the following error could any one help me in this regard

Making dependency list for source file cavitatingFoam.C
SOURCE=cavitatingFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/transportModels -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/transportModels/incompressible/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/transportModels/interfaceProperties/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/turbulenceModels/incompressible/turbulenceModel -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/thermophysicalModels/barotropicCompressibilityModel/lnInclude -IlnInclude -I. -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/appl/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc43DPOpt/cavitatingFoam.o
In file included from cavitatingFoam.C:46:
:confused:fixedMeanValueFvPatchField.H: In function ‘int main(int, char**)’:
fixedMeanValueFvPatchField.H:42: error: ‘namespace’ definition is not allowed here:confused:
In file included from fixedMeanValueFvPatchField.H:176,
from cavitatingFoam.C:46:
fixedMeanValueFvPatchField.C:32: error: ‘namespace’ definition is not allowed here
/appl/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’
/appl/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readPISOControls.H:3: warning: unused variable ‘nCorr’
/appl/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInc
http://www.cfd-online.com/Forums/ima...er_offline.gif http://www.cfd-online.com/Forums/ima...tons/quote.gif

herbert November 10, 2010 13:17

Hi,

in general, you must not add the #inlude below the
Code:


int main(int argc, char *argv[])

if you want to define a new class.

BTW: It would be better if you would create a own library out of fixedMeanValue and include this lib in your system/controlDict. That will prevent problems using paraview for postprocessing.

Regards,
Stefan

siddharameshwara November 11, 2010 02:52

HI stefen,

I am new to this openfoam. I do not know the procedure you have explained.Could you please elaborate step wise with some what in detail.Because i don't know how to create lib and add to system controldict that you have explained.I would be grateful to you.

Thanks in advance


All times are GMT -4. The time now is 14:06.