CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   heat flux in a solid slab (https://www.cfd-online.com/Forums/fluent/65659-heat-flux-solid-slab.html)

achauha1 June 22, 2009 15:23

heat flux in a solid slab
 
I have solid square slab of 12mmX 12mmX 200um. i have to divide it into four sub-volumes of equal volumes and then assign a different heat flux value to each one of them.I made the udf to do this .I can interpret and initialize it but but when i iterate, I receive following error

chip-exec: heat_flux1: wrong return type: float udf function expectedchip-exec: heat_flux1: argument 1: incorrect type (36): int expected
Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()


My udf is as follows:

#include "udf.h"

DEFINE_INIT(heat_flux1,d)
{
real x[ND_ND];
real a;
cell_t c;
Thread *t;

thread_loop_c(t,d)

begin_c_loop(c,t)
{
C_CENTROID(x,c,t);
if( x[0]<=0.006)
{
if (x[2]<=0.006)
a= 1e9;
else
a= 5e8;
}
else
{
if (x[2]<=0.006)
a = 3e8;
else
a = 9e8;
}
C_T(c,t)=a;
}
end_c_loop(c,t)

}


Please, someone help me out
Thanks in advance

achauha1 June 22, 2009 15:34

i am working on this problem since 2 days and still couldn't figure out what is going wrong. Please , help me.

thanks


All times are GMT -4. The time now is 19:53.