# Please check out my UDF code

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

 March 29, 2012, 11:38 Please check out my UDF code #1 New Member   tahmineh Join Date: Jan 2012 Location: Tehran - Iran Posts: 4 Rep Power: 5 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.

 September 14, 2012, 00:50 #2 Senior Member   Vaze Join Date: Jun 2009 Posts: 133 Rep Power: 8 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

 December 26, 2013, 14:14 #3 New Member   amir okhovat Join Date: Sep 2011 Location: Iran- Isfahan Posts: 19 Rep Power: 5 Dear Tahmine, It's correct afarin

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post aleisia Fluent UDF and Scheme Programming 0 June 9, 2011 16:57 chiven OpenFOAM Installation 3 December 1, 2009 08:21 jagadeesh putta FLUENT 0 November 21, 2007 22:43 John C. Chien Main CFD Forum 19 May 17, 2001 15:56 Greg Perkins FLUENT 8 October 20, 2000 12:40

All times are GMT -4. The time now is 09:28.