CFD Online URL
Home > Forums > FLUENT

A sample UDF in Fluent Documenation

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

LinkBack Thread Tools Display Modes
Old   April 8, 2003, 22:03
Default A sample UDF in Fluent Documenation
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)



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?

  Reply With Quote

Old   April 8, 2003, 23:44
Default Re: A sample UDF in Fluent Documenation
Alex Munoz
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]



  Reply With Quote


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
UDF for Viscoelastic Fow in Fluent skris2009 FLUENT 2 September 20, 2011 00:59
Please, Help with linking UDF precompiled outside fluent to fluent!!! gracerlima Fluent UDF and Scheme Programming 1 May 4, 2010 08:19
solving a conduction problem in FLUENT using UDF Avin2407 Fluent UDF and Scheme Programming 0 April 13, 2010 02:49
fluent UDF external library lapack problem Rick FLUENT 0 May 7, 2008 11:16
developing FLUENT UDF programs by VC++ 6.0 IDE huang peng FLUENT 2 February 25, 2007 15:58

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