CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Error in Intrepreting UDF: No Function Prototype

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2019, 02:02
Default Error in Intrepreting UDF: No Function Prototype
  #1
New Member
 
Join Date: Jan 2019
Location: Jakarta, Indonesia
Posts: 7
Rep Power: 3
danisnug is on a distinguished road
Hi, I'm having difficulty in interpreting UDF code to Fluent. The error message says:

Quote:
Error: C:/Users/danis/AppData/Local/Temp/UDF_PMV - Modified.c.7288.5.c: line 95: pmv_myudf: no function prototype
and here is the code I want to interpret:

Quote:
#include "udf.h"
DEFINE_ADJUST(pd_myudf,d)
{
Thread *t;
cell_t c;
real t_myudf = C_T(c,t)-273.15;
real speed_u_myudf = C_U(c,t);
real speed_v_myudf = C_V(c,t);
real speed_w_myudf = C_W(c,t);
real turbu_k = C_K(c,t);
real mh2o_myudf = C_YI(c,t,1); /*mass friction of h2o*/
real clo = 0.55;
real icl_myudf = 0.155*clo; /*clothing insulation*/
real tr_myudf = t_myudf;
real M_myudf = 58.0; /*metabolism, w/m2*/
real W_myudf = 0.0;
real p_myudf = 101325.0;
real turbu_tu;
real speed_myudf;
real pa_myudf;
real speedv;
real speedw;
real speedu;
real fcl_myudf;
real tcl1_myudf;
real tcl_myudf;
real tcl2_myudf;
real hc_myudf;
real temperary1_myudf;
real temperary2_myudf;
real a_myudf;
real b_myudf;
real c_myudf;
real d_myudf;
real e_myudf;
real f_myudf;
real L_myudf;
real ppd_myudf;
real pmv_myudf;
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{

/*calculate pa_myudf*/
speedu = speed_u_myudf;
speedv = speed_v_myudf;
speedw = speed_w_myudf;
speed_myudf = sqrt(pow((speedu),2.0)+pow((speedv),2.0)+pow((spee dw),2.0)); /*magnitude of speed*/
if (speed_myudf<0.05) {speed_myudf=0.05;} /*for speed<0.05,use speed=0.05*/
turbu_tu = 100.0*(turbu_k)/(speed_myudf);
pa_myudf = (29.0*mh2o_myudf)/((18.0+(11.0*mh2o_myudf))*p_myudf);


/*Calculate fcl*/
{
if (icl_myudf<0.078)
{fcl_myudf = 1.0+(1.29*icl_myudf);}
else
{fcl_myudf = 1.05+0.645*icl_myudf;}
}

/*iterate to calculate tcl*/

tcl1_myudf = 40.0;
tcl2_myudf = 35.7-(0.028*(M_myudf-W_myudf))-(icl_myudf*(0.0000000396*fcl_myudf*(pow((tcl1_myud f+273.0),4.0)-pow((tr_myudf+273.0),4.0))))+(fcl_myudf*hc_myudf*( tcl1_myudf-t_myudf));
{
if (tcl1_myudf-tcl2_myudf>0.000001)
{tcl1_myudf=tcl2_myudf;}
}
tcl_myudf=tcl2_myudf;

/*Calculate hc*/
temperary1_myudf = 2.38*pow((tcl1_myudf-t_myudf),0.25);
temperary2_myudf = 12.1*pow((speed_myudf),0.5);
{
if (temperary1_myudf<temperary2_myudf)
{hc_myudf=temperary2_myudf;}
else
{hc_myudf=temperary1_myudf;}
}


/*for a shorter formula of L_myudf*/
a_myudf = 0.0000000396*fcl_myudf*(pow((tcl1_myudf+273.0),4.0 )-pow((tr_myudf+273.0),4.0));
b_myudf = fcl_myudf*hc_myudf*(tcl_myudf-t_myudf);
c_myudf = 0.00305*(5733.0-(6.99*(M_myudf-W_myudf))-pa_myudf);
d_myudf = 0.42*(M_myudf-W_myudf-58.15);
e_myudf = 0.000017*M_myudf*(5867.0-pa_myudf);
f_myudf = 0.0014*M_myudf*(34.0-t_myudf);
L_myudf = (M_myudf-W_myudf)-(a_myudf+b_myudf+c_myudf+d_myudf+e_myudf+f_myudf);


/*Calculate pmv_myudf*/
pmv_myudf(c,t)=((0.303*(exp(-0.036*M_myudf)))+0.028)*L_myudf;


/*Calculate ppd_myudf*/
ppd_myudf(c,t)=100.0-(95.0*exp(-0.03353*pow((pmv_myudf(c,t)),4.0)-0.2179*pow((pmv_myudf(c,t)),2.0)));
}
end_c_loop(c,t)
}
}
The bold line is the line 95 which has the error. I have no idea what is wrong with the line 95. Can anyone help?

Thanks
danisnug is offline   Reply With Quote

Old   June 13, 2019, 01:49
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 1,330
Rep Power: 20
AlexanderZ will become famous soon enough
what is it
Code:
pmv_myudf(c,t)
you've defined
real ppd_myudf;
real pmv_myudf;

as real (not array), so you cant use (c,t) for them

I recommend you to compile your code instead of interpret

best regards
AlexanderZ is online now   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27


All times are GMT -4. The time now is 04:51.