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

which macros should I use in udf?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2016, 09:13
Default which macros should I use in udf?
  #1
Member
 
志新高(Zhixin Gao)
Join Date: Aug 2014
Location: hz.China
Posts: 30
Rep Power: 11
zhixin is on a distinguished road
Hi all,
I'm doing some simulation using species transport model(no reaction) and k-e model, and I need to calculate some variation using udf. Here is the formula I used: the mass fraction of o2 in the cell near the wall(mass_frac) to divide the distance of the centroid of the first layer (dist). Here is the part I plan to use to calculate in fluent.

real CR;
real dist;
real mass_frac;
cell_t c;
thread_loop_c(t,d)
{
if(THREAD_ID(t)==36)//elbow ID
{
begin_c_loop(c,t)
mass_frac=C_YI(c,t,0);//mass fraction of o2
dist=C_WALL_DIST(c,t);//centroid of first layer
CR=mass_frac/dist;
end_c_loop(c,t)
}
}

but I don't know which macros to use even if I looked up the help document. And I also wander how can I do to display the contour of CR.

Anyone can give me some advice?
Thanks.
zhixin 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
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 07:26
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
Grid Macros for UDF elena FLUENT 0 May 9, 2006 08:44
UDF Macros tom FLUENT 1 April 26, 2006 05:40
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 07:02.