CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF problems (https://www.cfd-online.com/Forums/fluent/37557-udf-problems.html)

Winnie August 17, 2005 03:18

Re: UDF problems
 
Thanks, dirk

I gave up using UDF and turned to the field function to post processing it. Actually I followed the same procedure as yours. But I can not get the non zero value. I am not sure what is the problem.

Thank you anyway for all your help.

Winnie

xiaozhao2008 March 15, 2011 09:26

Would you please explain the functions, such as Alloc_Storage_Vars(), Scalar_Reconstruction(), Scalar_Derivatives() and their arguments?
thanks a lot!


Quote:

Originally Posted by pUl|
;123286
Here is an example:

#include "udf.h"
#define CON 1

DEFINE_ADJUST(store_gradient, domain)
{
Thread *t;
Thread **pt;
cell_t c;
int phase_domain_index = 0.;
Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,phase_domain_index);
{
Alloc_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_N ULL);
Scalar_Reconstruction(pDomain, SV_VOF,-1,SV_VOF_RG,NULL);
Scalar_Derivatives(pDomain,SV_VOF,-1,SV_VOF_G,SV_VOF_RG,
Vof_Deriv_Accumulate);
}


mp_thread_loop_c (t,domain,pt)
if (FLUID_THREAD_P(t))
{
Thread *ppt = pt[phase_domain_index];

begin_c_loop (c,t)
{
C_UDMI(c,t,0) = C_VOF_G(c,ppt)[0];
}
end_c_loop (c,t)
}
Free_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NU LL);
}


mahdi-united February 29, 2020 04:32

Quote:

Originally Posted by xiaozhao2008 (Post 299496)
Would you please explain the functions, such as Alloc_Storage_Vars(), Scalar_Reconstruction(), Scalar_Derivatives() and their arguments?
thanks a lot!

hi
what are the arguments for this macro for accessing mass fraction?


All times are GMT -4. The time now is 10:54.