|
[Sponsors] |
August 31, 2021, 12:50 |
Validating heat flux profile
|
#1 |
New Member
YADU KRISHNAN N
Join Date: Aug 2021
Posts: 14
Rep Power: 4 |
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) } |
|
August 31, 2021, 12:55 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 |
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". |
|
August 31, 2021, 23:37 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you have a typo
to be Code:
F_CENTROID(x,f,tf);
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
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 |