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

Symbol look up error while compiling new library

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2019, 11:13
Default Symbol look up error while compiling new library
  #1
New Member
 
Aju Abraham
Join Date: Jul 2019
Posts: 4
Rep Power: 7
ajucgnr is on a distinguished road
Dear Foamers,


I need an urgent help in resolving an issue in implementing something in my Master Thesis.



My requirement is to make the following thermophysical model combination work for the sprayFoam solver


thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport polynomial;
thermo hPolynomial;
energy sensibleEnthalpy;
equationOfState perfectGas;
specie specie;
}


I get the following error as expected as the combination is not defined in the thermypysical model:


/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 6-e29811f5dff8
Exec : mysprayFoam
Date : Jul 23 2019
Time : 15:40:35
Host : "aju-HP-Pavilion-g6-Notebook-PC"
PID : 5302
I/O : uncollated
Case : /home/aju/OpenFOAM/aju-6/run/sprayFoam/trial
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: No convergence criteria found


PIMPLE: Operating solver in PISO mode


Reading g
Reading thermophysical properties

Selecting thermodynamics package
{
type hePsiThermo;
mixture reactingMixture;
transport polynomial;
thermo hPolynomial;
energy sensibleEnthalpy;
equationOfState perfectGas;
specie specie;
}



--> FOAM FATAL ERROR:
Unknown psiReactionThermo type
thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport polynomial;
thermo hPolynomial;
energy sensibleEnthalpy;
equationOfState perfectGas;
specie specie;
}


Valid psiReactionThermo types are:

hePsiThermo homogeneousMixture const hConst perfectGas specie sensibleEnthalpy

hePsiThermo homogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy
hePsiThermo homogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy
hePsiThermo inhomogeneousMixture const hConst perfectGas specie sensibleEnthalpy
hePsiThermo inhomogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy
hePsiThermo inhomogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy
hePsiThermo multiComponentMixture const hConst perfectGas specie sensibleEnthalpy
hePsiThermo multiComponentMixture const hConst perfectGas specie sensibleInternalEnergy
hePsiThermo multiComponentMixture sutherland janaf perfectGas specie sensibleEnthalpy
hePsiThermo multiComponentMixture sutherland janaf perfectGas specie sensibleInternalEnergy
hePsiThermo pureMixture const hConst perfectGas specie sensibleEnthalpy
hePsiThermo pureMixture const hConst perfectGas specie sensibleInternalEnergy
hePsiThermo pureMixture sutherland janaf perfectGas specie sensibleEnthalpy
hePsiThermo pureMixture sutherland janaf perfectGas specie sensibleInternalEnergy
hePsiThermo reactingMixture const hConst perfectGas specie sensibleEnthalpy
hePsiThermo reactingMixture const hConst perfectGas specie sensibleInternalEnergy
hePsiThermo reactingMixture sutherland janaf perfectGas specie sensibleEnthalpy
hePsiThermo reactingMixture sutherland janaf perfectGas specie sensibleInternalEnergy
hePsiThermo singleStepReactingMixture sutherland janaf perfectGas specie sensibleEnthalpy
hePsiThermo singleStepReactingMixture sutherland janaf perfectGas specie sensibleInternalEnergy
hePsiThermo veryInhomogeneousMixture const hConst perfectGas specie sensibleEnthalpy
hePsiThermo veryInhomogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy
hePsiThermo veryInhomogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy


From function static typename Table::iterator Foam::basicThermo::lookupThermo(const Foam::dictionary&, Table*, int, const char**, const Foam::word&) [with Thermo = Foam:siReactionThermo; Table = Foam::HashTable<Foam::autoPtr<Foam:siReactionThe rmo> (*)(const Foam::fvMesh&, const Foam::word&), Foam::word, Foam::string::hash>; typename Table::iterator = Foam::HashTable<Foam::autoPtr<Foam:siReactionThe rmo> (*)(const Foam::fvMesh&, const Foam::word&), Foam::word, Foam::string::hash>::iterator]
in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/thermophysicalModels/basic/lnInclude/basicThermoTemplates.C at line 46.

FOAM exiting




