How to compile?
I am absolute beginner in OF and I need to know how to compile if I want to make changes to the oscillatinRotatingMotion:C and .H files.
Could somebody explain the steps to do like for dummies?
To learn how to create a modified solver: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
The idea is nearly identical when it comes to creating a custom library. The detail is that with libraries, you only have to copy-paste-change what you really want.
I've helped other people with similar situations, where the most recent is this one: http://www.cfd-online.com/Forums/ope...tml#post380430 post #5
if you do not already know them
http://www.personal.psu.edu/dab143/OFW6/training.htm =>New Developer Sessions
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2007/ change year 2007..2012 to see different material
I followed the steps in the links you posted.
But if I write this in the terminal $FOAM_USER_APPBIN it says no such file or directory.
As I couldn't find the location above I placed my folder called newApp in $WM_PROJECT_USER_DIR. I hope thats also ok.
I have attached the newApp folder. There I created the Make/files and Make/options
and the code for myoscillatingRotatingMotion. In the code I changed all class names to myoscillatingRotaingMotion.
Then I wrote wmake and also tried wmake libso.
But I get the following error message:
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file myoscillatingRotatingMotion.C
could not open file solidBodyMotionFunction.H for source file myoscillatingRotatingMotion.C
SOURCE=myoscillatingRotatingMotion.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/triSurface/lnInclude -I/opt/openfoam211/src/meshTools/lnInclude -I/opt/openfoam211/src/dynamicMesh/lnInclude -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/myoscillatingRotatingMotion.o
In file included from myoscillatingRotatingMotion.C:26:0:
myoscillatingRotatingMotion.H:38:37: fatal error: solidBodyMotionFunction.H: No such file or directory
make: *** [Make/linux64GccDPOpt/myoscillatingRotatingMotion.o] Error 1
What am I doing wrong?
I managed to compile my newApp library which comprises myoscillatingRotatingMotion.
The problem is I call multiMotion in my dynamicMeshdict file which should offer to use myoscillatingRotatingMotion. But when I run the case it comes an error which says valid solidBodyMotionFunctions for the multiMotion are ...and list the valid functions . This List doesen't comprise my oscillatingRotatingMotion.
What do I have to do that the multiMotion also offers to call myoscillatingrotatingMotion?
I made a mistake I forgot to put libs ("...") in the controlDict file.
After correcting this I get the following error in log.pimpleDyMFoam:
--> FOAM Warning :
From function dlOpen(const fileName&, const bool)
in file POSIX.C at line 1175
dlopen error : libnewApp.so: cannot open shared object file: No such file or directory
--> FOAM Warning :
From function dlLibraryTable::open(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
could not load "libnewApp.so"
Could the problem be that the location of my library is wrong? As I said I couldn't find $FOAM_USER_APPBIN on my PC and I put It in $WM_PROJECT_USER_DIR.
Got it in the end ! My function works.
It's all in the links from Bruno.
|All times are GMT -4. The time now is 09:05.|