CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Compiling Probelm with new BC

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 15, 2010, 10:19
Default Compiling Probelm with new BC
  #1
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 7
Chris Lucas is on a distinguished road
Hi,

I want to rewriting rhoPisoFoam by including a totalEnergyEquation. For this, I need to include a new field for the total Enthalpy, which needs new Boundary Conditions.

I used the rho boundary condition files from rhoCentralFoam as a starting point. The new BC files ("fixedTotalEnthalpyFvPatchScalarField) compile without a problem. When I want to compile the solver, I get the following error message:


SOURCE=rhoPisoFoam2.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam171/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam171/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -IBC/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoPisoFoam2.o
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/opt/openfoam171/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam171/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam171/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam171/src/finiteVolume/lnInclude -IBC/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/rhoPisoFoam2.o -L/opt/openfoam171/lib/linux64GccDPOpt \
-lfiniteVolume -lmeshTools -lbasicThermophysicalModels -lspecie -lcompressibleTurbulenceModel -lcompressibleRASModels -lcompressibleLESModels -lOpenFOAM -liberty -ldl -lm -o /opt/openfoam171/applications/bin/linux64GccDPOpt/rhoPisoFoam2
Make/linux64GccDPOpt/rhoPisoFoam2.o: In function `main':
rhoPisoFoam2.C.text+0x1ab1): undefined reference to `Foam::fixedTotalEnthalpyFvPatchScalarField::typeN ame'
collect2: ld returned 1 exit status


It seems that the problem is related to "Foam::fixedTotalEnthalpyFvPatchScalarField::typeN ame", which should be the name of the new BC. The error message says that the called function is not found, but it is defined in fixedTotalEnthalpyFvPatchScalarField.H.

Could the problem be related to the parent class used for "fixedTotalEnthalpyFvPatchScalarField.H"

Regards,
Christian
Attached Files
File Type: gz rhoPisoFoam2.tar.gz (41.1 KB, 5 views)
Chris Lucas is offline   Reply With Quote

Old   November 15, 2010, 10:47
Default
  #2
Senior Member
 
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 8
herbert is on a distinguished road
Hi Christian,

did you include the new library containing this BC in your EXE_LIBS inside Make/options of the solver?

Regards,
Stefan
herbert is offline   Reply With Quote

Old   November 15, 2010, 11:09
Default
  #3
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 7
Chris Lucas is on a distinguished road
Hi,

thanks for the reply, help a lot .

The problem was related the name I gave the dynamic library file of fixedTotalEnthalpyFvPatchScalarField in BC/make/option

I used a different name in the option file of the solver, so the compiler could find the library

Regards,
Christian
Chris Lucas is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 05:40
error msg when compiling user fortran Ollimarc CFX 0 March 13, 2008 19:16
Dissimilarity in compiling new BC in 32bit OpenSuSE 103 versus 64bit CentOS 50 versus 64bit SLED 100 sponiar OpenFOAM Running, Solving & CFD 3 February 26, 2008 07:31
Discussing UDF and C++ Compiling Big Stone FLUENT 9 April 12, 2004 15:07
Compiling MON FLUENT 0 October 20, 2002 20:48


All times are GMT -4. The time now is 18:28.