CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

heat transfer coefficient for the fluid / solid interface

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sarah l

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2014, 00:38
Default heat transfer coefficient for the fluid / solid interface
  #1
Member
 
sarah
Join Date: Aug 2010
Posts: 42
Rep Power: 16
sarah l is on a distinguished road
Hi,
I am using non-equilibrium model in porous zone in Ansys Fluent 14.5. for specifying heat transfer coefficient for the fluid / solid interface, I have written the following udf

#include "udf.h"
DEFINE_PROFILE(Heat_trans_coeff,t,i)
{
cell_t c;
real Nu,Re,Pr;
real dens, visc; /*Fluid*/
real cond, cp; /* Fluid*/
real d_p;
real por;/*Porosity of the bed*/
d_p=0.06;
por=0.36

begin_c_loop(c,t)
{
dens = C_R(c,t); /*Density of fluid*/
visc = C_MU_L(c,t); /*Viscosity fluid*/
cond = C_K_L(c,t); /*Conductivity fluid*/
cp = C_CP(c,t); /*Specific heat fluid*/
Re = ND_MAG(C_U(c,t),C_V(c,t),C_W(c,t))*d_p*dens*por/visc ; /*Reynolds number has been calculated based on pore velocity*/
Pr = cp*visc/cond ;
Nu = 2.+ 1.1 * pow(Re,0.6) * pow(Pr,1./3.);
F_PROFILE(c,t,i) = Nu*cond/d_p ;
}
end_c_loop(c,t)
}
However this code cannot be interpreted in FLUENT. The error message is "c_loop_last: undeclared variable"
I would be grateful if somebody help me!
guilbemloco likes this.
sarah l is offline   Reply With Quote

Old   July 29, 2014, 11:44
Default
  #2
Disabled
 
Join Date: Nov 2013
Posts: 16
Rep Power: 13
anon_m is on a distinguished road
Hello:

Were you able to solve your problem?
anon_m is offline   Reply With Quote

Old   July 31, 2014, 03:50
Default
  #3
Member
 
sarah
Join Date: Aug 2010
Posts: 42
Rep Power: 16
sarah l is on a distinguished road
well, I changed some of the statements to constatnt parameter and the it run!
sarah l is offline   Reply With Quote

Old   July 31, 2014, 09:59
Default
  #4
Disabled
 
Join Date: Nov 2013
Posts: 16
Rep Power: 13
anon_m is on a distinguished road
Sarah:
Thanks for your reply. Do you by any chance know how one can get the solid temperature at a specific point in the media by udf?

Thank you.
anon_m is offline   Reply With Quote

Old   July 31, 2014, 15:57
Default
  #5
Member
 
sarah
Join Date: Aug 2010
Posts: 42
Rep Power: 16
sarah l is on a distinguished road
you're welcome
while you use non equilibrium model , the software creats solid zone itself so you can observe the variation of Temp on that ! also you can create new plane with specific points to see more details.

regards
sarah l is offline   Reply With Quote

Old   August 23, 2014, 19:08
Default udf for heat-transfer-coefficient-fluid-solid-interface
  #6
New Member
 
othman
Join Date: Aug 2014
Posts: 1
Rep Power: 0
othmann is on a distinguished road
Dear Pr Sarah

I work on the heat transfer in porous media, and I need a UDF for the heat transfer coefficient fluid/solid that is a function of the solid temperarue and the fluid temperature

Thank's to answer me

Best regards
othmann is offline   Reply With Quote

Old   April 25, 2016, 21:50
Post Udf heat transfer
  #7
New Member
 
Junia Mendes
Join Date: Apr 2016
Posts: 7
Rep Power: 10
junianatalia is on a distinguished road
Good night,

I'm working with heat transfer and I've had serious problems. Can you help me?
junianatalia is offline   Reply With Quote

Old   April 26, 2016, 05:59
Default
  #8
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
Quote:
Originally Posted by junianatalia View Post
Good night,

I'm working with heat transfer and I've had serious problems. Can you help me?
explain your problem, post the code you wrote and we can try to help you.
Bruno Machado is offline   Reply With Quote

Old   April 29, 2016, 09:42
Default My code heat transfer
  #9
New Member
 
Junia Mendes
Join Date: Apr 2016
Posts: 7
Rep Power: 10
junianatalia is on a distinguished road
heat_udf_1.h

It's my code. I'm working with tho phases in Eulerian Model. I'm having trouble describing each stage in my UFD.

The error is pointed out in this line:

heat_kmiec_1980 (c cell_t, Thread * ti, Thread * tj)
junianatalia is offline   Reply With Quote

Old   April 29, 2016, 09:48
Post
  #10
New Member
 
Junia Mendes
Join Date: Apr 2016
Posts: 7
Rep Power: 10
junianatalia is on a distinguished road
Quote:
Originally Posted by Bruno Machado View Post
explain your problem, post the code you wrote and we can try to help you.
Good morning.
Fallow my udf.

Thanks
Attached Files
File Type: h heat_udf_1.h (1.1 KB, 85 views)
File Type: c heat_coefficient.c (1.8 KB, 114 views)
junianatalia is offline   Reply With Quote

