UDF for thermal conductivity

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

 April 12, 2014, 14:49 UDF for thermal conductivity #1 New Member   mohammad Join Date: Apr 2014 Posts: 1 Rep Power: 0 Dear Freinds... i want to define thermal conductivity of nanofluid , I wrote UDF but when i interpreted to fluent, it show me a message " line : 24 function returning float returns double . please help me . thanks. #include "udf.h" #include "math.h" DEFINE_PROPERTY(nanofluid_Conductivity,c,t) { double Temp , K , T0 , B , Fi_ = 0.04 , k_bf , C_ronf , RoC_pbf , Ro_bf , f , k_nf , k_np = 40 , T , Ro_np = 3970 , d_np = 0.00000003; T = C_T(c,t); Temp = pow(T, 2); Temp *= -0.0036; Temp += ((1.9159 * T)+748.19); Ro_bf = Temp; K = 1.381 * (pow(10.0, -23)); T0 = 273; B = 8.4407 * pow((100 * Fi_), -1.07304); k_bf = (-0.000008 * pow(T, 2)) + (0.0062 * T) - 0.5388; C_ronf = (-0.0001 * (pow(T, 3))) + (0.1155 * pow(T, 2)) + (-41.296 * T) + 9017.8; RoC_pbf = C_ronf * Ro_bf; f = (((2.8217 * (0.01 * Fi_)) + 0.003917) * (T / T0)) + ((-3.0669 * (0.01 * Fi_)) - 0.00391123); k_nf = ((k_np + (2 * k_bf) - (2 * (k_bf - k_np) * Fi_)) / (k_np + (2 * k_bf) + ((k_bf - k_np) * Fi_)) * k_bf) + (5 * 10000 * B * Fi_ * RoC_pbf * sqrt((K * T) / (Ro_np * d_np)) * f); return k_nf; }

 April 13, 2014, 04:03 #2 Senior Member     Daniele Join Date: Oct 2010 Location: Italy Posts: 949 Rep Power: 15 Try to change double to real.

 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 ayoub1989 Fluent UDF and Scheme Programming 5 August 18, 2014 05:15 dotapro Fluent UDF and Scheme Programming 17 February 24, 2014 11:56 jack.s Fluent UDF and Scheme Programming 4 February 29, 2012 12:57 Rashmi FLUENT 1 November 6, 2007 21:08 FengYun FLUENT 2 October 27, 2005 05:28

All times are GMT -4. The time now is 11:57.