I compiled a new library libreactionThermophysicalModels.so adding the new model. The compile works successfully but when the solver sprayFoam is run, I get the following error:


mysprayFoam: symbol lookup error: /home/aju/OpenFOAM/aju-6/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined symbol: _ZN4Foam15chemistryReaderINS_19polynomialTransport INS_7species6thermoINS_17hPolynomialThermoINS_10pe rfectGasINS_6specieEEELi8EEENS_16sensibleEnthalpyE EELi8EEEE30dictionaryConstructorTablePtr_E



What could possibly be wrong? I am quite new with the solver and compiler stuffs in openfoam
ajucgnr is offline   Reply With Quote

Old   July 25, 2019, 17:04
Default
  #2
ch1
New Member
 
Christian
Join Date: Jun 2019
Posts: 14
Rep Power: 7
ch1 is on a distinguished road
Can you please give some details about how you created your thermophysical model?

Make sure that you add your new thermoType

Code:
thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport polynomial;
thermo hPolynomial;
energy sensibleEnthalpy;
equationOfState perfectGas;
specie specie;
}
to hePsiThermos.C file located in ../src/thermophysicalModels/basic/psiThermo/ and that the required header files are included there.
ch1 is offline   Reply With Quote

Old   July 27, 2019, 06:45
Default
  #3
New Member
 
Aju Abraham
Join Date: Jul 2019
Posts: 4
Rep Power: 7
ajucgnr is on a distinguished road
Quote:
Originally Posted by ch1 View Post
Can you please give some details about how you created your thermophysical model?

Make sure that you add your new thermoType

Code:
thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport polynomial;
thermo hPolynomial;
energy sensibleEnthalpy;
equationOfState perfectGas;
specie specie;
}
to hePsiThermos.C file located in ../src/thermophysicalModels/basic/psiThermo/ and that the required header files are included there.

Hi,
Thanks a lot for your reply. But there is no file named hePsiThermos.C in that folder. Only PsiThermos.C is available, which contains only those types of pureMixture and not reactingMixture.

I started the implementation new again, to avoid any more confusion,as follows:

  • I updated the thermophysical model inside psiReactionThermos.C file located in ../src/mythermophysicalModels/myreactionThermo/ . The following lines were added
Code:
makeReactionThermos
(
    psiThermo,
    psiReactionThermo,
    hePsiThermo,
    veryInhomogeneousMixture,
    polynomialTransport,
    sensibleEnthalpy,
    hPolynomialThermo,
    perfectGas,
    specie
);
  • I compiled the new library libreactionThermophysicalModels.so with the following lines in the options file in /src/myreactionThermophysicalModels/myreactionThermo
Code:
EXE_INC = \
    -I$(LIB_SRC)/transportModels/compressible/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/myThermophysicalModels/myBasic/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/myThermophysicalModels/mySpecie/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \
    -L$(FOAM_USER_LIBBIN) \
    -lcompressibleTransportModels \
    -lfluidThermophysicalModels \
    -lspecie \
    -lsolidSpecie \
    -lfiniteVolume
  • I recompiled my solver mysprayFoam after the following lines in the options file
Code:
EXE_INC = \
    -I. \
    -I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude \
    -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
    -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
    -I$(LIB_SRC)/lagrangian/basic/lnInclude \
    -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
    -I$(LIB_SRC)/lagrangian/spray/lnInclude \
    -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/myThermophysicalModels/mySpecie/lnInclude \
    -I$(LIB_SRC)/transportModels/compressible/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/myThermophysicalModels/myBasic/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
    -I$(WM_PROJECT_USER_DIR)/src/myThermophysicalModels/myreactionThermo/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
    -I$(LIB_SRC)/ODE/lnInclude \
    -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
    -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
    -I$(LIB_SRC)/combustionModels/lnInclude

