Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Problems of DPM concentration UDF

    • Bill Hsu
      Subscriber

      Hello everyone,

      I try to employ a UDF to calculate the DPM concentration, I add one UDMI before the simulation, and initialize particles uniformly distributed in a room (volume injection).  I set up an air conditioner and air purifier to dilute the particles. After the simulation is complete, I use Report - Volume integral - Volume average to compute the concentration (variable: User-Defined Memory ). I'm not sure if the way I compute the concentration is correct or not because the computed value is gradually increase with the time instead of decreasing (should be decreasing). Can someone give me some guidance? The following picture is my UDF code. 

    • Prashanth
      Ansys Employee

      Hello, 

      I think you need to reset the value of UDMI to zero each time. I think that is the reason it is steadily increasing with time.

      • Bill Hsu
        Subscriber

        Thanks for your suggestion, Prashanth! I use Report - Volume integral - Volume average to compute the UDMI, I'm not sure if it's right or not. Can you help me with this problem? 

      • Bill Hsu
        Subscriber

        Hello, Prashanth

        I didn't find how to reset the UDMI value in the manual and the internet, can you provide guidance about how to set the UDMI to zero each time?

        • Prashanth
          Ansys Employee

          It must be very staright forward. Try this:

          thread_loop_c(t, d)
              {
                begin_c_loop(c, t)
          {
            C_UDMI(c, t, 0) = 0;
          }
                end_c_loop(c, t)
              }
           
            loop(I,...
        • Bill Hsu
          Subscriber

          Hello, Prashanth,

          Thanks for your suggestion, I modified my code with your suggested code and ran the simulation, but the value of UDMI didn't change at every timestep, which means that the value of UDMI remains the same. The following picture is my code.

        • Prashanth
          Ansys Employee

          I think the code works,  you can check with a simple unsteady dpm problem.

        • Bill Hsu
          Subscriber

          Hello, Prashanth,

          I ran a case that used an air conditioner and an air purifier to dilute the particles in the room. 2400 particles are uniformly distributed in the room initially, and the initial concentration showed good agreement with my calculation. However, after the simulation run, the concentrations at different time steps are the same as the initial concentration. I expected that the particle concentration could decrease as time passed, but it didn't. Did the escape and trap particle also take into account in my UDF? I don't know how to fix it right now.

        • Bill Hsu
          Subscriber

          The number of particle tracks was decreased as time passed, but it didn't show how many particles trapped and how many particles escaped.

    • Prashanth
      Ansys Employee

      I think volume weighted averaging of dpm concentration is fine (we already have dpm cencentration listed as a variable, UDF might not be necessary). You can also monitor the dpm mass in domain as you remove the particles.

      • Bill Hsu
        Subscriber

        Hello Prashanth, since I adopted the one-way coupling (the interaction with the continuous phase option wasn't active), the dpm concentration wasn't available in the dropdown list, this is the reason why I compiled a UDF code to the Fluent. Or is there any other approach that can calculate the dpm concentration meanwhile keeping the one-way coupling assumption? 

    • Prashanth
      Ansys Employee

      I don't think there's another option apart from UDF for one way coupled cases.

Viewing 3 reply threads
  • The topic ‘Problems of DPM concentration UDF’ is closed to new replies.