CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Turbulent viscosity UDF (

ramesh February 21, 2004 06:36

Turbulent viscosity UDF
hello, i want to change the turbulent viscosity for each cell in std K-E models by changing the Cmu value for each cell. for that iam writing UDF. but in fluent can we vary Cmu value for cell to cell or it is constant for all the cells. i,e we can change Cmu values but that will take all the cells in to account. I am trying to change the Cmu value but it is showing the changed Cmu is same for all the cells. i hope u got my problem. Please kindly help me. thanking u for considering my request



ccc February 22, 2004 11:50

Re: Turbulent viscosity UDF
hi ramesh,

If you read the header file, turb_ke.h in src, you can find the following lines, extern FLUENT_EXPORT real M_keCmu; extern FLUENT_EXPORT real M_keC1; extern FLUENT_EXPORT real M_keC2; extern FLUENT_EXPORT real M_kesigk; extern FLUENT_EXPORT real M_kesige; I guess that in the fluent solver, Cmu is always taken to be constant for all cells. I think maybe your case is not taken into account in the design of the current version of fluent.

However, there is still a possible way to do so. As you maybe know, we can alter the value of flow variable for cell to cell after each iteration by using adjust function. Since you know the formula of the turbulence viscosity, it is easy to find how to alter the value of turbulence viscosity to make the effect the same as you have altered cmu for cell to cell.

It is just a suggestion because I do not consider this method thoroughly. You had better go deep into the k-e model before starting.

good luck.

mateus February 23, 2004 10:41

Re: Turbulent viscosity UDF

Do you want to specify the Cmu for a specific region (for example near wall) or do you want to specify the Cmu in cell with a specific condition (for example velociy or temperature)? The other problem is relatively simple to do with udf. I think there is also an example of how to do that in Fluent UDF documantation.

Hope it helps


All times are GMT -4. The time now is 22:48.