CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

library compilation

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2011, 03:21
Default
  #21
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
Hi

It is a little different. My option file look like:

EXE_INC = \
-I../bubbleFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-IturbulenceModel \
-IkineticTheoryModels/lnInclude \
-IinterfacialModels/lnInclude \
-IphaseModel/lnInclude \
-Iaveraging
EXE_LIBS = \
-L$(FOAM_USER_LIBBIN)\
-lEulerianInterfacialModels \
-lfiniteVolume \
-lmeshTools \
-lincompressibleTransportModels \
-lphaseModel \
-lkineticTheoryModel


Alex
foamer is offline   Reply With Quote

Old   August 1, 2011, 14:36
Default
  #22
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Alex,

Try "wclean" and then "wmake", this will make wmake look for all the files for the solver again, it may help.

Philip
bigphil is offline   Reply With Quote

Old   August 2, 2011, 03:06
Default
  #23
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
it did not seem to work.

it did not compile this time either. My option file look like this:

EXE_INC = \
-I../bubbleFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-IturbulenceModel \
-IkineticTheoryModels/lnInclude \
-IinterfacialModels/lnInclude \
-IphaseModel/lnInclude \
-Iaveraging
EXE_LIBS = \
-L$(FOAM_USER_LIBBIN)\
-lEulerianInterfacialModels \
-lfiniteVolume \
-lmeshTools \
-lincompressibleTransportModels \
-lphaseModel \
-lkineticTheoryModel


Alex
foamer is offline   Reply With Quote

Old   August 2, 2011, 06:43
Default
  #24
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Alex,

hmmnn could you paste the output of "wclean; wmake" here so I can see?

If you want you can email me your solver and I can try compile it myself (philip DOT cardiff AT ucd DOT ie).

Philip
bigphil is offline   Reply With Quote

Old   August 2, 2011, 07:17
Default
  #25
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
wclean does not give me anything.

wmake gives me:

Making dependency list for source file twoPhaseEulerFoam.C
could not open file createRASTurbulence.H for source file twoPhaseEulerFoam.C
could not open file wallFunctions.H for source file twoPhaseEulerFoam.C
could not open file wallDissipation.H for source file twoPhaseEulerFoam.C
could not open file wallViscosity.H for source file twoPhaseEulerFoam.C
SOURCE=twoPhaseEulerFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I../bubbleFoam -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -IturbulenceModel -IkineticTheoryModels/lnInclude -IinterfacialModels/lnInclude -IphaseModel/lnInclude -Iaveraging -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/twoPhaseEulerFoam.o
In file included from twoPhaseEulerFoam.C:54:
createFields.H:131: fatal error: createRASTurbulence.H: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOpt/twoPhaseEulerFoam.o] Error 1

Sorry i mislead you the other day. There is not any changes in the solver code itself. I can not compile the original one.
foamer is offline   Reply With Quote

Old   August 2, 2011, 07:30
Default
  #26
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Alex,


OK createRASTurbulence.H is not in the default twoPhaseEulerFoam, so presumably you are trying to use the createRASTurbulence.H from bubbleFoam..?

If that is the case then add the following line to your solver Make/options
-I$(FOAM_SOLVERS)/multiphase/bubbleFoam \ instead of -I../bubbleFoam \.

Then try wclean; wmake and let me know the output.

If it still can't find createRASTurbulence.H then copy this file from bubbleFoam to your directory ie if you are in your solver directory then use the following command:
Code:
cp $FOAM_SOLVERS/multiphase/bubbleFoam/createRASTurbulence.H .
then try wclean wmake again.


Philip
k.farnagh likes this.
bigphil is offline   Reply With Quote

Old   August 2, 2011, 08:03
Default
  #27
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
Hi

After i typed in "-I$(FOAM_SOLVERS)/multiphase/bubbleFoam \ instead of -I../bubbleFoam" i got the following after wclean and wmake:

options:2: warning: backslash and newline separated by space
Making dependency list for source file twoPhaseEulerFoam.C
SOURCE=twoPhaseEulerFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/applications/solvers/multiphase/bubbleFoam -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -IturbulenceModel -IkineticTheoryModels/lnInclude -IinterfacialModels/lnInclude -IphaseModel/lnInclude -Iaveraging -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/twoPhaseEulerFoam.o
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:8: warning: unused variable ‘momentumPredictor’
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/applications/solvers/multiphase/bubbleFoam -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/transportModels/incompressible/lnInclude -IturbulenceModel -IkineticTheoryModels/lnInclude -IinterfacialModels/lnInclude -IphaseModel/lnInclude -Iaveraging -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/twoPhaseEulerFoam.o -L/opt/openfoam171/lib/linux64GccDPOpt \
-L/home/user/OpenFOAM/user-1.7.1/lib/linux64GccDPOpt -lEulerianInterfacialModels -lfiniteVolume -lmeshTools -lincompressibleTransportModels -lphaseModel -lkineticTheoryModel -lOpenFOAM -liberty -ldl -lm -o /home/user/OpenFOAM/user-1.7.1/applications/bin/linux64GccDPOpt/alex


Alex
foamer is offline   Reply With Quote

Old   August 2, 2011, 08:53
Default
  #28
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Alex,


From the output shown, your solver has compiled. The last line "-o /home/user/OpenFOAM/user-1.7.1/applications/bin/linux64GccDPOpt/alex" shows that your solver executable called alex has been output to the directory /home/user/OpenFOAM/user-1.7.1/applications/bin/linux64GccDPOpt/ (which is $FOAM_USER_APPBIN).

So you should be able to run your solver (called alex) now, just run "alex" in your case directory.

There are a few compiler warnings shown, they are three "unused variables". This means you declared the variables shown but never used them. This is not an error but make sure that you are not meant to use these variables and remove them if you don't need them.

Also the wmake warning "options:2: warning: backslash and newline separated by space" wants you to remove a space in the Make/options file.

So your solver compiles, now you just have to get it to do what you want

Philip
bigphil is offline   Reply With Quote

Old   August 2, 2011, 10:37
Default
  #29
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
hmm

i get the following whne typing "alex":

FOAM FATAL IO ERROR:
cannot open file
file: /home/user/OpenFOAM/user-1.7.1/applications/solvers/multiphase/twoPhaseEulerFoam/system/controlDict at line 0.
From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 61.

Alex
foamer is offline   Reply With Quote

Old   August 2, 2011, 10:59
Default
  #30
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Alex,


You have to run your solver in your case directory (not the solver source code directory). The solver is looking for the controlDict file in the system directory of your case.

You should check out the tutorials in the user guide (http://www.openfoam.com/docs/user/).


Philip
bigphil is offline   Reply With Quote

Old   August 3, 2011, 08:57
Default
  #31
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
Thank you very much Philihp



Alex
foamer is offline   Reply With Quote

Old   August 3, 2011, 09:31
Default
  #32
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
No Problem,

Hopefully your solver works out for you!

Philip
bigphil is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem loading UDF library in parallel cluster Veera Gutti FLUENT 8 July 26, 2016 08:24
Problems in personal library compilation shrina OpenFOAM 3 February 23, 2009 12:12
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 16:49
Personal library compilation mss OpenFOAM Running, Solving & CFD 1 September 13, 2007 07:10
Help! I cann't make library Bowling FLUENT 5 May 12, 2004 05:56


All times are GMT -4. The time now is 16:25.