# ACU-T: 5301 Ship Hull Dynamics

This tutorial provides the instructions for setting up, solving, and viewing results of a flow around a freely floating ship hull. In this simulation, a wave hits the ship hull and displacement of the ship and the flow around the ship are simulated. This tutorial is designed to introduce you to a number of modeling concepts necessary to perform Free-Surface simulations.

- Use of Rigid Body type mesh motion
- Use of Free surface and Guide surface capabilities in conjunction of Rigid Body mesh motion.

- Analyze the problem
- Start AcuConsole and create a simulation database
- Set general problem parameters
- Use the pre-defined material model - Aluminum
- Create Rigid Body Mesh Motion
- Apply Mesh Motion to the Volume and Surface attributes
- Run AcuSolve
- Monitor the solution with AcuProbe
- Post-processing the nodal output with AcuFieldView

## Prerequisites

In order to run this tutorial, you should have already run through the introductory tutorials, ACU-T: 2000 Turbulent Flow in a Mixing Elbow and ACU-T: 5300 Ship Hull Static, and be familiar with AcuConsole, AcuSolve, or AcuFieldView. In order to run this tutorial, you will need access to a licensed version of AcuSolve.

Prior to running through this tutorial, copy AcuConsole_tutorial_inputs.zip from <Altair_installation_directory>\hwcfdsolvers\acusolve\win64\model_files\tutorials\AcuSolve to a local directory. Extract Ship_hull_static.acs and wave_c from AcuConsole_tutorial_inputs.zip.

## Analyze the Problem

The problem to be addressed in this tutorial is shown below. It is a mid-section of a Wigley Ship model. Wigley hulls have been widely used as test cases for evaluating hydrodynamic behavior of ships. The present tutorial demonstrates the simulation of gravity waves hitting a freely floating Wigley hull and evaluating the position of the hull with time. This tutorial is similar to the Ship Hull Static tutorial, except that the ship hull is freely floating as a rigid body compared to a static ship hull.

### Generation of Surface Gravity Waves

A linear solution of surface gravity wave propagation would result in the following equation for horizontal velocity of wave.

$u={U}_{0}+U\frac{\mathrm{cosh}k\left(D-z\right)}{\mathrm{sinh}\left(kD\right)}\text{cos}\left(\omega t-kx\right)$

Where,

$u$ is the horizontal particle velocity of wave

${U}_{0}$ is the speed of the wave

*U* is the velocity amplitude of disturbance

$k$ is wave number = $2\pi /\lambda $

$\lambda $ is the wave length of the wave

$D$ is the depth of the water

$\omega $ is the frequency of the wave = $\frac{2\pi}{T}$

$T$ is the time period of the wave

*t* is the time

In the present simulation, the following values are used for the variables of above equation:

*U* = 0.1256 m/s

$T$ = 1.0 sec

$k$ = 12.566 m^{-1}

${U}_{0}$ = 0.01 m/s

$D$ = 0.5 m

In the present tutorial, at the inlet you will generate the wave for 2 seconds and simulate the motion of the wave for 5 seconds. A UDF (wave.c) written in C language is used for this purpose. For the details of the functions used in the wave.c, refer to the AcuSolve User-Defined Functions Manual.

### Two Dimensional Simulations in AcuSolve

AcuSolve does not support a CFD analysis on a 2D surface mesh. However, a 2D analysis can be simulated on a volume mesh by having a single element extrusion along the perpendicular direction of 2D surface of interest and then having identical boundary conditions of symmetry or slip on both sides of extrusion. This way you can ensure that the solution does not vary along the thickness (extrusion), which is essentially a 2D representation of the problem. The present tutorial uses this approach.

### Modeling the Solid Ship Hull

For the present tutorial the following properties are assumed for the ship hull.

Material = Aluminum

Density = 2702 kg/m^{3}

Body Center = (1.12971, 0.0, 0.0082984) m

Body Mass = 0.2038 kg

