CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   spatial variation in heat generation inside a tube wall (https://www.cfd-online.com/Forums/fluent/106032-spatial-variation-heat-generation-inside-tube-wall.html)

n7310889 August 16, 2012 01:58

spatial variation in heat generation inside a tube wall
 
Hi,
Can any body tell me whether it is possible to declare spatial variation of heat generation in a 3d CHT model? That means heat will be generate at a certain rate, which will vary along y direction of a tube, and this variation can be express by a function.
Thanks in advance to whom, who will answer me the question;).
Regards

CFD-student August 16, 2012 02:38

Hi,
I can say this much. It is certainly possible to do this via user defined functions, however it might also be possible to do this using the user defined field functions.

n7310889 August 16, 2012 07:36

spatial variation in heat generation
 
Quote:

Originally Posted by CFD-student (Post 377304)
Hi,
I can say this much. It is certainly possible to do this via user defined functions, however it might also be possible to do this using the user defined field functions.

Hi,
For my 3D geometry (coolant flow inside a tube) I am struggling to accommodate both heat flux input, and radiation and/or convection loss from the tube outside wall in FLUENT window. The heat source is solar radiation (reflected by a parabolic trough). To account heat loss from the surface, I am planning to write an udf declaring either (1) heat flux profile minus radiation and/or convection loss, or (2) activate "Mixed option" in the wall boundary condition dialog box and hook a udf declaring heat generation, which (the heat generation) will vary along the vertical axis of the tube and translate along its horizontal length.

I'm novice in this field. I'll be grateful, if you can suggest me how can I proceed? I'm not sure how can I declare the location/axis of my 3D model to FLUENT. Also if I wanna calculate heat loss, may be I have to include both surface temperature and the ambient temperature.
If I develop an Excel file of the input heat flux including the formulas for heat loss calculation from the surface, how I will hook that Excel file?

You endeavor will be acknowledged.
Regards

CFD-student August 16, 2012 08:04

In order to write a use defined function of this nature you will need some basic understanding of C programming. I suggest that you start by taking the UDF tutorial on the customer portal and also consult the documentation for UDF programming. Start by replicating some of the examples given there. Thereafter you will have sufficient knowledge to write an UDF in which you can set the heat flux at the walls as a function of spatial position.

In order to compile UDF:s you will require microsoft NET framework SDK for windows enviroments. More about required softwares can be read in the CFD-online wiki.

n7310889 August 20, 2012 01:36

Hi CFD-student,
Could you at-least confirm me that whether my plan as I have proposed (in my very last post) to accommodate both of the heat (flux/generation ) and radiation loss is okay or not? Fortunately I've studied some udf from the online resource. My question was how to define the location of the profile on the tube surface in x, y z axes so that the profile vary along vertical y axis on a tubular surface from (z = 0 to 1.5m)? The axis of rotation of the tube is (0,0,0) to (0,0,1.5m).
Thanks in advance
Regards

CFD-student August 20, 2012 02:41

Yes, it is certainly possible to do what you propose.

n7310889 September 5, 2012 19:12

Quote:

Originally Posted by CFD-student (Post 377725)
Yes, it is certainly possible to do what you propose.

Hi, Primarily, I've written the following simple udf for my 3d model. But the results I'm getting is not impressive. The udf along the z axis seems be working. But I'm not sure whether the x and y axis arguments are working properly or not. I'll appreciate your endeavor to check and suggest me any correction. Another thing I need to ask you is that, radius of the fluid domain of my CFD model is 33 mm. But I'm not sure whether I put the radius 35 mm including the tube in calculation or 33 mm excluding the tube, no matter whether I consider wall thickness (2 mm) in my fluent model or not. The same question is also valid if I assign heat generation profile in the tube body instead of heat flux on the fluid wall surface. For you kind information, the axis of rotation of my semi-annular fluid domain lies between (0,0,0) to (0,0,1.5) of the Cartesian cordinate system.

#include "udf.h"
#include "math.h"

DEFINE_PROFILE(heat_profile,thread,index)
{
real x[ND_ND];
double z,a,heat_profile;

face_t f;

begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);

z =x[2];

if ((z>=0.0) && (z<=1.0))
{

for(a=0.0; a<180.0; a=a+0.2)

{
x[0] =0.033*sin(a);
x[1] =-0.033*cos(a);


if ((a>=0.0) && (a<=90))
{
heat_profile =60000;
}

else
{
heat_profile =0.0;
}

F_PROFILE(f,thread,index) =heat_profile;
}
}

else
{

F_PROFILE(f,thread,index) =0.0;
}
}

end_f_loop(f,thread)
}


All times are GMT -4. The time now is 03:27.