CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Writing own turbulence model (

ff November 8, 2002 06:08

Writing own turbulence model
Dear Fluent users,

I would like to applay my own turbulence model by writing UDF function. Is this possible in Fluent? Any advice will be very helpful.

BR, ff

cfd monkey November 8, 2002 10:31

Re: Writing own turbulence model
I think I understand your dilemma. You have the turbulence model (or the makings of one), but not the solver and some way of viewing/outputting your results. I may be wrong, but unfortunately I think it is not possible to do want you want with Fluent. My understanding of UDFs is that they are for getting more specific information about cells and faces than Fluent's defaults output. For example, if you wanted specific time-dependent data from a certain range of cells on a face, then this is a good applicaton for a UDF. Also UDF can be used for inputting profiles for velocity, temperature, radiation, et cetera, as boundary conditions. Fluent uses C in the UDFs and in Fluent 5 I'm fairly sure that no arrays are possible, among other limitations to the C language, so if this is the case, then you can see that it is probably not likely you will be able to implement a hand-written turbulence model. On the other hand, Fluent's primary turbulence models (Spalart-Almaras, K-e, and RNG) work quite well, so its probably more trouble than its worth to use Fluent as the environment to run your turbulence model. To get a definitive answer to your question, you could contact Fluent and ask them directly.

ff November 8, 2002 10:48

Re: Writing own turbulence model
Thank you, for your promptly answer. Is it possible to add some additional terms in scalar transport equations (like k or E) with UDF.

Best Regards,

Jonas Larsson November 8, 2002 11:20

Re: Writing own turbulence model
Yes, it is possible to implement a new turbulence model using UDFs. It is not easy though. You might want to ask fluent if they can provide you with an example - I remember seeing a k-w model implemented as a UDF for Fluent 5 some time ago.

david November 9, 2002 23:03

Re: Writing own turbulence model
I think, even if you are smart, it may take your 4/5 yrs of your dedicated time to implement a new turbulence model using UDFs. Why not writing a complete independent code??!! There are lots advantages and desadvantages though.


Jonas Larsson November 10, 2002 06:17

Re: Writing own turbulence model
With a good example to start from it shouldn't be more than a weeks work to implement a new model and run a few validation cases.

All times are GMT -4. The time now is 13:23.