|
[Sponsors] |
September 18, 2012, 09:57 |
How to compile?
|
#1 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
Hi,
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? Best, Alex |
|
September 18, 2012, 16:13 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Greetings Alex,
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 Best regards, Bruno
__________________
|
|
September 19, 2012, 03:54 |
|
#3 |
Senior Member
|
Dear Alexander,
if you do not already know them http://www.personal.psu.edu/dab143/OFW6/training.htm =>New Developer Sessions http://sourceforge.net/projects/open...OAM_Workshops/ http://sourceforge.net/projects/open...tadt/Training/ http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/ http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2007/ change year 2007..2012 to see different material http://www.tfd.chalmers.se/~hani/kur.../debugging.pdf |
|
September 19, 2012, 05:54 |
Hi
|
#4 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
Hi,
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 compilation terminated. make: *** [Make/linux64GccDPOpt/myoscillatingRotatingMotion.o] Error 1 What am I doing wrong? Thanks allot, Alex |
|
September 19, 2012, 09:27 |
|
#5 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
Hi,
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? Best, Alex |
|
September 19, 2012, 09:47 |
|
#6 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
Hi,
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:pen(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. Best, Alex |
|
September 19, 2012, 11:21 |
|
#7 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
Hi,
Got it in the end ! My function works. It's all in the links from Bruno. Many thanks, Alex |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
How to compile OpenFOAM-1.7.x on CrunchBang linux 10 | gwierink | OpenFOAM Installation | 0 | April 5, 2011 05:38 |
PV3FoamReader compile error.... | PEM_GUY | OpenFOAM Installation | 6 | April 5, 2010 18:22 |
compile errors of boundary condition "expDirectionMixed" | liying02ts | OpenFOAM Bugs | 2 | February 1, 2010 21:11 |
Error compile file udf | czfluent | Fluent UDF and Scheme Programming | 24 | September 26, 2009 14:24 |