CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Implementation of turbulence model

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

LinkBack Thread Tools Display Modes
Old   March 20, 2013, 11:07
Default Implementation of turbulence model
Join Date: Aug 2011
Posts: 83
Rep Power: 8
idefix is on a distinguished road

I am trying to implement a new turbulence model, but it does not work.

Here are the steps I did:

user:~/OpenFOAM> mkdir OpenFOAM-2.1.1-user
user:~/OpenFOAM> cd OpenFOAM-2.1.1
user:~/OpenFOAM/OpenFOAM-2.1.1> cp -r --parents src/turbulenceModels/incompressible/RAS/kEpsilon ../OpenFOAM-2.1.1-user
user:~/OpenFOAM/OpenFOAM-2.1.1> cd ../OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS> mv kEpsilon/ VOFkEpsilon
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS> cd VOFkEpsilon/
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> mv kEpsilon.H VOFkEpsilon.H
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> mv kEpsilon.C VOFkEpsilon.C
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> sed s/kEpsilon/VOFkEpsilon/g VOFkEpsilon.C > temp
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> mv temp VOFkEpsilon.C
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> sed s/kEpsilon/VOFkEpsilon/g VOFkEpsilon.H > temp
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> mv temp VOFkEpsilon.H
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> ll

user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> cp -r $FOAM_SRC/turbulenceModels/incompressible/RAS/Make .
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> ll
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> vi Make/files
In line 20 add: VOFkEpsilon/VOFkEpsilon.C
Finish with :wq
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> vi Make/options
I added -I$(LIB_SRC)/turbulenceModels/RAS/incompressible/lnInclude
The final file looks like
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-lincompressibleTurbulenceModel \
-lfiniteVolume \

Finish with :wq
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> vi VOFkEpsilon.C
In line 57 ad: Info << "my VOFkepsilon model" << endl;
Finish with :wq
user:~/OpenFOAM/OpenFOAM-2.1.1-user/src/turbulenceModels/incompressible/RAS/VOFkEpsilon> wmake libso
wmakeLnInclude: linking include files to ./lnInclude
make: *** No rule to make target »RASModel/RASModel.dep«,
needed by »Make/linux64GccDPOpt/dependencies« Stop.

Can any help me what I am doing wrong?

Thanks a lot
idefix is offline   Reply With Quote

Old   March 28, 2013, 06:43
New Member
Tobias Glasenapp
Join Date: Mar 2013
Location: Karlsruhe, Germany
Posts: 4
Rep Power: 6
glasenapp is on a distinguished road
Hello idefix,

It seems like you followed the instructions "How to implement your own turbulence model" given in the slides of Hakan Nilsson (Chalmers University).
What does your make/files look like? In my opinion, it should contain:


LIB = $(FOAM_USER_LIBBIN)/libmyincompressibleRASModels
Hope that helps.

glasenapp is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centrifugal Pump and Turbulence Model Michiel CFX 12 January 25, 2010 04:20
turbulence model equation Andy Chen FLOW-3D 4 January 1, 2010 22:45
SA Turbulence model implementation ganesh Main CFD Forum 0 March 6, 2006 13:23
k-w Turbulence model implementation suneesh Main CFD Forum 4 November 23, 2005 18:35
A reference on implementation of Spalart-Alam. Turbulence Model? Mohammad Kermani Main CFD Forum 2 December 26, 1999 03:56

All times are GMT -4. The time now is 00:10.