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

2D UDF for inlet y velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2016, 19:45
Default 2D UDF for inlet y velocity
  #1
New Member
 
Keyu Dhingani
Join Date: Dec 2015
Location: San Diego, CA
Posts: 3
Rep Power: 10
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, 06:01
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
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.


ps: you asked in a topic and created another one with exactly the same question. there is no need to do that.
Bruno Machado is offline   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 inlet velocity profile mismatch with Fluent ChristineL Fluent UDF and Scheme Programming 15 November 25, 2016 07:45
Having trouble adapting serial UDF to work in parallel muyuntao Fluent UDF and Scheme Programming 1 November 10, 2015 14:42
Velocity boundary condtion UDF help victoryv Fluent UDF and Scheme Programming 2 October 9, 2012 16:27
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11
UDF component in Cyliderical Velocity? Hongchan Kim FLUENT 3 April 24, 2001 13:20


All times are GMT -4. The time now is 18:46.