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/)
-   -   Initializing (https://www.cfd-online.com/Forums/fluent-udf/242438-initializing.html)

p.norouzi.gv April 21, 2022 17:13

Initializing
 
1 Attachment(s)
I defined a UDS function, and now I am trying to give an initial amount to the UDS. I used the DEFINE_INIT macro, but in the boundaries, the UDS amount is equal to 0. I would be happy to hear your ideas to solve this problem.


DEFINE_INIT(my_init_func,d)
{
cell_t c;
Thread *t;
real xc[ND_ND];

/* loop over all cell threads in the domain */
thread_loop_c(t,d)
{

/* loop over all cells */
begin_c_loop_all(c,t)
{
C_CENTROID(xc,c,t);
//**FI**
C_UDSI(c,t,0)=7000;
//**FIa**

}
end_c_loop_all(c,t)
}
}

AlexanderZ April 21, 2022 22:30

to define variables on boundaries you may use begin_f_loop macro to loop over faces


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