Fluids

Fluids

DEFINE_DPM_INJECTION_INIT to change the position of particle

    • pavankonchada123
      Subscriber

         Hi


      I want to change my position of injection for every time step by a magnitude of 0.0001 in y direction. Is my udf ok 


      #include "udf.h"


      #include "dpm.h"


      DEFINE_DPM_INJECTION_INIT(Bahn, I) 



      Particle *p; 


      real injposition = 0.75; 


       


       


      loop(p,I->p) 



      P_POS(p)[1] = injposition + 0.0001;


       


      injposition = P_POS(p)[1];


       


      } }

    • Rob
      Ansys Employee

      What happens when you try it? 

    • pavankonchada123
      Subscriber

      It worked when I used current time in it


       

    • pavankonchada123
      Subscriber

      Another doubt, does define_dpm_bodyforce macro helps in defining force on all particles in domain at all instances of time??

    • Rob
      Ansys Employee

      It will add a body force whenever it's called at whatever value is defined: you need to specify when it's active and what it does. 

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