|
[Sponsors] |
Cannot compile new solver (interFoam with Temperature) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 28, 2015, 15:48 |
Cannot compile new solver (interFoam with Temperature)
|
#1 |
New Member
Manuel do Nascimento
Join Date: May 2012
Posts: 14
Rep Power: 14 |
Hello,
I tried to add an energy equation to interFoam using the following instruction: http://www.wolfdynamics.com/images/c...erTempFoam.pdf I tried to do everything exactly like it is explained in the tutorial. The author even offers a download of the modified files. So, when I reach slide 13 the transport model "incompressibleTwoPhaseMixture" has to be compiled. It says: "in order to make our customized library usable we need to compile it and store the output file in a directory known by OpenFOAM. To do so let’s edit the path to our library in the ../Make/files and the destination folder of the shared object: myIncompressibleTwoPhaseMixture/myIncompressibleTwoPhaseMixture.C ... LIB = $(FOAM_USER_LIBBIN)/libmyIncompressibleTransportModels Then we can compile the library with the command wclean and wmake libso from the $WM_PROJECT_USER_DIR/src/transportModels/incompressible folder" At this point I get an error message: Making dependency list for source file myIncompressibleTwoPhaseMixture/myIncompressibleTwoPhaseMixture.C SOURCE=viscosityModels/viscosityModel/viscosityModel.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I.. -I../twoPhaseMixture/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/viscosityModel.o In file included from viscosityModels/viscosityModel/viscosityModel.C:26:0: viscosityModels/viscosityModel/viscosityModel.H:155:21: error: »scalarField« not defined in this scope viscosityModels/viscosityModel/viscosityModel.H:155:32: error: Templateargument 1 is invalid make: *** [Make/linux64GccDPOpt/viscosityModel.o] error 1 I have no idea how to solve this problem. When I did the tutorial "how to add temperatur to icoFoam" I didn't have any problems. Generally: how does OpenFOAM know in which folder to look for a certain transport model? (In the original path or the user created path?) Is it sufficient to rename the model in the main file, like the author did in the "interTempFoam.c"? -> #include "myIncompressibleTwoPhaseMixture.H"?? He does not really explain this part. I use version 2.1.1 |
|
June 29, 2015, 15:24 |
|
#2 |
New Member
Manuel do Nascimento
Join Date: May 2012
Posts: 14
Rep Power: 14 |
I was able to find several mistakes....
So far the transport model was compiled successfully, I guess. If I try to compile the solver, I receive the following error message: fvt@FVTUbuntu:~/OpenFOAM/fvt-2.1.1/applications/solvers/multiphase/interTempFoam$ wmake Making dependency list for source file interTempFoam.C SOURCE=interTempFoam.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/transportModels -I/home/fvt/OpenFOAM/fvt-2.1.1/src/transportModels/incompressible/lnInclude -I/opt/openfoam211/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -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/interTempFoam.o /opt/openfoam211/src/finiteVolume/lnInclude/readTimeControls.H: In Funktion »int main(int, char**)«: /opt/openfoam211/src/finiteVolume/lnInclude/readTimeControls.H:38:8: Warnung: Variable »maxDeltaT« wird nicht verwendet [-Wunused-variable] 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/transportModels -I/home/fvt/OpenFOAM/fvt-2.1.1/src/transportModels/incompressible/lnInclude -I/opt/openfoam211/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam211/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/interTempFoam.o -L/opt/openfoam211/platforms/linux64GccDPOpt/lib \ -L/home/fvt/OpenFOAM/fvt-2.1.1/platforms/linux64GccDPOpt/lib -ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl -lm -o /home/fvt/OpenFOAM/fvt-2.1.1/platforms/linux64GccDPOpt/bin/interTempFoam Make/linux64GccDPOpt/interTempFoam.o: In function `main': interTempFoam.C.text.startup+0x9298): undefined reference to `Foam::twoPhaseMixture::kappaf() const' collect2: ld gab 1 als Ende-Status zurück make: *** [/home/fvt/OpenFOAM/fvt-2.1.1/platforms/linux64GccDPOpt/bin/interTempFoam] error 1 Any ideas? Another question regarding the transport models. Is the make/options file edited correctly? -> EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(WM_PROJECT_USER_DIR)/src/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -ltwoPhaseInterfaceProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume This part is missing in the instructions. Thanks! |
|
June 29, 2015, 15:31 |
|
#3 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
check this link
i explained what to do with the file and option files http://www.cfd-online.com/Forums/ope...interfoam.html Jump to the 6th post and 7th |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Divergence in AMG solver: Temperature | Alex07 | FLUENT | 0 | June 17, 2015 16:03 |
Edit linear solver | luckycfd | OpenFOAM Programming & Development | 32 | January 24, 2014 14:28 |
abnormal temperature near interface when adding energy equation to interFoam | houkensjtu | OpenFOAM | 4 | June 26, 2013 14:40 |
Change Temperature boundary by a solver (rhoPimpleFoam) | fredo490 | OpenFOAM Programming & Development | 7 | May 15, 2013 12:11 |
Compile new solver under SuSE 64bit OS | hsieh | OpenFOAM Running, Solving & CFD | 3 | September 8, 2005 12:56 |