How to obtain convergence for komega model starting from kepsilon solutionFLUENT6.1.22
While starting komega solution from initial solution of kepsilon 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 kepsilon to komega. 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 kepsilon solution. However, as soon as we switch the turbulence model to komega, 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 kepsilon 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 komega. 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 kepsilon solution */ /* and initialise the omega field with this value to help */ /* convergence of komega case */ /* */ /* Authors: rsy, asw */ /***************************************************************/ /* */ /* How to use this UDF: */ /* (1) Read the kepsilon case and data or obtain kepsilon */ /* solution */ /* (2) Increment the User Defined Memory (UDM) counter to 1 in */ /* Define>UserDefined>Memory panel */ /* (3) Do one more iteration so that this newly created UDM is */ /* initialised */ /* (4) Go to Define>UserDefined>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 komega. */ /* (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>UserDefined>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 UDM0. 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 komega solution */ /* by assigning correct komega 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) } } 

