ME 58:143 Computational Fluid & Thermal Engineering Computer Lab #3 BENARD CONVECTION PROBLEM Introduction: Overall description of the problem and grid: This time we’ll solve a classical problem: Benard convection. In this problem we solve coupled momentum equations and energy equation by applying Boussinesq approximation. To observe the famous Benard convection cells, we need to set a range gTd 3 for Rayleigh number Ra , where is the thermal expansion coefficient, k is thermal diffusivity, k is the thermal conductivity, is kinematic C p viscosity, T=Tbottom-Ttop, d is the channel height. You can set your Ra between 106 ~109, which can be manipulated by changing d and T. On the other hand, T should not be larger than 20 oC for Boussinesq approximation to hold. The following are values of some parameters of liquid water at 60 oC in standard unit. 983.3 5.29e-4 (dynamical viscosity) 4.71e-4 Cp 4180 k 0.654 The grid for this problem is very simple, i.e. just a rectangular computational domain, as sketched below. L y cold wall d x warm wall 1. In the sketch, x is in the horizontal direction, and y is in the vertical direction. Gravity will act downward (in the -y direction). 2. The bottom wall will be hotter than the top wall, so that a thermal instability is possible. 3. The aspect ratio for the computational domain AR=L/d can be varied from 8 to 12. The channel height d can be varied from 0.025 to 0.09. A convenient way is to set d=2 in GAMBIT(L also needs to be changed according to your AR) to generate a basic grid, then rescale the grid to the real geometry in FLUENT. 1 Launch Gambit: 1. Enter "gambit -id benard &" 2. In the upper left of the screen, Solver-Fluent 5/6. Create some data points (vertices) for the desired geometry: 1. First, create a vertex at the lower-left corner of the computational domain. In Geometry, Vertex Command Button-R-Create Vertex-From Coordinates. In Create Real Vertex-Global, enter 0, -d/2, and 0 for x, y, and z coordinates respectively. Type an appropriate label for this vertex, i.e. "bottom left", and Apply. A vertex is created, as indicated by a small plus sign at this location. 2. Vertices need to be created at the other three corners of the domain. Create another vertex with coordinates (0,d/2,0), where d is the distance between the upper and lower channel walls. You can call it "top left" or something like that. Similarly, create a vertex at (L,d/2,0) called "top right", and one at (L,-d/2,0) called "bottom right", where L is the assigned horizontal length of the computational domain. 3. Zoom in to see the vertices more clearly. The easiest way to do this is Fit to Window in the Global Control area on the lower right of the Gambit screen. 4. In the main Gambit window near the upper left, File-Save. This will save your work so far. It is a good idea to do this every so often, especially after a major task is completed. Create edges from these vertices to define the computational domain: 1. Now some edges will be created to define the computational domain. Under Geometry, Edge Command Button. (Note: If the button is already open, clicking it again will make the options disappear! If this happens, click it again.) 2. Under Edge, right mouse click the top left icon, which is called Create Edge, and then Straight. (In this learning module from now on, this type of command which requires a right click of the mouse will be denoted by R-Create Edge-Straight.) Note that the straight edge option should be the default. 3. Select the two top-most vertices, type in a label ("top" is suggested, as on the figure), and Apply. A yellow line should appear indicating successful creation of this edge. 4. Similarly, create straight edges called "left", "bottom", and "right". Note: When creating the left and right edges, be sure to choose the bottom vertex first, and then the top vertex, so that the edge direction is up for both of these edges. This is important because these edges will be defined with periodic boundary conditions, and they must therefore be oriented identically. 5. Now Close the Create Straight Edge window. 2 Generate a face defining the computational domain: 1. Under Geometry, Face Command Button-R-Form Face-Wireframe. 2. It is important to select the edges in order when creating a face from existing edges. (I like to select them in mathematically positive counterclockwise order). Select the four edges just created. These edges outline a closed face. 3. In Create Face From Wireframe, type in a label for this face if desired ("domain" is suggested), and Apply. If all went well, a pretty blue outline of the face should appear on the screen; this is a face, which is now ready to be meshed. Link the right and left edges so they can be defined as periodic: 1. We want the left and right edges to be periodic, which means that whatever fluid flows out of or along the right edge goes into or along the left edge. To do this properly, these two edges must be linked. In Operation, Mesh Command ButtonEdge Command Button. 2. In Edge, R-Link/Unlink Edges-Link. 3. In Link Edge Meshes, select the left edge for Edge. Left click the mouse on the Link With Edge text area, and select the right edge. The arrows which appear on the selected edges must be in the same direction (up) for this to work properly. Check the box for Periodic if it is not chosen by default. Apply. Close. Specify the boundary types on all edges: 1. In order for the mesh to be properly transferred to Fluent, the edges must be assigned boundary types, such as wall, axis, etc. In Operation, Zones Command Button-Specify Boundary Types Command Button. 2. In the Specify Boundary Types window, change Entity to Edges (the default is usually Faces). In this problem, which is 2-D, boundary conditions will be applied to edges rather than to faces. 3. Select the top-most edge of the computational domain, which was labeled "top". Change Type to Wall, if necessary (that is usually the default) and type in the name "top" or "upper". Apply. Some words indicating this boundary condition will appear on the screen. 4. Similarly, make the bottom-most edge a wall called "bottom" or "lower". 5. Select both the left and right edges, and assign their boundary type simultaneously as Periodic, with the label "periodic". 6. Now Close the Specify Boundary Types window, and save your work. Define node points along the edges: 1. In Operation, Mesh Command Button-Edge Command Button-Mesh Edges. 3 2. Select the two horizontal edges (top and bottom), and in Mesh Edges, change the Spacing option from Interval Size to Interval Count. Enter the desired number of node points (some value between 100 and 150 is recommended here) as the Interval Count. 3. No clustering or bunching of nodes is required in this problem, so keep Ratio (in the Grading section of the Mesh Edges window) as 1.0. Apply. Blue circles should appear at each created node point along these two edges. 4. Now select the two vertical edges, and apply nodes to each of these (between 20 and 30 nodes are recommended). 5. Now all the necessary edges have been assigned nodes; Close the Mesh Edges window. Save your work. Generate the mesh on the face: 1. Under Mesh, Face Command Button. The default window that pops up should be Mesh Faces. If not, Mesh Faces. 2. Select the face by shift clicking on one of its edges. Elements should be Quad by default; if not, change it. Also change Type to Map if necessary. The Spacing options will be ignored since nodes have already been defined on the appropriate edges of this face. 3. Generate the mesh by Apply. If all goes well, a structured mesh should appear. 4. You can now Close the Mesh Faces window. Write out the mesh in the format used by Fluent, and then exit Gambit: 1. In the main Gambit window, File-Export-Mesh-Accept. Check the box for Export 2-D(x-y) mesh if it is not chosen by default. 2. When the Transcript (at lower left) informs you that the mesh is done, File-ExitYes. 3. Check the file benard.msh existing in your working directory. Set up the Fluent model: 1. Start Fluent in its 2-D mode (enter "fluent 2d &") and read in the grid you just created with Gambit. 2. Rescale your grid if your grid geometry is not the real one. Grid-Scale, change the Scale Factor for x and y, respectively. 3. Turn on heat transfer: Define-Models-Energy, check Enable Energy. OK. 4. Turn on gravity in the negative y-direction: Define-Operating Conditions. Turn on Gravity. Enter "-9.81" (m/s2) in the Y text box. 5. Notice the default operating temperature under Boussinesq Parameters. Set this temperature to 60 oC (333.16 K), which will be the temperature of the lower wall. 4 It is tempting to specify an operating density here too, but the help panels say that it is not necessary to specify operating density when using the Boussinesq approximation. OK. Define the fluid as liquid water with the Boussinesq approximation: 1. The default fluid is air, which must be changed to water. In the main Fluent window, Define-Materials-Database. Select water-liquid from the Fluid Materials drop down list. Copy. Close. 2. Now turn on the Boussinesq model: In the Materials window, make sure waterliquid is selected from the Fluid Materials drop down list. In the section of this window called Properties, open the drop down list for Density. Change from constant (the default) to boussinesq. 3. For some reason, the default reference density becomes zero. Change this to the appropriate reference density for water at 60 oC. 4. Similarly, scroll down through the other fluid properties, and enter the appropriate values at our reference temperature. Note that Fluent does not automatically update these properties at our specified reference temperature, so these must be changed by hand. 5. Change/Create. 6. Finally, Close the Materials window. Define the boundary conditions: 1. Now the boundary conditions need to be specified. Define-Boundary Conditions. Select fluid. Set . Choose water-liquid from the list of Material Names. OK. 2. Now choose the lower wall. Set. Change Thermal Conditions to Temperature, and enter the desired temperature of the lower wall, which is the reference temperature in this problem, i.e. 333.16 K. OK. 3. Similarly, define the (cooler) temperature of the upper wall, according to your desired Rayleigh number. 4. Now Close the Boundary Conditions window. Initialize and iterate: 1. To initialize the solution, Solve-Initialize-Initialize. The default initial value of pressure is okay, but I recommend a small value for the initial velocity field (something like 0.001 m/s in the y direction), just to give the flow some initial "kick" to help set up the instability. Also, set the temperature everywhere to some kind of average between the lower and upper limits. Init and Close. 2. Set the convergence criteria for the continuity residual to about 1.E-06, as described in previous learning modules. 5 3. Reduce the under-relaxation values to about half of their default values, as described in previous learning modules. 4. In addition, the discretization method recommended for natural convection flows is PRESTO!. (This can be changed by Solve-Controls-Solution.) 5. It is strongly recommended that you save your case and data files at this point, in case anything goes wrong. 6. Iterate towards a solution. If having difficulty converging, try this: Turn off the flow equations first, and just solve for the heat transfer. (Solve-Controls-Solution, and turn off the Flow equations.) This should converge very quickly to the basic state (steady state pure conduction through the fluid). Then turn the Flow equations back on and iterate some more. You may not be able to converge completely to residuals lower than 10-6. 7. Benard cells, if they appear, should be readily visible by displaying velocity vectors. 8. After the solution has converged, make a hardcopy plot of the velocity vectors, colored by velocity magnitude, if there are clear Benard cells. It is desirable here to zoom in to a couple cells so that the flow pattern is clear. Follow the directions given in previous learning modules if you don't remember how to generate hardcopies. Be sure to add your name and the Rayleigh number to the plot title. 9. Generate a plot of the streamlines over the entire computational domain if there are Benard cells: Display-Contours. Choose contours of Velocity and choose Stream Function-Surface Types-iso-surf. Display. Generate a hardcopy of the streamline pattern (make sure the entire domain is visible). This plot will be necessary for measuring the wavelength of the Benard cells. Save your calculations, repeat for another Rayleigh number, examine the Boussinesq approximation and exit Fluent: 1. In the main Fluent window, save your calculations. 2. Repeat the calculations for the other Rayleigh number (all you need to change is the temperature of the upper wall). I would suggest re-initializing the flow field. Make hardcopy plots as described above, but be sure to change the Rayleigh number on the plot title. Save these calculations as different file names if you have enough disk space available. 3. You also need to examine the Boussinesq approximation. You can shut off the Boussinesq approximation by setting thermal expansion coefficient to 0. Repeat the whole solution procedure. Can you observe the Benard cells this time? 4. Exit Fluent: File-Exit. Assignments (40pts): 1. Print out the residual plot for 2 cases with different Rayleigh number 6 2. Print out the velocity vector plot and the contour of stream functions for 2 cases 3. Print out the filled contour of temperature for 2 cases 4. Print out the filled contours of stream functions and temperature for the case without Boussinesq approximation 5. Discuss the results briefly 7