CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   issue compiling new turbulence model (https://www.cfd-online.com/Forums/openfoam-programming-development/96117-issue-compiling-new-turbulence-model.html)

perplexed user January 12, 2012 16:34

issue compiling new turbulence model
 
1 Attachment(s)
Dear All.

I'm trying to compile a new turbulence model in my ubuntu installation of openfoam2.0.1 installed successfully thourght the package manager.

in detail the turbulence model I'm trying to use is this: http://www.cfd-online.com/Forums/ope...tml#post323064

I've checked the howto on the wiki and the one provided by chalmers, but still some errors appears. Sorry for my newbeness but it's the first time I try to do something like this, and I'd really appreciate some help. I must also point out that I'm not so good at compiling sw (almost never did, apart from few fortran files, with no dependencies), so the more detail you want to put into the explanation the merrier ;)

what I've done (just to check if i did something wring here):

untarred the .C and .H files in my /OpenFOAM/myname-2.0.1/src/turbulenceModels/incompressible/RAS/gammaReThetatSST

here i created a subdirectory called Make

cd Make

created new files and option files, can be found attached in the tar.gz.

run wmake libso

the error resulting is similar to the one that can be found here, but the steps to solve it are not clear to me. the error log is:

Code:

wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file gammaReThetatSST.C
could not open file incompressible/turbulenceModel/turbulenceModel.H for source file gammaReThetatSST.C
SOURCE=gammaReThetatSST.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam201/src/finiteVolume/lnInclude -I/opt/openfoam201/src/meshTools/lnInclude -I/opt/openfoam201/src/transportModels -I/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/gammaReThetatSST.o
In file included from gammaReThetatSST.H:110,
                from gammaReThetatSST.C:26:
/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:44:60: error: incompressible/turbulenceModel/turbulenceModel.H: No such file or directory
In file included from gammaReThetatSST.H:110,
                from gammaReThetatSST.C:26:
/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:71: error: expected class-name before ‘,’ token
/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:150: error: ‘turbulenceModel’ has not been declared
/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:162: error: ‘turbulenceModel’ has not been declared
/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H: In member function ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModel::nuEff() const’:
/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:232: error: ‘nut’ was not declared in this scope
/opt/openfoam201/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:232: error: ‘nu’ was not declared in this scope
In file included from gammaReThetatSST.C:26:
gammaReThetatSST.H: At global scope:
gammaReThetatSST.H:274: error: ‘turbulenceModel’ has not been declared
gammaReThetatSST.H: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::DgammaEff() const’:
gammaReThetatSST.H:297: error: ‘nu’ was not declared in this scope
gammaReThetatSST.H: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::DReThetatTildaEff() const’:
gammaReThetatSST.H:306: error: ‘nu’ was not declared in this scope
gammaReThetatSST.H: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::DkEff(const Foam::volScalarField&) const’:
gammaReThetatSST.H:315: error: ‘nu’ was not declared in this scope
gammaReThetatSST.H: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::DomegaEff(const Foam::volScalarField&) const’:
gammaReThetatSST.H:324: error: ‘nu’ was not declared in this scope
gammaReThetatSST.H: In member function ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::epsilon() const’:
gammaReThetatSST.H:362: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.H: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::Rt() const’:
gammaReThetatSST.H:376: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::volScalarField Foam::incompressible::RASModels::gammaReThetatSST::Flength() const’:
gammaReThetatSST.C:61: error: ‘runTime_’ was not declared in this scope
gammaReThetatSST.C:62: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C:82: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::volScalarField Foam::incompressible::RASModels::gammaReThetatSST::ReThetac() const’:
gammaReThetatSST.C:106: error: ‘runTime_’ was not declared in this scope
gammaReThetatSST.C:107: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::Fonset() const’:
gammaReThetatSST.C:167: error: ‘runTime_’ was not declared in this scope
gammaReThetatSST.C:168: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::Fonset1() const’:
gammaReThetatSST.C:183: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C:183: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::Fwake() const’:
gammaReThetatSST.C:198: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::FThetat() const’:
gammaReThetatSST.C:203: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C:209: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘void Foam::incompressible::RASModels::gammaReThetatSST::ReThetat(Foam::volScalarField&) const’:
gammaReThetatSST.C:223: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C:244: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::gammaSep() const’:
gammaReThetatSST.C:286: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C:286: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::F1(const Foam::volScalarField&) const’:
gammaReThetatSST.C:308: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::F2() const’:
gammaReThetatSST.C:330: error: ‘nu’ was not declared in this scope
gammaReThetatSST.C: In constructor ‘Foam::incompressible::RASModels::gammaReThetatSST::gammaReThetatSST(const Foam::volVectorField&, const Foam::surfaceScalarField&, Foam::transportModel&, const Foam::word&, const Foam::word&)’:
gammaReThetatSST.C:524: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C:531: error: ‘runTime_’ was not declared in this scope
gammaReThetatSST.C:588: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C: In member function ‘virtual Foam::tmp<Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::R() const’:
gammaReThetatSST.C:606: error: ‘runTime_’ was not declared in this scope
gammaReThetatSST.C:607: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C:611: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C: In member function ‘virtual Foam::tmp<Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> > Foam::incompressible::RASModels::gammaReThetatSST::devReff() const’:
gammaReThetatSST.C:627: error: ‘runTime_’ was not declared in this scope
gammaReThetatSST.C:628: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C:632: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C: In member function ‘virtual void Foam::incompressible::RASModels::gammaReThetatSST::correct()’:
gammaReThetatSST.C:690: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C:695: error: ‘U_’ was not declared in this scope
gammaReThetatSST.C:710: error: ‘phi_’ was not declared in this scope
gammaReThetatSST.C:765: error: ‘runTime_’ was not declared in this scope
gammaReThetatSST.C:766: error: ‘mesh_’ was not declared in this scope
gammaReThetatSST.C:805: error: ‘nu’ was not declared in this scope
make: *** [Make/linuxGccDPOpt/gammaReThetatSST.o] Error 1

it is not clear to me if i just overlooked something or there are some differences between how things are made in the tutorial version (1.4.1) and the pseudo latest 2.0.1

any hint or advice would be highly welcome. thanks for your time spent reading throught this wall of text.

Bernhard January 13, 2012 03:40

I do not know the implementation of turbulence models in 1.4, but they are most likely not directly transferably to 2.1. The none declared statements may refer to files that you should include that aren't include, but here it refers to the non-compatibility.

The best strategy to get this model to compile on your version, is to start from a turbulence model closest to the one that you want to use (2.1 version), and update the relevant parts in the code (equations and parameter declaration).


All times are GMT -4. The time now is 04:21.