|
[Sponsors] |
HELP! how inject the same number of particles that exits the domain? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 1, 2013, 11:04 |
HELP! how inject the same number of particles that exits the domain?
|
#1 |
New Member
Matias Hess
Join Date: May 2012
Location: Resistencia (Argentina)
Posts: 4
Rep Power: 14 |
Hi all, I'm making use of DPM to model a recirculating batch reactor with liquid-solid heterogeneous flow. I need help with a UDF that works on boundary conditions by injecting the same number of particles that left the domain to maintain constant mass.
My boundary conditions were on output "pressure outlet" and "velocity inlet" at the inlet. Really I would greatly appreciate if you help me with the UDF. Greetings my dear! |
|
August 5, 2013, 13:45 |
|
#2 |
New Member
Matias Hess
Join Date: May 2012
Location: Resistencia (Argentina)
Posts: 4
Rep Power: 14 |
pleasee someone who can help me? any contribution will help me to advance my project
|
|
August 7, 2013, 14:32 |
|
#3 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Hi,
The following example is not about particles, but it shows how you can do some calculations on a boundary at each time step and apply the results somewhere else. - Area averaged temperature is calculated at the outlet. - The calculated average temperature is augmented by 1 K and will be applied as the inlet temperature at next time step. Code:
#include "udf.h" real T_mean = 300.0; /* defined outside because will be used in multiple DEFINE macros */ DEFINE_EXECUTE_AT_END(execute_at_end) { Domain *domain; Thread *thread; face_t face; real area[ND_ND]; real total_area = 0.0; real total_area_ave_temp = 0.0; int ID = 18; /* outlet ID displayed in Fluent boundary conditions panel */ domain = Get_Domain(1); thread = Lookup_Thread(domain, ID); /*change "12" to the actual id of your b.c. */ begin_f_loop(face, thread) F_AREA(area, face, thread); total_area += NV_MAG(area); total_area_ave_temp += NV_MAG(area)*F_T(face, thread); end_f_loop(face, thread) T_mean = total_area_ave_temp/total_area; printf("Area averaged T on boundary %d = %f K\n", ID, T_mean); } DEFINE_PROFILE(T_profile, thread, position) { face_t face; real T_prof = T_mean + 1; begin_f_loop(face, thread) F_PROFILE(face, thread, position) = T_prof; end_f_loop(face, thread) } |
|
October 10, 2013, 12:09 |
|
#4 |
New Member
Matias Hess
Join Date: May 2012
Location: Resistencia (Argentina)
Posts: 4
Rep Power: 14 |
Thanks for your reply François, i'm working on that udf.
|
|
Tags |
dpm, particles, re-injection, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF- how to calculate the number of particles in DPM | causuya | Fluent UDF and Scheme Programming | 8 | January 23, 2021 14:34 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
Stable boundaries | marcoymarc | CFX | 33 | March 13, 2013 07:39 |
Reynodls Number in the domain | juliom | FLUENT | 2 | July 19, 2012 16:44 |
Function to inject particles only once? | KK | CFX | 0 | March 4, 2008 16:45 |