CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   DPM velocity (

ldm273507 December 26, 2013 02:42

DPM velocity
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"
//UDF Manual P201
Tracked_Particle *tp;
cell_t c=P_CELL(tp);
Thread *t=P_CELL_THREAD(tp);
Particle *p;
P_VEL(p)[2] = -0.2;

All times are GMT -4. The time now is 09:13.