CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Temperature dependent Heat flux (Peltier effect) (https://www.cfd-online.com/Forums/fluent/112939-temperature-dependent-heat-flux-peltier-effect.html)

Student3 February 8, 2013 04:12

Temperature dependent Heat flux (Peltier effect)
 
I'm a student who have to design a cooling system based on Peltier module for my final degree project.
I have tried to develop a UDF which takes the temperature for one face and applies it in the face where the UDF is applied. I am able to retrieve the information of the face where the UDF is applied but not from the other face.
IŽll post my UDF to see if anyone see where is the problem.

#include "udf.h"

DEFINE_PROFILE(peltier, thread, i)

{
real sum = 0.;
real temp_sum = 0.;
real tmin = 0.;
real tempe,media;
face_t f;

Thread *f_thread;
Domain *domain;
domain = Get_Domain(2);
thread_loop_f(f_thread, domain)
{

begin_f_loop(f, f_thread)
{
tempe=F_T(f,f_thread);
sum=sum+1;
temp_sum=temp_sum+tempe;
}
end_f_loop(f, f_thread)


}
media=temp_sum/sum;
printf("media: %d", media);
begin_f_loop(f, thread)
{
F_PROFILE(f, thread,i) = 0.;
}
end_f_loop(f, thread)
}


Any advice are welcome.

Pacific January 25, 2020 03:53

Hi there,


Could you find the answer?
I have the same problem in my project.


Regards.

AlexanderZ January 27, 2020 05:45

describe your problem in details

Pacific January 27, 2020 05:53

I should apply Q=a*I*T to the boundary condition.
T is the wall temperature.
How can I define it in UDF?
I have tried to use Define_Heat_Flux function.


Thanks for your time.

AlexanderZ January 27, 2020 06:12

show your code, describe your problems

Pacific January 27, 2020 08:40

Quote:

Originally Posted by AlexanderZ (Post 755699)
show your code, describe your problems

#include "udf.h"
real Alpha = 0.; // Seebeck coefficient (V/K)
real I=0.; // Electric current

//

DEFINE_ADJUST(Seebeck_adjust, domain)
{

Alpha = 0.000400;
I=5;
}
DEFINE_HEAT_FLUX(heat_flux, f, t, c0, t0, cid, cir)
{
cid[0] = 0.;
cid[1] = 0.0;
cid[2] = Alpha*I;
cid[3] = 0.;
}

AlexanderZ January 27, 2020 23:05

what problems do you have?
may be you should use cid[1] = Alpha*I;
I have no experience here

vinerm January 28, 2020 07:28

DEFINE_HEAT_FLUX vs DEFINE_PROFILE
 
Hi

Do note that DEFINE_HEAT_FLUX is not meant for applying the heat flux condition, rather to alter the interactions between temperature and heat flux. For the purpose of applying a profile, DEFINE_PROFILE is to be used.

Vinerm

blacksatellite February 4, 2021 04:13

Quote:

Originally Posted by vinerm (Post 755848)
Hi

Do note that DEFINE_HEAT_FLUX is not meant for applying the heat flux condition, rather to alter the interactions between temperature and heat flux. For the purpose of applying a profile, DEFINE_PROFILE is to be used.

Vinerm

Hi there,


Could you find the answer?
I have the same problem in my project.


Regards.


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