CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   DPM Law (https://www.cfd-online.com/Forums/fluent/48092-dpm-law.html)

Corentin April 29, 2008 08:06

DPM Law
 
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!


RE13 May 1, 2008 13:26

Re: DPM Law
 
It is printing for each particle time step, this is not the same as the flow time.

Corentin May 5, 2008 04:58

Re: DPM Law
 
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.

RE13 May 5, 2008 08:38

Re: DPM Law
 
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

Corentin May 5, 2008 11:16

Re: DPM Law
 
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.


RE13 May 5, 2008 13:50

Re: DPM Law
 
1. PARTICLE_ID (no parameter)

2. p->stream_index

look at the structs in dpm.h

Corentin May 6, 2008 04:46

Re: DPM Law
 
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 :)


All times are GMT -4. The time now is 08:06.