CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   UDF error in Fluent ( October 29, 2020 06:39

UDF error in Fluent
The following error has been pop-up while compiling the UDF for population balance modeling

# Generating udf_names.c because of makefile pdf.obj


udf_names.c(8): error C2065: 'break_up_pdf_par': undeclared identifier

udf_names.c(8): warning C4312: 'type cast': conversion from 'int' to 'void (*)(void)' of greater size

udf_names.c(8): error C2065: 'UDF_TYPE_PB_BREAKUP_RATE_PDF': undeclared identifier

udf_names.c(8): error C2099: initializer is not a constant

The UDF code is

/************************************************** **********************
UDF that computes the particle breakage frequency
************************************************** ***********************/

#include "udf.h"
#include "sg_pb.h"
#include "sg_mphase.h"

DEFINE_PB_BREAKUP_RATE_FREQ(break_up_pdf_par, cell, thread, d_1)
real epsi, alpha, f1, f2, rho_d;
real C1 = 0.00481, C2 = 0.08, sigma = 0.07;

epsi = 0.5;

alpha = 0.12;
rho_d = 1000.;
f1 = pow(epsi, 1./3.)/((1.+epsi)*pow(d_1, 2./3.));
f2 = -(C2*sigma*(1.+epsi)*(1.+epsi))/(rho_d*pow(epsi,2./3.)*pow(d_1, 5./3.));
return C1*f1*exp(f2);

Please help

AlexanderZ October 29, 2020 08:14

well, there is a list of problems... fix them

if you have no idea how, share your code, so people here will try to help you

All times are GMT -4. The time now is 01:56.