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

problem with turbulence models after compilation?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 19, 2011, 11:41
Default problem with turbulence models after compilation?
  #1
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 16
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
Hi,

I made ​​some changes to reactingFoam ( openFoam 1.7.1) including only Info sentences, but when I compile and try to use , I get this error.

Unknown turbulenceModel type RASModel

Valid turbulenceModel types:

1
(
laminar
)


if anyone knows how I can fix this I will be grateful with any advice.


Best Regards,

felipe
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   October 20, 2011, 11:04
Default
  #2
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Would you have a copy of the code you are using? Maybe we could help you further from there?

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 20, 2011, 11:32
Default
  #3
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 16
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
HI Francois and thanks for your help, the code is the reactiongFoam solver, I made some changes in createFields to show density and the chemical source term, the code with the changes I made can be seen below.


Code:
Info<< nl << "Reading thermophysicalProperties" << endl;
autoPtr<psiChemistryModel> pChemistry
(
    psiChemistryModel::New(mesh)
);
psiChemistryModel& chemistry = pChemistry();

hsCombustionThermo& thermo = chemistry.thermo();

basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();

word inertSpecie(thermo.lookup("inertSpecie"));

volScalarField rho
(
    IOobject
    (
        "rho",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE   // (CHANGE)
    ),
    thermo.rho()
);

Info<< "Reading field U\n" << endl;
volVectorField U
(
    IOobject
    (
        "U",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);


volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& hs = thermo.hs();
const volScalarField& T = thermo.T();

#include "compressibleCreatePhi.H"

volScalarField kappa
(
    IOobject
    (
        "kappa",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE
    ),
    mesh,
    dimensionedScalar("zero", dimless, 0.0)
);

Info << "Creating turbulence model.\n" << nl;
autoPtr<compressible::turbulenceModel> turbulence
(
    compressible::turbulenceModel::New
    (
        rho,
        U,
        phi,
        thermo
    )
);

Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
    fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);

multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

forAll(Y, i)
{
    fields.add(Y[i]);
}
fields.add(hs);

DimensionedField<scalar, volMesh> chemistrySh
(
    IOobject
    (
        "chemistry::Sh",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE      //(  change)
    ),
    mesh,
    dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
);
To compile I do wclean and then wmake, the options an files from Make folder are:

options file:


EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel\
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lreactionThermophysicalModels \
-lspecie \
-lbasicThermophysicalModels \
-lchemistryModel \
-lODE \
-lfiniteVolume


files file:

myreactingFoam.C

EXE = $(FOAM_APPBIN)/myreactingFoam

But, when I try to run a test case I get the error that I mentioned before, I did this several times without any problems, but recently updated ubuntu from 11.04 to 11.10



Thanks for your help

FG
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   October 21, 2011, 09:32
Default
  #4
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Dear Felipe,

I tried re-compiling the reactingFoam solver with your (small) modifications, and running it, and everything went fine.

Did you update your operating system without re-updating your OpenFOAM installation? I've had errors with that in the past, mostly due to changes in the kernel header files, and the way gcc looked for dependencies.
I would suggest you re-run Allwmake in the OpenFOAM folder and try again.

Keep us updated on your progress.

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 21, 2011, 14:42
Default
  #5
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 16
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
Dear Francois, again thanks for your reply. I compile openFoam again with Allwmake, but this give some errors, some solvers was make successful (icoFoam, pisoFoam....), but others don't, this is the case of reactingFoam, RhocentralFoam and others, I try to only compile reactingFoam but then it has some errors , I attach the Allwmake log file, and the log file of when I re-compile reactingFoam

http://ifile.it/dxzbph1/Allwmakelog.txt


reactionfoam:

Code:
Making dependency list for source file reactingFoam.C
SOURCE=reactingFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/src/turbulenceModels/compressible/turbulenceModel     
-I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels
/specie/lnInclude     -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src
/thermophysicalModels/reactionThermo/lnInclude     -I/home/felipeg
/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/basic/lnInclude     
-I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels
/chemistryModel/lnInclude     -I/home/felipeg/OpenFOAM/OpenFOAM-
1.7.1/src/ODE/lnInclude     -I/home/felipeg/OpenFOAM/OpenFOAM-
1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o 
Make/linux64GccDPOpt/reactingFoam.o

