|
[Sponsors] |
April 29, 2008, 09:06 |
DPM Law
|
#1 |
Guest
Posts: n/a
|
Hi!
I am trying to use the define dpm law in order to code some finite difference temperature field in a particle. I would like to know : the define_dpm_law(X,p,ci), how is it working? I mean, I guess it is called at each time step, when the iterations are finished, in order to compute things for the particle in a converged fluid? I am asking, because I am injecting a single particle, and Fluent tells me that one particle is tracked. This is ok. But when I put one printf into the define_dpm_law, it is printing... *several* times for each time step (sometimes 2, sometimes 3 times in a time-step). Isn't supposed to work just ONE time at each time step, because I have a SINGLE particle? it really sounds strange to me. Besides, I have a single sub-iteration per time-step right now, no more. So where could these several executions come from? If you could explain me a little bit how this is working, I would really appreciate. Thanks! |
|
May 1, 2008, 14:26 |
Re: DPM Law
|
#2 |
Guest
Posts: n/a
|
It is printing for each particle time step, this is not the same as the flow time.
|
|
May 5, 2008, 05:58 |
Re: DPM Law
|
#3 |
Guest
Posts: n/a
|
Ok, thank you.
So, the particle time-step is different from the fluid time-step? I guess there is a way to fugure out what time is it? But anyway, even if the time step is different, if I have, say, 10 particles, I should observe 10*n printing on my screen, no? Sometimes, with 10 particles, I have 13 printing... what could this be? Is there anyway to get the particle ID (the number of the particle) ? I know we can plot and color depending on the particle ID, but is there anything like P_ID(p) that I could put in my UDF in order to know precisely which particle I am dealing with? My problem is that I am looking for a certain number of particles, and I always get more than this number. It must be the same entities at different time, but I'm kind a lost. Thank you. |
|
May 5, 2008, 09:38 |
Re: DPM Law
|
#4 |
Guest
Posts: n/a
|
A few questions:
1. What injection type are you using? 2. How many number of tries are you using? PARTICLE_ID and p->stream_index both return the same thing (I think) but if you are using a rosin-rammler dist. on a surface injection with for example 5 diameters and 5 number of tries for stochastic tracking then you will end up with 25 particle tracks for each face element on the surface. Those 25 tracks will have the same stream index or particle ID as you would have it. In this case, I am not sure how to "ID" each individual track. Regards RE |
|
May 5, 2008, 12:16 |
Re: DPM Law
|
#5 |
Guest
Posts: n/a
|
Hi!
I am using a file to inject particles. In this file, there are velocities, positions, diameters... By plotting the particle time step, I understood why there were too many particles, because for each fluid time step, there were several particle time step. But I don't understand why, because I am using the option that should keep the same time steps for fluid and particle. I still don't know how I could get the particle ID in the UDF? Is there any code for that? I tried P_ID(p) but it didn't work... You say "PARTICLE_ID(p)" ? I'll check that. Thanks. |
|
May 5, 2008, 14:50 |
Re: DPM Law
|
#6 |
Guest
Posts: n/a
|
1. PARTICLE_ID (no parameter)
2. p->stream_index look at the structs in dpm.h |
|
May 6, 2008, 05:46 |
Re: DPM Law
|
#7 |
Guest
Posts: n/a
|
Ok, thank you, but I still have a question.
Each time I print the particle ID, using PARTICLE_ID, it returns "1". Nothing else. What is exactly the particle ID ? I thought it was the name of the particle, the last parameter given in the injection file. Right now, I am giving a number for this name : this is "0". I guess PARTICLE_ID doesn't refer to this, because it is printing "1". So, what? The code is : fprintf(p,"%i",PARTICLE_ID); I expected to have "0", but I get "1". How could I get the name of my particle? I tried with a letter, "a", with printing in %c, no error occured, but I couldn't open my .dat file... Thank you |
|
|
|