CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF/DPM: Displace Particle during Tracking (http://www.cfd-online.com/Forums/fluent/49180-udf-dpm-displace-particle-during-tracking.html)

Steffi September 4, 2008 03:02

UDF/DPM: Displace Particle during Tracking
 
Hi,

My Problem: I would like to displace a particle with a UDF during tracking. For example moving the particle at once from coordinates (1/1) to (2/1) without aborting the calculation/tracking. Is there any FLUENT standard function to move an inert particle as it is tracked?

Steffi


Allan Walsh September 4, 2008 13:38

Re: UDF/DPM: Displace Particle during Tracking
 
I don't think there is any standard Fluent function. I have done something similar by using a UDF for a specific DPM law and then just change the particle coordinates for some predetermined condition.

Steffi September 4, 2008 15:54

Re: UDF/DPM: Displace Particle during Tracking
 
Hi Allan,

thanks for your response. Did you change the particle coordinates just by allocating some new values to P_POS(p)[]? Did you use DPM_SWITCH for your condition or did you just state the condition within DPM_LAW? What kind of particles have you had? Droplets, combusting particles, inert particles?

Steffi


Allan Walsh September 5, 2008 12:59

Re: UDF/DPM: Displace Particle during Tracking
 
We use DPM_LAW for three custom laws (drying, volatiles release, and combustion) along with built-in Fluent law for inert particles. We also use DPM_SWITCH to change between laws. It works fine this way, but I still question whether we actually need the DPM_SWITCH function.

In our implemention, at times we want to move material from the wall to the floor, without any reactions. My recollection in the past was that I did this by just changing the P_POS(p)[i] variable, keeping in mind that x is 0, y is 1, in the current versions of Fluent.

This should work for you within a custom DPM_LAW for inert particles.

In our case, we wanted to have a more general method since we don't always know the value of the y position of the floor, so we just set the y velocity to a high negative value to rapidly move the particle to the floor.


Steffi September 8, 2008 02:49

Re: UDF/DPM: Displace Particle during Tracking
 
Hi Allan,

thanks again. I tried to move inert particles (steady state tracking, Fluent 6.3) by using DPM_LAW (with and without DPM_SWITCH to state a condition). However, the solver didn't accept new particle positions. Changes in P_MASS(p), P_VEL(p) were also not possible.

Do you think this may be due to "inert particles"? Would be glad if you can answer me once again.

Steffi


Allan Walsh September 8, 2008 15:39

Re: UDF/DPM: Displace Particle during Tracking
 
Not sure. But, you might look in the UDF manual at the DEFINE_DPM_EROSION example where they also include a DEFINE_DPM_LAW for stopping tracking, where they set P_MASS(p) to zero.

How do you mean the solver did not accept new particle positions? What I would do is print the variables for the particle positon when your code is started just to make sure that the variables are accessible in your part of the code. Change the variable with particle position and then print it out from your code again.

It is quite possible that Fluent would change the particle position in your macro and then it would change it back as it returns to its own code. You might also want to check out the values of the particle position at the previous time step and when the particle enters the cell.

Or, you may have to access one of the other switches for particle tracking like abort, escape, etc. to keep it from reverting to the old condition.

Steffi September 9, 2008 03:02

Re: UDF/DPM: Displace Particle during Tracking
 
Hi Allan,

thank you again for your response.

I know this UDF example in which P_MASS(p) is set to zero. However it didn't work. That's why I use "p->stream_index=-1" as in the example of DPM_OUTPUT to abort particle tracking.

Concerning the changes in a particles position, you're right. If allocating some new values to P_POS(p) within a macro, these values are returned, when printing them. But for the next iteration step, when the macro is called again (for ex. DPM_SCALAR_UPDATE), Fluent returns to its "old" values.

I'm not sure whether I understand your last sentence right. You mean something like PATH_ACTIVE or PATH_ABORT as in the example of DPM_BC? I'll just try it.

Steffi



All times are GMT -4. The time now is 01:38.