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

Urgent! Help on UDF to set inlet velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 26, 2005, 06:18
Default Urgent! Help on UDF to set inlet velocity
  #1
Ray Hong
Guest
 
Posts: n/a
Dear Friends,

I tried to use UDF to set the inlet velocity. The geometry and B.C. are as follows:

wall

----------------------------------- i | |o n | |u l | |t e | |l t | |e

| |t

| |

|---------------------------------|

| | w | |wall

-----------------------------------

wall

The inlet velocity is parabolic and the UDF is as follows:

/************************************************** ***********************/ /* udf.c */ /* UDF for specifying a steady-state velocity profile boundary condition */ /************************************************** ***********************/

#include "udf.h"

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

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

y = x[1];

F_PROFILE(f, thread, index) = 0.4 - 2.5 * (y-0.6)*(y-0.6);

} end_f_loop(f, thread) }

The 2ddp solver is used. The real type was tried to change to double but not useful.

The interpreted and compiled schemes were used respectively to set the inlet B.C. but in vain.

Could you tell me what's wrong?

Thank you very much in advance.

Ray
  Reply With Quote

Old   December 26, 2005, 08:25
Default Re: Urgent! Help on UDF to set inlet velocity
  #2
loop
Guest
 
Posts: n/a
Hi, Can you write exactly what is wrong? What is happening with the profile? I am asking because at glance the entire syntax of the udf looks ok. Regards

  Reply With Quote

Old   December 27, 2005, 01:29
Default Re: Urgent! Help on UDF to set inlet velocity
  #3
Ray Hong
Guest
 
Posts: n/a
The udf was pasted before.

The problem is that the computed inlet velocity profile is almost uniform. Sorry, I could not paste the computed results there.

Could you tell me your email number so that I could send the jpg files to you?

Thank you.

Ray
  Reply With Quote

Old   December 28, 2005, 01:47
Default Re: Urgent! Help on UDF to set inlet velocity
  #4
Ray Hong
Guest
 
Posts: n/a
The mistake in udf was solved.

The program works OK.

Thank you any way.

Ray
  Reply With Quote

Old   December 30, 2005, 13:32
Default Re: Urgent! Help on UDF to set inlet velocity
  #5
loop
Guest
 
Posts: n/a
sorry for not responding. good it works. regards
  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
udf parabolic velocity inlet with unsteady case Faruk Beyca FLUENT 4 June 24, 2022 11:45
UDF parallel velocity inlet profile Armengol FLUENT 3 September 30, 2009 16:08
USED UDF for inlet velocity in 3D sara FLUENT 0 October 11, 2007 19:04
Urgent! Help on UDF to set B.C. of 3rd type Ray Hong FLUENT 0 December 28, 2005 20:35
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 12:21


All times are GMT -4. The time now is 04:03.