Heave and Pitch Simulation of Ship hull moving

0 downloads 0 Views 5MB Size Report
Ships moving through head sea waves predominantly encounter heave and pitch motions ... pitch motion of ship hull going through the head see waves.
Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Introduction Ships moving through head sea waves predominantly encounter heave and pitch motions while the other four motions (roll, yaw, surge, sway) are negligible. In this tutorial a wigley hull heave and pitch motion is simulated in head sea waves. This tutorial demonstrates how to do the following: • Use VOF multiphase model of Fluent to solve open channel flow. • Use open channel wave boundary condition to generate shallow waves. • Use Numerical Beach option to suppress the numerical reflection near the outlet. • Use dynamic mesh six-dof feature to model motion of the hull. • Restrict 4 degree of motions out of 6 degree using User Defined Function (UDF) • 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.6 Using Dynamic Meshes and Section 11.6.4 Six DOF Solver Settings, respectively in the ANSYS FLUENT 13.0 User’s Guide.

Problem Description The schematic of the problem is shown in Figure 1. The problem is to model heave and pitch motion of ship hull going through the head see waves. The problem considers incoming flow at 1.5 m/sec with wave specification as follows: • Wave amplitude = 0.01925 m.

c ANSYS, Inc. February 25, 2011

1

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

• Wave length = 3.85 m. • Phase angle = -270 degrees. Water bottom level is at 2.75m below free surface level. For this problem geometry is created such that Z axis is the vertical axis and z=0 is the free surface level. Flow is going along +X direction and Y axis is the lateral axis.

Figure 1: Schematic of the Problem

Setup and Solution Preparation 1. Copy the files (hull-2dof.msh.gz) to your working folder. 2. Create a subfolder (tiff-files) to store the tiff files for postprocessing purpose. 3. Use FLUENT Launcher to start the 3D double precision 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 User’s 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 file 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. The Display Options are enabled by default. Therefore, after you read in the mesh, it will be displayed in the embedded graphics window.

2

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Step 1: Mesh 1. Read the mesh file (hull-2dof.msh.gz). File −→ Read −→Mesh... As the mesh file is read, ANSYS FLUENT will report the progress in the console. Step 2: General Settings 1. Define 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. February 25, 2011

3

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Step 3: Models 1. Define 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) Enable Implicit in the Scheme group box. (c) Enable Implicit Body Force in the Body Force Formulation group box. (d) Click OK to close the Multiphase Model dialog box.

4

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

2. Enable the SST k-ω turbulence model. Models −→

Viscous −→ Edit...

Step 4: User-Defined Functions Define −→ User-Defined −→ Functions −→Compiled...

1. Click Add... for the Source Files. 2. Select six dof property.c in the Select File dialog box. ANSYS FLUENT displays a Warning dialog box warning you to ensure that the UDF source files are in the same folder that contains the case and data files. 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) from the FLUENT Database....

c ANSYS, Inc. February 25, 2011

5

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

3. Click Change/Create and close the Create/Edit Materials dialog box. Step 6: Phases 1. Define the primary phase, air. Phases −→

phase-1 −→ Edit...

(a) Enter air for Name. (b) Select air from the Phase Material drop-down list. (c) Click OK.

6

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

2. Similarly, define the secondary phase, water. Phases −→

phase-2 −→ Edit...

Step 7: Boundary Conditions 1. Define the boundary conditions for up-inlet. Boundary Conditions −→

up-inlet

(a) Ensure that mixture is selected from the Phase drop-down list and click Edit... (b) Enable Open Channel Wave BC. (c) Click Momentum Tab and set the input values

c ANSYS, Inc. February 25, 2011

7

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

i. Select Direction Vector from the Flow Direction Specification Method dropdown list. ii. Select Absolute from the Reference Frame drop-down list. iii. Enter 1.5 for Uniform Flow Velocity Magnitude. iv. Enter 1 for X-Component of Flow Direction . v. Enter 0 for Y-Component of Flow Direction . vi. Enter 0 for Z-Component of Flow Direction . vii. Select Intensity and Viscosity Ratio from the Specification Method drop-down list. viii. Enter 2% for Turbulence Intensity and 2 for Turbulent Viscosity Ratio. (d) Click Multiphase Tab and set the input values

i. Select First Order Airy from the Wave Theory drop-down list. ii. Select Shallow/Intermediate Waves from the Wave BC Options drop-down list. iii. Select water from the Secondary Phase for Inlet drop-down list. iv. Enter 0.01925 for Wave Amplitude. v. Enter 3.85 for Wave Length. vi. Enter 0 for Free Surface Level.

8

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

