CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD


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

LinkBack Thread Tools Display Modes
Old   June 1, 2007, 11:51
Default Hello everybody! I have some
Senior Member
maddalena's Avatar
Join Date: Mar 2009
Posts: 436
Rep Power: 13
maddalena is on a distinguished road
Hello everybody!
I have some problem with the specification of different diffusion coefficients for moving meshes. The general idea of my work is to specify a particular diffusion coefficient for the cells closer than a certain amount from my wing, and a distance-based diffusion (quadratic) for all the other cells. To calculate the distances, I would like to use wallDist.H, so I included it in my setMotionMovingCone.C and also I added the full path in the Make/options file: -I$(LIB_SRC)/finiteVolume/fvMesh/wallDist. I then added some more lines to do all my stuff in setMotionMovingCone.C file, saved and compiled everything. Unfortunately, I got the following error:

Making dependency list for source file setMotionMovingCone.C
could not open file volFields.H for source file setMotionMovingCone.C
could not open file cellDistFuncs.H for source file setMotionMovingCone.C

SOURCE=setMotionMovingCone.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/madl/OpenFOAM/OpenFOAM-1.3/src/tetDecompositionFiniteElement/lnInclude -I/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist -DCELL_DECOMP -I/home/madl/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/setMotionMovingCone.o
In file included from setMotionMovingCone.C:37:
/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist/wallDist.H:63: 23: error: volFields.H: No such file or directory
/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist/wallDist.H:64: 27: error: cellDistFuncs.H: No such file or directory
/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist/wallDist.H:80: error: expected class-name before ',' token
/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist/wallDist.H:82: error: expected class-name before '{' token
/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist/wallDist.H:121 : error: ISO C++ forbids declaration of 'volScalarField' with no type
/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist/wallDist.H:121 : error: expected ';' before '&' token
/home/madl/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/fvMesh/wallDist/wallDist.H:126 : error: expected `;' before 'label'
setMotionMovingCone.C: In function 'int main(int, char**)':
setMotionMovingCone.C:57: error: expected initializer before '&' token
setMotionMovingCone.C:61: error: 'dist' was not declared in this scope
make: *** [Make/linuxGcc4DPOpt/setMotionMovingCone.o] Error 1

As you can see, everything is due to the fact that I miss volFields.H and cellDistFuncs.H files. But this is strange because they are files dependant from wallDist.H, that is an OpenFOAM file so it is supposed to be right. Do you have any suggestion for me to understand what's wrong?
I also need an explanation about C++, since my programming knowledge is really basic. What is the difference between using #include "..." before "main" and after "main"? thanks!
maddalena is offline   Reply With Quote


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 14:08.