Breadcrumbs

 http://iwant2study.org/lookangejss/02_newtonianmechanics_8oscillations/ejss_model_PICUP_vhull_frem_v2/

 

 

Download ModelDownload SourceembedLaunch Website ES WebEJS

About

intro

Harmonic and Anharmonic Oscillations of a Boat

Developed by E. Ayars

Easy JavaScript Simulation by Fremont Teng and Loo Kang Wee

Simple Harmonic Oscillation (SHO) is everyone’s favorite type of periodic motion. It’s simple, easy to understand, and has a known solution. But SHO is not the only kind of periodic motion. In this set of exercises we’ll investigate an anharmonic oscillator. We’ll explore characteristics of its motion, and try to get an understanding of the circumstances under which the motion can be approximated as simple harmonic.

Subject Area Mechanics
Levels First Year and Beyond the First Year
Available Implementations Python and Mathematica
Easy JavaScript Simulation
Learning Objectives

Students who complete these exercises will be able to use an ODE solver to develop a qualitative understanding of the behavior of an anharmonic oscillator.

Most students gain a good understanding of the behavior of harmonic oscillators in their introductory classes, but not all oscillators are harmonic. Here we investigate an idealized boat hull which exhibits asymmetric oscillation: the restoring force is stronger for displacements in one direction than in the other. This results, for large oscillations, in a visibly non-sinusoidal oscillation. For small oscillations, the motion is approximately simple harmonic again.

Time to Complete 120 min

instructorguide

This set of exercises guides students through the development of an anharmonic oscillator, then lets them use an ODE solver to plot the motion. It does not describe how to use an ODE solver. Emphasis is on qualitative understanding of the system, although if the instructor chooses it is certainly possible to use real parameters (ρwater, dimensions of boat, etc) to obtain an “engineer’s answer”.

The problem is accessible to first-year students, but it may also be of interest to students in higher-level courses.

There is opportunity to discuss limitations of the model on the final problem. In this problem, if the amplitude is high enough that the boat gets out of the water, the model in the ODE breaks down in interesting and spectacular ways.

The pseudocode, Mathematica notebook, python code, and sample solutions of this Exercise Set assume the use of built-in differential equation solving capabilities. Depending on instructor preference, it may be desirable for students to have experienced the direct application of a finite-difference algorithm to a variety of first-order differential equations before using a computational ‘black box.’

theory

The simplest example of Simple Harmonic Oscillation (SHO) is a mass hanging on a spring. In equilibrium, the string will have stretched some equilibrium distance xo, so that the weight of the mass mg is balanced by the spring force kxo. Any additional motion x of the spring will result in an unbalanced force:

(1)ΣF=ma=mgk(xo+x)
(2)md2xdt2=(mgkxo)kx
(3)d2xdt2=kmx

This last equation is in the form of the equation for SHO:

(4)d2xdt2=ω2x

where ωkm in this case. Knowing ω, we can then go on to do whatever we need to do with the problem. The period of the motion is T=2πω, the position as a function of time will be x(t)=Acos(ωt+ϕ), etc.

We can use this “known solution” to SHO any time we can get the equation of motion into the form of the SHO differential equation. If the second derivative of a variable is equal to a negative constant times the variable, the solution is SHO with ω equal to the square root of that constant.

Even when we can’t get the equation of motion for a system into the form of SHO, we can often approximate the motion as SHO for small oscillations. The classic example of this is the simple pendulum. The equation of motion for the pendulum is

(5)d2θdt2=gLsinθ

This equation is not SHO, but for small θ, sinθθ so we can approximate the motion as SHO as long as the oscillations are small.

In the case of our wedge-shaped boat, the equation of motion is

(6)d2γdt2=ωo2(1+γ2)γ

This is not SHO! If γ is small, it is approximately SHO, but only approximately.

Note: The Mathematica and Python solutions here make use of built-in tools for solving differential equations. For other implementations the reader is directed to Numerical Recipes in C, or equivalent text, which will provide an introduction and theoretical description of the numerical approach to solutions via finite-difference methods.