vii. Enter -2.75 for Bottom Level. viii. Enter 0 for Wave Heading Angle. ix. Enter -270 for Phase Difference. (e) Click OK to close the up-inlet dialog box. For more information about Wave boundary conditions, see Section 17.3.12 Open Channel Wave Boundary Condition in ANSYS FLUENT 13.0 Theory Guide. 2. Define the boundary conditions for down-outlet. Boundary Conditions −→

down-outlet

(a) Ensure that mixture is selected from the Phase drop-down list and click Edit... (b) Click Momentum Tab and set the input values

i. Select Normal to Boundary from the Backflow Direction Specification Method drop-down list. ii. Select Intensity and Viscosity Ratio from the Specification Method drop-down list. iii. Enter 2% for Back Flow Turbulence Intensity and 2 for Back Flow Turbulent Viscosity Ratio. (c) Click Multiphase Tab and set the input values

c ANSYS, Inc. February 25, 2011

9

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

i. Enable Open Channel. ii. Select Free Surface Level from the Pressure Specification Method drop-down list. iii. Select Neighboring Cell Volume Fraction from the Density Interpolation Method drop-down list. iv. Enter 0 for Free Surface Level. v. Enter -2.75 for Bottom Level. (d) Click OK to close the down-outlet dialog box.

10

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Step 8: Operating Conditions Boundary Conditions −→ Operating Conditions...

1. Retain 101325 pascal for Operating Pressure. 2. Enter {-3.5, 0, 2} m for Reference Pressure Location . The reference pressure location that you choose should be in a region that will always contain the least dense of the fluids (e.g., the gas phase, if you have a gas phase and one or more liquid phases) 3. Enable Gravity. The dialog box expands to show additional inputs. 4. Enter -9.81 m/s2 for Gravitational Acceleration in the Z direction. 5. Enable Specified Operating Density and retain the default setting of 1.225 kg/m3 for Operating Density. Step 9: Cell Zone Conditions Cell Zone Conditions −→

fluid

1. Define the cell zone conditions for fluid. (a) Ensure that mixture is selected from the Phase drop-down list and click Edit...

c ANSYS, Inc. February 25, 2011

11

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

(b) Click Multiphase tab. (c) Enable Numerical Beach in the Numerical Beach Treatment. The dialog box expands to show additional inputs. (d) Set the input parameters for Numerical Beach.

12

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

i. Ensure that Two Dimensional is selected from the Damping Type drop-down list. ii. Select up-inlet from the Compute From Inlet boundary drop-down list. iii. Specify 1 for Number of Wavelengths. (e) Click OK to close the fluid dialog box. For more information about Numerical beach treatment, see Section 17.3.11.3 Numerical Beach Treatment in ANSYS FLUENT 13.0 Theory Guide.

c ANSYS, Inc. February 25, 2011

13

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Step 10: Dynamic Mesh Setup 1. Set the dynamic mesh parameters. Dynamic Mesh

(a) Enable Dynamic Mesh. (b) Enable Six DOF Solver. 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) 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.

14

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

A. Enter 0.011 m for Minimum Length Scale and 0.65 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.8 for Maximum Cell Skewness. C. Enter 10 for Size Remesh Interval.

c ANSYS, Inc. February 25, 2011

15

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

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

(a) Create the dynamic zone, hull. i. Select hull from the Zone Names drop-down list. ii. Ensure that Rigid Body is selected in the Type group box. iii. Ensure that sdofproperty is selected from the Six DOF UDF drop-down list. iv. Ensure that On is enabled in the Six DOF Options group box. v. Click Create. ANSYS FLUENTwill create the dynamic zone hull which will be available in the Dynamic Mesh Zones list. vi. Click Close to close the Dynamic Mesh Zones dialog box.

16

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Note: Open the six dof property.c file and check the properties of the hull body specified. Mass and Moment of inertia are specified here. In addition to this following commands have been written, prop[SDOF ZERO TRANS X] = TRUE; prop[SDOF ZERO TRANS Y] = TRUE; prop[SDOF ZERO ROT X] = TRUE; prop[SDOF ZERO ROT Z] = TRUE; These macros have been used to restrict the motion in the particular direction. For example first command restricts the translation motion in X direction. Like this way four motions have been restricted using four commands. Only two motions are allowed which is translation along Z axis and rotation about Y axis. Step 11: Solution 1. Set the solution method parameters. Solution Methods

c ANSYS, Inc. February 25, 2011

17

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

(a) Ensure that SIMPLE is selected from the Scheme drop-down list. (b) Select Green-Gauss Cell Based from the Gradient drop-down list. (c) Select Second Order Upwind for all the equations except Volume Fraction. (d) Select Compressive for Volume Fraction. 2. Set the solution control parameters. Solution Controls

