CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

UDF problems - velocity profile

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 30, 2008, 07:47
Default UDF problems - velocity profile
  #1
Oli
Guest
 
Posts: n/a
Hi everybody.

I'm trying to create a non uniform velocity profile at inlet ; the same as you can find it in the Fluent Docs.

The source code is

#include "udf.h"

DEFINE_PROFILE(x_velocity,thread,index)

{

real x[ND_ND];

real y;

face_t f;

begin_f_loop(f,thread)

{

F_CENTROID(x,f,thread);

y = x[1];

F_PROFILE(f,thread,index) = 30.0-30.0*(y*y)/(1.5*1.5)

}

end_f_loop(f,thread)

}

now i try to compile the source code

--> Define --> User Defined Functions --> Interpreted (as it is shown in the Fluent Docu)

But I always get the error : Error: /.../... : line 2 : syntax Error

Do i overlook something?

Fluent is running on a Linux operating system.

  Reply With Quote

Old   January 30, 2008, 17:15
Default Re: UDF problems - velocity profile
  #2
BG
Guest
 
Posts: n/a
F_PROFILE(f,thread,index) = 30.0-30.0*(y*y)/(1.5*1.5)

You forgot the semi colon at the line end

  Reply With Quote

Old   January 31, 2008, 05:37
Default Re: UDF problems - velocity profile
  #3
Oli
Guest
 
Posts: n/a
oh yes, thx

but there's still the same error ... other udf's (for example residence_time with DEFINE_SOURCE) are working without problems....
  Reply With Quote

Old   February 3, 2008, 06:13
Default Re: UDF problems - velocity profile
  #4
shehab abdelrahman
Guest
 
Posts: n/a
hi try replace the (index) in line 2, with just(i)... best regards, shehab
  Reply With Quote

Old   September 30, 2013, 15:39
Default Velocity Profile
  #5
New Member
 
Yunusrulz
Join Date: Apr 2012
Posts: 10
Rep Power: 5
yunusrulz is on a distinguished road
Hi, I want to keep velocity inlet in compressible flow.. since compressible flow allows mass flow inlet I kept same mass flow inlet profile... but it keeps changing as simulation progresses. so i wanna keep velocity inlet in a compressible flow problem.. but the simulation strucks some where.. it shows divergence error.. so is there any way to keep velocity inlet in compressible flow with pressure based solver and laminar flow ??
yunusrulz is offline   Reply With Quote

Reply

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
(ask) how to create UDF for inlet velocity profile sincity Fluent UDF and Scheme Programming 43 July 9, 2014 13:01
UDF parallel velocity inlet profile Armengol FLUENT 3 September 30, 2009 15:08
Prescribed inflow velocity profile - how to? Alan Main CFD Forum 10 October 28, 2005 12:14
UDF velocity profile problem Steve FLUENT 0 January 18, 2005 13:11
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 11:21


All times are GMT -4. The time now is 21:17.