CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Problems in the UDF for DPM erosion (https://www.cfd-online.com/Forums/fluent-udf/128874-problems-udf-dpm-erosion.html)

Messi January 23, 2014 05:29

Problems in the UDF for DPM erosion
 
Hi, I am using DEFINE_UDF_EROSION to compute the deposition rate in the wall.

However, there are several codes in the UDF I could not understand. Could you help me for this?

1, It has defined for the 'WALL_CONDITION =2' in the UDF code. So, how could the wall condition=1 or 0??

2, I have shown all codes that contain 'WALL_CONDITION' underneath.

3, I don't understand what does 'WALL_CONDITION' mean? Is it come from the settings in the fluent or is it come from the computation results in the fluent?

4, The author explained what 0, 1,2 mean in the code
/* 0 for none stick new wall
1 for old wall that has deposit on and use the T_melt_wall given above
2 for old wall that has deposit on and the T_melt_wall will calculated as a function of the compositions of wall deposition using the same equations as for particles*/



Any help would be appreciated. Thanks in advance.

Code:

/*Wall sticking condition*/

#define WALL_CONDITION 2       
      eta3 = 0;
        if (WALL_CONDITION == 1)  /* what does wall condition==1 mean? */
        {
                if (F_T(f,t) > T_shift_wall)
                        eta3 = 1;
        }

        if (WALL_CONDITION == 2) /* what does wall condition==2 mean? */
        {
                T_shift_wall = F_T(f,t);
                m = 0.00835 * SiO2 + 0.00601 * Al2O3 - 0.109;
                c = 0.0415 * SiO2 + 0.0192 * Al2O3 + 0.0276 * Fe2O3 + 0.016 * CaO - 3.92;
                y = pow(10, 7) * m / T_shift_wall + c;
                muw = pow(10, y) / 10;
               
                if ((F_T(f,t) <= T_shift_wall) && (muw <= muc))
                {
                        eta3 = 1;
                }
        }

        if (WALL_CONDITION == 0) /* what does wall condition==0 mean? */
        {
                eta3 = 0;
        }



All times are GMT -4. The time now is 08:18.