|
[Sponsors] |
November 20, 2007, 14:44 |
Hey, folks,
I want to learn
|
#1 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
Hey, folks,
I want to learn how to recompile turbulence models in OpenFoam. I did some tests as following. I modified the turbulenceModel.H file by multiplying the effect viscosity by 2. Then use "wmake libso" to recompile the turbulence model. virtual tmp<volscalarfield> nuEff() const { return tmp<volscalarfield> ( new volScalarField("nuEff", 2*nut() + 2*nu()) ); } I restarted a new simulaiton and the new results I got are almost exactly same as the previous one without changing the turbulence model. This makes me wondering whether I did right thing about recompiling the turbulence model. Can anyone give me some comments and suggestions? Thanks. Quinn QT |
|
November 20, 2007, 16:45 |
Hi Quinn,
maybe you forgot to
|
#2 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Hi Quinn,
maybe you forgot to recompile again your solver (wmake). because it did't change, you have to do a "touch *.C" and then recompile to take into account ou modification in turbulence.H hope it helps, Cedric |
|
November 20, 2007, 17:14 |
Cedric,
Thanks for your rep
|
#3 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
Cedric,
Thanks for your reply. I did recompile my simpleFoam solver with wmake. I did this after I recompiled the turbulence model. I don't know why the solver did not "see" the changes I made. Is there any other thing I did not consider? Thanks Quinn |
|
November 21, 2007, 04:08 |
Quinn,
your solver didn't see
|
#4 |
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17 |
Quinn,
your solver didn't see the changes because the solver didn't change. that's why I told you to do a "touch simpleFoam.C" before compiling your solver. The touch command updates the access and modification times of the named files to the current time and date. The command is useful because some commands rely on a file's access and modification times. So the compilation will take into account your new library. If it still doesn't work, maybe it is because it's not the right file to change :o) Cedric |
|
November 21, 2007, 10:28 |
Cedric,
Thanks for the clar
|
#5 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
Cedric,
Thanks for the clarification. I was thinking that "wclean" will do the same job as "touch" command. I am rerunning my simulation now. Hopefully it will work this time. Thanks again for your help. QT |
|
November 21, 2007, 13:54 |
Unfortunately, even though I "
|
#6 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
Unfortunately, even though I "touch" source file and recompiled it after I modified the turbulence model, my new simulation results is still same as before. This time, I multiplied effective viscosity by 1000 and I am not suppose to have the same results.
When I started the new simulation, I just cloned from the old simulaiton and started the new simulation from the last step of the old simulation. Will this be a problem? Is the old solver imbeded in the old case file? If anyone know what I did wrong, please give me some suggestion. I am realy stuck here. Your help is appreciated. QT |
|
November 26, 2007, 15:15 |
Hello, folks,
I deleted "k
|
#7 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
Hello, folks,
I deleted "kOmegaSST/kOmegaSST.C" from turbulence model make/files and recompiled turbulence model with "wmake libso". I also recompiled my simpleFoam solver. What surprised me is that I can still use kOmegaSST model for my simulation after I removed the kOmegaSST.C file. At the end of the compilation, I also got a message like this "/home/qtian/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libincompressibleTurbulenc eModels.so' is up to date." Can anyone tell me what is the problem? I have been stuck here for several days. Please give me some help if you can. Thanks for your help. Quinn |
|
November 26, 2007, 16:51 |
hello, all,
I figured it ou
|
#8 |
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17 |
hello, all,
I figured it out what is the problem. Just for the record,since I had the same name "incompressibleTurbulenceModels.so" at $(FOAM_LIBBIN) and $(FOAM_USER_LIBBIN), OpenFOAM solver used the one under $(FOAM_USER_LIBBIN). The make/files for turbulence model update the new lib in the $(FOAM_LIBBIN) folder. That is why simpleFoam solver did not "see" my change in turbulence model. QT |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a soot model in OpenFoam | skherad | OpenFOAM Running, Solving & CFD | 7 | July 16, 2014 06:05 |
Incompressible RSM turbulence thermal transport Can OpenFOAM do this | anothr_acc | OpenFOAM Running, Solving & CFD | 6 | February 24, 2009 06:39 |
changing model constants in k-e turbulence model | Sunil | CFX | 3 | October 3, 2006 13:12 |
Does there any original reference for the turbulence models in OpenFOAM | andycong | OpenFOAM Running, Solving & CFD | 0 | March 1, 2006 03:07 |
HELP! TURBULENCE k-e OR k-omega TURBULENCE MODEL? | Mirek Kabacinski | FLUENT | 5 | August 24, 2003 23:31 |