You are on page 1of 5

10.1.

1 Parabolic Velocity Inlet Profile in a Turbine Vane

http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.htm

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.

1z5

2012-01-09 13:17

10.1.1 Parabolic Velocity Inlet Profile in a Turbine Vane

http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.htm

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.

2z5

2012-01-09 13:17

10.1.1 Parabolic Velocity Inlet Profile in a Turbine Vane

http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.htm

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...

3z5

2012-01-09 13:17

10.1.1 Parabolic Velocity Inlet Profile in a Turbine Vane

http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.htm

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 function above. 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.

4z5

2012-01-09 13:17

10.1.1 Parabolic Velocity Inlet Profile in a Turbine Vane

http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node229.htm

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

5z5

2012-01-09 13:17

You might also like