|
[Sponsors] |
July 7, 2011, 18:17 |
Building a custom solver on OpenFOAM 2.0
|
#1 |
Member
Walter Schostak
Join Date: May 2011
Posts: 35
Rep Power: 15 |
I have been working on a custom solver on OpenFOAM 1.7.1 for a few months now and today I decided to install OpenFOAM 2.0.0 and see if my solver would be able to install cross-version.
I was able to install OpenFOAM 2.0.0 without any problems whatsoever so I added my solver to the application directory and ran wmake and it ran almost to completion, returning an error in the last 5 lines: Code:
Making dependency list for source file VofmhdFoam.C SOURCE=VofmhdFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam200/src/transportModels -I/opt/openfoam200/src/transportModels/incompressible/lnInclude -I/opt/openfoam200/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam200/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam200/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/VofmhdFoam.o readPISOControls.H: In function ‘int main(int, char**)’: readPISOControls.H:3:15: warning: unused variable ‘nCorr’ readPISOControls.H:8:10: warning: unused variable ‘momentumPredictor’ readBPISOControls.H:3:12: warning: unused variable ‘nBcorr’ g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam200/src/transportModels -I/opt/openfoam200/src/transportModels/incompressible/lnInclude -I/opt/openfoam200/src/transportModels/interfaceProperties/lnInclude -I/opt/openfoam200/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam200/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linuxGccDPOpt/VofmhdFoam.o -L/opt/openfoam200/platforms/linuxGccDPOpt/lib \ -ltwoPhaseInterfaceProperties -lincompressibleTransportModels -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -ldl -lm -o /opt/openfoam200/platforms/linuxGccDPOpt/bin/VofmhdFoam Make/linuxGccDPOpt/VofmhdFoam.o: In function `main': VofmhdFoam.C:(.text+0x7736): undefined reference to `Foam::incompressible::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&)' collect2: ld returned 1 exit status make: *** [/opt/openfoam200/platforms/linuxGccDPOpt/bin/VofmhdFoam] Error 1 Thanks in advance! |
|
July 8, 2011, 16:07 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
That's a linker error. Two things I usually look for are:
1 - Make sure your compiled libraries are up to date. Did you finish compiling all the OpenFOAM 2.0.0 libraries? Did you make a change to the library you are linking? 2 - Did you include the required library in your Make/options file? (Looks like finiteVolume.) If you include only the headers in the solver, but fail to include the -lfiniteVolume in the Make/options, you will get this error. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blow of compressible solver while using K-epsilon model in openfoam | Amit Mathur | OpenFOAM | 16 | October 6, 2013 12:09 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
OpenFOAm solver, ANSYS post processing | achinta | OpenFOAM | 3 | May 13, 2010 03:54 |
Modified OpenFOAM Forum Structure and New Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 06:56 |
AMG solver in Openfoam | gonski | Main CFD Forum | 0 | November 25, 2007 06:20 |