|
[Sponsors] |
February 25, 2012, 16:28 |
Thermal conductivity UDF
|
#1 |
New Member
jack
Join Date: Aug 2011
Posts: 3
Rep Power: 15 |
Hi friends...
i want to define thermal conductivity of fluid that varies with temperature and position. in other words i want to use this formula: k= 3*T^2+6*y that T is temperature and y is position in y-direction. I wrote the following UDF and run the case but when i compared this result with constant thermal conductivity it has no effect in my results. #include "udf.h" DEFINE_PROPERTY(knew,c,t) { real ktc; real y; real temp = C_T(c,t); ktc = (3. * pow (temp,2.)) + (6. *y); return ktc; } can any body help me??? |
|
February 26, 2012, 04:41 |
|
#2 |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15 |
Well in your code variable "y" isn't initialized, so I guess that is the problem. Here is an quick fix:
PHP Code:
|
|
February 26, 2012, 14:58 |
|
#3 | |
New Member
jack
Join Date: Aug 2011
Posts: 3
Rep Power: 15 |
Quote:
i use this UDF and my results changed!!! But my result is not satisfactory. i have some other question: i want to use this UDF in 2d modeling of pipe, and use this UDF to change thermal conductivity of fluid in each section of pipe from inlet to outlet with temperature and position of each point in every section. can i use this UDF in axisemmetric model with y or i should replace y with r??? if yes, can i replace y with r in the previous UDF??? And if i want to use this formula : k=3*T+ how can i change previous UDF ??? Last edited by jack.s; February 27, 2012 at 07:02. |
||
February 28, 2012, 17:08 |
|
#4 |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15 |
I think that you can use this code without any modification for an axisymmetric problem, if a symmetry axis is parallel with x axis. If it is parallel with y axis than you will have to change
PHP Code:
PHP Code:
Once again it depends, which spatial variable represents radius. Finally I would like to say, that I haven't test it and UDF manual isn't much speaking about axisymmetric problems in general. However, this is the way how I expect it should work |
|
February 29, 2012, 12:57 |
|
#5 | |
New Member
jack
Join Date: Aug 2011
Posts: 3
Rep Power: 15 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I need one simple udf code for effective thermal conductivity of nanofluid | mvf | Fluent UDF and Scheme Programming | 1 | February 10, 2017 20:05 |
UDF for effective thermal conductivity | Rashmi | FLUENT | 1 | November 6, 2007 21:08 |
UDF for effective thermal conductivity | Mona | FLUENT | 2 | January 16, 2006 14:36 |
Can wemodify effective thermal conductivity by UDF | FengYun | FLUENT | 2 | October 27, 2005 06:28 |
Effective thermal conductivity UDF - C_K_EFF?? | Craig | FLUENT | 4 | February 11, 2004 15:02 |