ME 634-001 HOMEWORK #3 Spring 2016 Burgers’ equation, 1 2 1 uxx , (1) u x = −px + 2 Re is a widely-used model for studying numerical procedures intended for application to the Navier– Stokes (N.–S.) equations. The similarities between this equation and the N.–S. equations are obvious. Moreover, by assigning px in judicious ways it is possible to produce exact solutions to this equation that exhibit essentially any desired mathematical properties, including turbulence-like behaviors. In this assignment you will study a model for turbulent Poiseuille flow. It should be observed that the mean velocity for turbulent flow does not follow the parabolic profile familiar from the laminar case, as the figure shows. ut + x 1 1.0 0.8 0.6 0.4 0.2 0 0.0 0 0.2 0.4 0.6 0.8 u1 This corresponds to the empirical formula 1/n , u(x) = 4x(1 − x) (2) √ where n is often assigned the value 7. It is possible to show that n = 1/ f where f is the friction factor of the Colebrook formula for pipe flow; and from this, the approximation n = 2 1 + (Re − Rec )0.0933 (3) can be obtained. Here, Rec denotes the transition Reynolds number taken to be Rec = 1750 for the present calculations. You will produce results for all of exact solution, DNS, RANS and LES methods for this problem, as described below. The same Fortran 77/90 source code works for all approaches, and the solution method is selected via flag values supplied in the input file; the file names are: brgrs-stdnt-trblnt-16.f inputfle.d The Fortran code solves Eq. (1) for all methods needed for this exercise without any coding required of the user. There will, however, be some coding needed for data post processing as described below. Carry out the following analyses and calculations to produce the results you are expected to report for this assignment. 1 1. Exact Solution. Run the code and save output files (burgers-xctfnl.out and burgersxctavg.out) for the exact solution at the final time and the time-averaged (over a specified time of stationarity) exact solution employing nx = 5001, nt = 100000, mthdflg = −1, nmap = 50, and tk = 1 × 10−5 . This should be done for Re = 3 × 103 , 2 × 104 , and 1 × 105 . These parameters are all set in the input file, and details of their meaning can be found at the beginning of the Fortran code listing as well as in the input file, itself. You may wish to immediately plot these results to get an intuitive feel for the form taken by the velocity profile and how this changes with Re. 2. DNS. Repeat Prob. 1 using the DNS option of the code (mthdflg = 0), but observe that this is not true DNS because the order of accuracy of the numerical methods employed is insufficient. Use length-scale estimates presented in lecture to determine the grid spacing (number of grid points) needed for a solution that is fully resolved for each value of Re, and compare this with the numbers you will actually use, given below. Note that grid refinement will never exactly reproduce the exact solution in this case. Nevertheless, for each value of Re, conduct grid-function convergence tests using grids consisting of 501, 1001, and 2001 points using tk = 2 × 10−4 , 1 × 10−4 , and 5 × 10−5 , respectively (i.e., fixed Courant number). You will need to choose different numbers of time steps, nt, depending on Re, so that stationarity has been achieved for a sufficiently long time for time averaging of the solution to provide meaningful results. This may require as many as 100000, or more, time steps for higher Re cases. You can qualitatively determine the time at which stationarity is achieved by viewing output provided in the file time-series.out. Then you can set a value of nstat (in the input file) to permit averaging to start only after stationarity has been reached. For each value of Re use your most accurate (finest-grid) DNS results to construct plots showing the comparison of these to the exact solutions for both the final time results (contained in the file burgers-dnsfnl.out) and the time average of this (file burgers-dnsavg.out). Also, be sure to record the run time for each calculation; you will use these data in your report for comparison with RANS and LES run times. 3. RANS. Derive the Reynolds-averaged form of Burgers’ equation, and include this derivation in your report. Apply the Boussinesq hypothesis to this result, and within the confines of the mixing-length models provide a formula for eddy viscosity νT . Then repeat Prob. 2 using the unsteady and RANS options together (mthdflg = 1, istdy = 0 in the input file) and employing the basic mixing-length model for which ℓmix = c1 x provided in lecture. For each value of Re perform calculations using grids of nx = 101, 201 and 401 points, and time step tk = 5× 10−4 . Run a sufficient number of time steps, nt, and corresponding settings of nstat to guarantee accurate time averages. Investigate the effect of changing c1 on each grid. In addition, (for extra credit) you may wish to consider using the Van Driest damping function with possible alteration of the constant A+ 0 with code entered near line 385 in subroutine brgrs of the Fortran code. If this proves successful, you may want to attempt adjusting the value of c1 to produce better solutions. 4. LES. Derive the LES form of Burgers’ equation in terms of an arbitrary, unspecified filter, and present this in your write up. Apply the Boussinesq hypothesis, in the form of the Smagorinsky subgrid-scale (SGS) model, to this equation to obtain a formula for SGS eddy viscosity νSGS . Carry out LES calculations with the same Burgers’ equation code used previously, now with mthdflg = 2. Use grids of 1001, 501 and 251 points with time step sizes tk = 1 × 10−4 , 2 2 × 10−4 , 4 × 10−4 , respectively. Note that it may be required to alter both grid spacing and time step size as Re increases. a. Assume that LES calculations should be resolved down to the Taylor microscale. Use this to determine required total arithmetic as a function of Re for these calculations. In particular, estimate the number of grid points needed for each value of Re. (Be sure to include this analysis in your final report.) b. As noted above, your code employs the Smagorinsky SGS model. The Smagorinsky constant, CS , is entered in your input data file as c2. For each value of Re, attempt to find an optimal value of CS for a grid consisting of 1001 points. Note that because now temporal fluctuations are contained in the resolved solution (unlike in RANS methods, but like DNS), longer integrations (up to nt = 100000) may be needed to obtain accurate time averages. After finding CS for the 1001-point grid, perform calculations for 501and 251-point grids. Determine whether CS is grid dependent, and discuss. c. Construct plots, and carry out analyses, for LES analogous to those already done for DNS and RANS. d. (Extra Credit) You may wish to investigate implicit LES (ILES), and compare its behavior with that of usual LES and DNS. This can be done in either of two ways: i) use mthdflg = 0 (DNS), but employ a smaller value for the filter parameter; or ii) use mthdflg = 2 (LES) but set c2 (the Smagorinsky constant) to zero—causing νSGS to be zero. This will also require using a smaller value of the filter parameter. Consider using numerical experiments to find the best value for this parameter, and note whether it changes with Re. You might also try to solve problems with higher values of Re than can be efficiently handled with usual LES, say up to 108 , on the same relatively course grids used for the basic LES calculations. 5. Make the following additional plots summarizing information from all (DNS, LES and RANS) calculations: i) run times as a function of Re on the finest grid used for each of DNS, LES and RANS—all on the same plot, ii) time-averaged (from the most highly-resolved grid for each case) solutions, all on the same plot, for exact, DNS, LES and RANS, for each Re (separate plots for each Re), and iii) final time solutions (again, on the most highly-resolved grid) for exact, DNS and LES. Thoroughly discuss these results. 6. Calculate νT (or νSGS , as appropriate), and make separate (spatial) plots of these and k vs. x. On each plot show results for all values of Re based on the finest-grid calculation and the exact solution. Finally, compute u+ and y+ —actually x+ in our notation—(describe in detail in your analysis section how you compute these) for all four (4) solution types: exact, DNS, RANS and LES. Use time-averaged results in all cases, and for RANS, LES and DNS methods do calculations based on the finest grid employed for each Re for each method. Then, again for each value of Re, plot u+ vs. x+ for all four types of solutions on the same plot—but separate plots for each Re. Discuss these results in the context of the corresponding plot from boundary-layer theory. 7. To rigorously test whether RANS and LES results converge to DNS solutions, use each of these methods with the same fine grid and number of time steps employed for DNS with Re = 2 × 104 and 1 × 105 ; namely, use nx = 2001 spatial grid points and nt = 100000 time steps. For each Re plot time-averaged LES and DNS results on the same graph with RANS results. Similarly, plot the highly-resolved LES solution at the final time on the same graph 3 with the corresponding DNS solution for both values of Re. Thoroughly discuss these results in light of properties of dependent-variable decompositions and forms of small-scale models for both RANS and LES, and with consideration of discussions associated with Prob. 5. Your results are to be presented in the form of, at least, a rough draft—but preferrably a final form for submission—of an archival journal paper. (It is recommended to download a style file from any top fluids, math or physics journal, and use it.) This must include a title and author (you) and an abstract, and the following sections: Introduction, Analysis, Results/Discussion and Summary/Conclusions as well as a reference list formatted in a style accepted by a typical journal. This reference list should include at least five (5) entries beyond possible citation of your texts and lecture notes, as may or may not be appropriate. These references should present both experimental and computational results for turbulent Poiseuille flow. It is expected that you will have read all of the cited literature, and that you will comment on these papers in your introduction and possibly elsewhere in the paper. 4