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

Problems of DPM Concentration UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2024, 04:26
Default Problems of DPM Concentration UDF
  #1
New Member
 
Kai-Chieh Hsu
Join Date: Mar 2024
Posts: 1
Rep Power: 0
Bill Hsu is on a distinguished road
Hello everyone,

I tried to use an air conditioner and an air purifier to dilute the particles in a room, I set 2400 particles uniformly distributed in the room initially, and used a UDF to calculate the concentration. The simulation was carried out for 60 minutes (transient and unsteady particle tracking), and I calculated the particle concentration every 5 minutes. Here are my questions:

1. I expected that the particle concentration would decrease as time passed, but the particle concentrations at every timestep are the same as the initial concentration, did anything wrong with my UDF? I already set the escape condition for outlets, and trap condition for walls.

2. The number of particles tracked decreased as time passed, and the escaped and trapped information didn't show up. I am not sure how to fix it.

The following code is my UDF:
Quote:
/*Particle mass concentration calculation*/
/*Using the particles-in-the-box method*/

#include "udf.h" /*The header file*/
#include "dpm.h"

DEFINE_EXECUTE_AT_END(get_dpm_conc) /*Calculate the flow quantities at the end of an iteration in a steady state run, or at the end of a time step in a transient run*/
{
Domain *d; /*Defined domain pointer*/
Thread *t; /*Defined thread pointer*/
cell_t c; /*cell identifier*/
d = Get_Domain(1);
Injection *I; /*Defined injection pointer*/
Particle *p; /*Defined particle pointer */

Injection *Ilist = Get_dpm_injections(); /*Get the list of all the injections*/

thread_loop_c(t, d) /*Reset the value of UDMI each time*/
{
begin_c_loop(c, t)
{
C_UDMI(c, t, 0) = 0;
}
end_c_loop(c,t)
}

loop(I, Ilist) /*loop over all the particles from a given injection*/
{
loop(p, I->p_init) /*loop over all the particles in transient simulation*/
{
c = P_CELL(p);
t = P_CELL_THREAD(p);
C_UDMI(c, t, 0) += P_N(p) * P_MASS(p) / C_VOLUME(c, t); /*The calculation of particle concentration*/
}
}
}

Last edited by Bill Hsu; March 22, 2024 at 05:48.
Bill Hsu is offline   Reply With Quote

Reply

Tags
dpm concentration, udf and programming


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
How to solve UDF compilation problems in Fluent. pakk Fluent UDF and Scheme Programming 16 September 10, 2018 03:48
Problems in converging viscosity UDF dependent upon strain rate and temperature. alexskerhut Fluent UDF and Scheme Programming 1 March 17, 2016 08:19
UDF to Access Wall Normal Concentration Gradient Daniel Tanner Fluent UDF and Scheme Programming 4 February 18, 2015 15:35
dpm concentration HK FLUENT 0 March 6, 2008 06:44
DEFINE_GEOM UDF Problems Pat FLUENT 0 August 14, 2003 14:16


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