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

Validating heat flux profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2021, 12:50
Default Validating heat flux profile
  #1
New Member
 
YADU KRISHNAN N
Join Date: Aug 2021
Posts: 14
Rep Power: 4
Yadu krishnan is on a distinguished road
I have used following UDF for neumann boundary condition as heat flux profile. How can I validate if it is working fine?


#include "udf.h"
DEFINE_PROFILE(Heat_flux,thread,position)
{
Thread *t;
Thread *tf;
cell_t c;
face_t f;
real x[ND_ND];
real cell[ND_ND];
int n;
int k = 1;
real wf;
real nc;
real temp;
real tempgrad ;
real Twall=100;
real delta;
begin_c_loop_all(c,t)
{
c_face_loop(c,t,n)
{
tf = C_FACE_THREAD(c,t,n);
if(THREAD_TYPE(tf) == THREAD_F_WALL)
{
f = C_FACE(c,t,n);
F_CENTROID(x,f,t);
wf = x[1];
C_CENTROID(cell,c,t);
nc = cell[1];
delta = wf-nc;
temp = C_T(c,t);
tempgrad= (temp - Twall)/delta ;
F_PROFILE(f, thread, position) = k * tempgrad;
}
}


}
end_c_loop_all(c,t)


}
Yadu krishnan is offline   Reply With Quote

Old   August 31, 2021, 12:55
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Apply it in a simple geometry, and see if the results are the same as what you calculate by hand.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build".
pakk is offline   Reply With Quote

Old   August 31, 2021, 23:37
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you have a typo
to be
Code:
F_CENTROID(x,f,tf);
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ 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
Heat Flux versus Wall Heat Flux: inlet - outlet energy, different values jmenendez CFX 1 February 14, 2021 16:55
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Heat flux profile UDF B.Hamada Fluent UDF and Scheme Programming 4 July 29, 2014 09:07
Heat flux profile UDF B.Hamada Fluent UDF and Scheme Programming 11 July 18, 2014 21:39
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44


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