CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   wall boundary temperature - access violation (https://www.cfd-online.com/Forums/fluent-udf/119596-wall-boundary-temperature-access-violation.html)

igorb June 20, 2013 06:54

wall boundary temperature - access violation
 
Hello:

I'm writing an UDF function to calculate Mean radiant temperature in post processing and to be able to do that I need to call F_T(f, t) macro for every boundary (wall boundary) face from every single cell in the domain. So i've created face thread loops inside cell thread loop. Something like this:

DEFINE_ON_DEMAND(MRT)

Domain *domain = Get_Domain(1);
Thread *tc, *tf;
face_t f;
cell_t c;
thread_loop_c(tc, domain)
{
begin_c_loop(c, tc)
{
thread_loop_f(tf, domain)
{
begin_f_loop(f, tf)
{
...
temp = F_T(f, tf);
...
}
end_f_loop(f, tf)
}
end_c_loop(c, tc)
}


I've isolated the problem in F_T(f, t) macro which for some reason causes access violation. Other F_ macros like F_AREA() or F_CENTROID work just fine. And, also, when I replace F_T(f, ft) with some arbitrary wall temperatures UDF works just fine. For now I'm calculating wall temperatures from neighboring cell temperatures and temp. gradients but its bugging me why it won't work with F_T. I'm I doing something completely wrong?

Thanks in advance,
Igor.


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