Fluent Wave Tutorial
Fluent Wave Tutorial
Introduction
The purpose of this tutorial is to illustrate the setup and solution of the 2D laminar uid ow in a tank with oscillating motion of a wall. The oscillating motion of a wall can generate waves in a tank partially lled with a liquid and open to atmosphere. Smooth waves can be generated by setting appropriate frequency and amplitude. One of the tank walls is moved to and fro by specifying a sinusoidal motion. In this tutorial you will learn how to: Read an existing mesh le in FLUENT. Check the grid for dimensions and quality. Add new uid in the materials list. Set up a multiphase ow problem. Use the dynamic mesh model. Set up an animation using Execute Commands panel.
Prerequisites
This tutorial assumes that you have little experience with FLUENT but are familiar with the interface.
Problem Description
In this tutorial, we consider a rectangular tank with a length (L) of 15 m and width (W) of 0.8 m (Figure 10.1). The left wall is assigned a motion with sinusoidal time variation. The top wall is open to atmosphere and thus maintained at atmospheric pressure. The ow is assumed to be laminar.
10-1
Preparation
1. Copy the mesh le, wave.msh and libudf folder to your working directory. 2. Start the 2D double precision solver of FLUENT.
10-2
Check the domain extents to see if they correspond to the actual physical dimensions. If not, the grid has to be scaled with proper units. 4. Display the grid (Figure 10.2). Display Grid...
i. Under Options, enable Color by ID. ii. Click Close. (b) In the Grid Display panel, click Display (c) Zoom in near the moving-wall (Figure 10.3).
10-3
Grid (Time=0.0000e+00)
Grid
10-4
Step 2: Models
1. Specify the solver settings. Dene Models Solver...
(a) Under Time, enable Unsteady (b) Under Transient Controls, enable Non-Iterative Time Advancement. (c) Click OK. 2. Enable VOF multiphase model. Dene Models Multiphase...
10-5
(a) Under Model, enable Volume of Fluid. The panel expands to show the other settings related to VOF model. Retain the other settings as default. (b) Click OK.
Step 3: Materials
Dene Materials... 1. Add liquid water to the list of uid materials by copying it from the materials database.
10-6
10-7
i. Select water-liquid (h2o<l>) from the Fluent Fluid Materials list. Scroll down to view water-liquid. ii. Click Copy and close the panel. (b) Click Change/Create and close the panel.
Step 4: Phases
Dene Phases... 1. Set air as primary phase and water as secondary phase.
(a) Under Phase, select phase-1. The Type will be shown as primary-phase. (b) Click Set....
i. Change Name to air. ii. Select air in the Phase Material drop-down list. iii. Click OK. (c) Similarly, change the Name of phase-2 to water and set its Type to water-liquid. (d) Close the Phases panel.
10-8
(a) Enable Gravity. (b) Under Gravitational Acceleration, set Y to -9.81 m/s2 . As the tank bottom is perpendicular to Y axis, gravity points in the negative Y direction. 2. Set the operating density. (a) Under Variable-Density Parameters, enable Specied Operating Density. (b) Retain the default density of 1.225 kg/m3 . Set the operating density to the density of the lighter phase. This excludes the build-up of hydrostatic pressure within the lighter phase, improving the round-o accuracy for the momentum balance. 3. Set the reference pressure location. (a) Under Reference Pressure Location, retain the default value of zero for both X and Y. This location corresponds to a region where the uid will always be 100% of one of the phases (water). If it is not, it is recommended to change the region to a appropriate location where the pressure value does not change much over time. This condition is essential for smooth and rapid convergence. 4. Click OK to accept the settings and close the panel.
10-9
1. Click Load to load the UDF library. The sinusoidal wall motion will be assigned using user dened function. A compiled UDF library named libudf is created for this purpose.
10-10
(a) Under Models, enable Dynamic Mesh. The panel expands. (b) Under Mesh Methods, disable Smoothing and enable Layering. (c) Under the Layering tab, set Collapse Factor to 0.4. (d) Click OK. 2. Set the dynamic mesh zones. Dene Dynamic Mesh Zones...
(a) Under Zone Names, select moving-wall. (b) Under Type, retain the default selection of Rigid Body. (c) Under Meshing Options tab, set Cell Height to 0.008 m. This is the average size of the cell normal to the moving wall. (d) Click Create and close the panel.
Step 9: Solution
1. Retain the default solution controls. Solve Controls Solution...
10-11
(a) Click Init and close the panel. The complete domain is now initialized with air. The water level required at start (t=0) can be patched. 3. Create a register marking the region of initial water level. Adapt Region...
10-12
(a) Set X Max to be 15 m. (b) Set Y Max to be 0.5 m. (c) Click Mark and close the panel. FLUENT displays the following message in the console: 8510 cells marked for renement, 0 cells marked for coarsening. 4. Patch the initial water level. Solve Initialize Patch...
(a) Under Registers to Patch, select hexahedron-r0. (b) Under Phase, select water. (c) Under Variable, select Volume Fraction. (d) Set Value to 1. (e) Click Patch and close the panel.
10-13
5. Display the zone motion to check the movement of moving-wall. (a) Display the grid (Figure 10.4). Display Grid...
i. Under Surfaces, deselect default-interior. Zoom-in the graphics window to get the view as shown in Figure 10.4. ii. Click Display.
Figure 10.4: Grid Display Outline at t=0 (b) Display the zone motion. Display Zone Motion...
10-14
i. Under Motion History Integration, set Time Step to 0.001. ii. Set Number of Steps to 300. iii. Click Integrate. iv. Under Preview Controls, set Time Step to 0.001. v. Set Number of Steps to 300. vi. Click Preview to observe the wall motion. vii. Close the Zone Motion panel. 6. View the contours of volume fraction for water (Figure 10.5). Display Contours...
(a) Select Phases... and Volume Fraction in the Contours of drop-down lists. (b) Under Phase, select water. (c) Under Options, enable Filled. (d) Click Display and close the panel.
10-15
Figure 10.5: Contours of Volume Fraction for Water 7. Enable the plotting of residuals during the calculation. Solve Monitors Residuals...
(a) Under Options, enable Plot. (b) Under Plotting, set Iterations to 10. This will display residuals for only the last 10 iterations. (c) Click OK.
10-16
(a) Under Format, select TIFF. (b) Under Coloring, select Color. (c) Click Apply. (d) Click Preview. The background of graphics window is changed to white. FLUENT will display a question dialog box asking you whether to reset the window. (e) Click Yes in the Question dialog box. (f) Close the panel. 9. Set the commands to capture the images of contours. You need to use Text User Interface (TUI) commands to achieve this. For most of the graphical commands, corresponding TUI commands are available. Solve Execute Commands...
10-17
(a) Set the number of Dened Commands to 3. (b) Enable On option for all the commands. (c) Under Every, set 7 for all the commands. (d) Under When, set Time Step for all the commands. (e) For command-1, specify the Command as: display set-window 1 This command will make the window-1 active. (f) For command-2, specify the Command as: display contour water vof 0 1 This command will display the contours of water volume fraction in the active window. (g) For command-1, specify the Command as: display hard-copy "vof-%t.tif" This command will save the image in the TIF format. The %t option gets replaced with the time step number, when the image le is saved. The TIF les saved can then be used to create a movie. For the information on converting TIF le to an animation le, refer to http://www.bakker.org/cfm/graphics01.htm (h) Click OK to accept the settings and close the panel. 10. Set the surface monitors. Solve Monitors Surface...
(a) Increase the number of Surface Monitors to 1. (b) Enable Plot for monitor-1. (c) Under Every, select Time Step. (d) Click on Dene... next to monitor-1.
10-18
(e) Select Area Weighted Average in the Report Type drop-down list. (f) Select Grid and X-Coordinate in the Report of drop-down list. (g) Under Surfaces, select moving-wall. (h) Click OK to close both the panels. 11. Save the case and data les (wave-init.cas.gz and wave-init.dat.gz). File Write Case & Data... Retain the default Write Binary Files option so that you can write a binary le. The .gz extension will save zipped les on both, Windows and UNIX platforms.
10-19
(a) Set the Time Step Size as 0.001 s (b) Set Number of Time Steps to 4000. (c) Click Iterate.
13. Save the case and data les (wave-4000.cas.gz and wave-4000.dat.gz).
10-20
10-21
(a) Select Pressure... and Static Pressure in the Contours of drop-down lists. (b) Click Display. The pressure at the bottom of the tank is maximum and goes on decreasing towards the top. This shows the variation of hydrostatic pressure due to the height of the liquid.
Summary
The dynamic mesh model is used to apply periodic sinusoidal motion to the wall. This generates a wave in the uid. The VOF model is used to track the air-water interface and consequently the wave motion. Non-iterative time advancement (NITA) was used to reduce the run time of transient simulation. Images displaying contours of water phase were captured to visualize the transient eects.
References
1. Flow Around the Itsukushima Gate, an example from Fluent Inc. Marketing Catalog, 2003.
10-22
Exercises/Discussions
1. Run the simulation for longer ow time to check the wave pattern. 2. Try running the simulation without non-iterative time advancement (NITA) option. (a) Are the ow patterns dierent? (b) Compare the wall clock time taken to reach the same ow time. 3. Run the simulation using variable time step option. 4. Try dierent motions to the wall and observe wave patterns. This will need specic C compiler to create UDF library from the source code. 5. What other situation can be simulated using the same mesh le?
10-23
10-24