|
[Sponsors] |
March 4, 2016, 10:13 |
which macros should I use in udf?
|
#1 |
Member
志新高(Zhixin Gao)
Join Date: Aug 2014
Location: hz.China
Posts: 30
Rep Power: 12 |
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. |
|
|
|
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 08:26 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
Grid Macros for UDF | elena | FLUENT | 0 | May 9, 2006 09:44 |
UDF Macros | tom | FLUENT | 1 | April 26, 2006 06:40 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |