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/)
-   -   adding a turbulence model without recompiling the core (https://www.cfd-online.com/Forums/openfoam-programming-development/85110-adding-turbulence-model-without-recompiling-core.html)

sebastianweiper February 17, 2011 11:50

adding a turbulence model without recompiling the core
 
Hi Foamers,

I want to add a new turbulence model to Openfoam without recompiling the core.
The Compilation works fine but when i want to start the calculation this turbulence model is not known.

I compiled it to this location:

LIB = $(FOAM_USER_LIBBIN)/mylibincompressibleLESModels

I also make the right entry in the controldict.

Is it possible to add some turbulencemodels without recompiling the core of openfoam?

Chris Lucas February 18, 2011 04:17

Hi,

this should work. Maybe you have to recompile the solver.

One question, why are you compiling the new model in a new dynamic library? Is the new model specially designed for one solver? If not, why not include the new model to the existing turbulence library (dynamic library).

Regards,
Christian

wyldckat February 19, 2011 15:04

Greetings to both of you!

@sebastianweiper:
Quote:

Originally Posted by sebastianweiper (Post 295745)
The Compilation works fine but when i want to start the calculation this turbulence model is not known.

I compiled it to this location:

LIB = $(FOAM_USER_LIBBIN)/mylibincompressibleLESModels

I also make the right entry in the controldict.

The location the library is perfect :) How can we be sure you made the right entry in controlDict, if you didn't post here the relevant entry? ;)

Quote:

Originally Posted by sebastianweiper (Post 295745)
Is it possible to add some turbulencemodels without recompiling the core of openfoam?

Like Christian said, yes it should be possible. But there are a few details that need to be taken into account:
  • Your new model doesn't have the same name as some other model, does it?
  • In the modified code, did you rename all of the references to the old model?
  • Have you modified all of the necessary files in your case (files in constant and system) to use the new model?
  • Are you 100% certain that the name you defined in the code is perfectly identical to the name you use in the case files? One letter is enough for it to not respond! For example, "myIcLES" will not be recognized as "myICLES"!

@Chris Lucas:
Quote:

Originally Posted by Chris Lucas (Post 295860)
If not, why not include the new model to the existing turbulence library (dynamic library).

One thing is working on our own computer, where we have access to every part of the file system and have superuser powers if we want (the almighty root user :) ); another thing is having to use a shared computer or cluster, where OpenFOAM is installed in "/opt" and making changes to it is not an option ;)

Best regards,
Bruno


All times are GMT -4. The time now is 01:53.