CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   heat transfer coefficient for the fluid / solid interface (https://www.cfd-online.com/Forums/fluent-udf/138612-heat-transfer-coefficient-fluid-solid-interface.html)

sarah l July 7, 2014 23:38

heat transfer coefficient for the fluid / solid interface
 
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!

anon_m July 29, 2014 10:44

Hello:

Were you able to solve your problem?

sarah l July 31, 2014 02:50

well, I changed some of the statements to constatnt parameter and the it run!

anon_m July 31, 2014 08:59

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.

sarah l July 31, 2014 14:57

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

othmann August 23, 2014 18:08

udf for heat-transfer-coefficient-fluid-solid-interface
 
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

junianatalia April 25, 2016 20:50

Udf heat transfer
 
Good night,

I'm working with heat transfer and I've had serious problems. Can you help me?

Bruno Machado April 26, 2016 04:59

Quote:

Originally Posted by junianatalia (Post 596679)
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.

junianatalia April 29, 2016 08:42

My code heat transfer
 
1 Attachment(s)
Attachment 47105

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 April 29, 2016 08:48

2 Attachment(s)
Quote:

Originally Posted by Bruno Machado (Post 596720)
explain your problem, post the code you wrote and we can try to help you.

Good morning.
Fallow my udf.

Thanks

guilbemloco May 12, 2016 04:40

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

guilbemloco May 12, 2016 09:58

Hello Sarah,

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

Thank you

guilbemloco May 17, 2016 08:44

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.

junianatalia May 17, 2016 13:12

Quote:

Originally Posted by guilbemloco (Post 600392)
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

guilbemloco May 18, 2016 02:27

1 Attachment(s)
Quote:

Originally Posted by junianatalia (Post 600444)
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.

junianatalia May 18, 2016 08:28

Quote:

Originally Posted by guilbemloco (Post 600501)
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


All times are GMT -4. The time now is 11:38.