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

myThermo using makeThermo.H symbol lookup error

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Robin.Kamenicky
  • 1 Post By Robin.Kamenicky

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2018, 07:45
Default myThermo using makeThermo.H symbol lookup error
  #1
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11
Robin.Kamenicky is on a distinguished road
Hi Foamers,

I wonder whether somebody could help me with symbol lookup error I am getting.

I want to make non-newtonian trasport model for compressible flow. Till now I have just tried to copy other transport model, rename it and run.

The compilation runs fine, I can also choose the transport model in a solver. However, when I run in a case I get following error:

Code:
rhoPimpleFoam: symbol lookup error: /home/robin/OpenFOAM/robin-5.0-debug/platforms/linux64GccDPInt32Debug/lib/libmyThermos.so: undefined symbol: _ZN4Foam21nonNewtonianTransportINS_7species6thermoINS_1    2eConstThermoINS_10perfectGasINS_6specieEEEEENS_22sensibleInternalEnergyEEEEC1ERKNS_10dictionaryE
When I run
Code:
nm -C
on my library following symbolic link is the error one:
Code:
U Foam::nonNewtonianTransport<Foam::species::thermo<Foam::eConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> >::nonNewtonianTransport(Foam::dictionary const     &)
It tells it is undefined.

I have done following step:
  • cp -r OpenFOAM-5.0-debug/src/thermophysicalModels/specie/transport/const xxx-5.0-debug/src/thermophysicalModels/specie/transport/nonNewtonianTransport
  • mv constTransport.H nonNewtonianTransport,H
  • mv constTransportI.H nonNewtonianTransportI,H
  • mv constTransport.C nonNewtonianTransport,C
  • sed -i s/constTransport/nonNewtonianTransport/g nonNewtonianTransport*
  • Change public method typeName() in nonNewtonianTransport.H so it return:
    Code:
    return "nonNewtonianTransport<" + Thermo::typeName() + '>';
    instead of const.
  • Make a file myThermos.C based on psiThermos.C where also nonNewtonianTransport.H is included
    Code:
    *---------------------------------------------------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     |
        \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
         \\/     M anipulation  |
    -------------------------------------------------------------------------------
    License
        This file is part of OpenFOAM.
    
        OpenFOAM is free software: you can redistribute it and/or modify it
        under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
    
        OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
        ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        for more details.
    
        You should have received a copy of the GNU General Public License
        along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
    
    \*---------------------------------------------------------------------------*/
    #ifndef myThermo_H
    #define myThermo_H
    #include "psiThermo.H"
    #include "makeThermo.H"
    
    #include "specie.H"
    #include "perfectGas.H"
    #include "PengRobinsonGas.H"
    #include "hConstThermo.H"
    #include "eConstThermo.H"
    #include "janafThermo.H"
    #include "sensibleEnthalpy.H"
    #include "sensibleInternalEnergy.H"
    #include "thermo.H"
    
    #include "constTransport.H"
    #include "sutherlandTransport.H"
    
    #include "hPolynomialThermo.H"
    #include "polynomialTransport.H"
    
    #include "hePsiThermo.H"
    #include "pureMixture.H"
    #include "nonNewtonianTransport.H"
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    namespace Foam
    {
    
    /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
    
    makeThermo
    (
                 psiThermo,
                 hePsiThermo,
                 pureMixture,
                 nonNewtonianTransport,
                 sensibleInternalEnergy,
                 eConstThermo,
                 perfectGas,
                 specie
    );
    
    
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    } // End namespace Foam
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    #endif
    // ************************************************************************* //
  • Make a Make directory
    files:
    Code:
    myThermos.C
    LIB = $(FOAM_USER_LIBBIN)/libmyThermos
    options:
    Code:
    EXE_INC = \ 
            -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
            -I$(LIB_SRC)/OpenFOAM/lnInclude \
            -I$(LIB_SRC)/finiteVolume/lnInclude \
            -I$(LIB_SRC)/transportModels/compressible/lnInclude \
            -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
            -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
            -I$(LIB_SRC)/meshTools/lnInclude
        
    LIB_LIBS = \ 
            -L$(FOAM_USER_LIBBIN) \
            -lOpenFOAM \
            -lfiniteVolume \
            -lcompressibleTransportModels \
            -lspecie \
            -lfluidThermophysicalModels \
            -lthermophysicalProperties \
            -lmeshTools
  • wmake runs successfully.
  • tested at the tutorial tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance
  • library is included in the controlDict
    Code:
    libs    
    (
    "libmyThermos.so"
    );
  • thermophysicalProperties changed to utilize nonNewtonianTransport as transport model

Any help is very appreciated,
Thank you,
Robin
AlexKlo likes this.
Robin.Kamenicky is offline   Reply With Quote

Old   August 16, 2018, 10:08
Default
  #2
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11
Robin.Kamenicky is on a distinguished road
Hi,

The problem was commenting out following lines in nonNewtonianTransport.H

Code:
#ifdef NoRepository
#include "nonNewtonianTransport.C"
#endif
Kind Regards,
Robin
AlexKlo likes this.
Robin.Kamenicky is offline   Reply With Quote

Old   November 12, 2018, 06:48
Default similar Problem
  #3
New Member
 
Stefan
Join Date: Oct 2015
Posts: 24
Rep Power: 11
StefanW is on a distinguished road
Hi Robin,

how is it going?
just found your Thread and see that we are aiming the same goal.

In my case it is the multiphase solver compressibleInterFoam where I want to make one phase a nonNewtonian fluid with OF 5.x.

So far i coppied the polynomial transport model, called it nnTransport and implemented the necessary headers in
makeReaktion.H
reactionTypes.H
psiThermos.C
rhoThermos.C
thermoPhysicsTypes.H

and also the model in
psiThermos.C
rhoThermos.C

I compiled everything started a calculation and it runs well so far, but still with the calculation of mu based on the Tempreture (like polynomialTransport)

Now its time for changing the way how mu is calculated.

Have you been successfull here?
Any Hints would be really appreciated.

Thanks a lot.

Stefan
StefanW is offline   Reply With Quote

Old   December 16, 2018, 18:05
Default
  #4
Member
 
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11
Robin.Kamenicky is on a distinguished road
Quote:
Originally Posted by StefanW View Post
Hi Robin,

how is it going?
just found your Thread and see that we are aiming the same goal.

In my case it is the multiphase solver compressibleInterFoam where I want to make one phase a nonNewtonian fluid with OF 5.x.

So far i coppied the polynomial transport model, called it nnTransport and implemented the necessary headers in
makeReaktion.H
reactionTypes.H
psiThermos.C
rhoThermos.C
thermoPhysicsTypes.H

and also the model in
psiThermos.C
rhoThermos.C

I compiled everything started a calculation and it runs well so far, but still with the calculation of mu based on the Tempreture (like polynomialTransport)

Now its time for changing the way how mu is calculated.

Have you been successfull here?
Any Hints would be really appreciated.

Thanks a lot.

Stefan
Hi Stefan,

sorry for a late answer. How is it going?
I have not finished the nonNewtonian model implementation, I had to move over to other topic. I do work on reactingTwoPhaseEulerFoam where I am particularly interested in bulk and wall boiling models.

I hope , I will be able to return to nonNewtonian model implementation in February.

Have a nice day,
Robin
Robin.Kamenicky is offline   Reply With Quote

Reply

Tags
compilation, makethermo, symbol lookup error


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
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 07:35
Undeclared Identifier Errof UDF SteveGoat Fluent UDF and Scheme Programming 7 October 15, 2014 08:11
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24


All times are GMT -4. The time now is 05:39.