CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

In steady DPM model, how to get a particle residence time in a specific cell?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2012, 11:34
Default In steady DPM model, how to get a particle residence time in a specific cell?
New Member
Join Date: Jun 2012
Posts: 1
Rep Power: 0
DanK is on a distinguished road
Hi All,

In steady DPM model, how can I get a particle residence time in a specific cell?

I am trying to calculate the particle concentration by PSI-C (particle source in cell) method. To calculate the concentration, I really need to get the particle residence time in specific position.

Please help me to solve this problem.

DanK is offline   Reply With Quote

Old   August 25, 2012, 01:33
George Pichurov
Join Date: Jul 2010
Posts: 52
Rep Power: 15
jorkolino is on a distinguished road
Dong Hwa, is that you? If yes, I hope we solved your problem, if not, here is algorithm that you and others can follow.

in FLUENT 6.3 UDF Manual in chapter 3.2.7 you will find a lot of macros for DPM. I am mentiioning a few releveant here:
P_TIME(p): current particle time.
P_DT(p): current particle time step.
P_TIME0(p): particle time at entry to current cell.

TO get residence in current cell, I guess that the expression P_TIME(p)-P_TIME0(p) is needed.

The trick is, to be able to log this result over the particle track, i.e. to know at each point of the track what is the cell residence time. This is done with a macro called DEFINE_DPM_SCALAR_UPDATE. It is run each time the particle changes position.

DEFINE_DPM_SCALAR_UPDATE(dose, c, t, initialize, p)
	if (initialize)
		P_USER_REAL(p,0) = 0; /* this variable will hold the cell residence time, we initialize it here */
		P_USER_REAL(p,0) = P_TIME(p)-P_TIME0(p) ; /* store the cell residence time into the variable */
Every particle has an array of variables, which variables hold data for the particle during its track (i.e. the variable value changes along the particle track). What you essentially do above is declare particle array variable [0] and use it to store the cell residence time in it. Now, after hooking that in FLuent, you will have extra property for the particle, cell residence time. To hook it, (1) declare one variable in the array by going to UDF tab in the DPM model and chose number of scalars = 1 (2) in UDF function field, the same tab, drop down the scalar update and hook the function.

If successful, you can color the tracks by their cell residence time, you can also manipulate this property. You can also store the cell index into a particle array variable, P_USER_REAL(p,1) = P_CELL(p);

By the way, after knowing the cell residence time how do you intend to calculate the concentration of particles in a cell? I am not very clear on that, but I'll need to do something similar and it will be nice to know.

Last edited by jorkolino; August 25, 2012 at 02:00.
jorkolino is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
dispersion model with lagragian particle tracking model for incompressible flows eelcovv OpenFOAM Running, Solving & CFD 54 April 10, 2018 10:36
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
How to put melting Point data of inert particle in DPM model subhankar_bhandari Main CFD Forum 0 July 26, 2010 08:28
Steady state DPM - Convergence and particle tracks Sandilya Garimella FLUENT 2 March 28, 2008 16:53

All times are GMT -4. The time now is 03:15.