-
-
September 27, 2017 at 11:19 am
admin
Ansys EmployeeHow to loop over all the DPM injections (and particles) using UDF
-
October 17, 2017 at 8:48 am
cbhavsar
Ansys EmployeeTo loop over all the injections, you first need to get a list of all the injections you have defined. This can be done using the following command Injection Ilist = Get_dpm_injections(); You will also have to define a generic injection pointer Injection *I; Now, looping over all the injections can be done using the following command loop(I, Ilist){ / Add user specific code here / } You can loop over all the particles from a given injection. To do that, you first need to define a particle pointer Particle *p; Looping over all the particles can be done using loop(p, I->p){ / Add user specific code here / } Note that in a transient simulation to compute transient particles, you will need to replace loop(p, I->p)with loop(p, I->p_init). Transient particle initialization cannot be performed with a loop over I->p. loop(p, I->p_init){ / Add user specific code here */ } You can use these loops to fetch particle data using particle specific macros like PDIAM(p) for particle diameter PT(p) for particle temperature etc.
-
- The topic ‘Loop over all the DPM injections (and particles) using UDF’ is closed to new replies.
-
3407
-
1057
-
1051
-
896
-
882
© 2025 Copyright ANSYS, Inc. All rights reserved.