CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

Sos!!! Udf code

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

LinkBack Thread Tools Display Modes
Old   August 8, 2012, 08:53
Default Sos!!! Udf code
New Member
Join Date: Oct 2011
Posts: 14
Rep Power: 6
Jo_vivian_lee is on a distinguished road
Hi there,
I am working on a UDF CODE which is as below, but it doesn`t work for me, could you please check what mistakes I have made? Thank you in advance.
I think the problem is the function what I used, I want to describe that power 1/6 of (0.003125-fabs(x)), how? and also, x should be an absolute value

#include "udf.h"
real pos[ND_ND];
real x, t;
face_t f;
begin_f_loop(f, thread)
F_CENTROID(pos, f, thread);
F_PROFILE(f,thread,index) =pow((0.003125-fabs(x)),(1/6))*39.75287884+0.3*15.2*sin(1600*3.1415926*t);
end_f_loop(f, thread)

Last edited by Jo_vivian_lee; August 8, 2012 at 09:23.
Jo_vivian_lee is offline   Reply With Quote

Old   August 16, 2012, 00:09
Senior Member
Join Date: Aug 2011
Posts: 315
Rep Power: 12
blackmask will become famous soon enough
Use 1.0/6 instead of 1/6, the latter is 0 which may not what you expected. Also make sure that abs(x) does not exceed 0.003125
blackmask is offline   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
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
UDF code yahya_azizi Fluent UDF and Scheme Programming 4 August 6, 2012 08:06
Brownian Motion UDF Code Confuser FLUENT 1 November 1, 2005 11:37
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 22:58.