Body Weight = 0.2038 × 9.81 = 2.0 N

Components of Moments of Inertia (in kg m^{2}):

${I}_{xx}$ = 0.00113969

${I}_{yy}$ = 0.0051392

${I}_{zz}$ = 0.004006

${I}_{xy}={I}_{yx}=0$

${I}_{yz}={I}_{zy}=0$

${I}_{zx}={I}_{xz}=0$

### Rigid Body Dynamic Analysis

- Internal Forces/Moments: refers to the integrated fluid traction and moment
- External Forces/Moments: refers to the force and moment you specify

A local coordinate system is used to simplify the definition of the rigid body model and the solution of the equations of motion. The translational and rotational equations of motion are:

$ma+Cv+Kx={F}_{I}+{F}_{E}$

$I\alpha +D\omega +L\theta ={R}_{I}+{R}_{E}$

Where,

$x,v,a$ are the translational displacement, velocity and acceleration vectors, respectively as:

$x=\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$, $v=\left[\begin{array}{c}{v}_{x}\\ {v}_{y}\\ {v}_{z}\end{array}\right]$, $a=\left[\begin{array}{c}{a}_{x}\\ {a}_{y}\\ {a}_{z}\end{array}\right]$

$\theta ,\omega ,\alpha $ are the angular displacement, angular velocity and angular acceleration vectors, respectively as:

$\theta =\left[\begin{array}{c}{\theta}_{x}\\ {\theta}_{y}\\ {\theta}_{z}\end{array}\right]$,$\omega =\left[\begin{array}{c}{\omega}_{x}\\ {\omega}_{y}\\ {\omega}_{z}\end{array}\right]$, $\alpha =\left[\begin{array}{c}{\alpha}_{x}\\ {\alpha}_{y}\\ {\alpha}_{z}\end{array}\right]$

$m$ is the mass of the body.

$I=\left[\begin{array}{ccc}{I}_{xx}& {I}_{xy}& {I}_{xz}\\ {I}_{yx}& {I}_{yy}& {I}_{yz}\\ {I}_{zx}& {I}_{zy}& {I}_{zz}\end{array}\right]$ is the dyadic (moment of inertia) matrix of the body.

$C,D$ are the translational and rotational damping matrices, respectively.

$K,L$ are the translational and rotational stiffness matrices, respectively.

${F}_{I},{R}_{I}$ are the internal Forces and Moments from the fluid.

${F}_{E},{R}_{E}$ are the external Forces and Moments you specify.

### Rigid Body Dynamics Analysis for a 2D Problem

- The displacements of the ship along its span (y-direction) is neglected.
- The axis of rotation for the ship is along the y-direction and the variables along other axis are neglected.
- Translational damping and stiffness matrices and their rotational equivalents are assumed to be zero.
- The only external force acting on the rigid body is the gravity force (${F}_{g}$) along the z-axis.
- The external moments acting on the body is zero, because the only external force acting on the body is gravity which does not generate any moment.

For the present tutorial, a single element extrusion will be made along the y-axis. Based on the above assumptions, you arrive with:

$x=\left[\begin{array}{c}x\\ 0\\ z\end{array}\right]$, $v=\left[\begin{array}{c}{v}_{x}\\ 0\\ {v}_{z}\end{array}\right]$, $a=\left[\begin{array}{c}{a}_{x}\\ 0\\ {a}_{z}\end{array}\right]$

$\theta =\left[\begin{array}{c}0\\ {\theta}_{y}\\ 0\end{array}\right]$, $\omega =\left[\begin{array}{c}0\\ {\omega}_{y}\\ 0\end{array}\right]$, $\alpha =\left[\begin{array}{c}0\\ {\alpha}_{y}\\ 0\end{array}\right]$

The translational equations of the motion will be:

$ma={F}_{I}+{F}_{E}$

