CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   3D UDF Paraboilc Velocity Profile (Can't Maintain) (http://www.cfd-online.com/Forums/fluent/43413-3d-udf-paraboilc-velocity-profile-cant-maintain.html)

Sing January 20, 2007 04:17

3D UDF Paraboilc Velocity Profile (Can't Maintain)
 
I am simulating the air flow over a 3D building in a wind domain using a paraboilc velocity inlet profile.

The inlet profile is written by the following code, which is compiled into Fluent without any errors.

After 2000 iterations,the solution is converged, the velocity inlet profile at a point near to the entry is plotted, which agrees well with the udf profile.

However, as the velocity profile is plotted at a distance of 1000m away from the inlet, the profile is somehow distorted and does not have the same profile as the inlet profile.

The size of the wind domain is 3500(x) x 3500(y) x 150(z). The building is at a distance of 1200m from the inlet.

What can i do to maintain the Velocity Profile along the wind domain? Plz Help~~~~~

// UDF code for 3D parabolic Velocity Profile //

#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)

{

real x[ND_ND];

real z; // Vertical Distance

face_t f;

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

z = x[2];

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

}

end_f_loop(f, thread)

}


Laika January 20, 2007 05:07

Re: 3D UDF Paraboilc Velocity Profile (Can't Maint
 
Hi,

most probably, this is because the wall function used with the turbulence model is not compatible with the Atmospheric Boundary Layer profile you've implemented in the UDF. The wall functions are valid for small geometries (compared to yours) and relatively small cells. You just tapped a problem tat is very often neglected, but that chouldn't be neglected! You will have to play with the wall functions (I heard that's possible in v6.3) or with the k-eps model constants...

Can you provide some extra details on your project, simulation goals, findings, ... and we can probably help each other. I'll have to do an atmospheric dispersion problem soon, so it's a good time to start cooperating on these issues...

talk to you soon!

cheers, Laika, still orbiting


Sing January 20, 2007 05:29

Re: 3D UDF Paraboilc Velocity Profile (Can't Maint
 
Hi,

Thanks Laika for replying my message~

As i have posted in the previous email, i have to simulate the air flow over an isolated high-rise building, in order to observe the flow changes in the wake region in terms of velocity profile and TKE.

In my simulation, i am using the standard k-epsilon model as the first step to obtain some preliminary results.

The simluated results are satisfactory, like obseving recirculation behind the building. However, the problem is that the velocity profile at the front of the building is distorted and is actually quite different from the input parabolic velocity profile.

I am afraid that my simulated results would be very different from the results having perfect parabolic profile. Since one of my requirement is to carry out the simulation using various wind speed and profiles, so it is really important for me to keep the velocity profile up to the building.

I am using Fluent version 6.1.22 only, how can i modify the k-epsilon model constants as Laika mentioned before? Can you tell more information on that?

I can supply further information for my project if needed.

Thx

Sing


sri99iitm February 25, 2010 11:19

dude can u pls help with writing udf .
Im running simulation with a cylinder ,sphere inside it for Non Newtonian fluid.
I recently started working with fluent ,hope u could lead ur helping hand
Dimensions of cylinder
L=20cms
D=4cms
d(sphere)=2cms
Parabolic Velocity equation be V=Vmax(1-r/R)^(n+1/n)

my code:
#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)

{

real x[ND_ND];

real y,r,R;

face_t f;

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

r = pow(x,2)+pow(y,2);

// Vmax=4.1,R=o.o4//

F_PROFILE(f, thread, position) = Vmax *pow(1-r/R,(n+1)/n);

}

end_f_loop(f, thread)

}

Please tell the changes i have to make ,thank u

lehoang_mai September 27, 2010 06:50

Quote:

Originally Posted by sri99iitm (Post 247432)
dude can u pls help with writing udf .
Im running simulation with a cylinder ,sphere inside it for Non Newtonian fluid.
I recently started working with fluent ,hope u could lead ur helping hand
Dimensions of cylinder
L=20cms
D=4cms
d(sphere)=2cms
Parabolic Velocity equation be V=Vmax(1-r/R)^(n+1/n)

my code:
#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)

{

real x[ND_ND];

real y,r,R;

face_t f;

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

r = pow(x,2)+pow(y,2);

// Vmax=4.1,R=o.o4//

F_PROFILE(f, thread, position) = Vmax *pow(1-r/R,(n+1)/n);

}

end_f_loop(f, thread)

}

Please tell the changes i have to make ,thank u

I think, variables Vmax and n must declare in the fisrt time when you declared "Real y,R,r,Vmax,n". And variable n must assigned to any value.

niravtm007 August 27, 2011 11:36

velocity inlet for 3d parabolic equation.
 
hiii friends i am entirely new to using udf's in fluent. I have a cubical geometry, with two inlets on perpendicular adjacent faces. i have to implement udf to only one of the conditions.
i have two cases
1) parabolic velocity inlet ( space varient)
2) sinusodial velocity velocity inlet ( time variant)
can any one pls send me the udf ( codes) ...

niravtm007 August 31, 2011 01:09

. i have worked out with 2d udf for parabolic velocity inlet.
please help me how this code will change with 3d. i wanna know how will be the equation considering 3rd dimmension.
as in 2d we have V(x)=Vmax- y^2/(disatnce from centre in y direction )^2 * Vmax.
please help me.
also give suggestion how to work out on sinusoidal inlet udf.
thanks in advance

niravtm007 September 1, 2011 01:38

can you please explain how does this line fit int o your code
F_PROFILE(f, thread, position) = 24.9 *pow(z,0.27);
. i want to use 3d parabolic inlet mine is a cubical cell 1*1*1. inlet i a circular face of o.1 dia. please tell me how to modify according to my problem

ksbiefr September 17, 2014 18:40

could you please tell me
what is the exact equation you are using for developing Parabolic velocity profile in 3D.

smarika November 26, 2014 08:58

udf for inlet error
 
1 Attachment(s)
i have to simulate a wind turbine of 45 m radius. i have used this udf at the inlet but there are some error when i initialize from inlet as shown in the picture.can anyone please tell me why is this error. what can be done to correct it?
:confused:
#include "udf.h"
#define zo 10
#define uo 5

DEFINE_PROFILE(inlet_x_velocity,thread,index)
{
real x[ND_ND];
real z;
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);
z= x[2];
F_PROFILE(f,thread,index)=uo*pow(z/zo,0.16);
}
end_f_loop(f,thread)
}


All times are GMT -4. The time now is 10:53.