g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter 
-Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-
depth-40 -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src
/turbulenceModels/compressible/turbulenceModel     -I/home/felipeg
/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude   
  -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels
/reactionThermo/lnInclude     -I/home/felipeg/OpenFOAM/OpenFOAM-
1.7.1/src/thermophysicalModels/basic/lnInclude     -I/home/felipeg
/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/chemistryModel
/lnInclude     -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src
/ODE/lnInclude     -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src
/finiteVolume/lnInclude -IlnInclude -I. -I/home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude   -fPIC 
Make/linux64GccDPOpt/reactingFoam.o -L/home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/lib/linux64GccDPOpt \

     -lcompressibleTurbulenceModel     -lcompressibleRASModels     
-lcompressibleLESModels     -lreactionThermophysicalModels     -lspecie    
-lbasicThermophysicalModels     -lchemistryModel     -lODE     
-lfiniteVolume  -lOpenFOAM -liberty -ldl   -lm -o /home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/reactingFoam
/usr/bin/ld: Make/linux64GccDPOpt/reactingFoam.o: undefined reference 
to symbol 'Foam::OPstream::write(Foam::Pstream::commsTypes, int, 
char const*, long)'
/usr/bin/ld: note: 'Foam::OPstream::write(Foam::Pstream::commsTypes, 
int, char const*, long)' is defined in DSO /home/felipeg/OpenFOAM
/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1/libPstream.so so try 
adding it to the linker command line
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-
1.4.1/libPstream.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/reactingFoam] Error 1
Thanks for your help

best Regards

Felipe
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   October 21, 2011, 15:04
Default
  #6
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Dear Felipe,

Somewhere at the beginning of your log you have the error:
Code:
OPwrite.C:29:17: fatal error: mpi.h: No such file or directory
compilation terminated.
make: *** [Make/linux64GccDPOptSYSTEMOPENMPI/OPwrite.o] Error 1
And that's normally a real show stopper when trying to compile OpenFOAM.

Have you installed the extra libscotch-dev and libopenmpi-dev libraries?

If you don't have the ability to install those on your system, you should download and compile the openmpi libraries in your ThirdParty folder using the README instructions.

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 21, 2011, 21:47
Default
  #7
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 16
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
Hi, Francois thank for your last advice, I install the packages that you mentioned before, and then clean and compile again, but I have the same problem, the log file in this case is:

Quote:

