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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 14, 2009, 17:14
Default Problem with bin_particles_in_cells command
  #1
New Member
 
Mayank Kumar
Join Date: May 2009
Posts: 4
Rep Power: 17
kmayank is on a distinguished road
Hi,

I see that the command "bin_particles_in_cells(domain)" is giving me error in Fluent 12 version, saying "Too few arguments". Looks like it needs one more argument, and of int type. The command used to work fine in Fluent 6 with just the 'domain' argument.
If anyone has any idea of the updated usage, I would be grateful.

Thanks
Mayank
kmayank is offline   Reply With Quote

Old   May 13, 2010, 17:05
Default experiencing the same problem
  #2
New Member
 
Drew
Join Date: May 2010
Posts: 1
Rep Power: 0
mcdhrim is on a distinguished road
I have been using User Defined Function: bin_particles_in_cells(d).

This function worked with Fluent 6.3.26 but it does not work anymore with ANSYS FLUENT.

Does anyone know how to go around this problem?

Thanks,
DR
mcdhrim is offline   Reply With Quote

Old   January 18, 2011, 02:33
Default
  #3
Member
 
Roman Gobitz-Pfeifer
Join Date: Dec 2009
Location: Stuttgart
Posts: 83
Rep Power: 17
Wikie is on a distinguished road
Hi,

did anybody solve this problem?? I also want to use the command "bin_particles_in_cells(domain)". I'm using version 12.1. The error message is "Too few arguments".
Can anybody help me please I stuck here!!

Thanks,
Wikie
Wikie is offline   Reply With Quote

Old   January 23, 2011, 11:37
Default
  #4
Member
 
Roman Gobitz-Pfeifer
Join Date: Dec 2009
Location: Stuttgart
Posts: 83
Rep Power: 17
Wikie is on a distinguished road
Hi,

I found the function bin_particles_in_cells in the cl_dpm.h file.
"FLUENT_EXPORT void bin_particles_in_cells(Domain *domain, cxboolean init_cells);"
So this function needs another argument init_cells of cxboolean type. Right now I dont't know how to handle this. Does anybody else what is meant by init_cells??

Cheers,
Wikie
Wikie is offline   Reply With Quote

Old   November 11, 2011, 04:48
Default
  #5
New Member
 
massoud
Join Date: Nov 2011
Posts: 20
Rep Power: 15
massoudepsilon is on a distinguished road
Hi every body,

I am using a UDF containing bin_particles_in_cell and I need to know that what this macro does.

I will be grateful if someone can answer it.

Cheers
massoudepsilon is offline   Reply With Quote

Old   May 2, 2012, 04:33
Default
  #6
New Member
 
Chao Li
Join Date: Mar 2010
Location: Shanghai.PRC
Posts: 9
Rep Power: 16
LICH is on a distinguished road
Hi Wikie,
Do you have any idea about the argument "cxboolean init_cells"? I've tried some value(0,1,FALSE,TRUE) for the argument. There is no error and the case can run. BUT the results are obviously wrong. There is NO particle is tracked in the domain.
Thanks a lot.
LICH is offline   Reply With Quote

Old   April 10, 2015, 14:43
Default
  #7
Senior Member
 
B_Kia
Join Date: May 2014
Location: Ir
Posts: 123
Rep Power: 12
HyperNova is on a distinguished road
hi
does anybody here solved the problem about : cxboolean init_cells?

i am using Fluent v 15.0
HyperNova is offline   Reply With Quote

Old   June 9, 2015, 00:46
Default
  #8
New Member
 
Luleå tekniska universitet
Join Date: May 2015
Location: LTU, Luleå, Sweden
Posts: 11
Rep Power: 11
mac_09 is on a distinguished road
Hello guys,

I have just solved this issue.

Cxboolean type is just T/F data type and init_cells is something I suppose we have to do like, initialize particles in cells.

So try your cases with:

So you can just try

Bin_particles_in_cells(domain, TRUE)

Thanks and good luck.

Regards:
MAC
mac_09 is offline   Reply With Quote

Old   August 28, 2017, 04:41
Default Simple UDF for looping on all particles in each cell.
  #9
New Member
 
massoud
Join Date: Nov 2011
Posts: 20
Rep Power: 15
massoudepsilon is on a distinguished road
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*/
}
}

Last edited by massoudepsilon; August 28, 2017 at 06:37.
massoudepsilon is offline   Reply With Quote

Old   July 3, 2018, 03: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

Old   July 3, 2018, 03:41
Default
  #11
New Member
 
massoud
Join Date: Nov 2011
Posts: 20
Rep Power: 15
massoudepsilon is on a distinguished road
Quote:
Originally Posted by fyx1995 View Post
hi!i‘m wondering is this udf suitable only for unsteady particle tracking
I have never used it for steady state. But, I guess if you use it for steady state it should loop over the streams passing from each cell.
massoudepsilon is offline   Reply With Quote

Reply


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 13:34
text command problem hamed_roozegar FLUENT 1 May 27, 2009 04:00
Problems of running the parallel computations lorraine FLUENT 17 July 6, 2007 09:08
PVM Distributed problem - error connecting zaidun CFX 2 July 5, 2006 10:59
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 15:52


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