CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

UDF problems

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   August 17, 2005, 03:18
Default Re: UDF problems
  #21
Winnie
Guest
 
Posts: n/a
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
  Reply With Quote

Old   March 15, 2011, 10:26
Default
  #22
New Member
 
Join Date: Jan 2011
Posts: 6
Rep Power: 7
xiaozhao2008 is on a distinguished road
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);
}
xiaozhao2008 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
parse error while interpreting udf Kristin Fluent UDF and Scheme Programming 3 March 15, 2012 07:43
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
problems with UDF to set contact angle poiuy219 Main CFD Forum 0 April 30, 2009 10:43
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29


All times are GMT -4. The time now is 19:40.