Making dependency list for source file reactingFoam.C
SOURCE=reactingFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/compressible/turbulenceModel -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/reactionThermo/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/basic/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/chemistryModel/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/ODE/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/reactingFoam.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/turbulenceModels/compressible/turbulenceModel -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/reactionThermo/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/basic/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/chemistryModel/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/ODE/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/reactingFoam.o -L/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt \
-lcompressibleTurbulenceModel -lcompressibleRASModels -lcompressibleLESModels -lreactionThermophysicalModels -lspecie -lbasicThermophysicalModels -lchemistryModel -lODE -lfiniteVolume /home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-system/libPstream.so -lOpenFOAM -liberty -ldl -lm -o /home/felipeg/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/reactingFoam
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::hs(Foam::Field<double> const&, Foam::List<int> const&) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::hBoundaryCorrection(Foam::Geom etricField<double, Foam::fvPatchField, Foam::volMesh>&)'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicRhoThermo::constructfvMeshConstructorT ables()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::hs() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicPsiThermo::basicPsiThermo(Foam::fvMesh const&)'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::mu() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicPsiThermo::fvMeshConstructorTablePtr_'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::h(Foam::Field<double> const&, Foam::List<int> const&) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicPsiThermo::~basicPsiThermo()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `typeinfo for Foam::basicPsiThermo'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicRhoThermo::~basicRhoThermo()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::hs()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::e()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicRhoThermo::rho()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo:si() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo:() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicRhoThermo::basicRhoThermo(Foam::fvMesh const&)'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicPsiThermo::constructfvMeshConstructorT ables()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo:()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::T() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicPsiThermo::destroyfvMeshConstructorTab les()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::Cp(Foam::Field<double> const&, int) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::hs(Foam::Field<double> const&, int) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::e(Foam::Field<double> const&, Foam::List<int> const&) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::Cv(Foam::Field<double> const&, int) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::read()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::alpha() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::Cv() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::e() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `typeinfo for Foam::basicRhoThermo'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::h()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::h() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::hBoundaryTypes()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::h(Foam::Field<double> const&, int) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::e(Foam::Field<double> const&, int) const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::Cp() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicThermo::hc() const'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicRhoThermo::destroyfvMeshConstructorTab les()'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicRhoThermo::fvMeshConstructorTablePtr_'
/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libreactionThermophysicalModels.so: undefined reference to `Foam::basicRhoThermo::rho() const'
collect2: ld returned 1 exit status
make: *** [/home/felipeg/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/reactingFoam] Error 1
I don't understand very well the error, I see that it is related with some libraries but these libraries have been compiled fine, I think that is related with the linking processes.


Again thanks for your help,

Best regards,

Felipe
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   October 22, 2011, 10:17
Default
  #8
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Dear Felipe,

Are you certain you didn't encounter any errors during your re-compiling of OpenFOAM?

Apparently you are missing some thermophysical library. It's probably only a consequence from an error occurring upstream, but we could try recompiling only the library. Try going to your the following folder:
Code:
cd ~/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/basic
and then recompile the library with
Code:
wmake libso
What do you get as output?

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 23, 2011, 19:26
Default
  #9
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 16
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
Hi, Francois and thanks for your help, I solve my compilation problem, I have to use a different version of gcc and I can compile all applications very well, but now I have a problem with mpi, when I try to use mpirun I obtain this error:


Code:
A requested component was not found, or was unable to be opened.  This
means that this component is either not installed or is unable to be
used on your system (e.g., sometimes this means that shared libraries
that the component requires are unable to be found/loaded).  Note that
Open MPI stopped checking at the first component that it did not find.

Host:      felipeg-Satellite-A665
Framework: crs
Component: none
--------------------------------------------------------------------------
[felipeg-Satellite-A665:15612] *** Process received signal ***
[felipeg-Satellite-A665:15612] Signal: Segmentation fault (11)
[felipeg-Satellite-A665:15612] Signal code: Address not mapped (1)
[felipeg-Satellite-A665:15612] Failing at address: 0x28
[felipeg-Satellite-A665:15612] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x7fb996e3fc60]
[felipeg-Satellite-A665:15612] [ 1] /usr/lib/libopen-pal.so.0(mca_base_select+0x110) [0x7fb997916260]
[felipeg-Satellite-A665:15612] [ 2] /usr/lib/libopen-pal.so.0(opal_crs_base_select+0x7e) [0x7fb99792898e]
[felipeg-Satellite-A665:15612] [ 3] /usr/lib/libopen-pal.so.0(opal_cr_init+0x2e9) [0x7fb997906fa9]
[felipeg-Satellite-A665:15612] [ 4] /usr/lib/libopen-pal.so.0(opal_init+0x188) [0x7fb997906968]
[felipeg-Satellite-A665:15612] [ 5] /usr/lib/libopen-rte.so.0(orte_init+0x55) [0x7fb997b589f5]
[felipeg-Satellite-A665:15612] [ 6] mpirun() [0x402f5f]
[felipeg-Satellite-A665:15612] [ 7] mpirun() [0x402b24]
[felipeg-Satellite-A665:15612] [ 8] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7fb996abaeff]
[felipeg-Satellite-A665:15612] [ 9] mpirun() [0x402a49]
[felipeg-Satellite-A665:15612] *** End of error message ***
Violación de segmento
I check that the libraries were installed and so is, any suggestions to resolve this?

Again thanks for your help,

Best Regards

Felipe
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   October 25, 2011, 15:04
Default
  #10
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Mm..

Did you compile Open-mpi yourself, or are you using system libraries?

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   November 21, 2012, 12:09
Default
  #11
New Member
 
Terrence Nguyen
Join Date: Jan 2012
Posts: 13
Rep Power: 14
hismother is on a distinguished road
Hi Felipe, I think I am having the same problem that you did. I have the same error statement as yours in comment no. 7. Can you tell me how you solved this?

You mentioned that you just changed the Gcc compiler and then it worked. Is it what you did?
hismother is offline   Reply With Quote

Old   November 21, 2012, 13:27
Default Compilation problem
  #12
Member
 
lfgmarc's Avatar
 
Luis Felipe Gutierrez Marcantoni
Join Date: Oct 2010
Location: Cordoba-Argentina
Posts: 47
Rep Power: 16
lfgmarc is on a distinguished road
Send a message via MSN to lfgmarc
Hi Terrence, Yes, I change to gcc4.4 version and then I can compile everything.


regards

Felipe
__________________
Felipe G
lfgmarc is offline   Reply With Quote

Old   November 21, 2012, 13:51
Default
  #13
New Member
 
Terrence Nguyen
Join Date: Jan 2012
Posts: 13
Rep Power: 14
hismother is on a distinguished road
Can you show me how to change it. Is it in the settings.sh ??

Many thanks

Terrence
hismother is offline   Reply With Quote

Old   May 27, 2013, 10:16
Default
  #14
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi
Is some body familiar with the problem regarding undefined reference.

I actually have a lot of files to edit and i hope i have done it good.

But still a compilation error appears as below..

Code:
y_porousSimpleFoam.C:(.text+0x17dd): undefined reference to `Foam::porousZone::addResistancea(Foam::fvMatrix<Foam::Vector<double> > const&, Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>&, bool) const'
my_porousSimpleFoam.C:(.text+0x18ad): undefined reference to `Foam::porousZone::addResistancea(Foam::fvMatrix<Foam::Vector<double> > const&, Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>&, bool) const'
my_porousSimpleFoam.C:(.text+0x274d): undefined reference to `Foam::porousZone::addResistanceb(Foam::fvMatrix<Foam::Vector<double> > const&, Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>&, bool) const'
my_porousSimpleFoam.C:(.text+0x28ed): undefined reference to `Foam::porousZone::addResistanceb(Foam::fvMatrix<Foam::Vector<double> > const&, Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>&, bool) const'
my_porousSimpleFoam.C:(.text+0x32a6): undefined reference to `Foam::porousZone::addResistanceb(Foam::fvMatrix<Foam::Vector<double> >&) const'
my_porousSimpleFoam.C:(.text+0x336e): undefined reference to `Foam::porousZone::addResistanceb(Foam::fvMatrix<Foam::Vector<double> >&) const'
my_porousSimpleFoam.C:(.text+0x4fe6): undefined reference to `Foam::porousZone::addResistancea(Foam::fvMatrix<Foam::Vector<double> >&) const'
my_porousSimpleFoam.C:(.text+0x50a6): undefined reference to `Foam::porousZone::addResistancea(Foam::fvMatrix<Foam::Vector<double> >&) const'
RaghavendraRohith is offline   Reply With Quote

Old   November 11, 2013, 07:53
Default
  #15
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13
Sherlock_1812 is on a distinguished road
Hi Rohith,

Where you able to find out what the error was? I'm faced with a similar error.
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   November 12, 2013, 02:14
Default
  #16
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi Srivaths

Ya i have found a solution of this problem in particular. You need to define the address of all the files in the Options and Make files accordingly. As the run of Mainfile.C includes different headers in different locations of the openFOAM directory, one needs to declare the header files with thier address accordingly in order to resolve the issue.

Hope it helps you

Thanks
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   November 12, 2013, 02:29
Default
  #17
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13
Sherlock_1812 is on a distinguished road
Hi Rohith,

Thank you for your reply. I have included the necessary paths in the files and options of the 'Make' directory. In my case I've compiled new boundary conditions into a a library which I've linked with the solver. The library compiles without any error.

When I link it to the solver, I get the following error:

It seems as though the solver needs something more to access the 2 BCs that I've defined within the shared object library.

Any ideas?

Code:
g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam222/src/finiteVolume/lnInclude -I/opt/openfoam222/src/sampling/lnInclude -I/opt/openfoam222/src/meshTools/lnInclude -I/opt/openfoam222/src/fvOptions/lnInclude -I/opt/openfoam222/src/turbulenceModels -I/opt/openfoam222/src/turbulenceModels/incompressible/RAS/lnInclude -I/opt/openfoam222/src/transportModels -I/opt/openfoam222/src/transportModels/incompressible/singlePhaseTransportModel -I/home/srivathsan/OpenFOAM/srivathsan-2.2.2/run/myWork/lnInclude -IlnInclude -I. -I/opt/openfoam222/src/OpenFOAM/lnInclude -I/opt/openfoam222/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/buoyantBoussinesqSimpleFoamTemp.o -L/opt/openfoam222/platforms/linuxGccDPOpt/lib \
	     -L/home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/lib -lmyWork -lfiniteVolume -lsampling -lmeshTools -lfvOptions -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleTransportModels  -lOpenFOAM -ldl   -lm -o /home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoamTemp
/home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/lib/libmyWork.so: undefined reference to `typeinfo for Foam::newDirectionMixedFvPatchVectorField'
/home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/lib/libmyWork.so: undefined reference to `vtable for Foam::newDirectionMixedFvPatchVectorField'
/home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/lib/libmyWork.so: undefined reference to `vtable for Foam::newGradientFvPatchVectorField'
/home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/lib/libmyWork.so: undefined reference to `typeinfo for Foam::newGradientFvPatchVectorField'
collect2: ld returned 1 exit status
make: *** [/home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoamTemp] Error 1
Thanks
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   November 12, 2013, 02:50
Default
  #18
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi srivaths

Mainly i see a fvPatchvectorfield is not declared properly, OpenFOAM generally has a linked file structure regarding which one need to look whether all the files have linked appropriately for a compilation to occur or not. So please try to see where this header file hails from and where it should be linked to, i think this should do your job


Thanks
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   November 12, 2013, 02:55
Default
  #19
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13
Sherlock_1812 is on a distinguished road
So if I understand right, the header files of the boundary conditions are included but probably not linked to the header files from which they are derived from. Am I right?


I will look into that. Many thanks Rohith.
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   November 20, 2013, 01:50
Default
  #20
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13
Sherlock_1812 is on a distinguished road
Hi Rohith,

I have mulled over this for a while and I don't seem to realise which file hasn't been linked properly. As mentioned earlier, the two BC's are in a directory called 'myWork' in $FOAM_RUN. The 'Make' directory in myWork compiles without any error.

I'm using a modified buoyant solver, the Make/files and Make/options of which I've attached. I've included the path to the 'mywork' directory in EXE_INC and the $(FOAM_USER_LIBBIN) in the EXE_LIBS section. I still get the error that I previously posted, when I run the solver. (P.S: i've included "libmyWork.so" in the controlDict as well)

Where am I missing the point?
Attached Files
File Type: txt files.txt (93 Bytes, 9 views)
File Type: txt options.txt (670 Bytes, 6 views)
__________________
Regards,

Srivaths
Sherlock_1812 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
Is this understanding of turbulence models correct? 3kha Main CFD Forum 3 January 31, 2011 22:31
Problem in k-eps turbulence code in complex geometry sontukaku Main CFD Forum 2 December 28, 2010 01:44
convergence of Spalart-Allmaras and k-w(SST) turbulence models smartdingo Main CFD Forum 0 July 14, 2010 12:03
Y+ ranges for Turbulence models han toss Main CFD Forum 2 October 16, 2005 05:07
Programming turbulence models (CFX 4.4) Hamsdi CFX 2 October 12, 2001 02:14


All times are GMT -4. The time now is 13:02.