Click on a cloud to download the Octave (mostly MATLAB) module

Module Documentation
All +
All 
Octave (Matlab) Modules
 + 
analyzer.m
Purpose
1.The first portion of this script takes the water level
data and determines the wave heights. If first translates
the height data to "eta" by subtracting the mean water
level trend over the time period. In the down crossing
loop, 'z' becomes the times that eta crosses zero. 'zc'
is an array that records each 'i' where eta crosses zero,
so that it can be referenced in the eta array. The next
loop defines the wave height as simply the max eta in each
range minus the minimum of the range between 'zc' increments.
Finally, it plots the wave height as a function of time.
2. Graph the normal distribution and the log normal distribution of the wave heights.
3. Determine the 100 year wave height based on the regression of the chosen distribution.
'HYH' is the 100 year wave height.
4. Calculate the period
Since the program aims to measure the pressures resulting from a 100 year occurance wave, it
would not work to simply take the period calculated directly from the data. Assuming that the
user would know how the approximate size of the body of water, the script does a reverse
of the JONSWAP method to determine the required wind speed to generate a wave height equal
to the calculated hundred year height.
5. The next part of this program determines the required wind speed for a fetchlimited scenario
and a four hour durationlimited scenario. The scenario that requires the higher wind speed
is the limiting factor, so the program choses that scenario and determines the corresponding
wave period for the wind speed.
6. Calculate the wavelength.
7. Calculate the pressures as a function of height based on the methods in the Coastal Engineering
Manual by the Army Corps of Engineers (separate link in this report).
Inputs
1. Prompts for the fetch length up to the structure.
2. Prompts for depth at the toe of the structure.
Outputs
1. Figure 1: Plot of wave heights vs. time.
2. Figure 2:
a) Normal distribution off wave height vs. time
b) Log normal distribution of wave height vs. time
3. Figure 3:
a) Vertical hydrostatic plot against the structure.
b) Pressure against the structure from wave crests along the height of the structure.
c) Pressure against the structure from wave troughs along the height of the structure.
4. Figure 4:
a) Pressure distribution along the stucture for a wave crest.
b) Pressure distribution along the structure for a wave trough.
 + 
eliminate_trend.m
 Purpose
Computer water surface profile; subtract off
water surface fluctuations.
 Input
Wave height matrix, H
 Output
Water surface profile, heta.
 + 
is_breaking.m
Purpose
The plots of pressure on the wall don't take into account
wave breaking conditions. This method determines if a wave
would be breaking based on the "Miche" breaking criteria, and
displays to the user whether or not the 100 year wave would
be breaking at the location (depth) where the hypothetical wave
wall would be.
Inputs
1. Wave length, L
2. Water depth, d
3. Hundred year wave height max, HYH
Output
A message displays in the Octave window indicating if a wave is breaking.
 + 
period.m
Purpose
Since the program aims to measure the pressures resulting from a 100 year occurance wave, it
would not work to simply take the period calculated directly from the data. Assuming that the
user would know how the approximate size of the body of water, the script does a reverse
of the JONSWAP method to determine ther required wind speed to generate a wave height equal
to the calculated hundred year height.
The program determines the required wind speed for a fetchlimited scenario
and a four hour durationlimited scenario. The scenario that requires the higher wind speed
is the limiting factor, so the program choses that scenario and determines the corresponding
wave period for the wind speed.
This method determines the wave period for such a scenario.
Inputs
1. HYH: the hundred year wave height.
2. F: the frequency of the HYH.
Output
The period of the hundred year wave striking the structure.
 + 
pressure.m
Purpose
The method calculates the pressure distribution along the structure for a give wave crest and
a given wave trough.
See ACE_MAN_P166.pdf, p 168
Inputs
1. HYH: the hundred year wave height.
2. L: HYH wave length
3. d: HYH wave depth
Outputs
1. xs: hydrostatic pressure distribution at wave crest along the structure.
2. xw: pressure from waves at crest along the structure.
3. xt: pressure from waves at the trough.
4. x1: pressure distribution from wave crest.
5. x2: pressure distribution from wave trough.
6. y: vertical distance along the structure's wall.
 + 
waterLevel.m
Purpose
Generate random, irregular water level data. This method obtains a wide spread of wave heights
Note: a sine function with a random noise component merely creates an almost constant wave
height. To get a wave simulation that varies with time, multiply two sine functions, one with a high
frequency and the other with a period that spans the whole data set. The component that includes
a random function multiplied by a sine function was introduced to simulate wave choppiness that
varies over time, ostensibly due to occassional storms or wind gusts.
Inputs
N : seed for random number generator
dt: time increment
Output
H : random wave height as a function of time.
 + 
wave_height_100_year.m
Purpose
Calculates the one hundred year wave height based on the regression of a userprescribed
normal or log normal fit and the probability of a 100 year event.
See wave_height_stats
Inputs
1. n : the number of time sample intervals for a given wave.
2. dt : incremental change in time
3. nw: number of zero crossings in the wave surface profile  used for standardizing wave stats
4. Height: time based wave height data
5. Z: a reduced variate corresponding to a probability for a given wave height.
6. LH: log of the height.
Output
HYH: Hundred year wave height.
 + 
wave_height_stats.m
Purpose
This method divides the wave heights into 50 equal bins.
The 'Occ' array stands for "occurance," and it says how
many wave heights are greater than or equal to the "Height"
bin size. 'Cum_Occ' stands for "cumulative occurance." It
gives the cumulative amount of wave heights at or below
the defined 'Height' bin.'P' is the corresponding probab
ility of the wave height falling into each 'Height' bin.
'Z' is the reduced variate corresponding to each probability
Input
1. h : wave height as a function of time
2. nw: number of zero crossing of a given wave profile
3. bin: number of wave height classes
Outputs
1. Height: a distribution of heights based on number of bins in a histogram.
2. LH: the log of the Height distribution
3. Z : the reduced variate corresponding to each probability.
 + 
waveLength.m
 Purpose
Calculate the wave length based on wave period and depth.
 Inputs
1. Wave period, Tp
2. Water depth, d
 Output
Wave length, L
