Compiled define_dpm_scalar_update not having any effect in fluent
1 Attachment(s)
I ran a dpm simulation, compiled it with define_dpm_scalar_update function and hooked it as a discrete phase UDF but its not working. Maybe what I did is physically wrong or maybe I used the wrong UDF.
The UDF: #include "udf.h" #include "dpm.h" DEFINE_DPM_SCALAR_UPDATE(update_velocity, cell, thread, initialize, p) { real z = TP_POS(p)[2]; real z_vel = TP_VEL(p)[2]; if (z < 1.5) { P_VEL(p)[2] = z_vel * 0.05; } else { P_VEL(p)[2] = z_vel; } } |
Its working, just needed to compile using built in compiler.
|
All times are GMT -4. The time now is 07:27. |