How to obtain convergence for k-omega model starting from k-epsilon solution-FLUENT-6.1.22


While starting k-omega solution from initial solution of k-epsilon one may encounter convergence difficulties. During iterations many cells show turbulent viscosity warning messages. How to get rid of this?
It is observed that it is not possible to control the divergence of omega equation if the turbulence model is changed from k-epsilon to k-omega. There is a sudden jump in omega residuals which leads to turbulent viscosity warning messages and after a while hits solver limits and omega equation diverges. Thus a better method for providing a starting guess for omega was required. This is achieved using a UDF. Please note that,

omega = epsilon/(c_mu*k).

It is possible to obtain the realistic value of epsilon from k-epsilon solution. However, as soon as we switch the turbulence model to k-omega, the values of epsilon are lost and we can't do anything.

Thus two define_on_demand type UDFs are written. This UDF are to be compiled and read in k-epsilon solution. The first function calculates the value of omega using the above equation and stores it in a User Defined memory.

Once this is done, the turbulence model was changed to k-omega. Now the second udf assigns the value of the UDM, to C_O (omega) in all the cells

This gives a better starting guess value for omega.

Here is the source code of the UDF which can be used. The information about how to use this UDF, is also provided there.
/***************************************************************/
/* UDF to compute omega values from k-epsilon solution */
/* and initialise the omega field with this value to help */
/* convergence of k-omega case */
/* */
/* Authors:- rsy, asw */
/***************************************************************/
/* */
/* How to use this UDF:- */
/* (1) Read the k-epsilon case and data or obtain k-epsilon */
/* solution */
/* (2) Increment the User Defined Memory (UDM) counter to 1 in */
/* Define-->User-Defined-->Memory panel */
/* (3) Do one more iteration so that this newly created UDM is */
/* initialised */
/* (4) Go to Define-->User-Defined-->Execute On Demand and */
/* execute "cal_omega". This calculates omega value using */
/* the relation:- */
/* omega = epsilon/(c_mu*k) */
/* (5) Then the calculated value of omega is stored in UDM. */
/* (6) Now change the turbulence Model to k-omega. */
/* (7) Now either perform one iteration or plot the values of */
/* Omega. This step is performed to make sure that omega */
/* variable gets the memory location to store the value */
/* (8) Now execute "assign_omega" from */
/* Define-->User-Defined-->Execute On Demand */
/* (9) This assigns the calculated values stored in the memory */
/* to omega variable field */
/* (10)One can varify this by plotting contour plots of Omega */
/* and UDM-0. Note to plot the cell center values */
/* */
/*Note:Cell center values are plotted by turning of Node values */
/* option in the Display-->Contours panel */
/* Now one can proceed to obtain the k-omega solution */
/* by assigning correct k-omega boundary conditions for inlet */
/* outlet boundaries */
/***************************************************************/

#include "udf.h"


DEFINE_ON_DEMAND(calc_omega)
{
Domain *d=Get_Domain(1);
Thread *t;
cell_t c;

thread_loop_c(t,d){
begin_c_loop(c,t){

C_UDMI(c,t,0)=C_D(c,t)/(0.09*C_K(c,t));
}
end_c_loop(c,t)
}
}

DEFINE_ON_DEMAND(assign_omega)
{
Domain *d=Get_Domain(1);
Thread *t;
cell_t c;
thread_loop_c(t,d){
begin_c_loop(c,t){
C_O(c,t)= C_UDMI(c,t,0);
}
end_c_loop(c,t)
}
}





Show Form
No comments yet. Be the first to add a comment!