|October 17, 2009, 07:24||
Join Date: Oct 2009
Posts: 3Rep Power: 7
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:
/* 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)))
.... (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!!!
I also have another question about how does fluent deal with terms of a user defined scalar equation. I want to know if it is necessary to define all 4 terms (unsteady,diffusion,convection and source) of a UDS equation even if some of them are equal to zero!? I mean for example if the UDS has only diffusion and source terms, is it necessary to set convetive and unsteady sources equal to zero or fluent does this autumatically. Or is it ok to only define a diffusion coefficient equal to "1" to specify the laplace equation!?
I'll be so thankful if someone helps me.
Thanks a lot [IMG]file:///C:/Users/Artin/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif[/IMG]
|Thread||Thread Starter||Forum||Replies||Last Post|
|UDS problem with wall boundary condition||Alex F.||FLUENT||14||August 6, 2014 05:08|
|natural convection problem for a CHT problem||Se-Hee||CFX||2||June 10, 2007 06:29|
|Adiabatic and Rotating wall (Convection problem)||ParodDav||CFX||5||April 29, 2007 19:13|
|problem in solving "wave generation" problem||san||FLUENT||2||April 3, 2006 23:37|
|Is this problem well posed?||Thomas P. Abraham||Main CFD Forum||5||September 8, 1999 14:52|