CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Asking help about some statements in UDF (https://www.cfd-online.com/Forums/fluent/69176-asking-help-about-some-statements-udf.html)

artin haroutunian October 14, 2009 08:26

Asking help about some statements in UDF
 
Hi there, I'm a graduate mechanical engineering student and i need to use UDF to do a project. I have come across some statements whose functions are not clear for me. I'll be so thankful if someone explains their function to me. Here is the beginning part of the source code:
DEFINE_ADJUST(psi_adjust, domain)
{
/* Check the number of user defined-scalars */
if (n_uds < N_REQUIRED_UDS)
Internal_Error("wrong number of user defined scalars allocated");
/* Fill a user defined scalar with the axial momentum source term */
Thread_loop_c (t, domain)
{
if (NULL != THREAD_STORAGE(t,SV_UDS_I(RHO)))
{
begin_c_loop (c,t)
{
.... (and it goes on)
I want to know 1)what does the second "if" statement do and what's "RHO"? 2)Is the statement "n_uds<N_REQUIRED_UDS" something known for fluent? Because they (n_uds and N_REQUIRED_UDS) were not declared anywhere in the source file!!!
Thanks a lot


All times are GMT -4. The time now is 11:12.