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

(ask) how to create UDF for inlet velocity profile

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   May 29, 2013, 05:04
Default salam
  #41
New Member
 
tehran
Join Date: May 2013
Posts: 3
Rep Power: 5
armanrazy is on a distinguished road
hi amir .can i ask u about sth about b.c with udf
armanrazy is offline   Reply With Quote

Old   August 14, 2013, 12:05
Default Defining TOP HAT VELOCITY profile
  #42
New Member
 
Yunusrulz
Join Date: Apr 2012
Posts: 10
Rep Power: 6
yunusrulz is on a distinguished road
I want to define a top hat velocity profile at my inlet. I dont know the code to define top hat velocity profile. does any body know it. Please answer.
yunusrulz is offline   Reply With Quote

Old   January 14, 2014, 05:58
Red face Velocity inlet UDF in fluent
  #43
New Member
 
Akshay Khadse
Join Date: Sep 2013
Posts: 11
Rep Power: 4
Ammofreak is on a distinguished road
hi guys,

I want to use a user defined function for velocity inlet for following conditions:

v_x = (2/3)*z for z = 0 to 30
v_x = 20 for z = 30 to 70
v_x = (200/3)-(2/3)*z for z = 70 to 100

It is for 3D compressor cascade inlet. I do not know how to write such functions.
Can anyone help me?
Ammofreak is offline   Reply With Quote

Old   July 9, 2014, 13:01
Default
  #44
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 5
Sherlock_1812 is on a distinguished road
Hello,

I have a 2D axisymmetric geometry where I want to impose a non uniform velocity field in the fluid region (not a boundary, but the internal field). I have the coordinates and the axial and radial velocity components from a previous simulation.

How do I go about importing this into the current case. Also is there a better way to store the velocity value other than File -> Export?

Thanks in advance
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   January 12, 2016, 11:03
Thumbs up Periodic BC DDPM, UDF
  #45
Member
 
Rupesh Verma
Join Date: Jun 2013
Posts: 64
Rep Power: 5
roopesh99 is on a distinguished road
Dear Friend,
I am using, DDPM simulation using ANSYS 14.5, for a simple system. I used inlet as periodic and outlet as shadow in ANSYS for making it periodic but after making periodic I have no control on the inlet (I am unable to specify mass flow rate inlet), it is showing option to specify pressure gradient.
Thanks for helping in advance!!!
roopesh99 is offline   Reply With Quote

Old   April 25, 2016, 18:41
Default UDF for inlet y velocity 2D
  #46
New Member
 
Keyu Dhingani
Join Date: Dec 2015
Location: San Diego, CA
Posts: 3
Rep Power: 2
Keyu is on a distinguished road
Hi,

I have seen and used UDFs for the inlet x velocity, but what do I do to make a UDF for inlet y velocity.

Here is the UDF that I used for inlet x velocity.
[
#include "udf.h"
#define umean 10.0
#define R 0.0005
DEFINE_PROFILE(inlet-x-velocity,t,i)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f,t,i) = (3./2.)*umean*(1-pow((y-R)/R,2));
}
end_f_loop(f,t)
}
]

I tried replacing x with y and vice versa to hopefully get the y-direction velocity, but unsuccessful.

Any suggestions here will be useful.

Thanks,
Keyu
Keyu is offline   Reply With Quote

Old   April 26, 2016, 04:58
Default
  #47
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 240
Rep Power: 5
Bruno Machado is on a distinguished road
Quote:
Originally Posted by Keyu View Post
Hi,

I have seen and used UDFs for the inlet x velocity, but what do I do to make a UDF for inlet y velocity.

Here is the UDF that I used for inlet x velocity.
[
#include "udf.h"
#define umean 10.0
#define R 0.0005
DEFINE_PROFILE(inlet-x-velocity,t,i)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f,t,i) = (3./2.)*umean*(1-pow((y-R)/R,2));
}
end_f_loop(f,t)
}
]

I tried replacing x with y and vice versa to hopefully get the y-direction velocity, but unsuccessful.

Any suggestions here will be useful.

Thanks,
Keyu
This line varies the position along the X, Y, Z axis (0,1,2 respectively).

y = x[1];

If you want a velocity profile normal to the Y direction, you need to use the variation of the position in the X direction if 2D and X and/or Z direction if 3D.
Bruno Machado is online now   Reply With Quote

Old   April 27, 2016, 11:09
Default
  #48
Member
 
Rupesh Verma
Join Date: Jun 2013
Posts: 64
Rep Power: 5
roopesh99 is on a distinguished road
Dear
u r right..
roopesh99 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
UDF problems - velocity profile Oli Fluent UDF and Scheme Programming 4 September 30, 2013 15:39
How to create non-uniform velocity profile in FLUENT? pankaj FLUENT 6 March 29, 2012 05:46
udf for velocity profile in a geometry having two inlets shubham208011 Fluent UDF and Scheme Programming 0 April 6, 2009 15:13
UDF velocity and temperature Raj FLUENT 3 February 1, 2009 19:29
UDF velocity profile at nodes Emad FLUENT 2 January 29, 2009 07:35


All times are GMT -4. The time now is 07:09.