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

Please check out my UDF code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2012, 12:38
Default Please check out my UDF code
  #1
New Member
 
tahmineh
Join Date: Jan 2012
Location: Tehran - Iran
Posts: 4
Rep Power: 14
tahmineh is on a distinguished road
hi,
I want to model nanofluid (thermal oil/AL2O3)in single phase.
please check out my code.

/************************************************** *********************/
/* UDF that defines the some properties of the fluid such as vicosity*/
/*(as a function of temperature) */
/************************************************** *********************/
#include"udf.h"


DEFINE_PROPERTY(viscosity, c, t)
{

real mu_f,fi,mu_eff,tt;
tt=C_T(c,t);

fi=0.03; /*volume fraction of the nano particles */

mu_f=0.000001*((6.672*0.0000001*tt*tt*tt*tt)-(1.566*0.001*tt*tt*tt)+(1.388*tt*tt)-(5.541*100*tt)+(8.487*10000));
mu_eff =(1+2.5*fi)*mu_f;

return mu_eff;
}



DEFINE_PROPERTY(conductivity,c,t)
{

real k_eff,ks,kf,fi,tt;
tt=C_T(c,t);
fi=0.03;
kf=(-5.753496)*0.0000000001*tt*tt-(1.875266*0.0001*tt)+(1.900210*0.1);
ks= 5.5+34.5*(exp((-0.0033)*(tt-273)));

k_eff=(kf*(ks+2*kf-2*fi*(kf-ks)))/(ks+2*kf+fi*(kf-ks));

return k_eff;

}


DEFINE_PROPERTY(density, c, t)
{

real ro_nf,fi,ro_f,ro_s,tt;

tt=C_T(c,t);
fi=0.03;
ro_f=(-4.153495*0.1*tt)+1.105702*1000;
ro_s=3850;
ro_nf=((1-fi)*(ro_f))+(fi*(ro_s));

return ro_nf;

}



Regards,
tahmineh.
tahmineh is offline   Reply With Quote

Old   September 14, 2012, 01:50
Default
  #2
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
Hi tahmineh

You might already had solved the problem.
I feel this UDF should work properly.

If you have any query you can please ask.

Best wishes
Mvee
mvee is offline   Reply With Quote

Old   December 26, 2013, 14:14
Default
  #3
New Member
 
amir okhovat
Join Date: Sep 2011
Location: Iran- Isfahan
Posts: 24
Rep Power: 15
amirokhovat is on a distinguished road
Send a message via Skype™ to amirokhovat
Dear Tahmine, It's correct
afarin
amirokhovat is offline   Reply With Quote

Reply


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
Please check out my parallelized udf aleisia Fluent UDF and Scheme Programming 0 June 9, 2011 17:57
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
Request for UDF code for forced vibrations jagadeesh putta FLUENT 0 November 21, 2007 22:43
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 16:56
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 13:40


All times are GMT -4. The time now is 20:17.