Fluent DPM UDF: How to refine DPM_OUTPUT?

Hi All.

My goal is to remove a particle from the domain once it has reached a certain position and a certain velocity, and store the position of the particle when it is removed. I have written a UDF that prints the positions/velocities of all the particles in my domain, but I need to refine this to only remove particles which meet certain criteria. I was previously trying this with DPM_SCALAR_UPDATE but couldn't find a way to save the positions of the particles it was removing. Does anyone have any suggestions? My UDF (which I compile) is below.



  • BeginerModelBeginerModel Member
    edited April 2019


    *** DPM UDF to write particle positions to file (Apply to interior Blood) ******/
    #include "udf.h"
    #include "dpm.h"
    #include "math.h"
    DEFINE_DPM_OUTPUT(particle-info,header,fp, p,t,plane)
    par_fprintf_head(fp,"X-Position Y-Position Z-Position X-Velocity Y-Velocity Z-Velocity Time \n ");
    par_fprintf(fp,"%d %" int64_fmt " %e %e %e %e %e %e %e \n",

  • DrAmineDrAmine GermanyForum Coordinator
    edited April 2019

    Both approaches would work for removing particles. You can even use for the interior plane a proous jump condition with very very high permeability trap the particles and sample them there without using any UDF.

  • anshsanshs Member
    edited December 2019

    Hello, I'm also writing code for DPM particles. May I know, how were you able to understand and write the above code? Any reference material?

    Thank you.

  • DrAmineDrAmine GermanyForum Coordinator
    edited December 2019
    Check the FLUENT customization manual
Sign In or Register to comment.