CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   how can I increase the number of injected particles? (https://www.cfd-online.com/Forums/fluent/78083-how-can-i-increase-number-injected-particles.html)

sfotovati July 12, 2010 14:16

how can I increase the number of injected particles?
 
Dear users,
I know that the maximum number of injected particles from any surface is equal to the total number of mesh points over that surface. I wrote a UDF to increase that which is as followings:


#include "udf.h"
DEFINE_DPM_INJECTION_INIT(init_inject,I)
{
real x;
real ymax;
Particle *p;
ymax=20e-3;
x=rand()* ymax / RAND_MAX ;
P_POS(p)[0]=0;
P_POS(p)[1]=x; 
}

but I recieve a SEGMENTATION VIOLATION error. Please help me to fix it.

novice July 14, 2010 03:54

Hi I donot know about the UDF, but u can increse the number of particles by incresing the number of tries option in the injections menu.


All times are GMT -4. The time now is 23:32.