(a) Keep default values for the Solution Controls. 3. Set the solution monitors. Monitors (a) Residual Monitor. Monitors −→

Residuals −→ Edit...

i. Ensure that Plot is enabled under Options. ii. Retain 1000 for Iterations to Plot. iii. Click OK to close the Residual Monitors dialog box. (b) Force Monitor. Monitors −→

18

Drag −→ Edit...

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

i. Enable Print to Console, Plot and Write under Options. ii. Select hull under Wall Zones. iii. Click OK to close the Drag Monitor dialog box. 4. Initialize the solution. Solution Initialization

(a) Select up-inlet from the Compute From drop-down list. (b) Select Flat from the Open Channel Initialization Method drop-down list. (c) Click Initialize. 5. Set the auto save option. Calculation Activities (a) Enter 200 for Autosave Every (Time Steps) and click Edit....

c ANSYS, Inc. February 25, 2011

19

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

(b) Enter hull 2dof.gz for File Name. ANSYS FLUENTwill append the timestep number so that each file will have a unique filename. (c) Click OK to close the Autosave dialog box.

20

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

6. Run the calculation. Run Calculation (a) Enter 0.005 s for Time Step Size. Make sure that the time step size is in the range of 1/100 to 1/200 of the Period (b) Enter 3000 for Number of Time Steps. (c) Set Max Iterations/Time Step to 20. Write the initial case and data files with the name hull-2dof-init.cas.gz before clicking Calculate File −→ Write −→Case & Data (d) Click Calculate. Now you need to monitor the drag residual plot.Run the simulation till the drag value stabilize(Figure 3); after stabilization drag curve will become periodic.

Figure 3: Drag monitor plot

c ANSYS, Inc. February 25, 2011

21

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Step 12: Postprocessing 1. Read the case and data file for the 1600th time step (hull 2dof-1-01600.cas.gz). File −→ Read −→Case & Data... 2. Create Iso-surface of water volume fraction 0.5. Surface −→Iso-Surface...

(a) Select Phases... and Volume fraction from Surface of Constant drop-down list. (b) Select water from Phase drop-down list. (c) Enter 0.5 for Iso-Values (d) Enter vof-0.5 for New Surface Name. (e) Click Create and close the Iso-surface dialog box.

22

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

3. Display contours of Mesh (Z-coordinate) on the free surface (Figure 4). Graphics and Animations −→

Contours −→ Set Up...

(a) Enable Filled and disable Global Range from the Options list. (b) Select Mesh... and Z-Coordinate from the Contours of drop-down lists. (c) Select vof-0.5 from the Surfaces list. (d) Enter 25 for the Levels and click Display.

Figure 4: Wave elevation contour

c ANSYS, Inc. February 25, 2011

23

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

4. Display contours of water volume fraction on the hull (Figure 5). Graphics and Animations −→

Contours −→ Set Up...

(a) Select Phases... and Volume Fraction from the Contours of drop-down lists. (b) Select water from the Phases drop-down lists. (c) Select hull from the Surfaces list. (d) Click Display.

Figure 5: Contours of water Volume Fraction on the hull (water line along hull hurface)

24

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

5. Create Heave and Pitch plots from the motion history data In the dynamic mesh properties we have switch on the Write Motion History in the six DOF options, so a motion history file (Figure 6) is written which consists of linear and angular positions. In the file, CG Z is the heave and THETA Y is the pitch.

Figure 6: Motion History File

(a) Create a text file heave.xy by copying the time and CG Z columns. Plot this file to get the heave curve. Plots −→

File −→ Set Up...

Figure 7: Heave motion curve

c ANSYS, Inc. February 25, 2011

25

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

(b) Similarly create pitch.xy by copying the time and THETA Y columns. Plot this file to get the pitch curve. Plots −→

File −→ Set Up...

Figure 8: Pitch motion curve 6. Wave elevation contours (contours of Z-Coordinate on the free surface) at different time steps are shown in Figures 9 to Figures 10.

Figure 9: Contours at t = 9 s

26

Figure 9: Contours at t = 10 s

c ANSYS, Inc. February 25, 2011

Tutorial: Heave and Pitch Simulation of Ship hull moving through head sea waves

Figure 10: Contours at t = 11 s

Figure 10: Contours at t = 12 s

Figure 10: Contours t = 13 s

Figure 10: Contours t = 14 s

Summary This tutorial demonstrated the setup and solution of ship hull heave and pitch simulation.

c ANSYS, Inc. February 25, 2011

27