CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Set value of cell to face. (https://www.cfd-online.com/Forums/main/89163-set-value-cell-face.html)

Emzeten June 6, 2011 17:50

Set value of cell to face.
 
Hello, my problem is that i need to assign to faces a values of nearest cells. I need to have on faces a value of Strain Rate to compute good values of Strain Rate gradient. Without this I have 0 on walls and gets wrong value of gradient. I know I can use Adjacent Cell Index (F C0, F C1) but i dont know how exactly I should do this. Thanks for help.

DEFINE_ADJUST(AT_BEGIN,domain)
{
cell_t c;
Thread *t;
face_t f;

thread_loop_c(t,domain)
{
begin_c_loop_all(c,t)
{
C_UDSI(c,t,1)=C_STRAIN_RATE_MAG(c,t);
}
end_c_loop_all(c,t)
}


All times are GMT -4. The time now is 03:15.