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

Problem while compiling a turbulence model in OF 4.1

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By clapointe

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 11, 2018, 10:38
Default Problem while compiling a turbulence model in OF 4.1
  #1
Member
 
Alejandro Valeije
Join Date: Nov 2014
Location: Spain
Posts: 52
Rep Power: 11
alexvaleije is on a distinguished road
Hi everybody,

I am having some problems compiling a modified k-epsilon turbulence model in OpenFoam 4.1

To be sure I'm not writing anything wrong in the files, I have copied the original files of the model and I have changed all of the "kEpsilon" terms for "mykEpsilon" and nothing else.

My Make/files has the following:

Quote:
mykEpsilon.C

LIB = $(FOAM_USER_LIBBIN)/libmyIncompressibleRASModels
and my Make/options is:

Quote:
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude

LIB_LIBS = \
-lfiniteVolume \
-lmeshTools
Despite of that, the error when I try to compile is this:

Quote:
g++ -std=c++0x -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 -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam4/src/finiteVolume/lnInclude -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/TurbulenceModels/turbulenceModels/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c mykEpsilon.C -o Make/linux64GccDPInt32Opt/mykEpsilon.o
mykEpsilon.C:40:6: error: redefinition of \u2018void Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :correctNut()\u2019
void mykEpsilon<BasicTurbulenceModel>::correctNut()
^
In file included from mykEpsilon.H:213:0,
from mykEpsilon.C:26:
mykEpsilon.C:40:6: error: \u2018virtual void Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :correctNut()\u2019 previously declared here
void mykEpsilon<BasicTurbulenceModel>::correctNut()
^
mykEpsilon.C:51:21: error: redefinition of \u2018Foam::tmp<Foam::fvMatrix<double> > Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :kSource() const\u2019
tmp<fvScalarMatrix> mykEpsilon<BasicTurbulenceModel>::kSource() const
^
In file included from mykEpsilon.H:213:0,
from mykEpsilon.C:26:
mykEpsilon.C:51:21: error: \u2018virtual Foam::tmp<Foam::fvMatrix<double> > Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :kSource() const\u2019 previously declared here
tmp<fvScalarMatrix> mykEpsilon<BasicTurbulenceModel>::kSource() const
^
mykEpsilon.C:66:21: error: redefinition of \u2018Foam::tmp<Foam::fvMatrix<double> > Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :epsilonSource() const\u2019
tmp<fvScalarMatrix> mykEpsilon<BasicTurbulenceModel>::epsilonSource() const
^
In file included from mykEpsilon.H:213:0,
from mykEpsilon.C:26:
mykEpsilon.C:66:21: error: \u2018virtual Foam::tmp<Foam::fvMatrix<double> > Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :epsilonSource() const\u2019 previously declared here
tmp<fvScalarMatrix> mykEpsilon<BasicTurbulenceModel>::epsilonSource() const
^
mykEpsilon.C:83:1: error: redefinition of \u2018Foam::RASModels::mykEpsilon<BasicTurbulenceM odel>::mykEpsilon(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&, const Foam::word&, const Foam::word&)\u2019
mykEpsilon<BasicTurbulenceModel>::mykEpsilon
^
In file included from mykEpsilon.H:213:0,
from mykEpsilon.C:26:
mykEpsilon.C:83:1: error: \u2018Foam::RASModels::mykEpsilon<BasicTurbulenceM odel>::mykEpsilon(const alphaField&, const rhoField&, const volVectorField&, const surfaceScalarField&, const surfaceScalarField&, const transportModel&, const Foam::word&, const Foam::word&)\u2019 previously declared here
mykEpsilon<BasicTurbulenceModel>::mykEpsilon
^
mykEpsilon.C:200:6: error: redefinition of \u2018bool Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :read()\u2019
bool mykEpsilon<BasicTurbulenceModel>::read()
^
In file included from mykEpsilon.H:213:0,
from mykEpsilon.C:26:
mykEpsilon.C:200:6: error: \u2018virtual bool Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :read()\u2019 previously declared here
bool mykEpsilon<BasicTurbulenceModel>::read()
^
mykEpsilon.C:221:6: error: redefinition of \u2018void Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :correct()\u2019
void mykEpsilon<BasicTurbulenceModel>::correct()
^
In file included from mykEpsilon.H:213:0,
from mykEpsilon.C:26:
mykEpsilon.C:221:6: error: \u2018virtual void Foam::RASModels::mykEpsilon<BasicTurbulenceModel>: :correct()\u2019 previously declared here
void mykEpsilon<BasicTurbulenceModel>::correct()
^
make: *** [Make/linux64GccDPInt32Opt/mykEpsilon.o] Error 1
Since I have not redefined anything, I don't know why is this happening. Could anybody help me with this?
Thank you very much!!
Alex
alexvaleije is offline   Reply With Quote

 


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
about choosing Turbulence model for multiphase flow problem. Near FLUENT 5 April 11, 2019 04:24
Help Selecting Turbulence Model for VOF Problem NavierIsStoked FLUENT 0 November 1, 2013 11:27
K - epsilon VS SST turbulence model Maicol Main CFD Forum 0 November 30, 2012 16:25
problem compiling spalart allmaras model bababanamzdaalma OpenFOAM 0 April 4, 2012 20:13
Centrifugal Pump and Turbulence Model Michiel CFX 12 January 25, 2010 03:20


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