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

Duplicate entry SpalartAllmaras in runtime selection table LESModel

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

Like Tree8Likes
  • 1 Post By matzbanni
  • 5 Post By wenxu
  • 2 Post By skeptik

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 12, 2014, 04:23
Default Duplicate entry SpalartAllmaras in runtime selection table LESModel
  #1
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12
wenxu is on a distinguished road
Hello,everyone.
I encounter the problem which had troubled me for some time, and i also searched the forum but i did not get any clear answer. So i started a new post here. Every one could give me some suggestions even if you did not encounter this problem.

My Make/options is as follows:
Quote:
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_FLAMELETPCC_SRC)/turbulenceModels/compressible/turbulenceModel \
-I/root/OpenFOAM/root-2.3.0/src/flameletPCC/flameletIntermediate/lnInclude \
-I/root/OpenFOAM/root-2.3.0/src/flameletPCC/coalCombustion/lnInclude \
-I$(LIB_FLAMELETPCC_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_FLAMELETPCC_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_FLAMELETPCC_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_FLAMELETPCC_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_FLAMELETPCC_SRC)/combustionModels/lnInclude
Quote:
EXE_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-lFlameletPCCcompressibleTurbulenceModel \
-lFlameletPCCcompressibleLESModels \
-lFlameletPCCcompressibleRASModels \
-lFlameletPCCreactionThermophysicalModels \
-lFlameletPCCspecie \
-lFlameletPCCbasicThermophysicalModels \
-lFlameletPCCchemistryModel \
-lfiniteVolume \
-lmeshTools \
-lsampling \
-lflameletPCCintermediate \
-lflameletPCCcoalCombustion\
-lFlameletPCCCombustionModels
Where the LIB_FLAMELETPCC_SRC is the envierment to my local src case.
The library was compiled with no problem, but when i run the solver , I encounter the following error:
Quote:
Duplicate entry SpalartAllmaras in runtime selection table LESModel
#0 /opt/openfoam230/platforms/linuxGccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+ 0x29) [0xb4893ca9]
#1 /root/OpenFOAM/root-2.3.0/platforms/linuxGccDPOpt/lib/libFlameletPCCcompressibleLESModels.so(+0x448f3) [0xb76158f3]
#2 /lib/ld-linux.so.2(+0xeeab) [0xb77a8eab]
#3 /lib/ld-linux.so.2(+0xef94) [0xb77a8f94]
#4 /lib/ld-linux.so.2(+0x120f) [0xb779b20f]
Duplicate entry vanDriest in runtime selection table foamLESdelta
#0 /opt/openfoam230/platforms/linuxGccDPOpt/lib/libOpenFOAM.so(_ZN4Foam5error14safePrintStackERSo+ 0x29) [0xb4893ca9]
#1 /root/OpenFOAM/root-2.3.0/platforms/linuxGccDPOpt/lib/libFlameletPCCcompressibleLESModels.so(+0x44b0b) [0xb7615b0b]
#2 /lib/ld-linux.so.2(+0xeeab) [0xb77a8eab]
#3 /lib/ld-linux.so.2(+0xef94) [0xb77a8f94]
#4 /lib/ld-linux.so.2(+0x120f) [0xb779b20f]
Many errors to list here.

