|
[Sponsors] |
December 26, 2013, 02:42 |
DPM velocity
|
#1 |
New Member
Rodman
Join Date: Dec 2013
Posts: 7
Rep Power: 12 |
Hi,everybody. I want to make simulation of cooling tower and try to write a UDF to contorl the velocity of water (use DPM model) in a specific zone, but there are some incorrects in it. When I compile the UDF, the console apperas "uninitialized local variable ‘tp' used" and "uninitialized local variable ‘p' used". Wether the DEFINE_ADJUST Macro can be used in modifying the velocity of DPM? Please give me some suggestions, thank you. The UDF is below:
#include "udf.h" #include "dpm.h" DEFINE_ADJUST(my_adjust,d) { //UDF Manual P201 Tracked_Particle *tp; cell_t c=P_CELL(tp); Thread *t=P_CELL_THREAD(tp); Particle *p; if(P_POS(p)[2]<14.8&&P_POS(p)[2]>=13.4) begin_particle_cell_loop(p,c,t) { P_VEL(p)[2] = -0.2; } end_particle_cell_loop(p,c,t) } |
|
Tags |
dpm, udf code, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple floating objects | CKH | OpenFOAM Running, Solving & CFD | 14 | February 20, 2019 10:08 |
udf : velocity profile in DPM (and mass) | cdiako | Fluent UDF and Scheme Programming | 0 | July 31, 2013 06:17 |
Radial velocity and tangential velocity on centrifugal fan, | johnnyp | FLUENT | 2 | May 24, 2013 08:10 |
Plotting Droplet velocity -DPM | joshkemp | FLUENT | 1 | April 12, 2007 21:09 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |