6
10.1.1 Parabolic Velocity Inlet Profile in a Turbine Vane Consi der t he tur bine vane illustrated in Figure 10.1.1. An unstructured grid is us ed t o model the flow field surroundi ng the vane. The domain exte nds from a periodic boundary on the bottom to an identical one on the top, a velocity inlet on the left, and a pressure outlet on the right. Figure 10.1.1: The Grid for the Turbine Vane Example A flow field in which a constant  x velocity is appli ed at the inlet will be compared with one where a  parabolic  x velocity profile is applied. While the a ppli cation of a profile using a piecewise-linear profile is available with the boundary profiles option, the spec ification of a polynomi al can only be accomplis hed  by a user-defined function. The results of a consta nt-velocity applied field (of 20 m/sec) a t the inlet are shown i n Fig ures 10.1.2 and 10.1.3. The initial constant velocity field is distorted as the flow mov es around the turbine vane. 10.1.1 Pa rabo lic Velocit y I nlet Profile in a T urb in e V an e http://202 .118. 25 0.111:8080/f lu ent/Flu en t60_ help/h tm l/udf/n ode 229.ht 1 z 5 2012-01-09 13:1

ProfilPredko Help

Embed Size (px)

Citation preview

Page 1: ProfilPredko Help

8/3/2019 ProfilPredko Help

http://slidepdf.com/reader/full/profilpredko-help 1/5

10.1.1 Parabolic Velocity Inlet Profile in a Turbine Vane

Consider the turbine vane illustrated in Figure 10.1.1. An unstructured grid is used to model the flow field

surrounding the vane. The domain extends from a periodic boundary on the bottom to an identical one on

the top, a velocity inlet on the left, and a pressure outlet on the right.

Figure 10.1.1: The Grid for the Turbine Vane Example

A flow field in which a constant  x velocity is applied at the inlet will be compared with one where a

 parabolic  x velocity profile is applied. While the application of a profile using a piecewise-linear profile is

available with the boundary profiles option, the specification of a polynomial can only be accomplished

 by a user-defined function.

The results of a constant-velocity applied field (of 20 m/sec) at the inlet are shown in Figures 10.1.2 and

10.1.3. The initial constant velocity field is distorted as the flow moves around the turbine vane.

.1 Parabolic Velocity Inlet Profile in a Turbine Vane http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.ht

5 2012-01-09 13:1

Page 2: ProfilPredko Help

8/3/2019 ProfilPredko Help

http://slidepdf.com/reader/full/profilpredko-help 2/5

Figure 10.1.2: Velocity Magnitude Contours for a Constant Inlet  x

Velocity

Figure 10.1.3: Velocity Vectors for a Constant Inlet  x Velocity

The inlet  x velocity will now be described by the following profile:

where the variable  y is 0.0 at the center of the inlet, and extends to values of 0.0745 m at the top and

 bottom. Thus the  x velocity will be 20 m/sec at the center of the inlet, and 0 at the edges.

.1 Parabolic Velocity Inlet Profile in a Turbine Vane http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.ht

5 2012-01-09 13:1

Page 3: ProfilPredko Help

8/3/2019 ProfilPredko Help

http://slidepdf.com/reader/full/profilpredko-help 3/5

A UDF is used to introduce this parabolic profile at the inlet. The C source code ( vprofile.c) is shown

 below. The function makes use of Fluent-provided solver functions that are described in Section 5.3.

/***********************************************************************//* vprofile.c *//* UDF for specifying steady-state velocity profile boundary condition *//***********************************************************************/#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position){

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, position) = 20. - y*y/(.0745*.0745)*20.;

}end_f_loop(f, thread)

}

The function, named inlet_x_velocity, is defined using DEFINE_PROFILE and has two arguments:

thread and position. Thread is a pointer to the face's thread, and position is an integer that is a

numerical label for the variable being set within each loop.

The function begins by declaring variable f as a face_t data type. A one-dimensional array x and

variable y are declared as real data types. A looping macro is then used to loop over each face in the

zone to create a profile, or an array of data. Within each loop, F_CENTROID outputs the value of the face

centroid (array x) for the face with index f that is on the thread pointed to by thread. The  y coordinate

stored in x[1] is assigned to variable y, and is then used to calculate the  x velocity. This value is then

assigned to F_PROFILE, which uses the integer position (passed to it by the solver based on your 

selection of the UDF as the boundary condition for  x velocity in the Velocity Inlet panel) to set the  x

velocity face value in memory.

To make use of this interpreted UDF in FLUENT, you must first compile it.

Define  User-Defined  Functions  Interpreted...

.1 Parabolic Velocity Inlet Profile in a Turbine Vane http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.ht

5 2012-01-09 13:1

Page 4: ProfilPredko Help

8/3/2019 ProfilPredko Help

http://slidepdf.com/reader/full/profilpredko-help 4/5

In the Interpreted UDFs panel, name your function in the Source File Name field. If necessary, enter 

your C preprocessor type in the CPP Command Name field and the size of the stack under Stack Size.

Turn on Display Assembly Listing to see an assembly listing in your console window as the function

compiles. Click on Compile and then Close the panel.

To select this user-defined function as the velocity boundary condition for the zone of choice, open the

Velocity Inlet panel.

In the X-Velocity drop-down list, select udf inlet_x_velocity, the name that was given to the functionabove. This function will now be used, rather than the value of (in this example) 0 that appears in the

X-Velocity field. Click on OK to accept the new boundary condition and close the panel.

After the solution is run to convergence, a revised velocity field is obtained as shown in Figures 10.1.4

and 10.1.5. The velocity field shows a maximum at the center of the inlet, which drops to zero at the

edges.

.1 Parabolic Velocity Inlet Profile in a Turbine Vane http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.ht

5 2012-01-09 13:1

Page 5: ProfilPredko Help

8/3/2019 ProfilPredko Help

http://slidepdf.com/reader/full/profilpredko-help 5/5

Figure 10.1.4: Velocity Magnitude Contours for a Parabolic Inlet  x

Velocity

Figure 10.1.5: Velocity Vectors for a Parabolic Inlet  x Velocity

Previous: 10.1 Boundary Conditions

Up: 10.1 Boundary Conditions

Next: 10.1.2 Transient Velocity Inlet

© Fluent Inc. 2001-11-29

.1 Parabolic Velocity Inlet Profile in a Turbine Vane http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.ht