|
[Sponsors] |
April 12, 2014, 15: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, 05:03 |
|
#2 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
Try to change double to real.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for thermal conductivity | ayoub1989 | Fluent UDF and Scheme Programming | 5 | August 18, 2014 06:15 |
UDF for effective thermal conductivity in porous media | dotapro | Fluent UDF and Scheme Programming | 17 | February 24, 2014 11:56 |
Thermal conductivity UDF | jack.s | Fluent UDF and Scheme Programming | 4 | February 29, 2012 12:57 |
UDF for effective thermal conductivity | Rashmi | FLUENT | 1 | November 6, 2007 21:08 |
Can wemodify effective thermal conductivity by UDF | FengYun | FLUENT | 2 | October 27, 2005 06:28 |