|
[Sponsors] |
March 20, 2013, 11:08 |
Implementation of turbulence model
|
#1 |
Member
Join Date: Aug 2011
Posts: 89
Rep Power: 15 |
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 anyone help me what I am doing wrong? Thanks a lot |
|
March 20, 2013, 11:19 |
|
#2 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23 |
Hi Idefix,
You were a bit too enthusiastic with copying everything Remove the Make/files you copied and replace it by a new Make/files file with the (only!) following lines: Code:
VOFkEpsilon.C LIB = $(FOAM_USER_LIBBIN)/libextendedRASModels In the case where you want to use the turbulence model, you should add Code:
libs ( "libOpenFOAM.so" "libextendenRASModels.so" ); If something goes wrong, feel free to let us know. Cheers, L |
|
March 26, 2013, 05:39 |
|
#3 |
Member
Join Date: Aug 2011
Posts: 89
Rep Power: 15 |
Thanks for your help.
Everything is working now If anyone has the same problem, here is the last step you have to do to finish the implementation: Go to constant/RASProperties Add: RASModel VOFkEpsilon; Cheers |
|
March 26, 2013, 11:01 |
|
#4 |
Member
Join Date: Aug 2011
Posts: 89
Rep Power: 15 |
Hello,
now I´ve got the next problem I want to implement a term which uses alpha1 but what ever I did, I always get the massage: alpha1 was not declared in this scope What did I forget to add? Thanks for your help |
|
March 26, 2013, 11:04 |
|
#5 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23 |
Hi Idefix,
You really should define the problem a bit better if you want us to be able to help us... What does this alpha1 represent. Is it a const parameter of the turbulence model? Is it a volScalarField? Does it only show up in the turbulence model equations? Cheers, Lieven |
|
March 27, 2013, 02:22 |
|
#6 |
Member
Join Date: Aug 2011
Posts: 89
Rep Power: 15 |
oh sorry, I forget
alpha1 is defined in the User´s Guide: http://www.openfoam.org/docs/user/damBreak.php (chapter 2.3.3) alpha1 is the phase fraction and is used in the VOF-model. I refer to the solver interFoam. alpha1 = 1: the phase is liquid alpha1 = 0: the phase is gaseous 0 < alpha1 < 1: there is the interface between two phases in this cell alpha1 is a volScalarField Do you understand this explanation? If it´s not the case, please ask. I´ll try to explain it in more detail. Thanks again Cheers Last edited by idefix; March 27, 2013 at 05:31. |
|
|
|
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 |