CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Compiling Probelm with new BC (http://www.cfd-online.com/Forums/openfoam/82058-compiling-probelm-new-bc.html)

Chris Lucas November 15, 2010 10:19

Compiling Probelm with new BC
 
1 Attachment(s)
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

herbert November 15, 2010 10:47

Hi Christian,

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

Regards,
Stefan

Chris Lucas November 15, 2010 11:09

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


All times are GMT -4. The time now is 10:45.