Sie sind auf Seite 1von 22

Tutorial: Solving a 2D Box Falling into Water

Introduction
The purpose of this tutorial is to provide guidelines and recommendations for setting up and solving a moving deforming mesh (MDM) case along with the six degree of freedom (6DOF) solver and the volume of uid (VOF) multiphase model. The 6DOF UDF is used to calculate the motion of the moving body which also experiences a buoyancy force as it hits the water (modeled using the VOF model). Gravity and the bouyancy forces drive the motion of the body and the dynamic mesh. This tutorial demonstrates how to do the following: Use 6DOF solver to calculate motion of the moving body. Use VOF multiphase model to model the buoyancy force experienced by the moving body. Set up and solve the dynamic mesh case. Create TIFF les for graphic visualization of the solution. Postprocess the resulting data.

Prerequisites
This tutorial is written with the assumption that you have completed Tutorial 1 from ANSYS FLUENT 13.0 Tutorial Guide, and that you are familiar with the ANSYS FLUENT navigation pane and menu structure. Some steps in the setup and solution procedure will not be shown explicitly. In this tutorial, you will use the dynamic mesh model and the 6DOF model. If you have not used these models before, see Sections 11.3 Using Dynamic Meshes and 11.3.7 Six DOF Solver Settings, respectively in the ANSYS FLUENT 13.0 Users Guide.

Problem Description
The schematic of the problem is shown in Figure 1. The tank is partially lled with water. A box is dropped into the water at time t = 0. The box is subjected to a viscous drag force and a gravitational force. When the box is immersed in water, it is also subjected to a buoyancy force.

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

The walls of the box undergoes a rigid body motion and displaces according to the calculation performed by 6DOF solver. Whenever the box and its surrounding boundary layer mesh are displaced, the mesh outside the boundary layer is smoothed and/or remeshed.

Figure 1: Schematic of the Problem

Setup and Solution Preparation


1. Copy the les (6dof-mesh.msh.gz and 6dof 2d.c) to your working folder. 2. Create a subfolder (tiff-files) to store the tiff les for postprocessing purpose. 3. Use FLUENT Launcher to start the 2D version of ANSYS FLUENT. For more information about FLUENT Launcher see Section 1.1.2 Starting ANSYS FLUENT Using FLUENT Launcher in ANSYS FLUENT 13.0 Users Guide. 4. Enable Double-Precision in the Options list. 5. Click the UDF Compiler tab and ensure that the Setup Compilation Environment for UDF is enabled. The path to the .bat le which is required to compile the UDF will be displayed as soon as you enable Setup Compilation Environment for UDF. If the UDF Compiler tab does not appear in the FLUENT Launcher dialog box by default, click the Show Additional Options >> button to view the additional settings. 2

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

The Display Options are enabled by default. Therefore, after you read in the mesh, it will be displayed in the embedded graphics window. Step 1: Mesh 1. Read the mesh le (6dof-mesh.msh.gz). File Read Mesh... As the mesh le is read, ANSYS FLUENT will report the progress in the console. Step 2: General Settings 1. Dene the solver settings. General Transient

(a) Select Transient from the Time list. 2. Check the mesh (see Figure 2). General Check

Figure 2: Mesh Display ANSYS FLUENT will perform various checks on the mesh and will report the progress in the console. Make sure the minimum volume reported is a positive number.

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

Step 3: Models 1. Dene the multiphase model. Models Multiphase Edit...

(a) Select Volume of Fluid from the Model list to open Multiphase Model dialog box.

(a) Ensure that Number of Eulerian Phases is set to 2. (b) Retain the default value of Courant Number. (c) Enable Implicit Body Force in the Body Force Formulation group box. (d) Click OK to close the Multiphase Model dialog box. 2. Enable the standard k- turbulence model. Models Viscous Edit...

Step 4: User-Dened Functions Dene User-Dened Functions Compiled...

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

1. Click Add... for the Source Files. 2. Select 6dof 2d.c in the Select File dialog box. ANSYS FLUENT displays a Warning dialog box warning you to ensure that the UDF source les are in the same folder that contains the case and data les. Click OK. ANSYS FLUENT sets up the folder structure and compiles the code. The compilation is displayed in the console. 3. Click Load to load the UDF library. Step 5: Materials Materials Create/Edit... 1. Retain the properties of air. 2. Copy water-liquid (h2o<l>) from the FLUENT Database.... 3. Modify the properties of water-liquid (h2o<l>).

(a) Select user-dened from the Density drop-down list. i. Select water density::libudf from the User-Dened Functions dialog box. (b) Select user-dened from the Speed of Sound drop-down list. i. Select water speed of sound::libudf from the User-Dened Functions dialog box. (c) Click Change/Create and close the Create/Edit Materials dialog box. Step 6: Phases 1. Dene the primary phase, water. Phases phase-1 Edit... 5

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

(a) Enter water for Name. (b) Select water-liquid from the Phase Material drop-down list. (c) Click OK. 2. Similarly, dene the secondary phase, air. Phases phase-2 Edit...

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