The second error is as follows:
Quote:
Selecting turbulence model type LESModel
Selecting LES turbulence model Smagorinsky
Selecting LES delta type vanDriest
Selecting LES delta type cubeRootVol
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam230/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::compressible::LESModels::Smagorinsky::update SubGridScaleFields(Foam::GeometricField<Foam::Tens or<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/root/OpenFOAM/root-2.3.0/platforms/linuxGccDPOpt/lib/libFlameletPCCcompressibleLESModels.so"
#4 Foam::compressible::LESModels::Smagorinsky::Smagor insky(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&, Foam::word const&) in "/opt/openfoam230/platforms/linuxGccDPOpt/lib/libcompressibleLESModels.so"
#5 Foam::compressible::LESModel::adddictionaryConstru ctorToTable<Foam::compressible::LESModels::Smagori nsky>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) in "/opt/openfoam230/platforms/linuxGccDPOpt/lib/libcompressibleLESModels.so"
#6 Foam::compressible::LESModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) in "/opt/openfoam230/platforms/linuxGccDPOpt/lib/libcompressibleLESModels.so"
#7 Foam::compressible::turbulenceModel::addturbulence ModelConstructorToTable<Foam::compressible::LESMod el>::NewturbulenceModel(Foam::GeometricField<doubl e, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) in "/opt/openfoam230/platforms/linuxGccDPOpt/lib/libcompressibleLESModels.so"
#8 Foam::compressible::turbulenceModel::New(Foam::Geo metricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo&, Foam::word const&) in "/root/OpenFOAM/root-2.3.0/platforms/linuxGccDPOpt/lib/libFlameletPCCcompressibleTurbulenceModel.so"
#9
Please give me some suggestions. Thank you in advance!

regards,
wen
wenxu is offline   Reply With Quote

Old   December 13, 2014, 01:29
Default
  #2
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12
wenxu is on a distinguished road
Have solved it!
wenxu is offline   Reply With Quote

Old   May 15, 2015, 07:41
Default
  #3
Member
 
MB
Join Date: Sep 2012
Posts: 30
Rep Power: 13
matzbanni is on a distinguished road
And how did you solve it?
amuzeshi likes this.
matzbanni is offline   Reply With Quote

Old   May 15, 2015, 08:10
Default
  #4
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12
wenxu is on a distinguished road
We had used two library, one is the standard library, the other one is the library in our own $HOME/SRC.

For example: in my case, [QUOTE-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \][/QUOTE]
These are standard library in $(LIB_SRC). We should COPY these standard libraries in our own library folder and substitute these standard library with own library, say, $(LIB_YOUOWM_SRC), Then in the solver, you should use these libraries: $(LIB_YOUOWM_SRC), BUT not: $(LIB_SRC)


please do not forget define $(LIB_YOUOWM_SRC) in your .bashrc like:
export $(LIB_YOUOWM_SRC) = $HOME/your run case library path/src

Good luck!

Xu
wenxu is offline   Reply With Quote

Old   May 29, 2015, 08:31
Default
  #5
Member
 
Ilya
Join Date: Dec 2011
Location: Russia
Posts: 97
Blog Entries: 41
Rep Power: 14
skeptik is on a distinguished road
To whom it may concern...

When you re-use some code, better to re-name name of the classes and functions. So such errors does not appear.

You can take a look at Jens Höpken presentation "A brief introduction on the basic structure of functionObjects" where he suggests

Quote:
Code re-use I
1 Start your favourite OpenFOAM version terminal
2 Find the existing forces functionObject:
src ; find . -name "forces.H" | grep -v "lnInclude"
3 Goto your user directory: cd $WM_PROJECT_USER_DIR
4 Create the directory for your sources:
mkdir -p src/customForces
5 Change to this directory: cd src/customForces
6 Copy the content of the directory containing forces.H
7 Delete all *.dep files: rm *.dep

Code re-use II
1 Rename all *forces*.[H,C] to *customForces*.[H,C]
2 In all files, replace forces by customForces
For Vim users: %s/forces/customForces/g
3 In all files, replace calccustomForcesMoments by
calcForcesMoments
4 Create Make folder with two empty files in it: files and options
5 Adjust Make/files to:
customForces.C
customForcesFunctionObject.C
LIB = $(FOAM_USER_LIBBIN)/libcustomForces
So there are two classes with different name forces and customForces in namespace. The classes are identical but there are no errors with it. And you can keep re-use and rewrite original code to get something suitable.
batistem and kk2017 like this.
__________________
practice makes perfect
skeptik is offline   Reply With Quote

Old   May 29, 2015, 08:34
Default
  #6
Member
 
MB
Join Date: Sep 2012
Posts: 30
Rep Power: 13
matzbanni is on a distinguished road
Quote:
Originally Posted by skeptik View Post
To whom it may concern...

When you re-use some code, better to re-name name of the classes and functions. So such errors does not appear.

You can take a look at Jens Höpken presentation "A brief introduction on the basic structure of functionObjects" where he suggests



So there are two classes with different name forces and customForces in namespace. The classes are identical but there are no errors with it. And you can keep re-use and rewrite original code to get something suitable.
Thanks for your input! In my case I forgot to build a custom swak4foam-version for my sample-utilities...

Best Regards
matzbanni is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time Selection Mechanism - Some help required to understand jaswi OpenFOAM Programming & Development 3 October 29, 2015 13:42
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 04:40
Adding thermophysical model to chemistryType runtime table ChrisA OpenFOAM Programming & Development 3 March 10, 2014 09:37
Changing viewfactor Model and use the changed my model by calling "mySolver" FabianF OpenFOAM Programming & Development 2 January 14, 2014 11:25
rhoSimplecFoam Mach0.8 no pressure values CFDnewbie147 OpenFOAM Running, Solving & CFD 16 November 23, 2013 05:58


All times are GMT -4. The time now is 11:14.