|
[Sponsors] |
October 30, 2006, 10:12 |
DPM UDFs Group Injection
|
#1 |
Guest
Posts: n/a
|
Is it possible to write a UDF for a group injection. I want to use a UDF as my injection position changes with time, but I wish to have a range of particle sizes at the injection point.
I have successful written a udf using DEFINE_DPM_INJECTION_INIT for a single injection but would like to expand it to group. Tne only way I can think to do it is to make several injections one for each size. Is there a better way? |
|
October 31, 2006, 13:44 |
Re: DPM UDFs Group Injection
|
#2 |
Guest
Posts: n/a
|
Hi, I think u can try to use a particle injection file definition. In this .txt file, You should write as follow:
((x-position y-posizion z-posizion x-velocity y-velocity z-velocity DIAMETER Temperature mass-flow Time) ParticleName) all of them must be number such (0.000e+000); 'name' could be whatever u want. ofcourse u must write one row per particle. if u have a lot of particles u can implement it in MATLAB or samething like that. I hope it'll be helpfull regards Adriano. ps. sorry for my english. |
|
November 6, 2006, 20:33 |
Re: DPM UDFs Group Injection
|
#3 |
Guest
Posts: n/a
|
When you use DEFINE_DPM_INJECTION_INIT, the loop(p,I->I) macro can be used as many times as you want, that is to say if you want 40 particles injected, just precise in the particles panel how many particles you want to inject in your group, and fluent will automatically run 40 times the loop macro.
for instance, faceid[i] is an array of face ID (let's say 100 faces IDs), if you precise 40 particles to inject in the panel, the following code will be run 40 times by fluent, and you will inject in the middle (CENTROID Macro) of face i, i+1, i+2, etc... P_POS defines the position of the particle (P_POS(p)[1]=x, P_POS(p)=y, etc...) P_DIAM is for the diameter Here is the code: loop(p,I->p_init) { f=faceid[i]; Message("injection number %d \n",i); for(j=0;j<3;j++) { F_CENTROID(coor,f,thread); P_POS(p)[j]=coor[j]; } P_DIAM(p)=pdiam; i++ } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
dpm GROUP iNJECTION | Mohsin | FLUENT | 9 | December 13, 2010 14:03 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |
Are my IRIXbs systune parametersb setting correct | lakeat | OpenFOAM Installation | 1 | May 5, 2008 11:48 |
about group injection of DPM model | zwdi | FLUENT | 5 | April 12, 2004 20:31 |