Step 7: Boundary Conditions 1. Dene the boundary conditions for tank outlet. Boundary Conditions tank outlet

(a) Set the boundary conditions for the mixture phase. i. Ensure that mixture is selected from the Phase drop-down list and click Edit...

ii. Select Intensity and Viscosity Ratio from the Specication Method drop-down list. iii. Enter 1% for Backow Turbulence Intensity and 10 for Backow Turbulent Viscosity Ratio. iv. Click OK to close the Pressure Outlet dialog box. (b) Set the boundary conditions for the air phase. i. Select air from the Phase drop-down list and click Edit.... ii. Click the Multiphase tab and enter 1 for Backow Volume Fraction. iii. Click OK to close the Pressure Outlet dialog box. Step 8: Operating Conditions Boundary Conditions Operating Conditions... 1. Retain 101325 pascal for Operating Pressure. 2. Enable Gravity. The dialog box expands to show additional inputs. 3. Enter -9.81 m/s2 for Gravitational Acceleration in the Y direction. 7

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

4. Enable Specied Operating Density and retain the default setting of 1.225 kg/m3 for Operating Density. Step 9: Dynamic Mesh Setup 1. Set the dynamic mesh parameters. Dynamic Mesh

(a) Enable Dynamic Mesh. (b) Enable Six DOF Solver. (c) Ensure that Smoothing is enabled. (d) Enable Remeshing from the Mesh Methods group box ans click Settings.... i. Click Smoothing tab and set the Spring Constant Factor to 0.5. ii. Click Remeshing tab and set the remeshing parameters.

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

A. Enter 0.056 m for Minimum Length Scale and 0.13 m for Maximum Length Scale. The Minimum Length Scale and the Maximum Length Scale can be obtained from the Mesh Scale Info dialog box. Click on the Mesh Scale Info... button to open the Mesh Scale Info dialog box. B. Enter 0.5 for Maximum Cell Skewness. iii. Click OK to close Mesh Method Settings dialog box. Six DOF Solver Settings includes Gravitational Acceleration setting and the Write Motion History option. You already have set the Gravitational Acceleration in the Operating Conditions dialog box. If you want the motion history, enable Write Motion History and specify the File Name.

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

2. Set up the moving zones. Dynamic Mesh (Dynamic Mesh Zones) Create/Edit...

(a) Create the dynamic zone, moving box. i. Select moving box from the Zone Names drop-down list. ii. Ensure that Rigid Body is selected in the Type group box. iii. Ensure that test box::libudf is selected from the Six DOF UDF drop-down list. iv. Ensure that On is enabled in the Six DOF Solver Options group box. v. Click Create. ANSYS FLUENTwill create the dynamic zone moving box which will be available in the Dynamic Mesh Zones list. i. Similarly, create the dynamic zone, moving uid by also enabling Passive from the Six DOF Solver Options group box. Ensure that you enable Passive from the Six DOF Solver Options group box. When Passive for the rigid body is enabled, ANSYS FLUENT does not take forces and moments on the zone into consideration. ANSYS FLUENTwill create the dynamic zone moving uid which will be available in the Dynamic Mesh Zones list. 10

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

(b) Close the Dynamic Mesh Zones dialog box. Step 10: Mesh Preview The purpose of the preview is to verify the quality of the mesh yielded by the mesh motion parameters. Since the ow is not initialized, the motion of the box will be vertical due to gravity. 1. Save the case le (6dof-init.cas.gz). File Write Case... 2. Display the mesh. Graphics and Animations 3. Preview the motion. Dynamic Mesh Preview Mesh Motion... Mesh Set Up...

(a) Enter 0.0005 for Time Step Size. (b) Enter 1000 for Number of Time Steps. (c) Click Preview (see Figure 3).

Figure 3: Mesh Motion at t = 0.5 s

c ANSYS, Inc. November 24, 2010

11

Tutorial: Solving a 2D Box Falling into Water

The motion is acceptable. (d) Close the Mesh Motion dialog box. 4. Exit ANSYS FLUENT without saving. Step 11: Solution 1. Start the 2D version of ANSYS FLUENT and read the case le (6dof-init.cas.gz). 2. Set the solution method parameters. Solution Methods

(a) Ensure that SIMPLE is selected from the Scheme drop-down list. (b) Select Green-Gauss Node Based from the Gradient drop-down list. (c) Select Second Order Upwind for all the equations except Volume Fraction. (d) Retain the default discretization method of Geo-Reconstruct for Volume Fraction.

12

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

3. Set the solution control parameters. Solution Controls

(a) Enter 0.5 for Body Forces in the Under-Relaxation Factors group box. (b) Enter 0.8 for Turbulent Viscosity. (c) Retain the default values for other parameters.

c ANSYS, Inc. November 24, 2010

13

Tutorial: Solving a 2D Box Falling into Water

4. Initialize the solution. Solution Initialization

