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

Implementation of turbulence model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2013, 11:07
Default Implementation of turbulence model
  #1
Member
 
Join Date: Aug 2011
Posts: 89
Rep Power: 15
idefix is on a distinguished road
Hello

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
kEpsilon.dep
VOFkEpsilon.C
VOFkEpsilon.H

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
Make
VOFkEpsilon.C
VOFkEpsilon.H
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
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude
LIB_LIBS = \
-lincompressibleTurbulenceModel \
-lfiniteVolume \
-lmeshTools

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
Default
  #2
New Member
 
Tobias Glasenapp
Join Date: Mar 2013
Location: Karlsruhe, Germany
Posts: 4
Rep Power: 13
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:

Code:
VOFkEpsilon.C

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

Tobias
glasenapp is offline   Reply With Quote

Reply


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
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 16:03.