|
[Sponsors] |
October 1, 2006, 21:04 |
DEFINE_DPM_INJECTION_INIT
|
#1 |
Guest
Posts: n/a
|
Hi there,
I would like to write a UDF that injects particles near the wall of a cylinder. I want to use DEFINE_DPM_INJECTION_INIT but I don't understand in the UDF manual how it works (especially what is the line that inject the particle). In fact, I would like to loop over the cells of a face, and then inject a particle in the centre of the convenient cells (those who are on the border of the inlet face of the cylinder). Could you give me advice ? PS: I'm French, so I do apologize on my bad English ... Confused |
|
October 2, 2006, 12:14 |
Re: DEFINE_DPM_INJECTION_INIT
|
#2 |
Guest
Posts: n/a
|
I'm not sure the DEFINE_DPM_INJECTION_INIT is needed for your problem. Why don't you just define the initial location (and other properties) for your particles and go from there? I have used this UDF to zero out certain terms which are calculated each particle calculation, as an example.
|
|
October 2, 2006, 13:58 |
Re: DEFINE_DPM_INJECTION_INIT
|
#3 |
Guest
Posts: n/a
|
that's a good start ! I need to initiate injection at precise time, so I think I will write an ON_DEMAND udf, and define the initial location, properties so that when I'll make the injection the particles will be near the wall. I'll tell you if it works. Thx
|
|
October 2, 2006, 13:59 |
Re: DEFINE_DPM_INJECTION_INIT
|
#4 |
Guest
Posts: n/a
|
that's a good start ! I need to initiate injection at precise time, so I think I will write an ON_DEMAND udf, and define the initial location, properties so that when I'll make the injection the particles will be near the wall. I'll tell you if it works. Thx
|
|
October 10, 2006, 23:34 |
Re: DEFINE_DPM_INJECTION_INIT
|
#5 |
Guest
Posts: n/a
|
Sorry, but I don't understand how to inject a particle in a PRECISE cell.
I made a UDF to get the cell ID where inject the particle but I do not know how to say in the UDF that I want to inject from the centroid of THIS particular cell. So just to make things clear, I want to initialize the position of the injected particle. But there is no example of use of the P_POS or P_POS_INIT variables. here is my code: /************************************************** *******************/ DEFINE_DPM_INJECTION_INIT(cent_part,I) { int i; double coor[ND_ND]; Particle *p; domain=Get_Domain(1); Thread *thread= Lookup_Thread(domain, ID); C_CENTROID(coor,c0,thread); loop(p,I->p); Message("Initializing injection\n"); for(i=0;i<3;i++) { P_INIT_POS(p)[i]=coor[i]; } } /************************************************** ********************/ ID and c0 are global variables. thanks for your answers ! Razz |
|
|
|