Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

Fluent DNB simulation

    • Kinjal
      Subscriber

      I am carrying out flow boiling simulation in fluent to predict DNB. I am starting with heat flux of 0.5Mw/m^2 and increasing it step by step and monitoring temoerature. When the chf is reached wall temperature will increase suddenly and the solution will diverge. At first when I was usimg sauter mean I was able to get the diversgence but at that time it was giving wrong results for WHFP i.e. my evaporative heat flux was going above total heat flux which is not possible. Then I kept the boilig dia. default for the secondary phase and WHFP gave the correct results but now I am not able to predict DNB. What can be the issue?

    • Rob
      Forum Moderator

      Lots of things. An overuse of TLAs may play a part, but I'd start by looking at the mesh and other solver settings. 

    • Kinjal
      Subscriber

      Hello the above problem is solved. Now I have got a recalibrated model for nucleation site density, udf for which is given below

       #include "udf.h"
       #define C 42.27
       #define n 4.67
       #define delta_T_ref 1
       
       DEFINE_BOILING_PROPERTY(nucleation_site_density, f, t, c0, t0, from_index, from_species_index, to_index, to_species_index)
      {
         real nuc_d, subcool;
         real T_w=F_T(f,t);
         real T_SAT = C_STORAGE_R(c0,t0,SV_SAT_TEMPERATURE);
       
          
          /* Subcooling calculation: T_w - T_l */
         subcool = T_w - T_SAT;
       
          /* Calculate nucleation site density using the formula */
         nuc_d = pow(C,n) * pow((subcool / delta_T_ref), n);
       
         return nuc_d;
      } This seems correct but why is fluent crashing while predicting wall temperature and printing on console bisection method cannot find wall temperature. How can I resolve this issue, Please help
       
    • Rob
      Forum Moderator

      Not sure, does it behave running on a single core?

    • Kinjal
      Subscriber

       

      No multiple cores. Hello can you please help me.

       

       

    • Kinjal
      Subscriber

      The udf is correct right?

      Bisection method cannot find wall temperature bounds for the face with ID 557 on the boundary 'heated_wall' centered at ( 0.243575 0.005500 ). Skipping this face.
      Bisection method cannot find wall temperature bounds for the face with ID 558 on the boundary 'heated_wall' centered at ( 0.244252 0.005500 ). Skipping this face.
      Bisection method cannot find wall temperature bounds for the face with ID 559 on the boundary 'heated_wall' centered at ( 0.244928 0.005500 ). Skipping this face.
      Bisection method cannot find wall temperature bounds for the face with ID 560 on the boundary 'heated_wall' centered at ( 0.245604 0.005500 ). Skipping this face.
      Bisection method cannot find wall temperature bounds for the face with ID 561 on the boundary 'heated_wall' centered at ( 0.246281 0.005500 ). Skipping this face.

      This is what it says

       

    • Rob
      Forum Moderator

      Bisection looks to be parallel, but could be a red herring. I assume you're retaining all data? Can you try on a single core and post the wall boundary settings that you're using?

    • Kinjal
      Subscriber

       

      As this is a simulation for predicting CHF I am giving 0.5MW/m2 heat flux initially and increasing it in steps of 0.5 after wall tempature is stabilised. This is controlled by udf. I tried on single core. It doen't make any difference.

    • Rob
      Forum Moderator

      And is anything else set on the wall bc? 

    • Kinjal
      Subscriber

      No nothing

    • Rob
      Forum Moderator

      Is it a thin wall? 

    • Kinjal
      Subscriber

       

      The geometry is a simple 2d rectangle

      Axis symmetric BC is used and on the wall heat flux is applied in steps

      It is like heat flux is constant until temparture is stabilised and it is increased after that. But while I am monitoring heat flux file it is changed and it drops suddenly when boiling begins. Inout should not change right.

       

       

       

    • Rob
      Forum Moderator

      Which heat flux? Pictures of panels will help. 

    • Kinjal
      Subscriber

       

      #include “udf.h”
       
      DEFINE_PROFILE(dynamic_heat_flux, thread, position)
      {
          int n = N_ITER;         // Get the current iteration number
          real q0 = 0.5e6;        // Initial heat flux (W/m^2)
          real q;                 // Heat flux at the current iteration
          real chf = 3e6;      // CHF value (W/m^2)
       
          // Determine the heat flux based on the iteration number
          if (n <= 500)
          {
              q = q0;
          }
          else 
          {
              int i;
              q = q0;
              for (i = 500; i <= n; i += 300) 
              {
       
                  // Check if q approaches 75% of chf
                  if (q >= 0.75 * chf) 
                  {
                      q += 0.1e6; // Increment by an additional 10% step
                  }
                  else
                  {
                      q += 0.5e6; // Increment the heat flux by 0.5e6
                  }
              }
          }
       
          // Print the heat flux value after every 300 iterations
          if (n % 300 == 0)
          {
              Message(“Iteration %d: Heat Flux = %g W/m^2\n”, n, q);
          }
       
          face_t f;
          begin_f_loop(f, thread)
          {
              F_PROFILE(f, thread, position) = q; // Apply the heat flux
          }
          end_f_loop(f, thread)
      }

      this is how heat flux is applied

       

    • Kinjal
      Subscriber

       

       

    • Rob
      Forum Moderator

      Why not use a profile or just link flux to iteration number with a limit? Your code isn't monitoring anything in Fluent, it's just checking the iteration number. 

    • Kinjal
      Subscriber

      But this works when I am using Lemmert Chawla model from the fluent direcly but when it is given through udf it is causing problem

    • Rob
      Forum Moderator

      And how does the UDF differ from the model? 

    • Kinjal
      Subscriber

      Even if I am making udf same as a model it is not working for me. Also the heat input which I give changes when the udf is activated

    • Rob
      Forum Moderator

      You have two UDFs. Which one alters the heat flux you're reporting, and what are you reporting? 

    • Kinjal
      Subscriber

      So heat flux udf I am using and it works well when lemmert chawla model existing in fluent is selected, but the combination of nucleation site density and heat flux udf is causing heat flux to change a lot and results are unphysical. I want to modify the existing Lemmert Chawla model for my simulation as values need to be different, but this is not working. Can you check if there is issue with my NSD udf which I have posted above.

    • Rob
      Forum Moderator

      We don't debug UDFs. So, the problem is not with the heat flux it's only when you turn on the nucleation UDF?  I'd not use single letter variable/constants and always define a value as 1.0 if it's real just in case you've accidentally tagged something that predefined as an integer: I learnt coding with FORTRAN so have a few old habits. 

    • Kinjal
      Subscriber

       

      I don’t know what exactly is the problem. How can I modify the existing model in fluent then. By using default model I am getting very high wall superheat values which are unphysical, hence I am recalibrating. But problem is surely not with the heat flux as it works well for default.

       

    • Rob
      Forum Moderator

      Nor do I as you haven't shared what you're monitoring to see why you think it's not working. What is the Heat Flux Report that Fluent is reporting? NOT the surface integral. 

    • Kinjal
      Subscriber

       

       i have shared the image above.The heat flux I have shown

      Here I have given constant heat flux of 3MW/m2 and see how it is fluctuating even though it is an input. And also wall temperature is changing abruptly

       

    • Rob
      Forum Moderator

      Which is the SURFACE INTEGRAL. Please check the value from the FLUX REPORT. 

    • Kinjal
      Subscriber

      But why to check surface integral? Here the problem is with the udf. Am I calling wall temperature in a correct way. Can you please confirm on that?

    • Rob
      Forum Moderator

      What temperature call? 

    • Kinjal
      Subscriber

      in udf which I have shared above

    • Kinjal
      Subscriber

      I amusing same model as that default model in fluent for nucleation site density byt through udf. The reason for this is I want to change the values of constants in the default model. But the udf doesn't give same results as that of default model. Why is it happening.

    • Rob
      Forum Moderator

      Ah, the first UDF. You're calling the wall facet temperature, what does the documentation show? Note, UDFs are not fully supported - you need to check documentation carefully. 

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