CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Why can't I obtain the temperature gradient? (https://www.cfd-online.com/Forums/fluent/46454-why-cant-i-obtain-temperature-gradient.html)

Eddy October 30, 2007 13:34

Why can't I obtain the temperature gradient?
 
I wrote a macro with DEFINE_EXECUTE_AT_END for my 2-phase eulerian model.

DEFINE_EXECUTE_AT_END(name) {

cell_t c;

Thread *t_mix,*t_p1;

thread_loop_c(t_mix, d)

{

if(FLUID_THREAD_P(t_mix))

{

t_p1=THREAD_SUB_THREAD(t_mix, 0);

begin_c_loop(c, t_mix)

{

C_UDMI(c,t_mix,0)=C_T_G(c, t_p1)[0]*0.01; }

end_c_loop(c,t_mix)

}}}

I have hook the enthalpy source term for the phase-1 and phase-2, and I need to use C_UDMI(c,t_mix,0) to express the mass transfer rate in the mass source terms. Compilation is OK, but there is "segmentation violation" signal afther I click "iteration". I patched an initial value to UDMI-0, because i have to use the value in a DEFINE_ADJUST macro. Need help!!!


All times are GMT -4. The time now is 20:01.