$m\left[\begin{array}{c}{a}_{x}\\ 0\\ {a}_{z}\end{array}\right]=\left[\begin{array}{c}{F}_{I}{}_{x}\\ {F}_{I}{}_{y}\\ {F}_{I}{}_{z}+{F}_{g}\end{array}\right]$

The rotational equations of the motion will be:

$I\alpha ={R}_{I}+{R}_{E}$

$\left[\begin{array}{ccc}{I}_{xx}& {I}_{xy}& {I}_{xz}\\ {I}_{yx}& {I}_{yy}& {I}_{yz}\\ {I}_{zx}& {I}_{zy}& {I}_{zz}\end{array}\right]\times \text{}\left[\begin{array}{c}0\\ {\alpha}_{y}\\ 0\end{array}\right]=\left[\begin{array}{c}0\\ {R}_{I}{}_{y}\\ 0\end{array}\right]$

$\left[\begin{array}{c}{I}_{xy}{\alpha}_{y}\\ {I}_{yy}{\alpha}_{y}\\ {I}_{zy}{\alpha}_{y}\end{array}\right]=\left[\begin{array}{c}0\\ {R}_{I}{}_{y}\\ 0\end{array}\right]$

${\alpha}_{y}=\frac{{R}_{I}{}_{y}}{{I}_{yy}}$

The only critical component of moment of inertia for the present tutorial is ${I}_{yy}$.

## Define the Simulation Parameters

### Start AcuConsole and Open the Simulation Database

In the next steps you will start AcuConsole and open a database that is set up for a Ship hull static simulation. You will then make appropriate changes to the database to take into account the dynamics of the ship motion.

### Set General Simulation Parameters

In the next steps you will modify global attributes needed for the transient portion of the simulation.

### Set Material Model Parameters

In the next steps you will verify that the pre-defined material properties of water and aluminum match the desired properties for this problem.

### Set Mesh Motion Parameters

In the next steps you will define the mesh motion based on the rigid body dynamics of the ship hull.

### Apply Volume Parameters

### Set the Mesh Motion to the Guide Surface

### Compile UDF for Windows

A UDF written in C language (wave.c) is provided with the tutorial. Now this C program should be compiled using the following steps.

### Compile UDF for Linux

A UDF written in C language (wave.c) is provided with the tutorial. Now this C program should be compiled using the following steps.

## Compute the Solution and Review the Results

### Run AcuSolve

In the next steps you will launch AcuSolve to compute the solution for this case.

### Post-Process with AcuProbe

AcuProbe can be used to monitor various variables over solution time. In the present simulation it is worthwhile to monitor the forces on the ship hull.

### View Results with AcuFieldView

Now that a solution has been calculated, you are ready to view the flow field using AcuFieldView. AcuFieldView is a third-party post-processing tool that is tightly integrated to AcuSolve. AcuFieldView can be started directly from AcuConsole, or it can be started from the Start menu, or from a command line. In this tutorial you will start AcuFieldView from AcuConsole after the solution is calculated by AcuSolve.

In the following steps you will start AcuFieldView, create an animation of the ship hull motion with the contours of z-mesh displacement.

#### Start AcuFieldView

#### Animate to View Displacement of the Ship

These steps are provided with the assumption that you are able to manipulate the view in AcuFieldView to have a white background, perspective turned off, outlines turned off, and the viewing direction set to +z. If you are unfamiliar with basic AcuFieldView operations, refer to Manipulate the Model View in AcuFieldView.

## Summary

In this tutorial, you worked through a basic workflow to set up a dynamic ship-hull simulation with surface gravity waves. You started with an .acs file from the Ship Hull Static tutorial and modified the set up to accommodate the rigid body motion of the ship hull. Once the case was set up, you generated a solution using AcuSolve. Results were post-processed in AcuFieldView to allow you to create animation of the Ship hull movement with time. New features introduced in this tutorial include: Rigid Body type mesh motion, use of Free surface and Guide surface capabilities in conjunction of Rigid Body mesh motion.