Friday, January 12, 2018

TI-80 and TI-84 Plus CE – Two Opposing Ocean Waves

TI-80 and TI-84 Plus CE – Two Opposing Ocean Waves

Introduction

The program OPPTIDE draws an ocean wave consisting of a composite of two opposite waves at time t seconds. 

Inputs:

L = wavelength of the wave in feet (λ)
A = amplitude of the wave in feet
H = depth of the ocean in feet
T = time that the wave is drawn, in seconds

Constants:

G ≈ 32.174049 ft/s^2  (approximate Earth’s gravitation constant)

Output: 

Drawing of the wave described by the equation:

y = A cos (K*X – W*T) + A cos (K*X + W*T)  (X varies, T is a constant and given), where:
K = 2*π/L
W = (g*K*tanh(K*H))

Note:

The tanh, hyperbolic tangent function, is not on the TI-80.  Therefore the following definition is used:

tanh x = (e^(2*x) – 1)/(e^(2*x) + 1)

The tanh function is found only in the catalog of the TI-84 Plus CE ([Shift], [ 0 ]).

TI-80 Program OPPTIDE

DISP “2018-01-10 EWS”
RADIAN
0→XMIN
50→XMAN
5→XSCL
32.17049→G
DISP “FEET”
INPUT “WAVELENGTH:”,L
INPUT “DEPTH:”,H
INPUT “AMPLITUDE:”,A
-A-1→YMIN
A+1→YMAX
1→YSCL
INPUT “TIME:”,T
(2π)/L→K
(e^(2KH)-1)/(e^(2KH)+1)→Q
√(QKG)→W
“A*COS(KX-WT)+A*COS(KX+WT)”→Y1
DISPGRAPH

TI-84 Plus CE Program OPPTIDE

“EWS 2018-01-10”
Func: Radian
0→Xmin: 50→Xmax: 5→Xscl
32.174049→G
Disp “DISTANCE IN FEET”
Input “WAVELENGTH:”, L
Input “AMPLITUDE:”, A
-A-1→Ymin: A+1→Ymax: 1→Yscl
Input “OCEAN DEPTH:”, H
Input “TIME (S):”, T
2π/L→ K
√(G K * tanh(KH))→W
“A cos(KX – WT) + A cos(KX + WT)” → Y1
GraphColor(1,BLUE)
DispGraph

Example

At T = 1 second with parameters:
W = 75.5 feet
A = 4.76 feet
H = 25 feet

See the results below.



Source:

Salmon, Rick.  “Intro to Ocean Waves”  Scripps Institution of Oceanography.  UC San Diego  December 7, 2015.  http://pordlabs.ucsd.edu/rsalmon/111.textbook.pdf  Retrieved December 26, 2017

Eddie


This blog is property of Edward Shore, 2018.