CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Non-uniform heat flux on a tube (https://www.cfd-online.com/Forums/fluent/120731-non-uniform-heat-flux-tube.html)

Kamu July 13, 2013 07:41

Non-uniform heat flux on a tube
 
Dear all,

How can I use a non-uniform heat flux boundary condition along the circumference of a tube?

Regards

Kamu July 19, 2013 08:11

Quote:

Originally Posted by Kamu (Post 439516)
Dear all,

How can I use a non-uniform heat flux boundary condition along the circumference of a tube?

Regards

Is there any way I can write a udf for such in 3d?

flotus1 July 19, 2013 09:08

With the define_profile macro you should be able to specify such a boundary condition.

Code:

  #include "udf.h" 
 DEFINE_PROFILE(heatflux,t,i)
 {   
  real x[ND_ND];     
  face_t f;   
 
  begin_f_loop(f,t)
        {
          F_CENTROID(x,f,t);
       
          F_PROFILE(f,t,i) = 1.0;
          *instead of 1.0, define whatever spatial function you want
          *x[1] is the x-coordinate, x[2] the y-coordinate and x[3] the z-coordinate
        }
      end_f_loop(f,t)
}


Kamu July 19, 2013 09:14

Dear Alex,

Thanks a lot for this. I will try it out.
so i do not need to worry about converting the cartesian coordinates to cylindrical coordinates?
The heat flux varies only in the circumferential direction and not in the radial or axial direction.

Regards
Kamu

flotus1 July 19, 2013 09:17

If your simulation is real 3D then there should be no problem.

ravi1005 July 13, 2016 00:25

Non-uniform heat flux on a tube
 
above program is not running and what is the meaning of x[1],y[1] and z[1].

flotus1 July 13, 2016 04:28

"program not running" is not an error description to work with.

There is no x[1], y[1] and z[1] in the code.
As the comment lines say, the array x holds the position vector. Thanks to my fortran background I shifted the indices. The comment line should read:
Code:

*x[0] is the x-coordinate, x[1] the y-coordinate and x[2] the z-coordinate
I would edit this error, but the post is too old.

m.f.arefi August 2, 2019 06:14

hi can you tell me what's the heat flux function you've defined mathematically as non-uniform heat flux?

AlexanderZ August 2, 2019 08:01

Code:

  #include "udf.h" 
 DEFINE_PROFILE(heatflux,t,i)
 {   
  real x[ND_ND];     
  face_t f;   
 
  begin_f_loop(f,t)
        {
          F_CENTROID(x,f,t);
       
          F_PROFILE(f,t,i) = 1.0;
          *instead of 1.0, define whatever spatial function you want
          *x[0] is the x-coordinate, x[1] the y-coordinate and x[2] the z-coordinate
        }
      end_f_loop(f,t)
}

for instance
Code:

F_PROFILE(f,t,i) = x[0]*1000.0;
is heat source which increases along x-axis 1000 times with each meter
heat source could be time dependent as well

best regards

m.f.arefi August 16, 2019 02:42

Quote:

Originally Posted by AlexanderZ (Post 740880)
Code:

  #include "udf.h" 
 DEFINE_PROFILE(heatflux,t,i)
 {   
  real x[ND_ND];     
  face_t f;   
 
  begin_f_loop(f,t)
        {
          F_CENTROID(x,f,t);
       
          F_PROFILE(f,t,i) = 1.0;
          *instead of 1.0, define whatever spatial function you want
          *x[0] is the x-coordinate, x[1] the y-coordinate and x[2] the z-coordinate
        }
      end_f_loop(f,t)
}

for instance
Code:

F_PROFILE(f,t,i) = x[0]*1000.0;
is heat source which increases along x-axis 1000 times with each meter
heat source could be time dependent as well

best regards

hi again thank you for your reply
I m working on a pipe in pipe volumetric solar collector and I want to choose best radiation model in ansys fluent because my multiphase model is mixture for simulating nanofluid and my solver is pressure based you know when I read papers related to this topic I found that monte carlo method (density based) is a proper model and using udf file to consider non uniform radiation is applied so what should I do ?I cant change to monte carlo method because mixture model is important for me...

AlexanderZ August 18, 2019 22:18

from my point of view monte carlo method is just a slover, use other one
write new paper

best regards


All times are GMT -4. The time now is 04:17.