CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

DEFINE_DPM_INJECTION_INIT

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2006, 21:04
Default DEFINE_DPM_INJECTION_INIT
  #1
jfg39
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
  Reply With Quote

Old   October 2, 2006, 12:14
Default Re: DEFINE_DPM_INJECTION_INIT
  #2
Allan Walsh
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.
  Reply With Quote

Old   October 2, 2006, 13:58
Default Re: DEFINE_DPM_INJECTION_INIT
  #3
jfg39
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
  Reply With Quote

Old   October 2, 2006, 13:59
Default Re: DEFINE_DPM_INJECTION_INIT
  #4
jfg39
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
  Reply With Quote

Old   October 10, 2006, 23:34
Default Re: DEFINE_DPM_INJECTION_INIT
  #5
jfg39
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
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 19:22.