(a) Enter 0.001 m2 /s2 for Turbulent Kinetic Energy and 0.001 m2 /s3 for Turbulent Dissipation Rate. (b) Enter 1 for air Volume Fraction. (c) Click Initialize. 5. Create an adaption register for patching. Adapt Region... (a) Set the Input Coordinates as follows: Parameters X Min (m), X Max (m) Y Min (m), Y Max(m) (b) Click Mark. (c) Close the Region Adaption dialog box. Values (-5, 5) (-5, -1.5)

14

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

6. Patch the air volume fraction. Solution Initialization Patch...

(a) Select air from the Phase drop-down list. (b) Select Volume Fraction from the Variable list. (c) Select hexahedron-r0 from the Registers to Patch list. (d) Retain 0 for Value. (e) Click Patch. (f) Close the Patch dialog box. 7. Enable the plotting of residuals. Monitors Residuals Edit...

(a) Enter 400 for Iterations to Plot. (b) Click OK to close the Residual Monitors dialog box.

c ANSYS, Inc. November 24, 2010

15

Tutorial: Solving a 2D Box Falling into Water

8. Dene a surface monitor for Y Velocity. Monitors (Surface Monitors) Create...

(a) Enable Print to Console, Plot, and Write for surf-mon-1. (b) Retain the default setting of 2 for Window. (c) Enter 6dof yvel.out for File Name. (d) Select Flow Time from the X Axis drop-down list. (e) Select Time Step from the Every drop-down list. (f) Select Area-Weighted Average from the Report Type drop-down list. (g) Select Velocity... and Y Velocity from the Field Variable drop-down lists. (h) Select moving box from the Surfaces list and click OK to close the Surface Monitor dialog box.

16

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

9. Set the auto save option. Calculation Activities (a) Enter 100 for Autosave Every (Time Steps) and click Edit....

i. Enable Retain Only the Most Recent Files. ii. Set the Maximum Number of Data Files to 2. iii. Enter falling-box.gz for File Name. ANSYS FLUENTwill append the timestep number so that each le will have a unique lename. iv. Click OK to close the Autosave dialog box. 10. Save the hardcopy of display. File Save Picture... (a) Select TIFF from the Format list. (b) Ensure that Color is selected from the Coloring list. (c) Ensure that Raster is selected from the File Type list. (d) Enter 800 (pixels) for Width and 600 (pixels) for Height in the Resolution group box. (e) Click Apply and close the Save Picture dialog box.

c ANSYS, Inc. November 24, 2010

17

Tutorial: Solving a 2D Box Falling into Water

11. Execute commands for the animation setup. Calculation Activities (Execute Commands) Create/Edit...

(a) Set the Dened Commands to 4. (b) Enable Active for all commands. (c) Enter 100 for Every and select Time Step from the When drop-down list. (d) Enter the commands as shown in the Execute Commands dialog box. Ensure to create the subfolder ti-les before clicking the OK button. (e) Click OK to close the Execute Commands dialog box. 12. Display lled contour plots, enter the following command in the ANSYS FLUENT console. > display set contours filled-contours yes 13. Run the calculation. Run Calculation (a) Enter 0.0005 s for Time Step Size. (b) Enter 10000 for Number of Time Steps. (c) Set Max Iterations/Time Step to 50. (d) Click Calculate. Step 12: Postprocessing 1. Convert the TIFF les in the subfolder ti-les to form an animation sequence for postprocessing purpose, using the software package like QuickTime or Fast Movie Player. The contours of volume fraction of water at dierent time steps are as shown in Figures 4 through 23.

18

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

Figure 4: Contours at t = 0.25 s

Figure 5: Contours at t = 0.5 s

Figure 6: Contours at t = 0.75 s

Figure 7: Contours at t = 1.0 s

Figure 8: Contours t = 1.25 s

Figure 9: Contours t = 1.5 s

c ANSYS, Inc. November 24, 2010

19

Tutorial: Solving a 2D Box Falling into Water

Figure 10: Contours at t = 1.75 s

Figure 11: Contours at t = 2.0 s

Figure 12: Contours of at t = 2.25 s

Figure 13: Contours at t = 2.5 s

Figure 14: Contours at t = 2.75 s

Figure 15: Contours at t = 3.0 s

20

c ANSYS, Inc. November 24, 2010

Tutorial: Solving a 2D Box Falling into Water

Figure 16: Contours at t = 3.25 s

Figure 17: Contours at t = 3.5 s

Figure 18: Contours at t = 3.75 s

Figure 19: Contours at t = 4.0 s

Figure 20: Contours at t = 4.25 s

Figure 21: Contours at t = 4.5 s

c ANSYS, Inc. November 24, 2010

21

Tutorial: Solving a 2D Box Falling into Water

Figure 22: Contours at t = 4.75 s

Figure 23: Contours at t = 5.0 s

Summary
This tutorial demonstrated the setup and solution of a dynamic mesh case along with the 6DOF solver and the VOF multiphase model. The 6DOF UDF was used to calculate the motion of the box dropped into the water. The TIFF les created in the tutorial can be used to provide a graphic visualization of the solution.

22

c ANSYS, Inc. November 24, 2010

Das könnte Ihnen auch gefallen