-
-
December 14, 2024 at 6:53 pm
rashed.islam
SubscriberHi,Â
I am currently using Coalesced-DPM model in Ansys Fluent to simulate API-Lactose particles for an inhaler inhalation related fluid problem. As an outcome, I want to find Aerodynamic Particle Size Distribution (APSDs) in the outlet. In order to do that, I need to know the particle ID of each coalesced particle due to agglomeartion/deagglomeration.Â
Is anyone please help me in this issue?ÂThanks in advance.
Rashed
-
January 7, 2025 at 5:17 pm
Prashanth
Ansys EmployeeHi,
Here are my comments from what I understand: coalesced particles are actually removed trajactories. If you want to track coalesced particles, you can use say DPM_SPRAY_COLLIDE, loop into the particles, check if some became bigger and mark or note them. You can check the UDF manual which uses this macro for a very simple coalescence model..
-
February 26, 2025 at 5:46 pm
rashed.islam
SubscriberHi,Â
Thanks for your reply.Â
I checked on the DPM_SPRAY_COLLIDE and the given example by Ansys. I have few more questions on this macro.- When does this macro triggered? Is this triggered when two particles are colliding each other? Or it is called during particle tracking after every particle time step?Â
- What does p do in this UDF? Is this just a pointer or it is a list of all the paticles in a certain cell?
- Also, you mentioned to loop into the particles. Can I do that without introducing a new particle index *pi (used in the example UDF by Ansys given below) and loop through by only using only p and tp? Or is it even possible to track the coalesced particles without looping the particles?
Please help me with this. It'll be a great help for me.Â
DEFINE_DPM_SPRAY_COLLIDE( name, tp, p) /*********************************************************** DPM Spray Collide Example UDF ************************************************************/ #include "udf.h" #include "dpm.h" #include "surf.h" DEFINE_DPM_SPRAY_COLLIDE(mean_spray_collide,tp,p) { /* non-physical collision UDF that relaxes the particle */ /* velocity and diameter in a cell to the mean over the */ /* specified time scale t_relax */ const real t_relax = 0.001; /* seconds */ /* get the cell and Thread that the particle is currently in */ cell_t c = P_CELL(tp); Thread *t = P_CELL_THREAD(tp); /* Particle index for looping over all particles in the cell */ Particle *pi; /* loop over all particles in the cell to find their mass */ /* weighted mean velocity and diameter */ int i; real u_mean[3]={0.}, mass_mean=0.; real d_orig = P_DIAM(tp); real decay = 1. - exp(-t_relax); begin_particle_cell_loop(pi,c,t) { mass_mean += P_MASS(pi); for(i=0;i<3;i++) u_mean[i] += P_VEL(pi)[i]*P_MASS(pi); } end_particle_cell_loop(pi,c,t) /* relax particle velocity to the mean and diameter to the */ /* initial diameter over the relaxation time scale t_relax */ if( mass_mean > 0. ) { for(i=0;i<3;i++) u_mean[i] /= mass_mean; for(i=0;i<3;i++) P_VEL(tp)[i] += decay*( u_mean[i] - P_VEL(tp)[i] ); P_DIAM(tp) += decay*( P_INIT_DIAM(tp) - P_DIAM(tp) ); /* adjust the number in the droplet parcel to conserve mass */ P_N(tp) *= CUB( d_orig/P_DIAM(tp) ); } }
-
- You must be logged in to reply to this topic.
-
3236
-
1031
-
968
-
859
-
798
© 2025 Copyright ANSYS, Inc. All rights reserved.