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

new propety

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pakk

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 9, 2013, 07:01
Default new propety
  #1
Member
 
shahrbanoo
Join Date: Mar 2013
Posts: 63
Rep Power: 13
shahrbanoo is on a distinguished road
Hi dears...
I had a code for defining new viscousity for blood, but when I interpret it, it says:
C:\Users\NoneStop\Desktop\viscous.c: line 18: function returning double returns float.
the code is here:
# include "udf.h"
# define n 0.67
# define alpha 1.0
# define muo 0.0042
DEFINE_PROPERTY(Power_law_model,cell,thread)
{
float visc,trace;
float u[3],v[3],w[3];
int i;
for(i=0; i<3; i++)
{
u[i] = C_U_G(cell,thread)[i];
v[i] = C_V_G(cell,thread)[i];
w[i] = C_W_G(cell,thread)[i];
}
trace = 0.5*(2*pow(u[0],2) + pow(v[0]+u[1],2) + 2*pow(v[1],2) + pow(v[2]+w[1],2) + 2*pow(w[2],2) + pow(w[0]+u[2],2));
visc = 0.5*muo*pow(1+alpha*trace,0.67);
return visc;
}
what should I do?
please help me...
shahrbanoo is offline   Reply With Quote

 


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



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