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

error C2063: 'PMV' : not a function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2018, 10:15
Default error C2063: 'PMV' : not a function
  #1
New Member
 
Ahmed Hassan
Join Date: Nov 2017
Posts: 10
Rep Power: 9
Ahmed Hassan is on a distinguished road
Hello everyone,
I'm trying to write a UDF for a thermal comfort index called PMV (predicted mean vote) but i'm getting this error when compiling in fluent:
line 95.. error C2063: 'PMV' : not a function
what could be the problem here ?
Thank you all in advance

this is my code:

#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 1????*/
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)
}
}
Ahmed Hassan is offline   Reply With Quote

Reply

Tags
c2063, compile issue, programing, thermal comfort, udf


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
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 12:32
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 02:47
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 07:59
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


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