|
[Sponsors] |
April 8, 2003, 21:03 |
A sample UDF in Fluent Documenation
|
#1 |
Guest
Posts: n/a
|
#include "udf.h"
DEFINE_PROFILE(pressure_profile, t, i) { real x[ND_ND];/* this will hold the position vector*/ real y; face_t f; begin_f_loop(f, t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f, t, i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5; } end_f_loop(f, t) } 1.I'd like to know what is mean of"ND_ND"in the declare real x[ND_ND]. 2."y = x[1]"returns the y component of cell centroid positioin,but how about the x component and z component? |
|
April 8, 2003, 22:44 |
Re: A sample UDF in Fluent Documenation
|
#2 |
Guest
Posts: n/a
|
hi Majestic friend
the real x [Nd Nd] give you the node coordinates the second question the centroids is an array of three float values that according with c programming the array start on 0 for the first value and finist on 2 for the thhird value x=x[0] y=x[1] z=x[2] Regards Alex |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
solving a conduction problem in FLUENT using UDF | Avin2407 | Fluent UDF and Scheme Programming | 1 | March 13, 2015 02:02 |
UDF for Viscoelastic Fow in Fluent | skris2009 | FLUENT | 2 | September 19, 2011 23:59 |
Please, Help with linking UDF precompiled outside fluent to fluent!!! | gracerlima | Fluent UDF and Scheme Programming | 1 | May 4, 2010 07:19 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 10:16 |
developing FLUENT UDF programs by VC++ 6.0 IDE | huang peng | FLUENT | 2 | February 25, 2007 14:58 |