# How to add velocity in DPM?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 April 25, 2012, 09:08 How to add velocity in DPM? #1 New Member   Ebrahim Join Date: Mar 2010 Posts: 18 Rep Power: 7 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!

 January 6, 2014, 04:55 #2 New Member   Joshua Join Date: Sep 2011 Posts: 3 Rep Power: 5 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!!!

January 6, 2014, 14:47
#3
New Member

Ebrahim
Join Date: Mar 2010
Posts: 18
Rep Power: 7
Quote:
 Originally Posted by g0800276 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

 July 16, 2014, 15:17 #4 New Member   Azadeh Saeedi Join Date: Mar 2014 Location: Canada Posts: 23 Rep Power: 3 hello, could you give me some help on calculating velocity gradient over tracked particle?

July 17, 2014, 10:14
#5
New Member

Ebrahim
Join Date: Mar 2010
Posts: 18
Rep Power: 7
Quote:
 Originally Posted by Azy 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

July 18, 2014, 09:56
#6
New Member

Azadeh Saeedi
Join Date: Mar 2014
Location: Canada
Posts: 23
Rep Power: 3
Quote:
 Originally Posted by Ebrahim 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

July 19, 2014, 07:23
#7
New Member

Ebrahim
Join Date: Mar 2010
Posts: 18
Rep Power: 7
Quote:
 Originally Posted by Azy 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

July 19, 2014, 18:50
#8
New Member

Azadeh Saeedi
Join Date: Mar 2014
Location: Canada
Posts: 23
Rep Power: 3
Quote:
 Originally Posted by Ebrahim 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.

 Tags dpm, udf

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Zeallt Fluent UDF and Scheme Programming 3 March 4, 2015 18:41 R P CFX 2 October 26, 2004 02:13 thomas FLUENT 0 February 9, 2004 09:17 winnie FLUENT 0 May 28, 2003 09:55 Abhi Main CFD Forum 12 July 8, 2002 09:11

All times are GMT -4. The time now is 00:55.

 Contact Us - CFD Online - Top