CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF inlet velocity profile mismatch with Fluent (https://www.cfd-online.com/Forums/fluent-udf/72735-udf-inlet-velocity-profile-mismatch-fluent.html)

 ChristineL February 16, 2010 16:11

UDF inlet velocity profile mismatch with Fluent

I am prescribing a velocity profile at the inlet of my mesh. Fluent compiles the c file fine and the solution does converge. However, the velocity profile that I am inputting is a parabola and Fluent does not plot the correct shape of my profile at the inlet. My UDF code is show below. My y coordinates start at zero and goes to 0.0093 m.
Any ideas on why Fluent is not interpreting the correct velocity profile would be appreciated.

#include "udf.h"
#include "mem.h"

/** Parameter Constants **/

#define wallspeed 7.0711

#define finalheight 0.0093

#define height 0.001

/***************** Inlet Velocity Profile in Slot *****************/
{
real x[ND_ND];
real y;
face_t f;

{
y = fabs(x[1]);
}
}

 ekakavand February 22, 2010 16:17

profile in the velocity inlet

hi...

i have this problem,too.

thanks,
elahe

 Goldsstean February 23, 2010 03:01

Ohhhh,

There is problem in your geometry creation.

Remember the velocity profile given for pipe, y= something something...

for e.g the pipe is of diameter 1m on y axis. you should construct it as (y=+0.5 and y=-0.5 and centre of pipe should be at "zero")

either you can make changes in udf but i feel that is tidious(not that much).

Amol

 ekakavand February 24, 2010 05:43

hi Goldsstean

it's a bit odd, my case is a canal and i want to make wave in that. 'y' in my case is calculate from the bottom of canal , is different with pipe,ya?
do you try yoursef?

best
elahe

 Goldsstean February 24, 2010 05:48

 ekakavand February 24, 2010 08:23

i model a canal with 20 m lenght and 15 m height in 2d fluent.
i wanna generate wave in canal and i hook a udf file that velocity time varing was defined in it for x and y direction. wave is generated correctly but velocity profile plot is not correct and do not match with velocity countor. it seems velocity countor is right and match with theory but profile is wrong.

i set velocity inlet in the left border of canal. and in plot menu >xy plot> i write a file of velocity in this boundary. is my way right or not?

elahe

 saran15 February 10, 2012 06:06

how do give parabolic inlet velocity

how do give parabolic inlet velocity profile for supersonic nozzle

 maryamgh February 13, 2012 05:22

udf for velocity profile

dear all, i am new in fluent simulation. I write a udf file to define a terrain for my case. I use log law for velocity but I face to this massage: " number error floatingpoint error" .

this is my udf file:
#include "udf.h"
{
real x[ND_ND];
real y;
face_t f;
{
y = x[1];
}
}

 student00 February 14, 2012 02:50

UDF for density variation

Variable density was defined in the liquid state as
q = ql/[b(T - Tl) + 1] for 30C < T < 100 C, where q =
760 kg/m3, Tl = 30 C, and b = 0.0005 , with linearly
varying density in the ‘‘mushy” state, from 870 kg/m3
at 28 C to 760 kg/m3 at 30 C.

 Mahboobe365 June 21, 2013 14:42

Hi ekakavand,

In fluent if you use Grid or MEsh/ reorder domain/zones, it may help.

 Ravindra123 June 24, 2013 06:10

Do u get the solution to your problem? I am also getting the same problem but in giving the transient temperature profile.
Any help would be appreciated.

open channel problem

2 Attachment(s)
Hi everybody,
I have a problem with the wind pressure distribution on a building. As you can see from the attached picture (Picture 1), which I downloaded it from the internet, the pressure at the lower part of the building is much less than that at the upper part and this is expected to be happened because the wind velocity near the ground is much less than that at the top.
The problem I faced is that the wind pressure be the same along the height of the building (Picture 2). Does anyone can help me?

 yousefaz November 23, 2016 23:01

Hi Muhamed,

You need to define a velocity profile the varies with height at the inlet using a UDF. I would also suggest that you refine the mesh near the building.

By the way, do you happen to know the source for Picture 1?

Thanks
Y.A.Z

Quote:
 Originally Posted by yousefaz (Post 626659) Hi Muhamed, You need to define a velocity profile the varies with height at the inlet using a UDF. I would also suggest that you refine the mesh near the building. By the way, do you happen to know the source for Picture 1? Thanks Y.A.Z
Do you have a UDF for inlet velocity profile in an open channel? I couldn't find it in the INTERNET and I don't know how to write the UDF that I need.

Regarding Picture 1, as I remember, I took it from an article about air velocity distribution on a building.

 `e` November 25, 2016 04:32

Here is a UDF for defining a velocity profile along a boundary for wind modelling around buildings: http://www.cfd-online.com/Forums/flu...nd-height.html

Edit the following equation to your inlet velocity profile (z is the z-direction height in their UDF):

Code:

`F_PROFILE(f, thread, position) = 24.9 *pow(z,0.27);`

 Originally Posted by `e` (Post 626842) Here is a UDF for defining a velocity profile along a boundary for wind modelling around buildings: http://www.cfd-online.com/Forums/flu...nd-height.html Edit the following equation to your inlet velocity profile (z is the z-direction height in their UDF): Code: `F_PROFILE(f, thread, position) = 24.9 *pow(z,0.27);`