|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
KAKI
Join Date: Aug 2011
Posts: 13
Rep Power: 3 ![]() |
hello, I want to simulate the heat transfer by convection in a cavity, the cavity subjected to a heat flux in terms of (y), q = 1-(y/0.04)*(y/0.04),
i want the udf of heat flux. thanks.... |
|
|
|
|
|
|
|
|
#2 | |
|
Senior Member
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 266
Rep Power: 9 ![]() |
Quote:
Code:
#include "udf.h"
/* profile for heat flux*/
DEFINE_PROFILE(heatflux_profile, t, i)
{
real x[ND_ND]; /* this will hold the position vector */
face_t f;
begin_f_loop(f, t)
{
F_CENTROID(x, f,t);
F_PROFILE(f, t, i) =1.-(x[1]/0.04)*(x[1]/0.04);
}
end_f_loop(f, t)
}
|
||
|
|
|
||
![]() |
| Thread Tools | |
| Display Modes | |
|
|