Old   May 12, 2016, 05:40
Default
  #11
New Member
 
gui
Join Date: Oct 2013
Posts: 10
Rep Power: 13
guilbemloco is on a distinguished road
Dear members of the forum

I need a UDF for the heat transfer coefficient, considering the properties change with the temperature.
My function is very similar to the one Sarah posted here, if anyone knows how to correct that function that would be great!

Thank you,

G

Last edited by guilbemloco; May 12, 2016 at 06:47.
guilbemloco is offline   Reply With Quote

Old   May 12, 2016, 10:58
Default
  #12
New Member
 
gui
Join Date: Oct 2013
Posts: 10
Rep Power: 13
guilbemloco is on a distinguished road
Hello Sarah,

Could you please show me the UDF you created after you changed some parameters to constant?

Thank you
guilbemloco is offline   Reply With Quote

Old   May 17, 2016, 09:44
Default
  #13
New Member
 
gui
Join Date: Oct 2013
Posts: 10
Rep Power: 13
guilbemloco is on a distinguished road
Well, I found that in this code there is a ";" missing after the declaration of "por=0.36".

I added that and I was able to interpret the function normally.
guilbemloco is offline   Reply With Quote

Old   May 17, 2016, 14:12
Default
  #14
New Member
 
Junia Mendes
Join Date: Apr 2016
Posts: 7
Rep Power: 10
junianatalia is on a distinguished road
Quote:
Originally Posted by guilbemloco View Post
Well, I found that in this code there is a ";" missing after the declaration of "por=0.36".

I added that and I was able to interpret the function normally.
Hello,

Can you send me your UDF?

Thanks
junianatalia is offline   Reply With Quote

Old   May 18, 2016, 03:27
Default
  #15
New Member
 
gui
Join Date: Oct 2013
Posts: 10
Rep Power: 13
guilbemloco is on a distinguished road
Quote:
Originally Posted by junianatalia View Post
Hello,

Can you send me your UDF?

Thanks
Sure, it is this:

#include "udf.h"
DEFINE_PROFILE(Heat_trans_coeff,t,i)
{
cell_t c;
real Nu,Re,Pr;
real dens, visc; /*Fluid*/
real cond, cp; /* Fluid*/
real d_p;
real por;/*Porosity of the bed*/
d_p=0.018;
por=0.3;

begin_c_loop(c,t)
{
dens = C_R(c,t); /*Density of fluid*/
visc = C_MU_L(c,t); /*Viscosity fluid*/
cond = C_K_L(c,t); /*Conductivity fluid*/
cp = C_CP(c,t); /*Specific heat fluid*/
Re = ND_MAG(C_U(c,t),C_V(c,t),C_W(c,t))*d_p*dens*por/visc ; /*Reynolds number has been calculated based on pore velocity*/
Pr = cp*visc/cond ;
Nu = 2.+ 1.1 * pow(Re,0.6) * pow(Pr,1./3.);
F_PROFILE(c,t,i) = Nu*cond/d_p ;
}
end_c_loop(c,t)
}

I was able to interpret in windows and to compile in linux systems, the reason is not clear thought.
Attached Files
File Type: c heat_transfer_coefficient.c (643 Bytes, 69 views)
guilbemloco is offline   Reply With Quote

Old   May 18, 2016, 09:28
Post
  #16
New Member
 
Junia Mendes
Join Date: Apr 2016
Posts: 7
Rep Power: 10
junianatalia is on a distinguished road
Quote:
Originally Posted by guilbemloco View Post
Sure, it is this:

#include "udf.h"
DEFINE_PROFILE(Heat_trans_coeff,t,i)
{
cell_t c;
real Nu,Re,Pr;
real dens, visc; /*Fluid*/
real cond, cp; /* Fluid*/
real d_p;
real por;/*Porosity of the bed*/
d_p=0.018;
por=0.3;

begin_c_loop(c,t)
{
dens = C_R(c,t); /*Density of fluid*/
visc = C_MU_L(c,t); /*Viscosity fluid*/
cond = C_K_L(c,t); /*Conductivity fluid*/
cp = C_CP(c,t); /*Specific heat fluid*/
Re = ND_MAG(C_U(c,t),C_V(c,t),C_W(c,t))*d_p*dens*por/visc ; /*Reynolds number has been calculated based on pore velocity*/
Pr = cp*visc/cond ;
Nu = 2.+ 1.1 * pow(Re,0.6) * pow(Pr,1./3.);
F_PROFILE(c,t,i) = Nu*cond/d_p ;
}
end_c_loop(c,t)
}

I was able to interpret in windows and to compile in linux systems, the reason is not clear thought.
Thanks! guilbemloco
junianatalia is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed in meshing for Solid to Fluid Heat Transfer niazaliahmed FLUENT 2 February 22, 2020 16:47
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
goddamnit: how to set up heat transfer from fluid to solid macfly FLUENT 7 June 16, 2012 12:50
error message cuteapathy CFX 14 March 20, 2012 07:45


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