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/)
-   -   How to include additional variables in a LESdelta? (https://www.cfd-online.com/Forums/openfoam-programming-development/105112-how-include-additional-variables-lesdelta.html)

Jane L July 23, 2012 11:31

How to include additional variables in a LESdelta?
 
Hello!

Currently I'am programming my own DES turbulence model. Therefore I need to make a new version of maxDeltaxyz which includes u*dt and sqrt(k)*dt in addition to dx, dy, dz, where u is the magnitude of the velocity, dt is the timestep and k is the turbulent kinetic energy used in that turbulence model.
After trying one day, could anybody help me how to include which files so that I can use u, dt and k in maxDeltaxyz?

Thanks in advance for any help!!

timo_IHS July 23, 2012 12:06

Have a look in this turbulence model (VLES)
OpenFOAM-1.6-ext/src/turbulenceModels/incompressible/RAS/kOmegaSSTF

Best

Jane L July 24, 2012 04:36

Thanks for your reply!

I downloaded OpenFOAM-1.6-ext and didn't find kOmegaSSTF in that src folder. :confused:
However the main changes to kOmegaSST are stated in the presentation "How to implement your own turbulence model" by Håkan Nilsson.
My problem is that those variables which can be used in a turbulence model aren't known by mymaxDeltaxyz (/home/user/OpenFOAM/user-2.1.1/src/turbulenceModels/LES/LESdeltas/maxDeltaxyz). Hence, when I write them into my code and try to compile, I recieve following output:
Code:


    error: ‘U_’ was not declared in this scope
    error: ‘runTime_’ was not declared in this scope
    error: ‘k_’ was not declared in this scope

So my quite basic question is how do I have to declare the variables in order to use them in mymaxDeltaxyz?

Best regards

timo_IHS July 24, 2012 07:35

Perhaps a IOobject helps!?

Jane L July 24, 2012 10:06

ok, I think it works for now!

Thank you very much

timo_IHS July 24, 2012 10:21

Could you show some part of your code, perhaps it is interesting for other users too.

Jane L July 25, 2012 06:54

yes, I will do that but I think I will wait until I have some validation results. Either I will post a running turbulence model or I will run into some problems and post a buggy code in order to get some help ;)

so long

Jane L November 1, 2012 06:50

Hi!

I finished the programming of the turbulence models. You find the necessary files in this thread:

http://www.cfd-online.com/Forums/ope...s-k-omega.html

best regards


All times are GMT -4. The time now is 16:11.