CFD Online Logo CFD Online URL
Home > Forums > FLUENT


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

LinkBack Thread Tools Display Modes
Old   September 1, 2008, 15:31
Posts: n/a
Hi people im a newbie of Fluent and i want put the profile of velocity on x direccion and a source term on x-momentum. So i copied the exemples of Fluent Manual. I did two files, one for profile (profile.txt) and other for source (source.txt). On Fluent i selected the Fluid and chose the source term. I chose on Boundary Conditions for inlet the velocity profile. So, when i Interpreted the its all ok but when i select Iterate appear the follow error: xmom_source:wrong return type: void udf function expect. My flow is turbulent and the fluid is air. How i can fixed that. Thank you for all help

#include "udf.h" /* must be at the beginning of every UDF you write */

DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f;

begin_f_loop(f,thread) /* loops over all faces in the thread passed

in the DEFINE macro argument */



y = x[1];

F_PROFILE(f,thread,index) = 1.5*pow(y/42,0.14);

} end_f_loop(f,thread) } ********SOURCE********* #include "udf.h"

#define C2 100.0

DEFINE_SOURCE(xmom_source, c, t, dS, eqn) { real x[ND_ND]; real con, source; C_CENTROID(x, c, t); con = C2*0.5*C_R(c, t)*x[1]; source = -con*fabs(C_U(c, t))*C_U(c, t); dS[eqn] = -2.*con*fabs(C_U(c, t)); return source; }

  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
contribution of convective source in total source? Antony Phoenics 4 July 30, 2008 05:15
Volumetric source or Inlet source Kumar CFX 0 May 12, 2008 09:33
profile as BC bohis FLUENT 0 April 16, 2008 07:18
Source and Source coefficient Ramcharan CFX 0 February 13, 2008 08:27
how to identify profile file source? Ralf Schmidt FLUENT 0 November 8, 2006 10:45

All times are GMT -4. The time now is 00:29.