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

Problem with bin_particles_in_cells command

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 3, 2018, 02:28
Default
  #10
New Member
 
FENG
Join Date: Jul 2018
Posts: 1
Rep Power: 0
fyx1995 is on a distinguished road
Quote:
Originally Posted by massoudepsilon View Post
Since Fluent 12, the implementation of bin_particles_in_cells(domain, count) has changed and you need additional macro (unthread_particles_to_all_inj(domain, check)). Please be aware that this additional macro had only one argument at least until Fluent version 14. Since Fluent 17 it needs 2 arguments (domain and check (which is a boolean variable)).

Here is a simple UDF for looping on all particles in each cell.

DEFINE_ADJUST(Looping, domain)
{
cxboolean count;
cxboolean check;
Thread *t;
cell_t c;
Particle *p;

Alloc_Storage_Vars(domain, SV_DPM_PARTICLE_BIN, SV_NULL);

bin_particles_in_cells(domain, count);
thread_loop_c (t,domain)
{
begin_c_loop(c, t)

{

begin_particle_cell_loop(p,c,t)
{
/* you can do your calculation on particles in one cell here*/
}
end_particle_cell_loop(p, c, t)
}
end_c_loop(c, t)
unthread_particles_to_all_inj(domain, check);
Free_Storage_Vars(domain, SV_DPM_PARTICLE_BIN, SV_NULL); /* release allocated memory*/
}
}
hi!i‘m wondering is this udf suitable only for unsteady particle tracking
fyx1995 is offline   Reply With Quote

 


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
[OpenFOAM.com] erros in Allwmake jiwon OpenFOAM Installation 7 December 30, 2015 12:34
text command problem hamed_roozegar FLUENT 1 May 27, 2009 03:00
Problems of running the parallel computations lorraine FLUENT 17 July 6, 2007 08:08
PVM Distributed problem - error connecting zaidun CFX 2 July 5, 2006 09:59
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


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