CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Check UDF (http://www.cfd-online.com/Forums/fluent/33482-check-udf.html)

stephen e April 15, 2004 08:45

Check UDF
 
I'm at present having several problems with the UDF below. The udf should mark the boundary cells with a value of 1. I have used it before with no problems but can't see whats wrong!

The problems:

1)firstly it acutally marks what seems to be a random selction of cells, inculding some of the boundary cells and then; 2)crashes out half way through one iteration!

The UDF:

DEFINE_EXECUTE_AT_END(Delta_EXP1)

{

Domain *domain;

Thread *thread;

Thread *Boundarythread;

face_t Boundaryface;

cell_t cell;

int j;

domain = Get_Domain(1);

thread_loop_c(thread,domain)

{

begin_c_loop (cell,thread)

{

C_UDMI(cell,thread,0)=0;

j=0;

c_face_loop(cell,thread,j);

{

Boundaryface =C_FACE(cell,thread,j);

Boundarythread =C_FACE_THREAD(cell,thread,j);

if(BOUNDARY_FACE_THREAD_P(Boundarythread))

{

C_UDMI(cell,thread,0)=1;

}

else

{

C_UDMI(cell,thread,0)=0;

}

}

}

end_c_loop(cell,thread)

}

return;

}

If someone can help or check it, I would be most grateful.

Stephen e

stephen e April 15, 2004 09:51

Re: Check UDF
 
Problem solved !!!!


All times are GMT -4. The time now is 09:39.