You are on page 1of 2

# ROSE-HULMAN INSTITUTE OF TECHNOLOGY

## Department of Mechanical Engineering

ME 323

Numerical Methods

Homework 4
(Due at the beginning of Lab 9)
Introduction & MotivationSphere floating in water:
A spherical floater is placed in water. Without external forcing, it would be partially submerged with depth h, as
shown in the following diagram. The free surface of the water is indicated by the triangle in the figure. When the
sphere is half-submerged, h = R. When the sphere is totally submerged, h = 2R.

h
If we neglect the effect of surface tension, the general equation of motion for the floater is given by

d2 h
m =
m g w Vsub g

d t2

(1)

buoyancy force

where Vsub is the volume of the floater submerged in water which depends on the depth h in the following way:

1 2

h (3 R h)

3
Vsub (h) =
4 R 3 1 ( 2 R h )2 ( R + h )
3
3

0h<R
R h < 2R

Apply the state-vector approach to time-advance the oscillatory motion associated with a floater of radius R = 0.1 m
and mass m = 1 kg for 3 seconds, with an initial conditions of

h (=
t 0=
) R

and

dh
=0
d t t =0

(2)

Homework 4

Page 1 of 2

## ROSE-HULMAN INSTITUTE OF TECHNOLOGY

Department of Mechanical Engineering
ME 323

Numerical Methods

Write a well-documented, modular MATLAB code to time-advance Equation (1) with its initial conditions (2).
Your top-level code hw4_INI.m should initiate the following tasks in an efficient way:

o

## other system parameters like radius, mass, etc

Time-advance the equation of motion using the state-vector approach using the fourth-order Runge-Kutta
method as we practiced in Lab 7.

Use the subplot command to display the time history of the submerged depth (top figure) and the vertical
velocity (bottom figure);

Vy =

dh
dt

On the command window, report the maximum and minimum values, with 8 decimal places, of both the
submerged depth h and the vertical velocity Vy of the floater.

Result Validation
Demonstrate that youve both thought about the result your code returns and checked that its reasonable by
attaching a result validation page (you may use engineering paper.) Use drawings, equations, and sentences to
Demonstrate how you used the equations on the first page to determine the system state vector and the
system state derivative.
Demonstrate that changes to the parameters produce the expected results.

## For complete submission of this assignment, you must

2. Store a soft copy of your code in your personal folder under a new subfolder HW 4 at