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

Building a custom solver on OpenFOAM 2.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2011, 18:17
Default Building a custom solver on OpenFOAM 2.0
  #1
Member
 
Walter Schostak
Join Date: May 2011
Posts: 35
Rep Power: 15
wschosta is on a distinguished road
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
Has anyone had similar errors and some guidance? Or are there any notable changes in OpenFOAM syntax between 1.7.1 and 2.0.0 that I'm not aware of?

Thanks in advance!
wschosta is offline   Reply With Quote

Old   July 8, 2011, 16:07
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
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.
marupio 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
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


All times are GMT -4. The time now is 12:42.