Showing posts with label ocean waves. Show all posts
Showing posts with label ocean waves. Show all posts

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.  

Sunday, April 23, 2017

HP Prime and TI-84 Plus CE: Shallow Wave Analysis

HP Prime and TI-84 Plus CE:  Shallow Wave Analysis

Introduction



The program H2OWAVES calculates wave speed, impedance, and wave flux for shallow ocean waves.  The following are assumed:

1. The criteria of λ < D/20 is assumed where λ is the length of the wave.
2. The water assumed to be 0°C, where the density (ρ) is 1,000 kg/m. 
3. SI units are used.  For gravity, g = 9.80665 m/s^2 is used.

Formulas Used

Wave Speed (m/s):  v = √(g * D)
Wave Impedance (Mks):  Z = ρ * v
Wave Energy Flux (W/m):  I = (ρ * g * H)^2/(2 * Z)
Maximum Possible Length (m):  λ = 20 * D

HP Prime Program H2OWAVES

EXPORT H2OWAVES()
BEGIN
// EWS 2017-04-21
// Shallow Wave Analysis
// for D/L<1/20
// SI Units

LOCAL D,H;
LOCAL v,Z,I;

INPUT({D,H},
"Wave Analysis",
{"D: ","H: "},
{"Depth (m)","Wave Height (m)"});

v:=√(9.80665*D);
Z:=1000*v;
I:=(9806.65*H)^2/(2*Z);

PRINT();
PRINT("Wave speed (m/s): "+v);
PRINT("Impedance (Mks): "+Z);
PRINT("Wave Flux (W/m): "+I);

RETURN {v,Z,I};

END;

TI-84 Plus CE Program H2OWAVES

"EWS 2017-04-23"
"SHALLOW WAVES"
"D<F/20"
Disp "SHALLOW WAVES"
Input "DEPTH (M): ",D
Input "HEIGHT (M): ",H
√(9.80665*D)→V
1000*V→Z
(9806.65*H)^2/(2*Z)→I
Disp "WAVE SPEED (M/S):",V
Disp "IMPEDANCE (WKS):",Z
Disp "WAVE FLUX (W/M):",I

Example

Input: 
Depth:  3.2 m
Height:  0.49 m

Output:
Wave Speed: 5.601899678 m/s
Impedance:  5601.899678 Wks
Wave Flux:  2060.953478 W/m

Source:

Ingard, K.U. Fundamental of Waves and Oscillations Cambridge University Press:  New York 1988.  IBSN 0 521 32734

Surf’s up!  Eddie


This blog is property of Edward Shore, 2017.

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...