exercises

Exercise 1: A straight-sided boat

Imagine a boat with vertical sides, floating. There will be two forces on this boat: its weight mg, and the buoyant force ρgV. (I’ve defined down to be the positive direction, here, so the buoyant force is negative since it’s upwards.) The volume V in the buoyant force component is the volume of water displaced by the boat: in other words, the volume of boat that is below water level. In equilibrium, the bottom of the boat will be some distance xo below the water, so V=Axo, where A is the area of the boat at the waterline.

If we then push the boat down some additional distance x and let go, the boat will bob up and down.

  1. Show that the boat’s vertical motion is SHO. It will probably be helpful to follow the same pattern as for the introduction example: the key is to get the equation in the form of the equation for SHO.
  2. What is the period of the boat’s motion?

Exercise 2: A V-hulled boat

Instead of a straight-sided boat, imagine a boat with a V-shaped hull profile, as shown below.

Sketch of a boat with a V-shaped hull

The width w of the hull at the waterline depends on the depth below waterline h:

(7)w=βh

The volume of water displaced by this boat is the area of the triangle below water level, times the length of the boat:

(8)V=12βh2L
  1. Show that the vertical motion of this boat is not SHO. Replace h with (yo+y), where yo is the equilibrium depth, and follow the example in the introduction.
  2. Rearrange the equation you got in the previous problem to be as close to SHO as possible by putting it in this form:

    (9)d2ydt2=ωo2(1+y2yo)y

    In this form, you can see that if y2yo is small, the motion is approximately SHO with angular frequency ωo. What is that ωo? What must be small for this approximation to be valid?

  3. If y2yo is not small, would the period of the boat’s oscillation be larger or smaller than To=2πωo? Use a numeric solution of the equation of motion for the boat to verify your answer.

  4. Plot the motion of the boat for various amplitudes. In addition to effects on T, how else does the motion differ from SHO? It will be helpful to plot both the solution to the differential equation and the SHO approximation,

    (10)y(t)=ymaxcos(ωot)

  5. We’ve neglected viscous damping, which is a bad idea in liquids! Redo your calculations, and plots, adding a viscous damping force

    (11)Fv=δdydt

    to your equations.

vhull.py

#!/usr/bin/env python

'''

vhull.py

Eric Ayars

June 2016

A solution to the vertical motion of a V-hulled boat.

'''

from pylab import *

from scipy.integrate import odeint

# definitions

w = 1.0 # Well, we need to pick something. Might as well

# normalize the frequency. :-)

delta = 0.2 # not sure what this should be, play with it!

def vhull_ODE(s,t):

# derivs function for v-hull ODE, without viscous damping

g0 = s[1]

g1 = -w*(1+s[0]/2)*s[0]

return array([g0,g1])

def vhull_ODE2(s,t):

# derivs function for v-hull ODE, with viscous damping added

g0 = s[1]

g1 = -w*(1+s[0])*s[0] - delta*s[1]

return array([g0,g1])

# Now set up the solutions.

time = linspace(0,20,500) # 500 points on interval [0,20]

# And now plot some things!

# Here's a low-amplitude one, should be approximately SHO.

A = 0.1 # Fairly small amplitude

yi = array([A,0.0])

answer = odeint(vhull_ODE, yi, time)

y = answer[:,0] # position is just the first row

plot(time,y, 'b-', label="Actual solution")

plot(time,A*cos(w*time), 'r-', label="SHO approximation")

A = 0.5 # Not small amplitude

yi = array([A,0.0])

answer = odeint(vhull_ODE, yi, time)

y = answer[:,0] # position is just the first row

plot(time,y, 'b-')

plot(time,A*cos(w*time), 'r-')

'''

# For damped motion, just use vhull_ODE2() instead of vhull_ODE.

A = 0.5

yi = array([A,0.0])

answer = odeint(vhull_ODE2, yi, time)

y = answer[:,0] # position is just the first row

plot(time,y, 'b-', label="Actual solution")

plot(time,A*cos(w*time), 'r-', label="SHO approximation")

'''

