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

DPM Law

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2008, 08:06
Default DPM Law
  #1
Corentin
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!

  Reply With Quote

Old   May 1, 2008, 13:26
Default Re: DPM Law
  #2
RE13
Guest
 
Posts: n/a
It is printing for each particle time step, this is not the same as the flow time.
  Reply With Quote

Old   May 5, 2008, 04:58
Default Re: DPM Law
  #3
Corentin
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.
  Reply With Quote

Old   May 5, 2008, 08:38
Default Re: DPM Law
  #4
RE13
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
  Reply With Quote

Old   May 5, 2008, 11:16
Default Re: DPM Law
  #5
Corentin
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.

  Reply With Quote

Old   May 5, 2008, 13:50
Default Re: DPM Law
  #6
RE13
Guest
 
Posts: n/a
1. PARTICLE_ID (no parameter)

2. p->stream_index

look at the structs in dpm.h
  Reply With Quote

Old   May 6, 2008, 04:46
Default Re: DPM Law
  #7
Corentin
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
  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 14:50.