CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Compiled define_dpm_scalar_update not having any effect in fluent (https://www.cfd-online.com/Forums/fluent/252685-compiled-define_dpm_scalar_update-not-having-any-effect-fluent.html)

DIWAS October 31, 2023 05:04

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;
}
}

DIWAS October 31, 2023 08:42

Its working, just needed to compile using built in compiler.


All times are GMT -4. The time now is 07:27.