title("V-Hull Boat Solution")

xlabel("time")

ylabel("Position")

legend(loc="lower right")

show()

solutions

Exercise 1: A straight-sided boat

For a boat with vertical sides, the equation of motion can be derived by starting with Newton’s second law:

(12)ΣF=mgρgA(yo+y)=may

where A is the area of the boat’s cross-section at the waterline. yo is the equilibrium depth, so mg=ρgAyoand

(13)ay=d2ydt2=ρgAmy

This is in the form of the equation for SHO, with

(14)ω=ρgAm

The period of the boat’s oscillation will be

(15)T=2πmρgA

Exercise 2: A V-hulled boat

The derivation for the V-hulled boat follows the same general procedure.

(16)V=12βh2L=12βL(yo+y)2
(17)ΣF=md2ydt2=mg12ρgβL(yo2+2yoy+y2)

The equilibrium position is given by yo, so mg12ρgβLyo2=0 and

(18)d2ydt2=ρgβL2m(2yoy+y2)

This can be further simplified as

(19)d2ydt2=ρgβLyom(1+y2yo)y

From that equation we can see that if y2yo is small, then the motion is approximately SHO with

(20)ωo=ρgβLyom

There are an awful lot of constants in that equation, so to simplify our numeric calculations let’s just redefine things.

(21)d2ydt2=ωo2(1+y2yo)y

We can also define the unitless variable γyyo, which allows us to rewrite the equation in (almost) unit-independent form:

(22)d2γdt2=ωo2(1+γ2)γ

That’s the equation we need to send through the ODE solver.

The equation is approximately SHO if the amplitude is small. The easist way to control the amplitude is to set initial position to yi, with vi=0, so that the amplitude is yi.

Setting different values of amplitude gives different behavior: for small amplitude (γo=0.1) the result is nearly indistinguishable from SHO, but for larger values both the period and symmetry change. The figure below shows that at γo=0.5, the boat spends more time higher (the graph is inverted, since down is positive in our initial setup) and the period lengthens relative to the SHO approximation.


Solution to the V-hull boat oscillation

These effects are even more prominent at larger values of γo, as shown in the next figure.

Solution to the V-hull boat oscillation at large amplitude

There’s an opportunity here for the model to break down. If the boat gets completely out of the water, then the width of the boat becomes negative (ok, it doesn’t really but it does in the model) so then the volume becomes negative and the buoyant force becomes negative and the boat leaps away from the water exactly the way that real boats don’t. Be prepared to discuss this interesting result should the students get the amplitude too high.

Adding damping is relatively easy: just add another force term in the definition of the ODE. Results are shown below.

Solution to the V-hull boat oscillation with damping

 

Translations

Code Language Translator Run

Credits

Fremont Teng; Loo Kang Wee

Sample Learning Goals

[text]

For Teachers

Instructions

Solver Combo Box

 
Toggle this combo box to select their respective solver.
Selecting the EJSS RK4 Solver includes a playable animation.
 

Amplitude Field Box

 
Adjust this to change the amplitude of the wave.
 

Damped Check Box

 
Toggling this will determine if the oscillation is damped or not.
 
(Not Damped)


(Damped)
 

Play/Pause and Reset Buttons

 
Plays/Pauses and resets the simulation respectively.
 
That is all, do enjoy the simulation in the link below:

Research

[text]

Video

[text]

 Version:

  1. https://www.compadre.org/PICUP/exercises/exercise.cfm?I=117&A=anharmonic
  2. http://weelookang.blogspot.com/2018/07/harmonic-and-anharmonic-oscillations-of.html

Other Resources

[text]

end faq

{accordionfaq faqid=accordion4 faqclass="lightnessfaq defaulticon headerbackground headerborder contentbackground contentborder round5"}

1 1 1 1 1 1 1 1 1 1 Rating 0.00 (0 Votes)