



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Proceedings of FEDSM’ 1998 ASME Fluids Engineering Division Summer Meeting June 21-25, 1998, Washington,DC
*W.J. Devenport and J.A. Schetz****
Virginia Polytechnic Inst. and State Univ. Blacksburg, VA
Simple JAVA computer codes for boundary layer problems intended for student use solving the homework problems in a text such as Boundary Layer Analysis by Schetz, 1993 and similar problems on a PC or Work Station have been developed. The notion is to make platform- independent codes conveniently available via the internet. At this point, there are four separate codes for: 1) Thwaites-Walz incompressible, laminar integral method, 2) incompressible, laminar boundary layers by an implicit numerical method, 3) Moses, incompressible turbulent integral method, and 4) incompressible turbulent boundary layers by an implicit numerical method. A brief description of each code precedes the operating instructions. Also, a default input for a typical example and results for that case are presented and discussed.
Cf skin friction coefficient H * shape factor M Mach number p pressure r(x) body thickness distribution Re Reynolds number Ro body nose radius s(x) surface distance
*Associate Professor of Aerospace and Ocean Engineering, Member ASME ** J. Byron Maupin Professor of Aerospace and Ocean Engineering, Fellow ASME
T temperature K turbulent kinetic energy u streamwise velocity U (^) e (x) edge velocity distribution U (^) inf freestream velocity v transverse velocity x axial and streamwise coordinate y transverse coordinate */ w )dp/dx Clauser pressure gradient parameter boundary layer thickness
Here, we present simple JAVA computer codes that are intended for student use solving the homework problems in a text such as Boundary Layer Analysis by Schetz, 1993 and other similar problems on a PC or Work Station. The JAVA language was selected so that such codes could be made conveniently available in a platform-independent form on the internet. These codes are not intended for use by working professionals in the field. The goal has been to keep the
formulation, logic and programming as simple as possible so that the student can easily grasp the flow of the calculations. Thus, primitive variables ( u,v ); ( x,y ) are employed with no transformations. These codes are meant only to relieve the student of the burden of writing and debugging numerous codes during a course. The hope is to thereby leave sufficient time and energy for the working of actual boundary layer problems of reasonable complexity. The student is not relieved of the burden to think. One should always estimate the answer the computer solution is expected to yield. For example, one could use a simple integral solution to estimate the level of the skin friction to be expected. The student is the analyst, not the computer, and he or she is responsible for producing and interpreting the correct answer. At this point, there are four separate codes for the various methods covered: 1) Thwaites-Walz incompressible, laminar integral method, 2) incompressible, laminar boundary layers by an implicit numerical method, 3) Moses, incompressible turbulent integral method, and 4) incompressible turbulent boundary layers by an implicit numerical method. A brief description of each code precedes the operating instructions. Also, a default input for a typical example and results for that case are presented and discussed. Detailed development of the methods can be found in the referenced text. Earlier FORTRAN versions of these codes are also in that reference. For any boundary layer problem, one must specify the IOXLG WKURXJK GHQVLW\ DQG YLVFRVLW\^ RU SHUKDSV MXVW kinematic YLVFRVLW\ ,Q YDULDEOHGHQVLW\ YDULDEOHSURSHUW
cases, an equation of state and property variation information must also be given. The next information needed would be the freestream velocity U (^) inf and the inviscid edge velocity distribution, U (^) e (x). For high-speed flows, Mach numbers, Minf and Me (x), are needed. With heat transfer or compressible flow, the wall temperature, T (^) w(x) , or the wall heat transfer distribution and Tinf and Te (x) are required. Next is the matter of initial conditions. The integral methods only require initial values of quantities like θ , and Cf at x (^) init. The differential methods need initial profiles of u and v at x (^) init. For turbulent cases, one must select the turbulence model, e.g. mixing length model, eddy viscosity model or TKE model with the Prandtl Energy Method. The TKE method requires an initial profile and boundary conditions for K. Finally, the computational region must be selected. With an integral method, this is simply the length of interest. The differential methods require the height and the length of the computational region. The height should grow with streamwise distance to accommodate the growth in thickness of the boundary layer. The programs here are based on the untransformed equations to keep the codes simple, so the user must pick a computational region high enough at the initial station to accommodate the estimated growth of the boundary layer by the downstream end of the computational region. The last matter concerns the choice of the step size(s). The integral methods only need a choice of dx , while the
differential methods need dx and dy. This is normally accomplished by picking the number of points across the height and length of the region. For simplicity, most the codes included here have fixed step sized in the x and y directions. For a laminar flow, about 20-25 points across the boundary layer are sufficient. Thus, knowing the thickness of the boundary layer at the initial station permits a reasonable choice for dy. With the boundary layer approximation, we can take dx >> dy , and a value of dx^ ≈δ i/2^ is usually adequate. For a turbulent flow a stretched grid in the y direction is much more efficient, but that was not implemented in the interests of simplicity. Therefore, a large number of grid points is necessary, about 1000 points across the boundary layer.
This program is an implementation of the Thwaites- WALZ integral method for incompressible, laminar boundary layer flows. Refer to Sec. 2-3-2 in Schetz (1993) for a description of the technique (and Appendix B in the same reference for the original FORTRAN code). A default input set is included for the following flow problem. This is the same as the original worked example. Example Laminar Integral Method Problem: Consider 2D laminar flow of a fluid with a kinematic viscosity = 2.0x10- m^2 /s at Uinf = 10.0 m/s over a surface that is a flat plate from the leading edge to x = 1.0 m. At that station, a ramp begins that produces an inviscid velocity distribution U e( x ) = 10.5 - x /2, m/s. This is an adverse pressure gradient, since U e is decreasing so that p increases. Calculate the boundary layer development over this surface up to x = 2.0 m. Does the flow separate? Solution: We must provide input data for the kinematic viscosity as = 2e-4 and the freestream velocity as Uinf = 10.0. Select NMAX = 41 to give dx = 0.05. The body thickness distribution, r(x) , can be specified. The code will then calculate the surface distance along the body. The default is r(x) = 0.0. Blunt bodies need input for Ro. Finally, the inviscid velocity distribution is required. Since this case has a bi-linear edge velocity variation, velocities at only a few points including xinit and xfin need to be specified to define the distribution. The window in Fig. 1 shows the input information for the default case. On the left are two panels containing the input data for this case. The input data in the far left panel can be changed by selecting the item to be changed with the menu button, entering the new value in the slot below and pushing SET. The input data in the next panel to the right can be changed in a similar manner. One might wish to change the dimensionless edge velocity distribution, U e/ Uinf and the body shape. All that is required is to enter or modify sets of values for x, r and U e/ Uinf in the panel below and push SET. The code will fit a spline through the points used as input. Then, press the START button and watch the skin friction and the integral quantities develop in the graphs on the right. The
U e/ Uinf. All that is necessary is to enter or modify sets of values for x and U e/ Uinf in the panel below and push SET. Now, press the START button and watch the skin friction and the integral quantities develop in the graphs on the right. The window given in Fig. 6 shows the results about halfway through the calculation. Tabular values of the output can be accessed in the panel indicated. One can scroll up and down in the table with the slider bar and left and right with the cursor.
The fourth code implements an implicit numerical solution method for I ncompressible, T urbulent B oundary L ayer flows with three options for the turbulence model: 1) mixing length model, 2) eddy viscosity model and 3) Prandtl TKE model. See Secs. 7-9 and 7-10 in Schetz (1993) for details of the development (and the original FORTRAN code in Appendix B). For simplicity, a uniform grid spacing in the normal direction is employed. Thus, a large number of grid points in that direction must be used to obtain accurate results. Use at least 500 points across the initial boundary layer. A default case corresponding to the following example problem is shown. This is the same as the original worked example, recast here in SI units. The equations are solved in dimensionless form using the freestream velocity, Uinf , a reference length, L , (taken as 1.0 for convenience), and reference viscosity and density, (^) inf and (^) inf. The input must be in that form, and the output is given in that form. Profiles for u and v at the initial station are required. For simplicity, we have adopted the Law of the Wake velocity profile for u and v = 0 as approximations. The user must supply the value of the Clauser pressure gradient parameter, */ w)dp/dx, at the initial station so the Law of the wake can construct a suitable profile. Example Turbulent Numerical Method Problem: Consider 2D turbulent flow of a fluid with a kinematic viscosity = 9.3x10- m^2 /s (1.0x10-5^ ft^2 /s) at Uinf = 3.049 m/s (10.0 ft/s) over a flat plate from x = 1.524 to 1.829 m (5.0 to 6.0 ft.) Use all three turbulence models and compare the results. Solution: The simple integral solution (see Sec. 7-7 in Schetz, 1993) can be used to obtain "initial" conditions at x = 1.524. Thus, the numerical calculation will begin at xinit = 1.524 and go to xfin = 1.829 m. We must again provide input data for the kinematic viscosity as = 9.3e-7 m^2 /s and the freestream velocity as Uinf = 3.049 m/s. The integral solution at x = 1.524 m gives the boundary layer thickness, delta = 0.0261 m, and the Blasius turbulent skin friction law gives Cf = 0.00267. Choose 601 points across the initial boundary layer ( dy = 4.35e-5) and add points above that to give MMAX = 999. Pick NMAX = 101 to give dx = 0.0030. :HDGRSWWKH/DZRIWKH:DNHYHORFLW\SURILOH ZLWK for this case) for u and v = 0 as adequate approximations. Since this case is a constant edge velocity variation, velocities at only two points, at xinit and xfin need be specified. Again, Ue is normalized with Uinf in the code.
Lastly, the turbulence model must be selected. The default value is 1 which indicates a mixing length model. This is all displayed in the window in Fig. 7. To change the input data in the far left panel, select what item is to be changed with the menu botton, enter the new value in the slot below and push SET. It is easy to change the turbulence model and compare the results to those for the mixing length model. The input data in the next panel to the right can be changed in a similar manner as for ILBLI. Press the START button and watch the skin friction, integral quantities and the U/U e velocity profile develop. The window given in Fig. 8 shows the results about halfway through the calculation. The initial oscillations in skin friction are because the assumed initial velocity profiles are not exact. Tabular values of the output can be accessed in the panel.
All of these programs make use of tablular input (of edge velocity and coordinates) and tablular output (of boundary layer parameters and profiles). Data may be copied into or out of these tables using standard cut/paste/copy operations. For example, results may be pasted into Excel or a similar program so that the student can plot them in a presentable form. This compatibility with the 'clipboard' and other native applications is a very important element of the programs, since it largely overcomes the limitation of JAVA programs not being able to read or write files on the hard disk. It also opens up the possibility of developing a suite of applets that the student can use in combination to investigate the solution to more general problems. For example, we are in the process of developing a panel code applet and an applet to determine transition location given laminar boundary layer parameters as a function of streamwise distance. Given a geometry in the form of a paneling scheme, the panel code will provide edge velocity and coordinates as table output, and these may then be pasted into the WALZ program and a laminar boundary layer computed. Results from WALZ may then be pasted into the transition calculator whose output is used to initialize one of the turbulent boundary layer applets. The current suite of codes can be found under Boundary Layer Applets at: http://www.engapplets.vt.edu. Primary candidates for additional codes in the near future are one for numerical solution of compressible, laminar boundary layers and one for turbulent jets and wakes.
William Devenport acknowledges the support of the National Science Foundation under grant DUE-
Schetz, J.A., 1993, Boundary layer Analysis, Prentice Hall, Englewood Cliffs, NJ.
Figure 1. Input data for the default case in theWALZ code.
Figure 2. Sample output for the default case from theWALZ code.
Figure 3. Input data for the default case in theILBLI code.
Figure 7. Input data for the default case in theITBL code.
Figure 8. Sample output for the default case from theITBL code.