View Issue Details

IDProjectCategoryView StatusLast Update
0004051OpenFOAMBugpublic2024-02-13 17:27
Reportersr_786 Assigned Tohenry  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSOpenSuSEOS Version15.4
Product Versiondev 
Summary0004051: Issue With Compiling SSG and LRR
DescriptionHi,

I have been attempting to compile a new turbulence model for the RSM LRR and SSG in OpenFOAM-9 where I am using LINUX OpenSUSE-v15.4.

Prior to modifying the code I am first testing if I can successfully compile a new turbulence model. I first tried out compiling kEpsilon & kOmega which worked fine.

mykEpsilon:

wmake libso .
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file mykinematicMomentumTransportModels.C
g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -c mykinematicMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o
g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o -L/home/cfd/OpenFOAM/OpenFOAM-9/platforms/linux64GccDPInt32Opt/lib \
    -ltransportModels -lmomentumTransportModels -lfiniteVolume -lmeshTools -o /home/cfd/OpenFOAM/OpenFOAM-9/platforms/linux64GccDPInt32Opt/lib/mykinematicMomentumTransportModels.so

mykOmega:

wmake libso .
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file mykinematicMomentumTransportModels.C
g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -c mykinematicMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o
g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o -L/home/cfd/OpenFOAM/OpenFOAM-9/platforms/linux64GccDPInt32Opt/lib \

Issue appears when attempting to compile either SSG or LRR, see below

simpleSSG:

wmake libso .
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file mykinematicMomentumTransportModels.C
g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -c mykinematicMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o
In file included from simpleSSG.H:210:0,
                 from mykinematicMomentumTransportModels.C:47:
simpleSSG.C: In instantiation of ‘Foam::RASModels::simpleSSG<BasicMomentumTransportModel>::simpleSSG(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&, const Foam::word&) [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModels::simpleSSG<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModels::simpleSSG<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModels::simpleSSG<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’:
/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘static Foam::autoPtr<Foam::RASModel<BasicMomentumTransportModel> > Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&) [with RASModelType = Foam::RASModels::simpleSSG<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModel<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModel<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModel<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’
/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::RASModels::simpleSSG<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’
mykinematicMomentumTransportModels.C:48:1: required from here
simpleSSG.C:228:14: error: ‘bound’ was not declared in this scope
         bound(epsilon_, this->epsilonMin_);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simpleSSG.C:228:14: note: suggested alternative: ‘found’
         bound(epsilon_, this->epsilonMin_);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         found
simpleSSG.C: In instantiation of ‘void Foam::RASModels::simpleSSG<BasicMomentumTransportModel>::correct() [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’:
mykinematicMomentumTransportModels.C:48:24: required from here
simpleSSG.C:335:10: error: ‘bound’ was not declared in this scope
     bound(epsilon_, this->epsilonMin_);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simpleSSG.C:335:10: note: suggested alternative: ‘found’
     bound(epsilon_, this->epsilonMin_);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     found
make: *** [/home/cfd/OpenFOAM/OpenFOAM-9/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o] Error 1

simpleLRR

wmake libso .
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file mykinematicMomentumTransportModels.C
g++ -std=c++14 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/incompressible/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/transportModels/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/meshTools/lnInclude -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -c mykinematicMomentumTransportModels.C -o Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o
In file included from simpleLRR.H:219:0,
                 from mykinematicMomentumTransportModels.C:47:
simpleLRR.C: In instantiation of ‘Foam::RASModels::simpleLRR<BasicMomentumTransportModel>::simpleLRR(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&, const Foam::word&) [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModels::simpleLRR<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModels::simpleLRR<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModels::simpleLRR<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’:
/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘static Foam::autoPtr<Foam::RASModel<BasicMomentumTransportModel> > Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::New(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&) [with RASModelType = Foam::RASModels::simpleLRR<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>; Foam::RASModel<BasicMomentumTransportModel>::alphaField = Foam::geometricOneField; Foam::RASModel<BasicMomentumTransportModel>::rhoField = Foam::geometricOneField; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>; Foam::RASModel<BasicMomentumTransportModel>::transportModel = Foam::kinematicTransportModel]’
/home/cfd/OpenFOAM/OpenFOAM-9/src/MomentumTransportModels/momentumTransportModels/lnInclude/RASModel.H:100:9: required from ‘Foam::RASModel<BasicMomentumTransportModel>::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::RASModels::simpleLRR<Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel> >; BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’
mykinematicMomentumTransportModels.C:48:1: required from here
simpleLRR.C:219:14: error: ‘bound’ was not declared in this scope
         bound(epsilon_, this->epsilonMin_);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simpleLRR.C:219:14: note: suggested alternative: ‘found’
         bound(epsilon_, this->epsilonMin_);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         found
simpleLRR.C: In instantiation of ‘void Foam::RASModels::simpleLRR<BasicMomentumTransportModel>::correct() [with BasicMomentumTransportModel = Foam::IncompressibleMomentumTransportModel<Foam::kinematicTransportModel>]’:
mykinematicMomentumTransportModels.C:48:24: required from here
simpleLRR.C:325:10: error: ‘bound’ was not declared in this scope
     bound(epsilon_, this->epsilonMin_);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simpleLRR.C:325:10: note: suggested alternative: ‘found’
     bound(epsilon_, this->epsilonMin_);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     found
make: *** [/home/cfd/OpenFOAM/OpenFOAM-9/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/mykinematicMomentumTransportModels.o] Error 1
Steps To Reproduce1. Copy either LRR or SSG directory from src

2. Change LRR or SSG .C and .H files to simpleLRR or simpleSSG and make corresponding changes in file.

3. Copy myKinematicTransportModels.C from src, delete all other turbulence models cited in file (already compiled) and add new turbulence model which is to be compiled.

4. Copy make directory from src, and implement following in files and options:

files:

mykinematicMomentumTransportModels.C

LIB = $(FOAM_LIBBIN)/mykinematicMomentumTransportModels

options:

EXE_INC = \
    -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
     -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
    -I$(LIB_SRC)/transportModels/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \

LIB_LIBS = \
    -ltransportModels \
    -lmomentumTransportModels \
    -lfiniteVolume \
    -lmeshTools

5. Type in Linux bash terminal wclean .all and then wmake libso

6. Above 5 lines work for kEpsilon and kOmega, not for LRR or SSG
TagsNo tags attached.

Activities

henry

2024-02-13 17:27

manager   ~0013188

User support request

Issue History

Date Modified Username Field Change
2024-02-13 16:19 sr_786 New Issue
2024-02-13 17:27 henry Assigned To => henry
2024-02-13 17:27 henry Status new => closed
2024-02-13 17:27 henry Resolution open => no change required
2024-02-13 17:27 henry Note Added: 0013188