Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

DPM Particle Injection Total Flow Rate as a function of time

    • Paul Richter
      Subscriber

      Hello,

      i am doing a transient simulation with a DPM Injection.

      I want the injection not to be constant but to be a function of the simulation time (for example t^2).

      I think that the only way to implement that is with a UDF, i came up with this Code, but it is not working at all:

      #include "udf.h"

      DEFINE_DPM_SOURCE(dpm_mass_flow, c, t, initialize, p)
      {
          real time = CURRENT_TIME;
          real mass_flow_rate;

          mass_flow_rate = time * time;

          return mass_flow_rate;
      }

      My questions are:

      1) Is there an easier way to achieve a total flow rate of t^2

      2) If not do you know a better option for a UDF Code?

      Thanks in advance

    • Rob
      Forum Moderator

      Have a look at DEFINE_DPM_INJECTION_INIT   

    • Paul Richter
      Subscriber

      Dear Rob,

      first of all thanks for your reply!

      Yes i came up with this too, i made the Code:

      #include "udf.h"

      DEFINE_DPM_INJECTION_INIT(init,I)
      {
          Particle *p;
          real time = CURRENT_TIME;
          real P_FLOW_RATE;
         
          // Einstellung der Partikelmasse
          P_FLOW_RATE(p) = time * time;
      }

      But i get the Error "P_FLOW_RATE: no function prototype"

    • Rob
      Forum Moderator

      Which manual are you reading? 

    • Paul Richter
      Subscriber

       

      ANSYS FLUENT 12.0 UDF - edit Rob to comply with copyright

       

       

    • Rob
      Forum Moderator

      That'll explain it. Use the documentation that comes with the software (click on Help). You're using the old form of the macro.

       

Viewing 5 reply threads
  • The topic ‘DPM Particle Injection Total Flow Rate as a function of time’ is closed to new replies.