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

A sample UDF in Fluent Documenation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2003, 21:03
Default A sample UDF in Fluent Documenation
  #1
majestywzh
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?

  Reply With Quote

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

  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
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


All times are GMT -4. The time now is 06:49.