|
[Sponsors] |
UDF for UNSTEADY DDPM simulation, bin_particles_in_cells for begin_particle_cell_loop |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 28, 2016, 10:37 |
UDF for UNSTEADY DDPM simulation, bin_particles_in_cells for begin_particle_cell_loop
|
#1 |
New Member
Join Date: Apr 2016
Posts: 11
Rep Power: 10 |
Hello everyone. Thanks for your attention to this thread.
I'm now working on UNSTEADY DDPM simulation on Ansys. (DDPM is very similar to DPM, but it's under Eulerian-Eulerian model) In my UDF, I need to count for the number of particles residing in each cell, and then do something to them (cell by cell) at the end of each fluid time step (in DEFINE_EXECUTE_AT_END). So I wrote: { /* I learnt the under two sentenses from a phd thesis to active begin_particle_in_cell_loop*/ Alloc_Storage_Vars(domain, SV_DPM_PARTICLE_BIN, SV_NULL); bin_particles_in_cells(domain,TRUE); thread_loop_c(tc,d) { begin_c_loop(c,tc) { begin_particle_cell_loop(pi,c,tc) { .../*count the number of particles, and do something I planed to*/ } end_particle_cell_loop(pi,c,tc) } } Free_Storage_Vars(d, SV_DPM_PARTICLE_BIN, SV_NULL); } My problem is: when I include this UDF, at any time FLUENT will only trap the newly injected particles (say, the tracked number=180,180,170,180,170,..). However, when I exclude this UDF, or I comment the sentence 'bin_particles_in_cells(domain,TRUE);', the tracked number will be:= 180,360,530,710,880,... But if I comment the sentence, the begin_particle_cell_loop turns out to show me 'no particles in each cell'. Anyway, I can use an injection loop and a particle_in_injection loop to acheive what I want, but I can not stop wondering why the above things happened in my unsteady simulation. Thanks everyone for paying attention to such a long text. Looking forward to your replys. |
|
May 31, 2016, 09:43 |
|
#2 |
New Member
Join Date: Apr 2016
Posts: 11
Rep Power: 10 |
Indeed I have exactly the same problem with Ari who submit this thread:
http://www.cfd-online.com/Forums/flu...e_end-udf.html Ari solved this problem by replacing the particle_cell_loop by all_particle_in_domain loop. Nevertheless, I'm still very concerned about how to directly solve this problem caused by the sentence 'bin_particles_in_cells(domain,TRUE);'. If you have some idea, come on, let's discuss on it! |
|
May 31, 2016, 11:45 |
|
#3 |
Member
Bhargav Bharathan
Join Date: Jun 2015
Location: Montreal, Canada
Posts: 71
Rep Power: 11 |
Hi Narita,
I'm running a similar simulation. I don't use a udf like the one above and after the simulation runs for a while the number tracked reaches more than 100,000 and this slows down everything. Do you have any suggestions on how to handle this. -BB |
|
May 31, 2016, 22:48 |
|
#4 | |
New Member
Join Date: Apr 2016
Posts: 11
Rep Power: 10 |
Quote:
If your simulation is transient and you run it on Ansys Fluent: You can go to MODEL-DPM-INJECTION-PARCEL to set a larger constant number/diameter/volume. A larger number means one tracked parcel (or some people call it computational parcel) represents more (i.e., a larger number of) real particles. I don't quite remember but it seems that FLUENT user guide has a recommendation on this handling. Nevertheless, be careful: it may reduce the simulation accuracy. Good luck! |
||
May 31, 2016, 22:57 |
|
#5 | |
New Member
Join Date: Apr 2016
Posts: 11
Rep Power: 10 |
Quote:
http://www.cfd-online.com/Forums/flu...icle-data.html Determined to solve it! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for saving data of a transient simulation at particular locations | sreerajvarma | Fluent UDF and Scheme Programming | 3 | July 16, 2014 08:00 |
UDF for particle injection in ANSYS FLUENT DDPM and DEM models | Musa | Fluent UDF and Scheme Programming | 1 | October 6, 2013 14:01 |
Source Term UDF VS Porous Media Model | pchoopanya | Fluent UDF and Scheme Programming | 1 | August 28, 2013 07:12 |
Simulation with UDF for species mass fraction and velocity profile | virgy | Fluent UDF and Scheme Programming | 8 | February 7, 2012 05:30 |
UDF to change Rotation Speed in a MRF simulation | Mike | FLUENT | 3 | September 27, 2011 07:46 |