Fluids

Fluids

Problem with UDF

    • sairaja
      Subscriber

      I am using RPI model to simulate flow boiling, for nucleation site density Lemmert chawla model can be used in Fluent,
      The formulation goes as follows:
      N=(C (T_w -T_sat)) ^1.805, I wrote the same in an UDF, it did not give me the same results, I am not sure whether I was not able to call the wall temperature or any other issue, I defined UDF using DEFINE_BOILING_PROPERTY. To get the wall temperature i used F_T(f,t), not sure whether I used a wrong calling function for temperature. 

    • DrAmine
      Ansys Employee
      Can you tell me the motivation at first behind 're implementing the correlation
    • sairaja
      Subscriber

      I would like to change the constants 'C' and 'p', by 'p' i mean 1.805. So, I am first tried to reimplement the correlation with default values to check my UDF. Please let me know if it is right to call wall temperature by F_T(f,t).

    • DrAmine
      Ansys Employee
      Yes it is right.
    • sairaja
      Subscriber

      I used the following UDF, but I did not get the same result as the default model, not sure whether I am wrong or it has been implemented in Fluent in wrong way, Please let me know.


      DEFINE_BOILING_PROPERTY(site_density,f,t,c0,t0,from_index,from_species_index,to_index,to_species_index)


       {


         real wallsubcool,pro_con,site_density_1;


         real T_SAT = C_STORAGE_R(c0,t0,SV_SAT_TEMPERATURE);


         real T_W = F_T(f, t);


         if (T_W < T_SAT)


         {


         site_density_1 = 0;


         }


       


         else


         {


         wallsubcool = (T_W - T_SAT);


         pro_con = wallsubcool * 210;


         site_density_1 = pow(pro_con, 1.805);


         }


         return site_density_1;


       }


       

    • DrAmine
      Ansys Employee

      Setting site density to zero is not enough. Whenever the superheat is negative the partioning is not used as there is no boiling.

    • sairaja
      Subscriber
      I even tried giving just the default values without if condition (just C 210 and p =1.805), it didn't work. What could be the issue?

      Thanks Sai
    • DrAmine
      Ansys Employee

      Please test on  simple axisymmetric case and share a plot a long a heated wall for both cases.

    • sairaja
      Subscriber


      I ran a simple axisymmetric case. The temperatures are not properly resolved. A clear difference can be seen in the above figure. (red indicates the default case and black indicates udf case)


      Regards,


      Sai


       

    • sairaja
      Subscriber

      In the following graph, the red line indicates the wall temperature with UDF (where I didn't use zero, just correlation). However, when I used the UDF (which contains if condition) and C value 1210, I got the result close to the default Lemmert Chawla model (green curve--default, black curve --udf that contains if condition+C=1210). I am sure fine tuning C value will get me closer to default, but does that indicate the C value used in fluent is not 210?



       


       


      Regards,


      Sai

    • DrAmine
      Ansys Employee

      Are all plots done with node values on? 

    • sairaja
      Subscriber

      yes

    • DrAmine
      Ansys Employee

      I cannot reproduce on a case I created where I compare the default. Here I am calculating the site density whenever the wall super heat is larger then a certain small value. I am sure that there is a limiter but I would rather recommend focusing on the implementation of some other correlation rather then trying to reproduce the model in Fluent.


       


       

Viewing 12 reply threads
  • You must be logged in to reply to this topic.