HAND-HELD CALCULATOR ALGORITHMS FOR COASTAL ENGINEERING 



by 

 Todd L. Walton J Jv., l^illiam A. BivkemeieVy and J. Riahard Weggel 



I . INTRODUCTION 



The advent of the hand-held programable calculator has led to the develop- 

 ment of numerous programs in various fields of engineering and science. 

 Coastal engineering is no exception. This report provides algorithms for a 

 number of calculator programs useful in performing coastal engineering calcu- 

 lations, primarily in the area of wave transformations and wave generation. 



There are basically two types of hand-held programable calculators: those 

 that use algebraic logic, such as Texas Instruments, Algebraic Operating System 

 (AOS) notation, and those that use Reverse Polish Notation (RPN) , such as 

 Hewlett-Packard. For the six programs presented herein, versions in each type 

 of notation are provided — AOS designated by "A" and RPN designated by "R." 

 Each program is documented, the assumptions are briefly described, and refer- 

 ences to more detailed presentations of the theory are given. 



Since subtle differences exist among various brands of calculators and 

 among various models by the same manufacturer, the programs presented may need 

 to be modified to adapt them to other brands or models. These programs were 

 prepared and checked, using the Texas Instruments TI-59 (AOS) and the Hewlett- 

 Packard HP67 (RPN) . Users should refer to the operating manuals supplied with 

 individual calculators. Algorithms may be set up specifically to meet some 

 limiting conditions. For example, some programable calculators have a limiting 

 restriction on the number of program steps accepted so a program must be re- 

 vised to meet the limitation. The Texas Instruments TI-57, for example, 

 accepts only 50 program steps. Algorithms may be adapted to meet this limita- 

 tion by requiring prior calculation of input parameters either manually or by 

 another program.. 



Each of the AOS programs incorporates TI-59 compatible print routines which 

 print and label all input and output parameters. The user only has to enter 

 the input parameters and the results are automatically computed and printed. 

 Since the printing routines increase program length by as much as 25 percent, 

 use of a magnetic card for permanent program storage is recommended. All 

 print steps are marked with asterisks and need not be entered if printing is 

 not desired. 



II . PROGRAMS 



Six programs (100, 101, 102, 103, 104, and 105) are presented in this 

 report. Program 100, a simple program that computes linear wave theory wave- 

 length for a given depth, is designed to be used as the basis for any program 

 that requires wavelength; in fact, it has been incorporated into programs 101, 

 102, and 105. 



