CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to add velocity in DPM? (https://www.cfd-online.com/Forums/fluent-udf/100432-how-add-velocity-dpm.html)

Ebrahim April 25, 2012 09:08

How to add velocity in DPM?
 
Dear Freinds
I want track particles in a turbulent flow. for modeling the fluctuating velocities, I use a stochastic model which is not in FLUENT, so I should find fluctuating field, and supply these to the Lagrangian particle tracking unit and telling it to add those fluctuations to the mean velocities when doing trajectory computations!
Does anybody know how I can add the fluctuating velocity to the mean velocity?

Helps would be appreciated!

g0800276 January 6, 2014 03:55

Hi Ebrahim, I am facing the same problem. Did you solve this problem? After a little search, I could not find a way in the UDF manual to change the fluctuating velocity. One possible way is to rewrite the formula through the macro for drag coefficient, body force or source. Please enlighten me if you have found a better solution already!!!

Ebrahim January 6, 2014 13:47

Quote:

Originally Posted by g0800276 (Post 468800)
Hi Ebrahim, I am facing the same problem. Did you solve this problem? After a little search, I could not find a way in the UDF manual to change the fluctuating velocity. One possible way is to rewrite the formula through the macro for drag coefficient, body force or source. Please enlighten me if you have found a better solution already!!!

Hi g0800276,

I explain this in another post to BehtashCFD. This is my reply. This way worked for me:

"
There is no special UDF for defining fluctuating velocities. However, you can use other UDFs such as defining Drag Coefficient (DEFINE_DPM_DRAG) or time step (DEFINE_DPM_TIMESTEP). I recommend you to use DEFINE_DPM_DRAG UDF.
When you use such UDF, you can define the drag coefficient in the same way that is defined in FLUENT.

Here is an example. in this UDF, the drag coefficient is obtained from the spherical law (which is one of the forms that is used in FLUENT).

#include "udf.h"
#include "dpm.h"

DEFINE_DPM_DRAG(particle_drag_force,Re,p)
{
real drag_force;

*************************************
Here you can write neccessary commands for obtaining the fluctuating velocities
and also adding the to the mean flow velocities.
At the end write the command below which defines the drag coefficient the same as FLUENT.
*************************************

drag_force = SphereDragCoeff(p->Re);

return drag_force;
}
"

Still having questions, do not hesitate to ask.

Bests,
Ebrahim

Azy July 16, 2014 15:17

hello,

could you give me some help on calculating velocity gradient over tracked particle?

Ebrahim July 17, 2014 10:14

Quote:

Originally Posted by Azy (Post 501810)
hello,

could you give me some help on calculating velocity gradient over tracked particle?

Hello,

You can find the index of the cell which is occupied by the particle. Using that you may find approximate fluid velocity gradient at the particle location!
This method is not accurate, but may work for you :)

Azy July 18, 2014 09:56

Quote:

Originally Posted by Ebrahim (Post 501995)
Hello,

You can find the index of the cell which is occupied by the particle. Using that you may find approximate fluid velocity gradient at the particle location!
This method is not accurate, but may work for you :)

Hello Ebrahim,

Thanks for your reply.you mean I could use the particle index as the velocity gradient?

Thanks

Ebrahim July 19, 2014 07:23

Quote:

Originally Posted by Azy (Post 502161)
Hello Ebrahim,

Thanks for your reply.you mean I could use the particle index as the velocity gradient?

Thanks

Hi,

Here are the commands which I mean:

cell_t c;
Thread *t;
c = P_CELL(p);
t = P_CELL_THREAD(p);

Now, you can find velocity gradients in the occupied cell which is an approximation of what you want. Like:

C_U_G(c,t)

for a better estimation you may interpolate between the velocity gradients in the neighboring cells!

cheers

Azy July 19, 2014 18:50

Quote:

Originally Posted by Ebrahim (Post 502256)
Hi,

Here are the commands which I mean:

cell_t c;
Thread *t;
c = P_CELL(p);
t = P_CELL_THREAD(p);

Now, you can find velocity gradients in the occupied cell which is an approximation of what you want. Like:

C_U_G(c,t)

for a better estimation you may interpolate between the velocity gradients in the neighboring cells!

cheers

Thankss, you provide me with the great help.


All times are GMT -4. The time now is 05:02.