Heat flux at the boundary
The gradient of temperature is not available at the boundary faces. But the In my test case I had a wall surface with id =6 and defined a heat flux bc there. The following UDF implemented over that case yielded the same value of heat flux as was specified in the BC. #include "udf.h" DEFINE_ON_DEMAND(boundary_heat_flux) { Domain *d=Get_Domain(1); int id=6; /* for my case the wall surface id was 6 and I checked heat flux at that surface by providing a heat flux boundary condition */ Thread *t=Lookup_Thread(d,id); face_t f; real A[ND_ND]; begin_f_loop(f,t) { F_AREA(A,f,t); Message("Wall_Heat_Flux=%f",BOUNDARY_HEAT_FLUX(f,t)/NV_MAG(A)); } end_f_loop(f,t) } |
||
![]()
|