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

UDF problems

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2005, 04: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: 15
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

Old   February 29, 2020, 05:32
Default
  #23
Senior Member
 
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6
mahdi-united is on a distinguished road
Quote:
Originally Posted by xiaozhao2008 View Post
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?
mahdi-united is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 08:37
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
problems with UDF to set contact angle poiuy219 Main CFD Forum 0 April 30, 2009 11:43
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12:29


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