Thermal conductivity UDF
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??? |
Well in your code variable "y" isn't initialized, so I guess that is the problem. Here is an quick fix:
PHP Code:
|
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 :) |
Quote:
|
All times are GMT -4. The time now is 17:59. |