EXE_LIBS = \
    -L$(FOAM_USER_LIBBIN) \
    -lturbulenceModels \
    -lcompressibleTurbulenceModels \
    -llagrangian \
    -llagrangianIntermediate \
    -llagrangianTurbulence \
    -llagrangianSpray \
    -lspecie \
    -lcompressibleTransportModels \
    -lfluidThermophysicalModels \
    -lthermophysicalProperties \
    -lreactionThermophysicalModels \
    -lSLGThermo \
    -lchemistryModel \
    -lradiationModels \
    -lODE \
    -lregionModels \
    -lsurfaceFilmModels \
    -lcombustionModels \
    -lfiniteVolume \
    -lfvOptions \
  • I run the simulation with the required thermophysical model and then it displays the error as mentioned in my main post i.e.
Code:
mysprayFoam: symbol lookup error: /home/aju/OpenFOAM/aju-6/platforms/linux64GccDPInt32Opt/lib/libreactionThermophysicalModels.so: undefined symbol: _ZN4Foam15chemistryReaderINS_19polynomialTransportINS_7species6thermoINS_17hPolynomialThermoINS_10perfectGasINS_6specieEEELi8EEENS_16sensibleEnthalpyEEELi8EEEE30dictionaryConstructorTablePtr_E

NB: I use Openfoam version 6

Last edited by ajucgnr; July 27, 2019 at 09:00. Reason: Improve code readability
ajucgnr is offline   Reply With Quote

Old   July 27, 2019, 16:56
Default
  #4
ch1
New Member
 
Christian
Join Date: Jun 2019
Posts: 14
Rep Power: 7
ch1 is on a distinguished road
Did you include "polynomialTransport.H" and "hPolynomialThermo.H" in"psiReactionThermos.C"?
ch1 is offline   Reply With Quote

Old   July 28, 2019, 09:30
Default
  #5
New Member
 
Aju Abraham
Join Date: Jul 2019
Posts: 4
Rep Power: 7
ajucgnr is on a distinguished road
Quote:
Originally Posted by ch1 View Post
Did you include "polynomialTransport.H" and "hPolynomialThermo.H" in"psiReactionThermos.C"?

Hi,
Yes I did include those already.I actually resolved my issue
The problem was that any new additons of thermophysical model has to be updated in all the corresponding files too. So basically, apart from the above files, I had to update all the below files too:
  • In file ../src/myThermophysicalModels/mySpecie/include/thermoPhysicsTypes.H

Code:
typedef
    polynomialTransport
    <
        species::thermo
        <
            hPolynomialThermo
            <
                perfectGas<specie>
            >,
            sensibleEnthalpy
        >,
        8
    > gasPoly8HThermoPhysics;
  • In file ..src/myThermophysicalModels/myreactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C
Code:
makeChemistryReaderType(foamChemistryReader, gasPoly8HThermoPhysics);
  • In file ../src/myThermophysicalModels/myChemistryModel/chemistryModel/BasicChemistryModel/BasicChemistryModels.C

Code:
makeChemistryModelType
    (
        TDACChemistryModel,
        psiReactionThermo,
        gasPoly8HThermoPhysics
    );


makeChemistryModelType
    (
        StandardChemistryModel,
        psiReactionThermo,
        gasPoly8HThermoPhysics
    );
  • In file ../src/myThermophysicalModels/myChemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C
Code:
makeChemistrySolverTypes(psiReactionThermo, gasPoly8HThermoPhysics);
  • In file ../src/myThermophysicalModels/myChemistryModel/chemistryModel/TDACChemistryModel/reduction/makeChemistryReductionMethods.C
Code:
makeChemistryReductionMethods(psiReactionThermo, gasPoly8HThermoPhysics);
  • In file ../src/myThermophysicalModels/myChemistryModel/chemistryModel/TDACChemistryModel/tabulation/makeChemistryTabulationMethods.C
Code:
makeChemistryTabulationMethods(psiReactionThermo, gasPoly8HThermoPhysics);
ajucgnr is offline   Reply With Quote

Reply

Tags
compiling new library, psireactionthermo, sprayfoam


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
Caffa 3D code Waliur Rahman Main CFD Forum 0 May 29, 2018 01:53
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 05:06
OpenFOAM install on Ubuntu Natty 11.04 bkubicek OpenFOAM 13 May 26, 2011 06:48
POSDAT problem piotka STAR-CD 4 June 12, 2009 09:43
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30


All times are GMT -4. The time now is 15:43.