THE USE OF COMPUTERS IN NAVAL ARCHITECTURE EDUCATION Raymond A. Yagle Department of Naval Architecture and Marine Engineering The University of Michigan June 1, 1962 This material is distributed by The Ford Foundation Project on the Use of Computers in Engineering Education at The University of Michigan. This report appears in the library edition of the Final Report of the Project and is also issued as a separate booklet. Similar "Curriculum Reports" for other engineering disciplines are also available on request.

ABSTRACT In recent years, the Department of Naval Architecture and Marine Engineering of The University of Michigan, has been exploring the use of digital and analog computers in its undergraduate curriculum. Two of the Department's faculty members and one from the University of California at Berkeley have participated in faculty training programs of the Project on the Use of Computers in Engineering Education. This report describes the Department's curriculum, the staff's attitude toward computing work, and in some detail, one Departmental undergraduate course which involves considerable computer use by students. A selected set of five computer-oriented example problems which have been used in this course are also included. These problems may be considered as a supplement to the 99 example engineering problems, including several of interest to Naval Architects and Marine Engineers, which have been published previously by the Project. -G1 -

Table of Contents Page I. Introduction G3 II. Brief Description of Departmental Curriculum G3 III. Departmental Staff G5 IV. The Department's Computer Course G5 V. Anticipated Expansion of Computer Utilization G6 VI. Conclusion G10 VII. Sample Problems Gll 100 Tank Volume and Centroid G12 101 Calculations for the Curves of Form and Bonjean Curves G17 102 Program to Compute and Plot Curves of Form G28 103 Calculation of the Drafts Fore and Aft of a G45 Damaged Ship 104 Floodable Length Calculation G53 VIII. References Ol TABLE IG List of Sample Problems Gll -G2 -

USE OF COMPUTERS IN NAVAL ARCHITECTURE EDUCATION I. INTRODUCTION This report has been prepared to describe the experience of the Department of Naval Architecture and Marine Engineering at The University of Michigan in the use of electronic computers in regular courses within its curriculum. This report is intended to be just one of a number of similar discussions which will be concerned with each of the various engineering disciplines, and much of the background and explanatory information that would be common to all of the reports is described in references 1, 2, and 3. However, this report may well achieve circulation independent of the overall report (or at least closer examination by those concerned with engineering education in this particular discipline) and thus should be to some degree complete in itself. Therefore,an admittedly brief preface follows. An organized effort to integrate the use of computers into engineering education has been under way within the College of Engineering since 1958. Prior to this, individual professors had occasionally solved problems on computers for advanced courses. Some graduate students had taken a digital computer course in the Mathematics Department, and were able to use their knowledge in their research. In addition, analog computers were used in instrumentation courses taken by some of the students. The effort was not particularly widespread until late 1959, however, when support was given by the Ford Foundation for an experiment in the use of computers in actual engineering instruction. The Ford Foundation grant provided the opportunity for many resident faculty members to learn programming procedures and to use computers. The previous progress reports of The Project on the Use of Computers in Engineering Education cover in detail how this was done and include much other background information pertinent to equipment, visiting faculty arrangements, workshops, etc. Let it suffice to state that an enthusiastic and effective project director assisted by a college-wide committee and several very competent technical assistantshave managed not only to bring about the utilization of computers to some degree in perhaps one hundred regular engineering courses, but also have fostered serious consideration on the part of almost the entire faculty as to how beneficial and how suitable this utilization has actually been. This report attempts to evaluate these considerations for naval architecture and marine engineering while also describing the extent to which computers have been used and will be used in the immediate future. II. BRIEF DESCRIPTION OF DEPARTMENTAL CURRICULUM The undergraduate student electing to study naval architecture and marine engineering at The University of Michigan does not really become associated with the Department until his second year of enrollment. His first course in the Department is essentially introductory and includes terminology, fairing a set of lines, tonnage considerations, etc. and is normally taken in his third semester. During the next semester, a course dealing with stability, flooding, launching, etc., -G3 -

called Form Calculations I, is taken. It was in connection with this course that serious consideration as to the need to utilize digital computers first arose. The subject matter was handled in the traditional manner, and Simpson's rules, displacement and centers sheets, waterplane sheets, etc., were presented early in the course. The length of the calculations involved limited the number and scope of the problems assigned, and a second problem course, Form Calculations II, with only 2 hours credit (as opposed to 3 for the first course) was required for those students selecting the naval architecture option. Those students primarily interested in machinery, and hence the marine engineering option, were not required to take the second course. (A third option, Maritime Engineering Science, has very recently been added for those students primarily interested in ship research and development problems; students selecting this option will probably obtain more computer experience than those in either of the other options, but it is too early to report on this here.) In this second course more extensive problems were handled and the course really included little else. Thus, this course was the ideal choice for immediate revision and the initial use of digital computers by naval architecture students. The more general 3 hour course dealing with the principles of stability, flooding, etc., could be left essentially unchanged and the computer methods of calculation referred to only generally. During the 1960-61 and 1961-62 academic years the calculation course was taught as a computer course; the details of this experience will be presented later. Those students in the naval architecture option proceed to take, in the Department, two courses in ship structures and stress analysis as applied to ships, one course each in marine auxiliary and marine propulsion machinery, one in resistance, propulsion, and propellers, one in specifications and contracts, one in ship dynamics (ship motions and maneuverability), and three courses in design. Thosestudents in the marine engineering option also take the first course in ship structures, the same courses in resistance, propulsion, and propellers, and in auxiliary machinery, and several courses dealing with the design of marine power plants. In addition, some elective courses such as small craft design and economics in ship design and operation, as well as a number of graduate courses, are taught within the Department. These, then, are the other courses which have utilized or may utilize computers and are thus properly subject to discussion in this report. The undergraduate and graduate students in the Department obviously also take many courses outside the Department. Those in both options normally take seven courses in mechanics from statics through advanced structural mechanics and one in the theory of vibrations as applied to ships, mechanical engineering courses in machine design and themodynamics, courses in English, mathematics, economics, graphics, electrical engineering, materials, etc. The extent to which computers have been utilized in some of these courses also has some bearing on the subject of this report and will be treated later as required.

The Use of Computers in Naval Architecture Education III. DEPARTMENTAL STAFF The courses mentioned previously are taught by a five man permanent staff supplemented by one or two teaching fellows and an occasional visiting professor. At the present time, three of the regular faculty members have some familiarity with computers. Of these three, only two have some facility in programming for digital computers. The writer was fortunate enough to have been excused from teaching one regular course during the first semester of the 1960-61 academic year (through the auspices of the Ford Foundation Project) and was able to gain some limited skill in programming utilizing this released time. A second staff member had a similar opportunity during the second semester. The third staff member had some industrial analog experience prior to joining the faculty. The two Ford Foundation participants are thus in large measure involved with computers only because of the existence of the Project and very probably would not have obtained their experience otherwise. The writer also participated in the Project's activities during the summer of 1961 and was able to extend his experience considerably at that time. IV. THE DEPARTMENT'S "COMPUTER COURSE" As explained previously, the two hour credit course called Form Calculations II has been and is at the present time very often referred to as the "computer course." The material covered in the course has not been appreciably altered from what was its standard content for many years; but the means by which the calculations are carried out have been changed from desk calculating machines first to an IBM 704 computer, now to a 709 computer, and soon to a 7090 computer. The initial phases of this change began in the 1959-60 academic year, but the course was not entirely oriented to digital computers until the 1960-61 academic year. Thus at the time this report is written only four semesters of experience are available from which to form some sort of judgment as to how well the change has worked out and how far reaching the results may be. In addition, each of these four semesters have not been typical of the succeeding semesters in that the first two times the students enrolled had to be taught the MAD language and acquainted with the details of submitting problems to the Computing Center. While some of the students were concurrently taking the one hour credit programming course, then Mathematics 73, it seemed essential to teach MAD as fast as possible so that some naval architecture problems could be handled before the semester was half over. The four evening lectures presented by the Assistant Director of the Project at the beginning of each semester were ideal in this respect and aided considerably in giving the students a fast but somewhat brief overall insight into what programming entailed. The class periods (two hours per week) for perhaps the first seven weeks were also used to teach the MAD language. The contents of the Primer (reference 4) -G5 -

prepared under Project auspices were covered, and several sets of procedural exercises which also utilized naval architecture oriented questions where possible were used for home assignments. During the past year,the students taking the course had previously completed the one credit hour programming course (now Mathematics 373) and for the most part knew the MAD language well enough so that only a few periods of review were needed before starting in on naval architecture problems. While there seems to have been a considerable variation in the ability of students from different sections of the course (some having evidently covered more than others), this variation was less apparent during the second semester and presumably will, in time, not be great. In any case, the first lectures in the naval architecture course are primarily concerned with "THROUGH statements" and "conditionals," and discussion of the manner in which input and output can be handled so as to be general enough to deal with a wide range of data organization and to provide neat and descriptive arrangements of the answers sought. The next lectures deal with Simpson's first rule and the various ways it could be expressed in computer language, including use of both internal and external functions. The students are then assigned the relatively simple tank volume and centroid problem included as an example later. Thus far, only four formal problems in all have been included in any one semester, and only four in the latest one. Initially, only two were attempted, but this was because of the time spent in learning the language. The writer feels that during coming semesters the number may be increased to six, but that this is probably about the limit. It may be possible to have eight standard problems and to allow students to make a choice among some of these for their last few problems. It should be noted that all of the problems must be based on the prerequisite course, Form Calculations I, and thus the subject matter covered in these formal problems is limited. Hydrostatic curves, Bonjean curves, tank volumes and centers, flooding problems, floodable length calculations, launching,curves of statical stability, weights and centers, and damaged stability problems are thus about all that might be included. This is deemed sufficient, however, although the writer has not as yet programmed all of these for class purposes. The examples given later in this report include some of the problems now used. A question pertinent to this report is whether naval architecture students should stop here in their utilization of the digital computer. The following section deals with this matter. V. ANTICIPATED EXPANSION OF COMPUTER UTILIZATION While the Department's "computer course" does assure that we are at least providing our current students with some familiarity and appreciation for the digital computer as a mathematical tool, the course is probably taken too early in the student's schedule to allow him a full realization of how powerful and worthwhile it can really be. Calculations of the type -G6 -

The Use of Computers in Naval Architecture Education done in the course are often just as easily done on desk calculators; it may seem to the student that his primary benefit in using the computer is that the time consumed in doing even very lengthy problems is considerably reduced once his programming skill is adequate to produce essentially correct programs (with only minor corrections necessary after his program is initially written). This is not strictly true, of course, as the preparation of the algorithm used to solve a problem requires the student's clear understanding of the problem and its concise statement in mathematical language. The ability to do this correctly is normally proof that the student has learned much about the subject of the problem; this further understanding of the subject is a benefit far more important than the possible time saved. Thus it is believed that the basic naval architecture subjects dealt with in the computer course are being learned, and understood, better than in previous years because of the use of the computer. Would it not then be desirable for the same approach to be used for all the appropriate subjects covered later in the student's curriculum? The answer is not an easy one to arrive at for several reasons. One reason is that, for the mcs t part, the instructors (and hence the courses) involved are at present not prepared for such action. There are courses which could well be altered not so much in content as in emphasis, to utilize more numerical methods and hence the digital computer for problem solutions. But this could only be done satisfactorily by instructors with programming facility, who at least have an appreciation of the difficulties inherent in stating a problem in a manner that allows for computer solution. An even more important reason is that there just does not seem to be sufficient time. Generally speaking, courses taken in the later undergraduate years contain more material which is covered at a much faster pace than that in the more or less introductory courses. This is possible because the student is more mature and has had the fundamental training in mathematics and mechanics needed in many of the later courses. One does not tediously work through to the known solution of every differential equation nor analyze in detail each of all possible force systems in dealing with, for example, the motion of a ship in waves. The results of parametric studies can be discussed and understood by the student without duplicating each and every iteration involved. If an instructor were to introduce into one of these later courses just one application of the digital computer, discuss it thoroughly in class, and supplement the discussion with a home problem of sufficient scope to make the student's efforts worthwhile, he would of necessity have to spend less time on some other aspect of the course subject. This is particularly true at present present when there are occasional changes in there languae re occasionsal changes in the language and operation procedures stemming from upgrading of the equipment at the Computing Center and increasing sophistication on the part of those responsible for its operation. Thus, a student or an instructor who has not been active in using the computer for even one year finds he must first be brought up to date before he can correctly write his program or submit his program to the Computing Center. Further, he can seldom write an error-free program on his first try and more often than not it may take several weeks to obtain the desired results for a complex problem. -G7 -

Another reason for not necessarily attempting to utilize the computer in later courses in the Department is that the student very likely will use the computer in courses he takes in other departments. This seems to vary from semester to semester in certain courses, but there seems at present every likelihood that it will happen at least once per semester. Also, there is no reason why the student should not on his own initiative use the computer either for assigned problems for which it may be applicable, or for problems he originates himself. There is a danger, however, that he may become so engrossed in using the computer that he neglects or loses interest in the engineering aspectsof the problem or course involved. This has happened even on the basis of the first mathematics course in programming, and may not be particularly bad if the student receives the encouragement and has the ability to shift to programming and computer-related work as his intended profession. But there is the possibility that his fascination may be temporary and his engineering edcuation interrupted sufficiently to make his continuing studies difficult and troublesome. The most satisfactory answer to this whole question seems to the writer to be the adoption on the part of all instructors of certain aspects of what might be termed "computer-oriented thinking" for certain material taught in their courses. A course in ship economics, for example, may include analysis of the costs of building a ship in conjunction with such facets of a trade as consideration of the route to the number of years the market may exist. Such a problem solution depends upon so many variables that it is far too complex to discuss each detail adequately. Analysis of the complete structure of a ship, or even the form of the hull, or the design of the power plant, or many other problems faced by the naval architect and marine engineer involve so many details that only a few of them can be covered in any one course. But the instructor can mention most of these, even if only briefly, and can indicate in detail the part played by particular problem aspects and their analytical evaluation. Not only can he make use of the results of such computer studies as are now becoming available in the literature in his discussion, but he can also present much of the material he is covering in greater detail. This allows the student to see clearly parameter inter-relationships and hence allows the student to extend and enlarge his original studies by means of digital computers if time is available. This does not imply that this is not being done now, nor that the results of a computer solution of some problem may invalidate answers or relationships already known either from experience or from less cumbersome calculations made prior to the general availability of digital computers. But naval architects and marine engineers, in common with, other design-oriented engineers, must constantly see particular problems or details not only with regard to their effects on the finished product but also the relationships of the resulting effects on the myriad of other problems or details which they or others are dealing with as well. A systematic approach is thus often a necessity even though it may in some instances never have been clearly defined or stated as such. Experience with the computer cannot but help any instructor to present such approaches more logically and more succinctly, even if the experience is gained in entirely different areas. -G8 -

The Use of Computers in Naval Architecture Education The student should also be able to acquire a similar sense of the need for considering each problem or detail he deals with in his courses in relationship to his education as a whole. If he has experience with the computer and computer-oriented thinking early in his scholastic career, he senses from his lectures that this same thinking is shaping his instructors' presentation of his course material. This, in the writer's opinion, is the most worthwhile and the most permanent impact that the use of computers in engineering education can have. Whether the student solves his problem on the computer or not is for the most part a question of whether he has one available. Acknowledging that no student should graduate from an engineering school today without having successfully programmed some problems in some computer language, it is not essential that he continue to keep fully abreast of computer development or necessarily maintain whatever programming skill he may have acquired. All engineering students take one or more engineering drawing courses early in their college careers in which they develop some skill in producing engineering drawings. This is a skill that for the most part they need not maintain. They will, however, retain an appreciation of what an engineering drawing should include and presumably be able to read difficult and complex drawings despite some changes in conventions or other details. Similarly, a student who has done some programming work has an appreciation of what is involved and should therefore be better able to communicate with expert programmers at some later time even if the language is slightly different. He may well be able to read the essential part of any program that he may encounter and understand what is intended. Thus the writer feels that the Department of Naval Architecture and Marine Engineering here at The University of Michigan has not been negligent in utilizing digital computers in instruction even though the extent of such use has been limited. The expansion of computer utilization in the Department's courses will not be extensive in the near future. The immediate extension that would seem desirable, however, raises several other significant questions. One of these questions concerns the possibility of using prepared programs, written in the available language so that students might understand them clearly, in classroom teaching. The advantage of such a scheme is the saving of student time, particularly if the computer outputs are also given and if the student does not have to deal with either keypunch or printer. Much of the computer approach would be gained by the students even if they were not forced to prepare the algorithm themselves. This device could also keep students interested in and more aware of computers than discussing just the results of such programs, whether written by the instructor or found in the literature. The question is whether the idea is sufficiently beneficial that the instructor should make what might (in those cases when he would have to transcribe a program from another language into the one available to the students, for example) be an appreciable effort to include it as a routine -G9 -

part of his course content. Perhaps just one such handout in all courses where it could be done would be enough. Most of the graduate students in the Department take Mathematics 473, a more advanced computer course, and the handouts for graduate courses could presumably involve reasonably complex computer programs. Another way in which the use of computers could well be extended concerns the increased use of the analog computer. This is done in undergraduate courses taken by naval architecture and marine engineering students outside the Department, and normally only infrequently for seminars or other special graduate courses within it. With the computer pre-programmed to solve the problem and the output displayed on plotters or scopes of sufficient size for all to see, it would not necessarily matter whether the students fully understood either how the analyzer or function generator works or the scaling problems involved for them to receive a more vivid impression of the dynamic solutions to the problem being studied than the instructor's curves upon the blackboard. This also would mean an extra chore for the instructor each time he wished to take advantage of it, but the writer's experiences have always been pleasant because of the readiness of others more experienced to lend assistance. The availability of competent technical assistants would therefore seem to the writer to be more important than the availability of more elaborate equipment in fostering the increased use of analog demonstrations. And, once again, certain students would always want to make further use of the equipment on their own and could do so to their advantage if properly supervised and assisted by a technical assistant. VI. CONCLUSION The preceding description and discussion were meant to give the reader the impression that computer use in naval architecture education is a fact and that the most difficult problems involve questions of the most beneficial computer use. Despite the questions raised and the difficulties suggested, it is the writer's conviction that none of these are incapable of resolution. They are in large measure only those of the present, and are appropriate in this report only because the more difficult problems of several years ago are already resolved in a manner that fostered computer utilization in engineering education. It is not sufficient to relegate the computer to the role of merely another mathematical tool, and in so doing to dismiss both the stimulus it has given to training in numerical methods and the incentive it has provided for logical and systematic thinking. -G10 -

The Use of Computers in Naval Architecture Education VII. SAMPLE PROBLEMS The sample problems listed in Table IG are included in this report with several thoughts in mind. The reason for selecting only the five problems presented is that they have all been used in the computer course described earlier. TABLE IG List of Sample Problems Number* Title Author Page 100 Tank Volume and Centroid R. A. Yagle G12 101 Calculations for the Curves of Form and Bonjean Curves R. A. Yagle G17 102 Program to Compute and Plot Curves of Form Joseph H. Rodnite G28 103 Calculation of the Drafts Fore and Aft of R. A. Yagle and G45 a Damaged Ship J. R. Paulling,Jr. 104 Floodable Length Calculation R. A. Yagle and G53 J. R. Paulling,Jr. These problems may be considered as a supplement to problems 1 through 99 published in previous reports of the Project. The first of these problems is simple and direct and clearly indicative of where one must start in learning to program for a given discipline. The second problem is not particularly more difficult in concept than the first, but is typical of many naval architecture calculations in both its length and the necessity for an orderly and systematic approach to successfully complete the task. The third problem is really just a more involved and sophisticated solution for the second one and is included to show how well one particular student was able to demonstrate his grasp of the intricacies of available plotting subroutines even though at the time he had not been given any instruction or incentive to do so. The fourth and fifth problems were given to the students without more than casual suggestions as to how they might be solved. The programs given are not actually student solutions (nor were those for the first two), but several of their solutions were every bit as direct and in some instances written in a more logical sequence. All problems are programmed in the MAD language which is described completely in Reference 4. Other sample problems from other courses (including one analog problem) might also have been included, but for the most part these were done either by undergraduate students working on their own, or by graduate students or faculty members for seminar courses. While these problems may have been more worthwhile from the viewpoint of the experienced naval architect than those actually included, they now seem to the writer not in keeping with the purpose of this report. VIII. REFERENCES 1. Electronic Computers in Engineering Education, First Annual Report, Project on Use of Computers in Engineering Education, The University of Michigan College of Engineering, Ann Arbor, Michigan, August 1960. 2. Use of Computers in Engineering Education, Second Annual Report, Project on Use of Computers in Engineering Education, The University of Michigan College of Engineering, Ann Arbor, Michigan, December 1961. 3. Project on the Use of Computers in Engineering Education, Third Progress Report, The University of Michigan College of Engineering, Ann Arbor, Michigan, June 27, 1961. 4. A Computer Primer for the MAD Language, Organick, E. I., Ann Arbor, Michigan, 1961. -Gll

Example Problem No. 100 TANK VOLUME AND CENTROID by R. A. Yagle Problem Statement as Given to Students Write a MAD program to compute the total volume and centroid of a side tank in a ship. The tank bottom and top are horizontal planes; and three of the sides are vertical planes. The tank is built into the side shell of the ship. Consider the following information as given: W = width of tank, in feet H = height of tank, in feet NV = No. of intervals vertically between offsets NL = No. of intervals longitudinally between offsets OFS (I,J) = offset at vertical Sta. I, longitudinal Sta. J. The gross volume should be corrected for effect of internals by deducting 5%. Print out corrected volume and centroid coordinates properly labeled. Data to be used: I W = 10 ft H = 20 ft NV = 8 NL = 4 J T0 1 2 3 4 5 6 7 8 0 3.00 4.00 5.00 6o00 7.00 8.00 9.00 10.00 11.00 1 4.00 5.00 6.oo 7.00 8.00 9.00 10.00 11.00 12.00 2 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 3 6.o0 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 43 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 J / -G12 -

Instructor's Solution This problem is an exercise in the proper use of Simpson's First Rule. The solution involves finding the areas of the nine horizontal planes (I=0O to 1=8) and then evaluating the total volume by integrating these. At the same time the vertical moment of the volume about the base plane can be found by using the appropriate lever arms for each of the horizontal areas. The vertical location of the centroid of the total volume is then simply the vertical moment of the volume divided by the volume. The longitudinal centroid is found by applying the same technique to the five vertical planes (J=O to J=4). The transverse centroid determination involves finding the moment of each vertical plane about its inboard edge and integrating these to obtain the transverse moment of volume. The Simpson's Rule multipliers are separated and listed for convenience in explaining the program. List of Symbols OFS (I,J) AH(I) VOL VM AV(J) AM(J) LM TM Flow Diagram Offsets,in feet Areas of horizontal planes, in square feet Volume, in cubic feet Vertical volume moment, in feet4 Areas of vertical planes, in square feet Functions of area moments of vertical planes about inboard edges, in cubic feet. Longitudinal volume moment, in feet4 Transverse volume moment, in feet4 (7 LfTI',I N3 *ML) - l-a fT - * 3)/(. L *,^) H M a4-Ws H/(6, p J V) mu LU.TZH-) w V 0 lT_3_^_ if _ ______) _______. * _) O/ACW. \A^ ALPHA AN('f).D. \ -~K -<S> -G13 -

Tank Volume and Centroid Flow Diagram, Continued Vo lo,. o... L^ pqy VO \ o.A/ VOL= V OLD (Ah()iSAH(tN t)tA #(CtX)) 'f: 2M A4 H44+(^i)#t+) 4 *(X+z). ARrwfz))* fW_44I ~:qe,,..oszrMoA - 4AMo 1 \ c~ - )X4 V ^- T.A*1 ( < D: ^ ^fY!, AT) + (oF-,)- t4.+-.oF s (r+-, 3 P oFS(t+z,))*t z 6 6 A@- )/WtA q4g)+6sr).g 2 + 4*o Jj(jT) P. oZotf(X2J).P.z)^ VlJTC H~ 73: _1M LO 4 A V 4-T ) -t.4. * (x~(~' ~l ) *.4 V/~cj,+ I ) 0- 1LeTt Xe M/V@o; L sIT | OL Z IOL* Oqo I CA"

Example Problem No. 100 MAD Program and Data $COMPILE MAD, EXECUTE, DUMP, PRINT OBJECT PRINT FORMAT TITLE VECTOR VALUES TITLE = $ 1H1, S14,33HNAVAL ARCHITECTURE 300 P 1ROBLEM 1 / S12t 33HTHE VOLUME AND CENTROID OF A WING TANK /S2 25, 11HR. A. YAGLE //// * $ START READ FORMAT ONE, W, H, NV. NL VECTOR VALUES ONE = $ 2F8.2, 214 * $ READ FORMAT TWO, OFS(O,O)*..OFS(NVNL) VECTOR VALUES TWO = $ (9F8.2) * $ PRINT FORMAT DATA, W. H, NV. NL, OF(OO)...OFS(NVtNL) VECTOR VALUES DATA = $ S3 18HORIGINAL DATA W = F8.2,7!,. H 1 = F8.2,8H, NV = I4,8H. NL = 14 //S3. 15HTHE OFFSETS ARE 2 S3. 5F8.2 / (S21, 5F8.2) * $ INTEGER I, J, NV, NL DIMENSION AH(50), AV(50), AM(50) DIMENSION OFS (300, DIM) VECTOR VALUES DIM = 2, 6, 5 DIM(l) = NL + 2 DIM(2) = NL + 1 MULTl - W / (3e*NL) MULT2 = H / (3.*NV) MULT3 = (W*W) / (3.*NL*NL) MULT4 = (H*H) / (3.*NV*NV) MULT5 = H / (6.*NV) THROUGH ALPHA, FOR I = 0 1I I.G.NV AH(I) = 0 THROUGH ALPHA, FOR J = 0, 2t J.E.NL ALPHA AH(I) = AH(I) + (OFS(IJ) + 4** OFS(IJ+1) + OFS(IJ+2)) *MUL 1T1 VOL 0 VM = 0 THROUGH BETA. FOR I = 0, 2. I.E.NV VOL - VOL + (AH(I) + 4.* AH(I+1) + AH(I+2)) * MULT2 BETA VM = VM + ( I*AH(I) + 4.*(I+1)*AH(I+1) + (I+2)*AH(I+2)) * MUL 1T4 VCG = VM / VOL THROUGH GAMMA, FOR J = 0O 1I J.G.NL AV(J) = 0 AM(J) = 0 THROUGH GAMMA, FOR I = 0, 2t I*E.NV AV(J) = AV(J) + ( OFS(IJ) + 4.* OFS(I+1,J) + OFS(I+2,J)) * 1MULT2 GAMMA AM(J)=AM(J)+(OFS(IJ).P.2+4.*OFS(I+1,J)*P.2+OFS(I+2,J).P.2) 1* MULT5 LM = 0 TM = 0 THROUGH DELTA, FOR J = 0, 2t J*E.NL LM = LM+ (J*AV(J) + 4.*(J+1)*AV(J+1) + (J+2)*AV(J+2)) * MULT3 DELTA TM=TM + (AM(J) + 4.*AM(J+1) + AM(J+2)) *MULTI LCG = LM / VOL TCG = TM / VOL VOL = VOL * *95 PRINT FORMAT RESULT, VOL. VCG, LCG, TCG VECTOR VALUES RESULT = $ 1HO5S2*25HTHE VOLUME OF THE TANK IS 1F103, 11H CUBIC FEET // S3. 23HTHE CENTROID IS LOCATED F8.3 2, 34H FEET ABOVE THE BOTTOM OF THE TANK / S26, F8.3, 33H FEET 3 AFT OF THE FORWARD BULKHEAD / S269 F83,t 38H FEET OUTBOARD 40F THE INBOARD BULKHEAD *$ TRANSFER TO START END OF PROGRAM $ DATA 1000 2000 8 4 300 400 500 600 700 400 500 600 700 800 500 600 700 800 900 600 700 800 900 1000 700 800 900 1000 1100 800 900 1000 1100 1200 900 1000 1100 1200 1300 1000 1100 1200 1300 1400 1100 1200 1300 1400 1500 -G15 -

Tank Volume and Centroid Computer Output ORIGINAL DATA W = 10.00, H = 20.00, NV = 8, NL = 4 THE OFFSETS ARE 3.00 4.00 5.00 6.00 7,00 4,00 5.00 6.00 7*00 8.00 5.00 6.00 7.00 8.00 9.00 6.00 7.00 8.00 9.00 10.00 7.00 8.00 9.00 10.00 11.00 8.00 9.00 10.00 11.00 12.00 9.00 10.00 11.00 12.00 13.00 10.00 11.00 12.00 13.00 14.00 11.00 12.00 13.00 14.00 15.00 THE VOLUME OF THE TANK IS 1710.000 CUBIC FEET THE CENTROID IS LOCATED 11.481 FEET ABOVE THE BOTTOM OF THE TANK 5.370 FEET AFT OF THE FORWARD BULKHEAD 4.870 FEET OUTBOARD OF THE INBOARD BULKHEAD Discussion of Results and Critique This problem has been completely satisfactory as a first problem in the Department computer course, Naval Architecture 300. It is not general enough to use for normal tank capacity curves (volume or weight as a function of depth of fluid) and is very artificial with respect to its configuration, but it does require the student to organize his solution in an orderly and logical manner. No internal or external functions are required, but some experience in nesting THROUGH statements is involved. Also, the students must learn to handle their data and arrange their output formats neatly (a new problem to many of them). The problem is excellent preparation for the more involved and extensive second problem in the course. All of the students have managed to turn in suitable solutions to this problem in the last two semesters during which it was used, some within three weeks. Others have taken as long as six weeks, but have been well along on the second problem prior to this. -G16 -

Example Problem No. 101 CALCULATIONS FOR THE CURVES OF FORM AND BONJEAN CURVES by R. A. Yagle Problem Statement as Given to Students Write a MAD program for the IBM 709 computer that will calculate points for the Curves of Form, utilizing Simpson's First Rule. Allow for a number of quarter and half stations fore and aft and any even number of full stations along the length of the ship. The program should also allow for changes in the waterline spacing. Assume that any changes occur at even numbered water lines. Assume information about the shape of the main hull to be available in the form of offsets at each station between perpendiculars. Input Data: The following input data should be read into the computer in the order listed. First card. SHIP = identification number for ship LBP = length between perpendiculars, in feet BE = molded half beam,in feet NBL = number of different station spacings longitudinally NBV = number of different waterline spacings vertically OST = location of midship section, counting sections from fore perpendicular FORMAT (I10,2F10.2,3I10) Second card. L(K) = length from fore perpendicular to the Kth change in station spacing in feet FORMAT (8F10.2) Third card. LN(K) = number of intervals between L(K-1) and L(K) FORMAT (8110) Fourth card. D(K) = height from the baseline to the Kth change in waterline spacing,in feet FORMAT (8F10.2) Fifth card. VN(K) = number of intervals between D(K-1) and D(K) FORMAT (8110) Rest of cards. OFS(I,J) = half breadth at each section in feet, listing beginning at first station forward going from baseline up, then proceeding with next station in the same manner and so on. FORMAT (llF7.2) Use the suggested formats since the test data has been made up in accordance with these formats. -01 7 -

Calculations for the Curves of Form and Bonjean Curves Output: The following characteristics shall be printed out for each waterline, properly labeled. Waterplane area Center of Flotation (in relation to * ) Waterplane coefficient Tons/inch The following characteristics shall be printed out for each second waterline, properly labeled. Displacement mid., salt water, long tons Displacement mid., fresh water, long tons Vertical center of buoyancy Longitudinal center of buoyancy (in relation to )) Vertical metacentric height (above baseline) Longitudinal metacentric height (above baseline) Moment to trim 1" Change in displacement for 1" trim aft Block coefficient Midship coefficient Prismatic coefficient Station sectional areas for Bonjean curves Instructor's Solution The simplified solution presented here is in keeping with the ability and programming skill of the students who have just completed the previous sample problem. Its length adds sufficient complexity and justifies the simple approach used. The program calculates waterplane characteristics first, obtaining the areas of the waterplanes and their moments about the most forward station. The respective moments divided by their areas give the longitudinal position of the centroid, which is called the center of flotation. Calculation of the areas also permits the calculation of the tons per inch (added displacement for an additional inch of sinkage) and the waterplane coefficient (ratio of actual area to that of a rectangle the length of the ship and having a width equal to the beam of the ship). Nested in the same THROUGH statement are calculations for the transverse moments of inertia of the waterplanes about longitudinal centerline axes and for the longitudinal moments of inertia about the most forward station. For all cases, Simpson's First Rule is used. The program next calculates the volumes by integrating the waterplane areas vertically. This permits calculation of the fresh water and salt water molded displacements. Then the vertical moments of the volumes about the base and the longitudinal moments of the volumes about the midship station (since the centers of flotation as used are relative to midships) are obtained. These values permit calculation of the location of the center of bouyancy both vertically (VCB) and longitudinally (LCB). Knowing the transverse inertia of the waterplanes and the volume beneath them, permits determination of the transverse KM (vertical distance from the base to the trans -G18 -

Example Problem No. 101 verse metacenter) as the VCB has been calculated. Similarly, the longitudinal KM (vertical distance from the base to the longitudinal metacenter) is calculated using the longitudinal moments of inertia of the waterplanes. Some of these quantities are also used in calculating the moment to trim one inch by the stern, the change in displacement for one inch of trim by the stern, the block coefficient, and the prismatic coefficient. The midship coefficient requires calculation of the area of the midship station up to the waterline in question. The sectional areas for the Bonjean curves are also calculated directly from the offsets. These are printed out for each station and for every other waterline. All of the other results are also printed out in an orderly (even if spacious) manner. The handling of station spacing changes and waterline spacing changes is apparent from the problem statement given above. This generalization of the program, plus the dimensioning for all the data read in including that for the offsets, does allow the program to be used for different types of ships and as much detail as one might wish. More space could be reserved for either input data or the variables being calculated if this were required. List of Symbols SHIP LBP, BE, NBL, OST, L(K), LN(K), D(K), VN(K), OFS(I,J) NL NV STAL(I) STA STSP(K) WLSP(K) WPA(J) WPM(J) TI J) LI(J) ARM CF(J) TPI(J) WPC WL VOL DISP(J) DISPFW(J) WM LVM VCB (J LCB(J KMT (J KML (J MT1 (J DDISP(J) BCOEFF(J) MIDA PCOEFF (J) MCOEFF(J VARM(J) AREA See problem statement. Number of station intervals (dimensionless) Number of waterline intervals (dimensionless) Station identified by distance in feet from station 0 (dimensionless) Station identified by number (dimensionless) Spacings of station, in feet Spacings of waterlines, in feet Waterplane areas in square feet Moments of waterplane areas about station 0, in cubic feet Transverse moments of inertia of waterplane areas,in feet4 Longitudinal moments of inertia of waterplane areas, in feet4 Longitudinal distance from fore perpendicular to each station,in feet Longitudinal locations of centroids of waterplane areas. from midship, in feet Tons per inch for waterplanes, in long tons Waterplane coefficient (dimensionless) Waterline identified by number (dimensionless) Submerged volume, in cubic feet Displacements in salt water, in long tons Displacements in fresh water, in long tons Vertical volume moment, in feet Longitudinal volume moment, in feet4 Heights of centers of bouyancy above base line, in feet Distances of centers of bouyancy from midships, in feet Heights of transverse metacenters above base line, in feet Heights of longitudinal metacenters above base linein feet Moments to trim ship one inch, in ft-long tons Changes in displacement for one inch trim, in long tons Block coefficients (dimensionless) Area of midship statior in square feet Prismatic coefficients(dimensionless) Midship coefficients (dimensionless) Vertical distances from base line,in feet Area of particular station,in square feet -G19 -

Calculations for the Curves of Form and Bonjean Curves Flow Diagram L<P,0 L. Ii-JW ) g)...,+) L4I LI-:o) |o ) /VA14K) — ^ r5 oR\ O-(AL(ggS L fMCa L ( 1-s.( (0,,LOP Z< - J (-)Ak ~Vz -.foF,(o,o) // —o. -/ ' a,'- \ r ---, ALPIL1,s I,A4(2.=..F-(40. Vo) I.I 4 _.a, YF ~ g~ 4i~k(L ~IJCfP~IK) XdK,%TIO ACp4 ABL Z S -r -Wfe rTpz WF4(.T)1.4: '. 3 (4 XJ., 61A(-^r4L(zI)~ t5~sp&(K) pi-ps: J F,4 ->l-oP wl 4: @ \PS Z' 5F5 _______) 4(PL 1 ) A I(*1f A LB7 L vvrl4o.,-o./ — T,6. |- 1P C Y)r- ) (X-Z) J- ' - ' T ', ) I6z. z'o '<-OL VO o Ti -^o. VARO-:.pPA oo Sia p,5FP( z,) fVoL/, g. V~oF VcJJ(s z)l/V/~oL.,J:L ~, Tcq C-7 P^%9,iW4T+?.'VJ/36. 14/M/a 7 kCS(J4P3/iOL-,vf-ri4JE z-) ^ tW x VA M YA ^ A+7.*Ah '(K) - f>. N,k,/t.pt~))) A rrle istr1Jf)l Wg l... Lx Kr\r^l)y.....: * /P —.A F,, j\ 'vlq ^ Yll. ^.o. -.t - Z/Z,~PI~L) —K't} ='..,u z, ^- ^ 464Vo/BP zx CC ^ ) Nr —. f^..^ I (gn^}-L -^ -^gt* ^z ^ V4J(K) t ~ ~ P~6~(I 7i e LOS -G20 -

Example Problem No. 101 Equations for Flow Diagram c') pA()J NJA(rd) + z.e r*(oL0(,S)+4.*o( - JoH ^F? ($2, 7)) P K A )/3 r StfP (K )) * ofAR oZ-Z-)) o- SfP (4/3 (3) Tr(() ri(J))+z.*L*(OF'5.(. a)4.tO4 8( -,j.es +oo(Ft2,s>,r3. (9A(4 /. 4) ) L' Ls$j) t2 4 t As?)P z) *OF (X, ) t.g.4 *w (,, 'r7)s PKlo i) t((Rn^/ 5r. 5 WsPC 6))^Z, z)} OK ^tsZ,J})$ sSS P(K)/3. S') VoLa IVOL + (wJgA () + 4. #4 Pit++)-tWPA (5TZ))*k Lp(K)/3. ~6) WIf+f tV A+ *4PA +(.) '4f.) #p (V/4gp4 + 4I())PA FA & ( 2.JLP() W PA..+z)) WLoP (K)/3. (7C) lsvf 4 (CF6).fpA (3f) t4A C. (5+ i)-A tl)-rCF (tWPA ( tf) SL~P(y/3. (}) C^r5+Z):TI tiz^/y/oL +cB /s3t) ( C J/L (5It 2 )(L (,TJ+)- WPA (t z )P 6P/Z. -CF tJ+z..).Z/L o CT - Z) fo0 4i (t4)-d vWI CCILzSr)- VC0(zz))/(4z* L-51) 4(WI) PoePA +ZP.)4COKPA A).OS/2 VM ( Ze 1*o 4OP (K))) ^ CK)/ 3 (it) Pt~0^FF CJMf) df PA/f K*Eg*(V^AR Z. - /LoSP<K.))) (13 A~M ^AA *( pof; tIJJ)t44*8( ot i)~to(1,+2))pWL PCt)/3. -G21 -

Calculations for the Curves of Form and Bonjean Curves MAD Program and Data $ COMPILE MAD, EXECUTE. DUMP, PRINT OBJECT START READ FORMAT ONE, SHIPLBPBENBLNBV.OST VECTOR VALUES ONE=$I10,2F10o2,3110*$ READ FORMAT TWO, L(1)-*.L(NBL) VECTOR VALUES TWO=$(8F10.2)*$ READ FORMAT THREE. LN(1)***LN(NBL) VECTOR VALUES THREE=$(8I10)*$ READ FORMAT TWO. D(1)..*D(NBV) READ FORMAT THREE, VN(1)-..VN(NBV) NLO= NV=O L(O)=O. D(O)=0O THROUGH ALPHAT FOR K=1,1, K-G.-NBL NL=NL+LN ( K) ALPHA STSP(K)=(L(K)-L(K-1))/LN(K) THROUGH BETA, FOR K=1,lt K*G.NBV NV=NV+VN( K) BETA WLSP(K) (D(K)-D(K-1))/VN(K) DIMENSION OFS(1900,DIM),L(20),LN(20),D(20),VN(20),STSP(20),WL 1SP(20) WPA(30) WPM(30),TI(30)LILI(30)CF(30) TPI(30) DISP(30), 2DISPFW(30) VCB30LCB( LC(30) KM303) KML(30) MT1(30) DDISP(30), 3BCOEFF(30) MCOEFF(30) PCOEFF(30) WLH(30) OFSM(30) STAL(60) INTEGER SHIPNBL,NBVOSTINLNV,LNVNI,JKMP,WLSTA VECTOR VALUES DIM=2,62,61 DIM(1)=NV+2 DIM(2)=NV+1 READ FORMAT FOUR, OFS(OO0)...OFS(NLNV) VECTOR VALUES FOUR=$(11F7.2)*$ WLH=O. Jal WL=O THROUGH GAMMA, FOR K=lt,1 K.G.NBV WL=WL+VN(K) THROUGH GAMMA, FOR J=J,1 J.G.WL GAMMA WLH(J)=WLH(J-1)+WLSP(K) STAL(O)0=. Jul I=1 STA=O THROUGH DELTA. FOR K=1.ll K*G*NBL STA=STA+LN K) THROUGH DELTA, FOR I=I 1, I.G.STA DELTA STAL(I)=STAL (I-1)+STSP(K) PRINT FORMAT TITLE, SHIP.LBP BENBLNBVOST VECTOR VALUES TITLE=$1H1// S21,54HCALCULATIONS FOR THE CURVES 1 OF FORM AND BONJEAN CURVES // S41, 8HSHIP NO. I5// S42, 11H 2R. A. YAGLE ////// S3, 16HBASIC DIMENSIONS // S10, 361THE L 3ENGTH BETWEEN PERPENDICULARS IS F10.2,5H FEET / S10. 23HTHE M 40LDED HALF BEAM IS F10.2, 5H FEET/ S10. 9HTHERE ARE. I5, 42H 5DIFFERENT STATION SPACINGS ALONG THE SHIP / S10, 9HTHERE ARE 6 I5, 41H DIFFERENT WATERLINE SPACINGS UP THE SHIP / S10, 29HM 7IDSHIP IS LOCATED AT STATION 15 *$ THROUGH EPSI, FOR J=019. J.G.NV WPA(J)=O0 WPM(J)=0O TI (J)=0 LI(J)=0O I=0 ARM=0O STA=O THROUGH EPSI, FOR K=11,,K.GeNBL STA=STA+LN(K) THROUGH EPSI, FOR I=12,II*E.STA WPA(J)=WPA(J)+2.*(OFS(I,J)+4*OF OFS(I+J)OFS(I+2J))*STSP(K)/ 13. WPM(J)=WPM(J)+2.*(ARM*OFS(I J)+4**(ARM+STSP(K) )*OFS( I+1J)+( 1ARM+2.*STSP(K))*OFS(I+2,J))*STSP(K)/3. TI(J)=TI(J)+2.*(OFS(IJ).P.3+4.*OFS(I+1,J)*P*3+OFS(I+2,J).P.3 1)*STSP(K)/9. LI(J)=LI(J)+2.*((ARM.P.2)*OFS(I J)+4.*((ARM+STSP(K) )P.2)*OFS 1(I+1J)+((ARM+2.*STSP(K)).P2)*OFS(I+2,J))*STSP(K)/3. -G22 -

Example Problem No. 101 MAD Program and Data, Continued EPSI ARM=ARM+2.*STSP(K) PRINT FORMAT TITLE1l SHIP VECTOR VALUES TITLE1=$1Hl/ S20, 23HWATERPLANE CALCULATIONS / 1S25, 8HSHIP NO. I5/// S3, 48HCF IS IN FEET FORWARD (+) OR AF 2T (-) OP MIDSHIPS /// S3, 9HWATERLINE, S8, 8HWP AREAS. S6. 314HCF (FROM MID.), S6, 13HTONS PER INCH, S7, HWP COEFF. // 4 *$ THROUGH ZETA. FOR J=0,1 J.G:.NV CF(J)=LBP/2e-WPM(J)/WPA(J) TPI(J)=WPA(J)/420, WPC=WPA( J) / (LBP*2**BE) ZETA PRINT FORMAT RES1, WLH(J),WPA(J),CF(J),TPI(J),-WPC VECTOR VALUES RES1=$S4,F7 2,S5F1.2, 2S7,F8 2 *S8,F82,SlO, 1F8.4 //*$ WL=O J=O VOL=O. VVM=O. LVM=O. VARM=O. MIDA=O. THROUGH ETA, FOR K'l1l1 K.G*NBV WL=WL+VN(K) THROUGH ETA, FOR J=J,2, J.E.WL VOL=VOL+(WPA(J)+4.*WPA(J+1)+WPA(J+2))*WLSP(K)/3. DISP(J+2) =VOL/35. DISPFW(J+2)=VOL/36. VVM=VVM+ (VARM*WPA( J )4. *(VARM+WLSP(K))*WPA(J+ )+( VARM+2.*WLSP 1(K))*WPA(J+2))*WLSP(K)/3. LVM=LVM+(CF(J)*WPA(J)+4.*CF(J+1)*WPA(J+1)+CF(J+2)*WPA(J+2))*W 1LSP(K)/3. VCB(J+2)=VVM/VOL LCB(J+2)=LVM/VOL KMT(J+2)=TI(J+2)/VOL+VCB(J+2) KML(J+2)=(LI(J+2)-WPA(J+2)*(LBP/2.-CF(J+2)).P.2)/VOL+VCB(J+2) MT1(J+2)=VOL*(KML(J+2)-VCB(J+2))/(420.*LBP) DDISP(J+2)=TPI(J+2)*(-CF(J+2))/LBP BCOEFF(J+2)=VOL/(LBP*2**BE*(VARM+2.*WLSP(K) ) MIDA=MIDA+2**(OFS(OSTJ)+4**OFS(OSTJ+1 )+OFS(OST J+2))*WLSP(K 1)/3. PCOEFF(J+2)=VOL/(MIDA*LBP) MCOEFF(J+2)=MIDA/(2**BE*(VARM+2.*WLSP(K))) ETA VARM=VARM+2.*WLSP(K) PRINT FORMAT TITLE2, SHIP VECTOR VALUES TITLE2=$1H1/ S20,20HMOLDED DISPLACEMENTS/ S23. 19HSHIP NO. I5//// S3,27HALL VALUES ARE IN LONG TONS//S,9HWA 2TERLINEt S13t16HDISP. SALT WATER. S8.17HDISP. FRESH WATER//*$ THROUGH THETA, FOR J=2,2, J*G.NV THETA PRINT FORMAT RES2, WLH(J),DISP(J),DISPFW(J) VECTOR VALUES RES2=$S4,F7.2$ S15,F12.29S12,F12.2//*$ PRINT FORMAT TITLE3. SHIP VECTOR VALUES TITLE3=$lH1/ S1,045HLONGITUDINAL AND VERTICAL C 1ENTERS OF BUOYANCY / S25,8HSHIP NO. I5///// S3,33HVCB IS IN F 2EET ABOVE THE BASELINE / S3.9HWATERLINE, S16, 3HVCB, S12,3HL 3CB //*$ THROUGH IOTA, FOR J=2~,2 J.-GNV IOTA PRINT FORMAT RES3, WLH(J),VCB(J),LCB(J) VECTOR VALUES RES3=$S4,F7.2,S14,F8*.2S7,F8,2 /*$ PRINT FORMAT TITLE4. SHIP VECTOR VALUES TITLE4=$1H1/ S10,47HTRANSVERSE AND LONGITUDINAL 1 METACENTRIC HEIGHTS / S27, 8HSHIP NO. I5////S3,42HALL VALUE 2S ARE IN FEET ABOVE THE BASE LINE ////S3,9HWATERLINE, S16 3,9HKM TRANS.. S8,8HKM LONG. // *$ THROUGH KAPPA, FOR J=2,2, J.G.NV KAPPA PRINT FORMAT RES4, WLH(J), KMT(J), KML(J) VECTOR VALUES RES4=$S4,F7.2,S16,F8.2, S99F8.2 //*$ PRINT FORMAT TITLE5 SHIP VECTOR VALUES TITLE5=$1H1/ S19,27HMOMENT TO TRIM ONE INCH AND 1/ S10,47HCHANGES IN DISPLACEMENT FOR A ONE INCH TRIM AFT /S28 2, 8HSHIP NO. I5 //// S3, 33HTHE MOMENTS ARE IN FOOT LONG TONS 3/ S3, 35HTHE CHANGE IN DISP. IS IN LONG TONS //// S3 9HWATER 4LINE, S13, 18HMOM. TO TRIM 1 IN., S8, 15HCHANGE IN DISP. 5//*$ -023 -

Calculations for the Curves of Form and Bonjean Curves MAD Program and Data, Continued THROUGH LAMBDA, FOR J=2 2, J*.GNV LAMBOA PRINT FORMAT RES5 WLH(J) MT1(J)l DDISP(J) VECTOR VALUES RES=$S4,. F7.2. S17,FlO2, S16. F8.2 //*$ PRINT FORMAT TITLE6, SHIP VECTOR VALUES TITLE6=$1H1/ S10, 42HBLOCKt PRISMATIC, AND MIDS 1HIP COEFFICIENTS /S22. 8HSHIP NO I5////// S3 9HWATERLINE 2S11H5HBLOCK * S9, 9HPRISMATIC * S8t 7HMIDSHIP // *$ THROUGH MU. FOR J=2t2. J.G.NV MU PRINT FORMAT RES6, WLH(J) BCOEFF(J)t PCOEFF(J), MCOEFF(J) VECTOR VALUES RES6=$S4+ F7.2, S12, F6.4* S99 F6.4t S51O F6.4/ 1/ *$ PRINT FORMAT TITLE7t SHIP VECTOR VALUES TITLE7T=$H1/ Sl5, 34HSECTIONAL AREAS FOR BONJEA 1N CURVES / S25. 8HSHIP NO. I5//://// SO. 20HLOCATION OF STAT 2IONS,S15t 7HSTATION, S$8 21H DISTANCE FROM STA- 0 //*$ THROUGH NU# FOR I=0,1. I.*GNL NU PRINT FORMAT TITLE8# I STAL(I) VECTOR VALUES TITLE8=$ S38.15 S14. F10*2 *$ PRINT FORMAT SHEAD VECTOR VALUES SHEAD=$3////S3* 15HSECTIONAL AREAS *$ THROUGH XIt FOR -1=01 I — GNL PRINT FORMAT TITLE9 I VECTOR VALUES TITLE9=$S31H- S5,7HSTATION I4, S10 9HWATERLIN 1E * S12. 14HAREA.(SQ. FT,) // *$ J=O AREAO0. WLO0 THROUGH XI. FOR K=ltl KG.*NBV WL=WL+VN(K) THROUGH XI* FOR J=J#2. J.E.WL AREA=AREA+2.*(OFS( I,J)+4**OFS( I. J+ )+OFS( IJ+2)I*WLSPiK)/3. XI PRINT FORMAT RES79 WLH(J+2), AREA VECTOR VALUES RES7=$ S27, F7.2. S14t F9.3 *$ TRANSFER TO START END OF PROGRAM S DATA 528 8.00 2 18.00 6 00.00 0( 00.00 O( 00.00 0 00.20 00 65 1.90 5.10 1: 10.75 1' 16.85 2; 21.55 2E 24.20 3( 25.60 3 25.90 3' 24.62 3 21.92 3C 16.85 2S 4.10 22 3.10 1L _ 1.75 c 1.35 4 1.10.62 00.00 OC 00.00 OC 00.00 OC 00000 OC 00 00 OC 00.00 OC 00.00 OC 00.00 OC 0o.oo0 oc oc.f 0.00 0.00 0.00 1.75 +.10 7.15 1.10 7.35 3 35 8.00 0.98 2.55 3.25 2?60 ).60?.95 ~.05 f.90 3.85 %.76 '.53.95 ).00 ).00 G 00 ).00 ).00 D * 00 noO @00 0 00 D00 536.00 528.00 20 42.00 4 00.00 00.00 00.00 2.40 5.62 9.39 13.78 19.75 25.41 29.85 32.60 34,55 35.22 34 75 33103 30.78 26.23 19.82 13.05 7.45 3.55 1.23 00.00 00.00 00.00 00.00 00.00 00.00 Co. 0 00 00 00 ( (. 35.95 560.00 8 3 2 12 00.00 00.00 00.00 2.75 6.50 10.63 15.40 21.25 26.55 30.62 33.42 35.38 35.90 35.91 34.35 32.50 29.10 23.76 17.10 10.55 4.55 1.62 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00 00.00o - 0 a O0.0 0. 0- Uo00 — 00.00 -- O - -... 0000000 0000 00.00 0000 0000 0000 00.99 2.01 2.98 3.18 3.39 3.844~ 46-0 5.79 7.30 7.08 7.45 7.80 8.55 9.50 10.85 12.61 11.62 12.40 12.9513.88 14.78 — 159 --- 47 16.52 17.50 18.27 19.40 20.23 21.21 22.39 22.30 23.00 23.60 24.20 25.00 25.65 26.58 27.22 27.70 28.15 28*68 29.20 29.80 30.42 31.10 31.35 31,55 31i92 32*27 3272 33.20 33.79 33.90 34,10 34.32 34.50 34.70 34.85 35.50 35.55 35.62 35.74 35.82 35.90 35.92 - ---- 35.95 35.95 35.95 35.95 35.95 35.95 35.95 35.95 35.92 35,95 35.95 35.95 35.95 35.95 35.02 35.45 35.72 35*95 35*95 35.95 35.95 33.60 34,.0 34.98 3.60 35.92 35.95 35.95.. 30.98 32.52 33.72 35.30 35.90 35.92 35.95 26.45 28.95 3079 33.35 ---35 3570 35295 20.70 24.35 27.22 31.18 34.95 35.06 35.70 13.82 17.22 20.50 26.53 31.00 33.71 35.20 --- 5.90 7.77 10.20 16.80 25*40 30.10 32.90 2.15 2.00 -2.38 - — 5- 72 --- T780 — 24-70-29.14 0000 00.00 00,00 00.00 6.55 14.90 20.50 00.00 G00 ' 0000 oooo 0000 8.00 16.70 22.15 00.00 00.00 00.00o 00,00 5.55 13.55 19.15 00.00 00.o 0 0oo0 00o00 4.30 12.00 17055 00.00 00.00 00 00 00.00 2*55 9.30 14.65 00.00 00.00 00.00 00.00 00.04 6.55 11.75 00.00 o0.o o _ QO__Q(QO_ Q___o_ roo 3.50 8.75 00.00 000 00.00 00 00 00.00 00.00 3.75 0000 00.00 00.00 00o00 00.00 00.00 00.00_ -G24 -

Example Problem No. 101 Computer Output The complete output is not given in that the sectional areas for the Bonjean curve are all of the same form. Only four of these are included, CALCULATIONS FOR THE CURVES OF FORM AND BONJEAN CURVES SHIP NO. 528 R. A. YAGLE BASIC DIMENSIONS THE LENGTH THE MOLDED THERE ARE THERE ARE MIDSHIP IS BETWEEN PERPENDICULARS IS 536*00 FEET HALF BEAM IS 35.95 FEET 3 DIFFERENT STATION SPACING.S ALONG THE SHIP 2 DIFFERENT WATERLINE SPACINGS UP THE SHIP LOCATED AT STATION 12 WATERPLANE CALCULATIONS SHIP NO. 528 CF IS IN FEET FORWARD (+) OR AFT (-) OF MIDSHIPS WATERLINE,00 3,00 6,00 9,00 12,00 15.00 18,00 24.00 30,00 36,00 42,00 WP AREAS CF (FROM MID.) 10907.87 17566.64 19708 00 21244.08 22328.80 23245.04 24077 73 25639 12 28025.99 29728.30 31149 99 14.73 5.75 2.66 -0 96 -4.29 -7 40 -10 45 -17 27 -29.93 -36.66 -39 68 TONS PER INCH 25 97 41.83 46.92 50.58 53.16 55.35 57 33 61.05 66.73 70.78 74.17 WP COEFF..2873.4627.5191.5596.5881.6123.6342.6754.7382.7830.8205 MOLDED DISPLACEMENTS SHIP NO. 528 ALL VALUES ARE IN LONG TONS WATERLINE 6.00 12.00 18.00 30,00 42.00 DISP. SALT WATER 2882.35 6511.30 10493.78 19331,50 29508.03 DISP. FRESH WATER 2802.29 6330.43 10202.28 18794.52 28688.36 LONGITUDINAL AND VERTICAL CENTERS OF BUOYANCY SHIP NO. 528 VCB IS IN FEET ABOVE THE BASELINE WATERLINE 6.00 12.00 18*00 30.00 42*00 VCB 3.26 6.49 9.74 16.33 23.15 LCB 6.12 2.16 -1.48 -9.26 -18.53 TRANSVERSE AND LONGITUDINAL METACENTRIC HEIGHT SHIP NO. 528 ALL VALUES ARE IN FEET ABOVE BASE LINE WATERLINE 6.00 12.00 18.00 30o00 -KM TRANS. 56,59 35.80 30.45 30.33 KM LONG. 1880.84 1078.88 789.42 636.84 -G25 -

Calculations for the Curves of Form and Bonjean Curves Computer Output, Continued 42.00 33.74 561.31 MOMENT TO TRIM ONE INCH AND CHANGES IN DISPLACEMENT FOR A ONE INCH TRIM AFT SHIP NO. 528 THE MOMENTS ARE IN FOOT LONG TONS THE CHANGE IN DISP* IS IN LONG TONS WATERLI NE 6.00 12.00 18a00 30 00 42.00 MOM. FO TRIM 1 IN. 852.36 1099.76 1288.65 1889.28 2501 13 CHANGE IN DISP. -*23,43 1.13 3 *78 5.56 BLOCK, PRISMATIC, AND MIDSHIP COEFFICIENTS SHIP NO. 528 WATERLINE 6.00 12.00 18.00 30.00 42.00 BLOCK.4429 *5003.5375 *5940.6477 PRISMATIC *4921.5278.5568.6067.6576 MIDSH IP.900i.947o,9652.9791.9851 SECTIONAL AREAS FOR BONJEAN CURVES SHIP NO. 528 LOCATION OF STATIONS STATION 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 D.LSTANCE Fr(M_^ STA. 0.00 4.00 8.00 34.00 60.00 86.00 112.00 138.00 164.0 190.00 216.00 242.00 268 00 294.00 320.00 346.00 372.00 398.00 424.00 450.Q0 476.00 502. 00 528.00 532.00 536.00 540.00 544.00 546.00 552.00 556.00 5 6 0., O -G26 -

Example Problem No. 101 SECTIONAL AREAS STATION 3 STATION 4 STATION 5 STATION 6 AWATERL INE 6.JO 12.U 18.00 42.00 WATERL INE 6.00 12,u00 18,00 30i00 WATERLI NE 18.00 30.00 42.00 WVAT ERL I NE 6.00 12.0O 18.00 30. uj 42.0 AREA (5Q. FT.) 19. 2 u 0 51.960 90. 140 183.540 323.780 AREA (SQ. FT.) 45.340 122 740 212. o0 418 1 0 680 140 AREA (SQ. FT.) 79.780 206.840 355.180 688. 180 1071. 580 AREA (SQ. FT.) 126 560 310,360 519.940 984.340 1494.180 Discussion of Results and Critique This problem has been found to be satisfactory as the second problem in the computer course. The detail involved in arranging the output in a neat and systematic way is perhaps too great, but this does give the students an appreciation of how much additional effort such matters entail. Also, they can probably use this program in their design courses taken in the senior year and, therefore, it warrants extra care. The fact that the program required is relatively straightforward and easy to write, even if rather lengthy, has meant that all of the students have successfully completed it. On the average, they have had to resubmit it to the computer five times but the latter times normally involved only minor changes. -G27 -

Example Problem No. 102 PROGRAM TO COMPUTE AND PLOT CURVES OF FORM by Joseph J. Rodnite This program is included to indicate the degree of programming skill that can be acquired by a good student and to illustrate a more sophisticated solution to the preceding problem. The student elected to plot all of his results by utilizing PLOT subroutinesl, made use of other available subroutines, devised several external functions, and in general presented a solution of the type one might expect from an experienced and capable programmer. The student was a junior in the Department of Naval Architecture and Marine Engineering and had had only the programming course, Mathematics 373, prior to his enrollment in Naval Architecture 300. There seems no necessity to describe his solution in words here since this would require descriptions of all of the subroutines and, unfortunately, many pages. The flow diagram and the MAD program and data are included, however, and should be understandable to those familiar with MAD and the Michigan Executive System Subroutines (MESS). The computer output includes reprinting of the offsets, all of the calculated values in tabular form (including the station areas), twenty-five plots of the Bonjean curves, and plots of the vertical and longitudinal centers of bouyancy, salt and lresh water displacements, transverse metacentric height, center of flotation location relative to midships, change in displacement due to one inch parallel sinkage (tons per inch), moment to trim one inch, and waterplane areas. Rather than reproduce all of these, only the Bonjean plots for stations 3 and 14 are included along with the plots for VCB, salt water displacement, and transverse metacentric height. Flow Diagram AEI D- - /Ho)2 - BDI/H(o) DEOi-(O) SPAcEl 3 rAR r|FO.. IMAFO(24) DIHNf) AsrA eJ aDIM(aJ 5 O/H() STAS).... StAS6fA rA) I SOSP, JUSTA,AJWL.S OWIz.)AIStrA'/ / JJ | 5lM *W. (LStA/WLW. _ rt&c! DZPTN, TYPE 1 B. Carnahan and L. Evans

Flow Diagram, Continued CHfECK, ZERO. Z..RO. 4M ttlO).* JTSrAA(^O.)... VM, ACWhUS, CO), ). O), o).. S.D(AIWLS), FWD(oO). cWDrWAJS) [5 C AIS TA) STAAA/SA,SAS)vW4) VCBMO)... VC8(AWLSS),CAfO)..'. 4LC(CWLS),rN0')....dHrCwLS). X B H,). B.L.(A1WA.V),C O(o. Cs.LLAJWS), CPro)... CP(AIWrS) ZziRO. ALPHA A S |L'O)..Sw.MfNWLtS.LrfO).LW)LO (WS)VM, || wew w A, Xl a LOPS z / me arAA ciA, rTPIod -10 ' VCB( /.CB ()M.~ B ( JO, 1, ~ ARH rO. J --- — oz)' —i \,^,J) s(t-)/i.J +rAAC. J0~~VRMIRQIS ARMrIE) cO ZW>K/~s ~ SAvoA.~/ 'a.)/sL. ( ' ',, r (1t )rcCt)....... IS% v'ct",/'.,,J" -/,> c~- -,',s(a,) C ~_.oCCr 'M" I ea /ea cP".,,,.),~P~42ax OUTPUT,rej \^y |A i. |? \^ ^ ALJFZ) - I)... C~HGO([) 6~~04 1, wAcYr)n, cm'/7 CWP( ). ~1 r IlUFO(/)... -— ~ ~'J'W CWtC~) ~ ~o~ I TPrIz). s'Oet, ~W01"), CB(~'Z CLM~_,CPG PLOJ BO.r, _, o. Asr Icarr $ * $, TESAC W4 S,AIAl'IS 57, LABUEJ4 -G29 -

Program to Compute and Plot Curves of Form Flow Diagram, Continued 4. r 0a..LT or..V...... L.r-... T.amp_.o I- -.ArEo.. S ---- Sd=C~ PA(~j) =At _ ),B * AIW\>, 0,,AS) A(o5cl P1- ora.I- %OrA. P — Ap. A P --- D,/~7B%\- W oL LJ,4.a, A.)Or. - OSB — (/6 ( PLV-I ~or~. U1 pA.rV. AOT4. CFLL rt T L PLrOTr. N.orS. (oo- PA.. 0 H rP/IU rirr /8J c jflj072 j ] P. 0roR4A.C M 7L.UA Wh.ARTT WAt (0V) -0. PA.O7. P^73 It /9 / 4)- PIor. - WLAILf --- ( 3 TrAr <^~~ 11.>I N r Ho>D ^ ' ir\ fJ \^>X________\ -G30 -

Example Problem No. 102 Flow Diagram, Continued I a Ixo I'S. I11-(/ 1- f^aP ',-rAV, CO E -a. Fl. EA(JL C) tLZ Aoux r/os D T AO -- )T/OS: I. WL A (OF WLAkI/) + [KE / J +4. * K(f J+l) + M/, k Z STJ2 S7J+,')/I.' 5 2. 7~(I) - Tf(I) +(, (1 J).P5 +4. Kf J+ ).P3,C([, d 2).P5)* S TAS(J +)/23. 3. L57(I) -L/4(J) +(.d ~7TASCJ * # 2 )*A/4// 5) 4 LJI(Z):/J7) ".AS(('/,) a "A//.P.R2 3 S-7(J+,)/-5) 6.4() za( J) L +./f,(/l v.4., GTAsa +) *A/ 'fr4// 5 7 L If) = L I(I: +. A5( ). (4 A i (, J ~ t) ~r. P2 S TAS~(d+2)//. 5) &8. APt =A-_Rf1 - A S AC 2) 9koF. E~.I() Lf r. Zb /,2) z FTAS /(2C)/L 5 0, L C -, J +-) AM. p 2 sr $-(-5 /I. VM: V/I WLAP(I) WLS(+2) At/ 3. /2. Aigt2=,/4 'l+w gAM WL$(12) 3. VM77 - WVM + (LAf + /a) J W(. +2 /4. Alt' 4/J. S 7AS(J / 3. ALMM) L W/R + r.WLSWf2S) A) *H// 5 5;A SAR" A - S4T/SJ O) 1 /. L/ Hr' ) - ( 7r/J2') *2. /.) S/VOL (/r) * VC8A(f + /9 Bfr/L (~ 2.) -L ~2.)/VOLCar+2) #+vCB('~') 7 L 20. V L VL). A S. (CP'Af) - V J)/ AR. *A HtRSF. SA [S. M)/ T)) 21. c~Pz) 'VOL (IThra/L BP MA X*OF4.YSrAA. o. f+2. AIsrA)) 2. ACS(' =A RTH - SA SP),,D SP)2.) 23. /4' (f) GWDI) 5ML{,() - VCSflV()/2/,.,L 8P) 9. LCHGC (ZL) - L. t )(4,2,O2. *,LAP) /. CWP): WZL A// 7)/AZ e A. /4XOF. S TAIS O TA)) 26. P( = V) WL A R (I)/ 14 ) AR3. 12. A RM: A RH i+ W4S(cT2) 13.y 1M = VM + I/-LAR f f) W457('}*2) * 4. -W A PM/IT. 14. A RH =ARM + W.S(If2') /A. SA.IE AS EQUATIOA /,T /6. vCBcr 2). VM/ V0oc I -2) 17.z LCg6/6TotZr)^ C4. qO?44Z/))-f 2) WLSCf ^)/ VO^Cf^) /6. BrMr ) -c r/cr^ ~2. ^.5.'>)VOuIA- vcBCfl) 19. BAHL a) - L re i ^e/)OIV (I o*0Bz) + 20. CBCl2 — z VO1-rf ^)/rLBP A 2RM *. * MA)(OFI.^ (e./e.0,, A4TA)) 2f. CPw )c VLOZ KIf/c0/rBP -*HA OFeL. eSrW.A. ftAS rA 22. CHSCI*Z) -S7TAAH(MDSP. I*Z)Z(ARMfH*4l, MDSP) *2.) 253. ri[) CO- SWDCI)( 8/^14 L(I - VC6(/))/C/2. * Le P) 2.4. CHGOZn -- -4. O/C42. *LCP) Z5. CkI/PCr - V/LA)a)/lL8P*2. * H AXOFI. Ot,[. 0. A1VfS7-)) 26. rPfK) ~WL. ARC P1)20. -G31 -

Program to Compute and Plot Curves of Form MAD Program and Data $ COMPILE MAD, PRINT OBJECT, EXECUTE, DUMP, I/O DUMP R R PROGRAM TO COMPUTE AND PLOT CURVES OF FORM R R PROGRAMMED BY JOSEPH J RODNITE R INTEGER NSTANWLS,IJINFOTEMPIMDSP,TYPE DIMENSION K(2000,DIM),DIM(3),WLAR(50)tTI(50),ISTAS(50),LI(50) 1LM(50),VOL(50),SWD(50),FWD(50),WLS(50),VCB(50),CWP(50),LCB(50 2),BMT(50),BML(50),CB(50),CP(50),CMS(50),MT1(50),CHGD(50),CF(5 30),TPI(50),STAA(2000,BDIM),INFO(24),BDIM(2) DIMENSION IMAGE(867),TEMP(50),ACWLS(50) START READ FORMAT GENINFO(1)...INFO(24)lMDSPNSTANWLSTLBPDEPTH, 1TYPE DIM(0)=2 DIM(1)=NSTA+3 DIM(2)=NSTA+1 BDIM(O)=DIM(O) BDIM(1)=DIM(1) BDIM(2)=DIM(2) READ FORMAT SPACE,STAS(1)..*STAS(NSTA) READ FORMAT SPACE,WLS(1).**WLS(NWLS) THROUGH OFSCK, FOR I=0,1,I.G.NWLS OFSCK READ FORMAT OFFSETK(I,O)...K(INSTA) WHENEVER TYPE.E. 1, TRANSFER TO GO THROUGH TTTT, FOR I=O,1,I.G*NWLS TTTT READ FORMAT OFFSET, STAA(I,0)*..STAA(INSTA) EXECUTE RREAD.(KSTAANWLSNSTA) THROUGH TUTU, FOR I=0,1,I.G.NWLS TUTU READ FORMAT OFFSET, STAA(I,0)*..STAA(I,NSTA) WHENEVER TYPE *E. 8,EXECUTE RREAD2.(KSTAANWLS,NSTA) WHENEVER TYPE *.E 16,EXECUTE RREAD3.(KiSTAA9NWLSNSTA) GO BDIM(1)=NWLS+3 BDIM(2)=NWLS+1 THROUGH AAAA, FOR I=O,1,I*G.NWLS AAAA PRINT FORMAT CHECKIK(I,O)***K(INSTA) EXECUTE ZERO.(STAA(O,0),STAA(NSTANWLS)) EXECUTE ZERO.(VM,ACWLS(0),LM(O),SXD(0)*..SXD(NWLS),FWD(0)...F 1WD(NWLS),VCB(O)~.*VCB(NWLS),LCB(0)*,.LCB(NWLS),BMT(O).**BMT(N 2WLS),BML(O)...BML(NWLS),CB(O)**.CB(NWLSCP( CP(NWL)) EXECUTE ZERO.(WLAR(0)...WLAR(NWLS),TI(O)...TI(NWLS),LM(O)... 1LM(NWLS),LI(0)...LI(NWLS),VM) R R MAIN PROGRAM R THROUGH ALPHA, FOR I=1-,1,IG.NWLS ACWLS(I)=ACWLS(I-1)+WLS(I) ARM=LBP/2. THROUGH PSY, FOR J=0t2,J.G*NSTA-2 WLAR(I)=WLAR(I )+(K(IJ)+4**K(I,J+1)+K(IJ+2))*STAS(J+2)/1.5 R R TRANSVERSE INERTIA R TI(I)=TI(I)+(K(I,J)*P.3+4.*K(I,J+1).P.3+K(IJ+2).P.3)*STAS(J+ 12)/3. R R LONGITUDINAL INERTIA AND CENTER OF FLOTATION R LM(I)=LM(I)+K(IJ)*STAS(J+2)*ARM/1.5 LI(I)=LI(I)+.ABS.(K(IJ)*ARM.P.2*STAS(J+2)/15) ARM=ARM-STAS(J+2) LM(I)=LM(I)+K(IJ+1)*4.*STAS(J+2)*ARM/1.5 LI(I)=LI(I)+.ABS.(4**K(IJ+1)*ARM.P.2*STAS(J+2)/1.5) ARM=ARM-STAS(J+2) LM(I)=LM(I)+K(I,J+2)*STAS(J+2)*ARM/1.5 LI(I)=LI(I)+.ABS*(K(IJ+2)*ARM.P.2*STAS(J+2)/1.5) PSY CONTINUE R R CENTER OF FLOTATION R CF(I)=LM(I)/WLAR(I) LI(I)=LI(I)-WLAR(I)*CF(I)*CF(I) -G32 -

Example Problem No. 102 MAD Program and Data, Continued ALPHA CONTINUE THROUGH BETA. FOR J=0,1,J*G*NSTA ARM=0. THROUGH BETA, FOR I=0,2,I.G.NWLS-2 R R STATION AREA FOR BONJEAN CURVES R STAA(JI+2)=(K(IJ)+4.*K(I+1,J)+K(I+2tJ))*WLS(I+2)/1.5+STAA(J 1*I) BETA CONTINUE R R DISPLACEMENT AND VOLUME R ARM=O, THROUGH GAMMA. FOR I=0,2tI*G.NWLS-2 VOL(I+2)=VOL(I)+(WLAR(I)+4.*WLAR(I+1)+WLAR(1+2))*WLS(I+2)/3. SWD(I+2)=VOL(I+2)/35. FWD(I+2)=VOL(I+2)/36. R R VERTICAL CENTER OF BUOYANCY R VM=VM+WLAR(I)*WLS(I+2)*ARM/3. ARM=ARM+WLS(1+2) VM=VM+WLAR(I+1)*WLS(I+2)*4.*ARM/3* ARM=ARM+WLS(I+2) VM=VM+WLAR(I+2)*WLS(I+2)*ARM/3. VCB(I+2)=VM/VOL(I+2) R R LONGITUDINAL CENTER OF BUOYANCY R LCB(I+2)=((LM(I)+40*LM(I+1)+LM(I+2))*WLS(I+2)/3.)/VOL(I+2) R R TRANSVERSE METACENTRIC HEIGHT R BMT(I+2)=(TI(I+2)*2./36)/VOL(I+2)+VCB(I+2) R R LONGITUDINAL METACENTRIC HEIGHT R BML(I+2)=LI(I+2)/VOL(I+2)+VCB(I+2) R R BLOCK COEFFICIENT R CB(I2OL(I+VOLI+2)/(LBP*ARM*2e*MAXOF1,(KI+2,0,NSTA)) R R PRISMATIC COEFFICIENT R CP(I+2)=VOL(I+2)/(LBP*MAXOF2.(STAA,0,I+2,NSTA)) R R MIDSHIP COEFFICIENT R CMS(I+2)=STAA(MDSPI+2)/(ARM*K(I+2,MDSP)*2.) GAMMA CONTINUE PRINT FORMAT OUTPUT, INFO(1)*,oINFO(24) THROUGH DELTA, FOR I=1,1I*G.NWLS R R MOMENT TO CHANGE TRIM 1 INCH R MT1(I)=SWD(I)*(BML(I)-VCB(I))/(12,*LBP) R R CHANGE IN DISPLACEMENT DUE TO 1 INCH TRIM AFT R CHGD(I)=-LM(I)/(420.*LBP) R R WATERPLANE COEFFICIENT R CWP(I)=WLAR(I)/(LBP*2**MAXOF1.(KIt0,NSTA)) R R TONS PER INCH IMMERSION TPT(I)=WLAR(I)/420. PRINT FORMAT INI,WLAR(I),CF(I),CWP(I),TPI(I),SWD(I),FWD(I). 1VCB(I),LCB(I).BMT(I).BML(I(I),MT(I)CHGD(I)CB(I),CMS(I),CP(I) -G33 -

Program to Compute and Plot Curves of Form MAD Program and Data, Continued DELTA CONTINUE PRINT FORMAT NOTE PRINT FORMAT SKIP THROUGH END. FOR i=0,1,I*G.NSTA END PRINT FORMAT BONJEAItSTAA(IO).**STAA(INWLS) THROUGH LAST1, FOR J=O,1,J*G*NSTA THROUGH LAST, FOR I=,091I.G.NWLS LAST TEMP(I)=STAA(JI) PRINT FORMAT BONJTIJ WHENEVER TEMP(NWLS)*LoDEPTH/2, PRINT FORMAT TRUBL OTHERWISE EXECUTE PLOT2.(IMAGETEMP(NWLS),ODEPTHO.) EXECUTE PLOT3.($*$,TEMPACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT BONLBL END OF CONDITIONAL LAST1 CONTINUE R R PLOTING SUBROUTINES R PRINT FORMAT VCBTI EXECUTE PLOT2.(IMAGE,.75*DEPTH,O.,DEPTH,O.) EXECUTE PLOT3*($*$,VCBACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT VCBLBL PRINT FORMAT LCBTI TEMP=.ABS.MAXOF3.(LCBOONWLS) EXECUTE PLOT2.(IMAGETEMP,-TEMP,DEPTHO.) EXECUTE PLOT3.($*$,LCBACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT LCBLBL PRINT FORMAT SWDTI EXECUTE PLOT2*(IMAGESWD(NWLS),O,,DEPTH,O.) EXECUTE PLOT3.($*$,SWDACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT DISLBL PRINT FORMAT FWDTI EXECUTE PLOT2.(IMAGEFWD(NWLS)O.,DEPTHO.) EXECUTE PLOT3.($*$,FWDACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT DISLBL PRINT FORMAT BMTTI EXECUTE PLOT2.(IMAGEMAXOF3.(BMT~OONNWLS)O.,DEPTHO.) EXECUTE PLOT3.($*$,BMTACWLSNWLS) EXECUTE PLOT4.(379LABEL) PRINT FORMAT BMTLBL PRINT FORMAT CFTI TEMP=.ABS*MAXOF3.(CFOO,#NWLS) EXECUTE PLOT2.(IMAGETEMP,-TEMPDEPTHO.) EXECUTE PLOT3*($*$,CFACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT CFLBL PRINT FORMAT TPITI EXECUTE PLOT2.(IMAGE,TPI(NWLS),O,,DEPTH,O,) EXECUTE PLOT3.($*$,TPIACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT TPILBL PRINT FORMAT MT1TI EXECUTE PLOT2.(IMAGEMT1(NWLS)*,.ODEPTHO*) EXECUTE PLOT3.($*$,MT1,ACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT MT1LBL PRINT FORMAT WLARTI WLAR(O) = 0. EXECUTE PLOT2.(IMAGEWLAR(NWLS),ODEPTHO.) EXECUTE PLOT3.($*$,WLARACWLSNWLS) EXECUTE PLOT4.(37,LABEL) PRINT FORMAT WLALBL R R FORMAT SPECIFICATIONS R

Example Problem No. 102 MAD Program and Data, Continued VECTOR VALUES WLALBL=$1HO,S30,20HAREAS IN SQUARE FEET*$ VECTOR VALUES BMTLBL=$1HOS30O22H TRANSVERSE KM IN FEET*$ VECTOR VALUES MT1TI=$1H1S30,24H MOMENT TO TRIM ONE INCH//S1*$ VECTOR VALUES TRUBL=$1H4,S50,15HDATA IRRELEVENT*$ VECTOR VALUES BONLBL=$1HO,S30,20HAREA IN SQUARE FEET *$ VECTOR VALUES VCBLBL=$1HO,30,26HVCB ABOVE BASELINE IN FEET*$ VECTOR VALUES LCBLBL=$1HOS30,24HLCB FROM MIDSHIP IN FEET *$ VECTOR VALUES DISLBL=$1HOS30,20HDISPLACEMENT IN TONS *$ VECTOR VALUES GEN=$12C6/12C6//3I8,2F8,2,I8*$ VECTOR VALUES TPILBL=$1HOS30,27HADDED DISPLACEMENT IN TONS *$ VECTOR VALUES LABEL=$ HEIGHT ABOVE BASELINE *$ VECTOR VALUES SWDTI=$1H1S3023HSALT WATER DISPLACEMENT//S1*$ VECTOR VALUES FWDTI=$1H1S30,24HFRESH WATER DISPLACEMENT//S1*$ VECTOR VALUES SKIP=$1H1*$ VECTOR VALUES SPACE=$/(9F8.2)*$ VECTOR VALUES OFFSET=$/(9F8.2)*$ VECTOR VALUES CHECK=$1HOS50,15HOFFSETS FOR WL I2//(55,10F10.4 1//)*$ VECTOR VALUES CFTI=$1H1,S1O,3HAFTS20,32HCENTER OF FLOTATION F 1ROM MIDSHIP S20,7HFORWARD//51*$ VECTOR VALUES BMTTI=$1H1,S30,29HTRANSVERSE METACENTRIC HEIGHT 1//S1*$ VECTOR VALUES LCBTI=$1H1S1lO3HAFTS20,31HLONGITUDINAL CENTER 1OF BUOYANCY S20,7HFORWARD//S1*$ VECTOR VALUES BONJTI=$1H1,S30,27H BONJEAN CURVE FOR STATION I 12//S1*$ VECTOR VALUES BONJEA=$//S50,9H STATION I2,8H...AREAS/// 1(S5510F10O2//)*$ VECTOR VALUES VCBTI=$1H1S30.27HVERTICAL CENTER OF BUOYANCY// 1S1*$ VECTOR VALUES OUTPUT=$1H1,S25,12C6//S26,12C6//116HO WL WL A 1REA CF CWP T/I SW DISP FW DISP VCB LCB KM 2T KML MT1 CHG DISP CB CMS CP //*$ VECTOR VALUES IN=$1HOI3,F10.1,F6.1,F6.2,F6.1,2FO10.03F7.2,F8 1.2,F61,9F10.13F6.2*$ VECTOR VALUES NOTE=$65H4****NOTE**** 1. DISREGARD ZERO VALUES 1 ON ODD NUMBERED WATERLINES/1HOS13,67H2* FOR LONGITUDINAL CE 2NTERS NEGATIVE VALUE INDICATES AFT OF MIDSHIP /1HOS13, 380H3. ON ALL GRAPHS EXCEPT LONGITUDINAL CENTERS UPPER RIGHT H 4AND CORNER IS A POINT *$ VECTOR VALUES CFLBL=$1HOS930941H CENTER OF FLOTATION FROM MID 1SHIP IN FEET *$ VECTOR VALUES WLARTI=$1H1,S30,26HAREAS OF HORIZONTAL PLANES// 1S1*$ VECTOR VALUES TPITI=$1H1,S30,51HADDED DISPLACEMENT DUE TO ONE 1 INCH PARALLEL SINKAGE //S1*$ VECTOR VALUES MT1LBL=$1HOS30,36HMOMENT TO TRIM ONE INCH IN F 100T-TONS *$ TRANSFER TO START END OF PROGRAM $ COMPILE MAD, PRINT OBJECT, CONDITIONAL EXTERNAL FUNCTION(AB,CD) INTEGER CD,I,J ENTRY TO RREAD. THROUGH STL1, FOR I=O,1,I.G.C THROUGH STL19 FOR J=,01,J.G.D STL1 A(IJ)=A(I9J)+B(IJ)*.083333333 FUNCTION RETURN ENTRY TO RREAD2. THROUGH STL2, FOR I=O,1,I.G*C THROUGH STL2, FOR J=O,1,J.G.D STL2 A(I.J)=A(IJ)+B(IJ)/96. FUNCTION RETURN ENTRY TO RREAD3. THROUGH STL3, FOR I=0,1,I.G.C THROUGH STL3, FOR J=O,1,J.G.D STL3 A(I,J)=A(I,J)+B(IJ)/192. FUNCTION RETURN END OF FUNCTION $ COMPILE MAD, PRINT OBJECT, CONDITIONAL EXTERNAL FUNCTION(AsB,C,D) INTEGER B,C.FD ENTRY TO MAXOF1. E=0. -G35 -

Program to Compute and Plot Curves of Form MAD Program and Data, Continued THROUGH STL1l FOR F=1,1,F.G*D STL1 WHENEVER E *L6 A(BF),E= A(B~F) FUNCTION RETURN E R STL2 ENTRY TO MAXOF2. E=O. THROUGH STL2. FOR F=1:1iF.GoD WHENEVER E *L. A(F#C), E=A(FtC) FUNCTION RETURN E R ENTRY TO MAXOF3. E=O. THROUGH STL3# FOR F=1tlFf.G*D WHENEVER E *L.*ABS*A(F)t E=.ABS.A(F) FUNCTION RETURN E END OF FUNCTION STL3 $ DATA CURVES OF FORM FOR HULL 77 TO 79 PROGRAMMED BY JOSEPH J RODNITE MIDSHIP NO STA NO WLS 12 24 14 LBP 600. DEPTH TYPE DATA 44. 8 STATION SPACING STARTING FROM STATION 0 25. 25. 25. 25* 25 25* 25 2 25 25. 25. 25. 25. 25. 2 25 2. 25. 25 25. 25. 25. 25. 25. 25. 25. WATERLINE SPA ING STARTING FROM 2. 2. 2. 2. 2. 4, 4, 4. 4. 4. WATERLINE 0 2. 4. 4. 4. WATERLINE 0 O0 0. 0. 0. 0. 0O 0. 0. 0. 2 FOOT 0. 3. 4. 31, 33. 34. 8. 5. 2. 4 FOOT 1. 4. 5. 33. 35. 36. 10, 6. 3. 6 FOOT 1. 4. 5. 33. 35. 36. 10, 6. 3, 8 FOOT 1. 4. 6. 35. 36. 37. 12. 7. 4. 10 FOOT 1* 4. 6. 36. 37, 38. 15. 9. 4. 12 FOOT 1. 4. 6. 37. 37. 38. 17. 100 5. 0. 0. 0. 0. 0. 0. WATERLINE 6. 8. 33. 32. 0. 0. WATERLINE 8. 10. 35. 34. 0. 0. WATERLINE 8. 10. 35. 34. 0. 0. WATERLINE 9. 12. 37. 36. 0. O0 WATERLINE 10. 14. 37. 37. 0. 0. WATERLINE 10. 14. 38. 37. 0. 0. WATERLINE 10. 15. 38. 37. 0. 0. WATERLINE 0. 0. 0. 0. 0. 0. 12. 29. 0. 15. 31. 0. 15. 31. 0. 18. 33. 0. 19. 36. 0. 20. 36. 0. 21. 37. 0. 16. 24. 20. 27. 20. 27. 0. 0. 0. 0. 22. 27. 18. 12. 25. 30. 21. 15. 25. 30e 21. 15. 22. 27. 31 29. 24. 18. 24. 29. 33. 33. 28. 22. 25. 30. 37. 34. 29. 23. 27. 31. 35 35. 32. 27. 28 32. 36. 36. 34. 30. 0. 37. 20. 0. 37. 23. 3. 38. 12. 3. 38. 16. 16 FOOT 6. 38. 5. 20 FOOT 6. 38. 7. 11. 16. 22. 38* 38. 37. 0. 0. 0. -G36 -

Example Problem No. 102 MAD Program and Data, Continued........ 2 F.T WATERI NE 0. 3. 6. 11. 17. 37 38. 38. 38. 38. 27. 20. 11. 0 0o... 28 FOOT WATERLINE 0O 3. 7. 12. 18. 37, 38,. 38 38.. 38 30. 23. 15 7. 0. 32 FOOT WATERLINE 0. 3. 8. 14. 20. 37. 38. 38. 38. 38. 32. 27. 20 12. 4. 36 FOOT WATERLINE 1* 4 9. 15. 21. 37 38 38 3 8 38. 38. 34, 30. 23. 17 9. 40 FOOT WATERLINE 2. 6. 11. 17. 23, 38, 38. 38._ 38. 38. 35. 32. 27. 20. 13. 44 FOOT WATERLINE 3. 7. 13. 19. 24. 23. 37. 0. 24. 38 0. 26. 38. 0. 28. 38 0. 28. 38. 0. 29. 33, 36. 37. 35. 32. 30. 3'4. 36* 37. 36, 34. 31. 34. 37. 37. 37. 36. 31. 35 37. 38. 37. 37. 32 ~ 3 7. 38. 38. 37 30. 33 36. 37. 38. 38. 38. _ 38. 3. 38. 38. 38. 38. _ 37. 36, 33. 29* 24. 16. 0. Computer Output CURVES OF FORM FOR HULL 77 TO 79 PROGRAMMED BY JOSEPH J RODNITE __ — SW FW CHG WL WL AREA CF CWP T/ DISP DISP VCB LCB KMT KMLDISP C CMS CP 1 18304.2 27.9.44 43.6 0 0.00.00.00.00.0 -2.0..00 00 2 20560.9 30.0.47 49.0 1786 1737 2.44 28.38 92.94 3547.25 879.4 -2.4.36.80.45 3 20551.4 28.9.47 48.9 0 0.00.00.00.00.0 -2.4.00.00 u.00 4 22291.7 29.2.49 53.1 4168 4053 4.49 16.63 50.80 1719.01 992.6 -2.6.40.85.46 23930.7 25.8.52 57.0 0 0.00. 00.00.00.0 -2.4.00.00.0 6 24656.2 24.6.54 58.7 6886 6695 6.68 10.31 41.74 1212.611153.3 -2.4.44.89 _ 48 5, 23930._____________________________________ __ ______.~__A ---— JL^P — 7 25602.8 20.8.56 61.0 0 0..Q Q 0 -.00 _2 Q.0.-2 8 26566.7 17.9.58 63.3 12739 12385 10.98 9.62 32.57 763.961332.2 -1.9 -...._49.93.52 9 27524.1 13.8.60 65.5 0 0.00.00.00.00.0 -1.5.O.00.00 10 29017.2 8.0.64 69.1 19050 18521 15.32 4.46 3165 645.241666.7 -.9.95 --- 11 30483.7 2.7.67 72.6 0 0.00.00.00.00.0 -.3.00 __________________12 31912.2 -.4.70 76.0 26016 25294 19.80.81 33.31 612.902143.1.1.55.96.57 13 33133.2 -1.1.73 78.9 0 0. 0.00.00. 00 I0 - -w- LO — Q14 34160.2 -1.6.75 8___1.3 _33582 32650 _24.3_._ -_.24_ 35.87 572.892558.4 _ -.2.59.97.0 ****NOTE**** 1. DISREGARD ZERO VALUES ON ODD NUMBERED WATERLINES 2. FOR LONGITUDINAL CENTERS NEGATIVE VALUE INDICATES AFT OF MIDSHIP 3.-G3 ON ALL GRAPHS EXCEPT LONGITUDINAL CENTERS UPPER RIGHT HAND CORNER IS A POINT -G37 -

Program to Compute and Plot Curves of Form Computer Output, Continued STATION O...ARLAS.-.._. _ 00___ 1.96 _.00 14.50.00 26.06.00. 36.94.00 40.25.00 46.72.00 -.. 80.86 ----—............................. STATION 1...AREAS.00.00 22. 93.00 56.83.00 90.64.00 145.22.00 - -196.44.00 251.6_7.O00 354.22 STATION 2...AREAS ~!(JC-*^.00 31.32 0.00__ 75.33.00 125.36 00 228.2500 335.64.00 468.75 -.00 647.11 STATION 22...AREAS,00.00 oo0...00.00.0C.00.o.. --- —-— _ —^ --- —-_ --- —- __ --- —--- C — _- _ - -— _-..STA IJ3_ 2.3_.^- _.00.00 68.83.00 281.67.00.00.00.00.00.00.00.00.0i.00.00.0,.00.00,00 STATION 24...AREAS -—.oo00.0..00.0c.00 -.-o..0..,. _.-.-...C O.00 _.___ —_ --— __...._.o _ ___ _ _...Q__ -.. 0.00 -.00....................... -.co.0o -.0.0,' -.00 -G38 -

BONJEAN CURVE FOR STATION 3 44.000 - + + --------- + ---- + + --- —--— + --- —-— + --- —----------------------- I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I 35. 200 + ~ + + + + ----- + + --- —------------ ---------— + ------------------------------— + I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I ' HI I I I I I I I I I 1 E I I I I I I I I I I I I I I I I I I I I I I Gts I I I I I I * I I I I I t I I I I I I I I I I I 26.400 + --- —-------------------- ---------- ----------------------— + --- —---- II I I I I I I I I I A I I I I I I I I I I I * I~ I I I I I I I I I V I I I I I I I I I I I, E I I I I I I I I. I I I A I I I I I I I I I I I B I I I I I I I I I I I i I I I I I I I I I I I C- I I I I I I I I I I I E I I I I I I I I I I 1 1 I I I I I I I I I I N I I I I I I I I I I I C I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I II 1 I I * I I I I I I I I I I I I I I I I I I I I * I I I I I III I I t I I I I I I.1 I 1 1 I I I I I I I 1 I I I I I I I I I I I I I I * I I I I I 1III I I I I I I I I I I I I 0.0CO * -------— + --- —--— + --- —-— + — -----— + -------— + -------— + +++ --- —+ O.000 1C5.865 211.731 317.596 423.461 529.326 635.192 741.057 846.922 952.787 1058.653 0 Id ct (D 0 (ct Co ct 0 0 ct I. (DCD 0 CD 1 — 0 0o i0 AREA IN SQUARE FEET

BONJEAN CURVE FOR STATION 14 44.000 + --------- + --- —— ++ --- —-— ++ --- —---- + --- —--— +++ --- —------------ ------- -------- I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I 1 I I I I I II I I I I I I I I I I I I I I 1* I I 35.200 + --- —------------- + + + + -------— + --- —- ----------------- ------------ I I I I I I I I I I I I I I I I I l 1 1 1 1 I I I I I I I I I I I * I I I I I I I I I I H I I I I I I I I I I 1 E I I I I I I I I I I I I I I I I I I I I G I I 1 I I I I* 1 I I I H I I I I I I I I I I I T 26.400 + --- —— + --- —----— + --- —— + —+ --- —-— + --- —---- + --- —----------— + --- —----------— + --- —--- I I I I I I I I I I I A I I I I I I I I I I I B * I I I I I I I I I I 0(J I I I I I I I I I I I 0 V I I I I I I I I I E I I I I I I I I I I -I I I I I I * I I I I I I B I I I I I I I I I I I A I I I I I I I I I I I S 17.600 + + ------— + --- —-— + --- —-+ —++ --- —----------- ---------------- -------- --------- E I I I I I I I I I I I L * I I I I I I I I I I I I I I I I I I I I I I N I I I I I I I I I I I E I I I I I I I I I I I I I I * I I I I I I I 1 I I I I I I I I I I I I I I I I I I I 1 I I * I I I I I I I 1 I I 8.800 + --------- + + + --------------------------— + --------- ------------ I I * I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I 1 I I * I I I I I I I I I I I I I I I I I I I I I 0.000 + + + + + + + --------------— + --- —---- ---------------- --------- -------------------- 0.030 314.725 62.453 944.175 1258.900 1573.625 18F8.352 2203.375 2517.80C 2832.525 3147.250 0 0 ct (D CD o 0 Cct Q 0 ct H0 P. CD UJ1( 1-1 0 ct 0 0 0-0 0 0 5: AREA IN SQUARE FEFI

H E I G H T VERTICAL CENTER OF BUOYANCY 44.000 + +~ ~+ --— ~+ -----— +-~ —+ --- —- ~ 4- ~4 —~+____ ----. I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I 35.200 + ~ + ~ -+ --- —+ -------— + --- —--- ~ 4-+~~ +.+. --- — ~ — + I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I 26.400 +-+ ~ ~ ~+ -— + --- —~ + -— + --- ~ I -+-~ 4-+~ 4. ~ 4 + —_ +_ - II I I I I I I I I I II I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I II I I I I I I I I I II I I I I I I I I I II I I * I I I I I I I I I I I I I I I I I I I I 17.600 +- + + - ---— + --- —---- — + — + --- —-+ --- —-- ------— + --- —-— + I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I II I II I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I II I * I I II I I I I I I 0 0 ect 0 0 ct ID P. A B 0 V E l ty. H CD 0 o0 CD 0 0o B A S I L I N ~ 8.800 I I * I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I 1 I I I I I I I I I I I I I I I 1 I I I I I I I I 0.000 * + ----------— +-.+ --- —. --- —---- ~..++. --- —-.. ------— +~ --- —-— + --- —-- 0.000 3.300 6.600 9.900 13.200 16.500 19.800 23.100 26.400 29.700 33.000 VCB ABOVE BASELINE IN FEET

H E I G r r Po= \) r) A 0 V E B A S E L I N E SALT WATER DISPLACEMENT 44.000 + + ~ + + - + — ~ — -+ --------- + --- —— + — -- -- - + --- —- -- ---— __ + I I I I I I I I I I I I I I I I I I 1 I I I I I I I I I I I I I I I I I I I I I II I I * I I I I I I I I I I I I I I I I I I I I I 1 I I I I I I I I I I I I I I II I I I I I I I I I I * I I I 35.200 + — -- ---- -----— + — — + --- —-- + -- I I I I I I I I I I I I I I I I I I II I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I 26.400 + --- —-— ++ --- —-— + --- —-— + I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I- I I I I I I II I I I I I I I I I I I I I I I * I II I I I I I I I I I I I I I I I I I I I I II I I 17.600 + + -- + --- + --- —------- + --— + ----+ --- --------- + I I I I I I I I I I I * I I I I I I I 1 I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I 1 1 I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I II I I I I I 8.800 + — + ----— + --- —--- + + -- + --- —I I I I I II I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I * I I I I I I II II I I I I I I I I I I I I I I I I I I I I I * I I I I I I I 1 I I I I I I I I I I I I 0.000 * + --- —--— + --- —--— + --- —— + ---~++~+ + 0.000 3358.235 6716.470 10074.706 13432.941 16791.176 20149.411 23507.646 26865.882 30224.117 33582.352 DISPLACEMENT IN TONS 0 ct o ctDc 0 0 ct p. (D al 0 OQ ct0 0 C (D 0 ct 0 (D Co 0 0

TRANSVERSE METACENTRIC HEIGHT 44.000 ------— + --- —--- -------------------- + + + + --- —-— + --- —--- ----------------- -------------- I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I 35.200 -+ ~ +~ — - -4 ~ — + + + + — + --- —------ ------ -- — +~ + ~ + I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I H I I I I I I I I I I I E I I I I I I I I I I I I I I I I I I I I I I I G I I I I * I I I I I I I H I I I I I I I I I I I I I I I I I I I I I I A I I I I I I I I I I I * I I I I I I I I I I S 17.600 + --- —+ --- —---------------------------- ------------------ --— + --- —E I I I I I I I I I I I -II I L A I I I I I I I I I I I I I I I I I I I I I I N I I I I I I I I I I I E I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I 8.800 - ~ -- + ~ 4. ~ + ~ ~ 4. ~ ~ 4. ~ ~ 4.- + ~. --- —I I I I I I * I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I 1.00 * --- —-— + ------------— + --- —-+ --- —---- + --- —---------— + -------- ----------------— + I I I I37176 46410 55764 65I58 74352 83646 9294 I I I I I I I I I I I I I I I I I I I I I I * I I I I I I I I I I I I I I I I I I I I I 0 0 ct (D (t o 0 P. 0 c+ 1-1 IN' TRANSVERSE KM IN FEET

Program to Compute and Plot Curves of Form Discussion of Results and Critique While there are distinct advantages in being able to obtain from the computer actual plots of the values of the various curves of form as a function of draft, the occasions when these plots would be sufficient are rather limited. Bonjean curves are normally plotted on a profile of the ship involved in such a manner that sectional area curves can be readily obtained for any waterline. The curves of form are normally all presented on one plot so as to give a complete picture of the hydrostatic characteristics of the ship and to facilitate their use in problems. Thus, this particular solution would be useful only in a parametric study in which one might not care too much about the actual values and would be more concerned with the trends or the sense of the changes from one set of offsets to another. -G44 -

Example Problem No. 103 CALCULATION OF THE DRAFTS FORE AND AFT OF A DAMAGED SHIP by J. R. Paulling and R. A. Yagle (Solution essentially as devised by Professor J. R. Paulling, Jr., Department of Naval Architecture, University of California (Berkeley) while a faculty participant on the Ford Computer Project during the summer of 1961.) Problem Statement as Given to Students Given the table of offsets, the initial drafts fore and aft, and the locations of two transverse bulkheads bounding a compartment of a ship, write a MAD program which will solve for the final fore and aft drafts if the compartment is symmetrically flooded in free communication with the sea. The suggested procedure is to use an "added weight" method for solution, find the weight and trimming moment of the added water up to the original waterline, and then adjust the mean draft and trim to maintain static equilibrium. The modified amount of flooding water within the compartment should then be determined and draft and trim recalculated. This process should be repeated until satisfactory convergence is obtained as evidenced by a sufficiently small iteration increment in the drafts fore and aft. If convergence is not obtained, the procedure should be stopped after a specified number of iterations. The initial volume and LCB of the ship should, of course, be obtained by a longitudinal integration of the station areas and their moments. By an interpolation, five equally spaced station areas up to this initial waterline should be determined within the length of the specified compartment. These areas should then be used to obtain the volume and centroid of the water admitted to the compartment (up to the original waterline). The area, centroid and longitudinal moment of inertia of the waterplane must also be computed. Your program should be general, but need not (unless time permits) allow for changes in station or waterline spacing and may specify that the number of intervals be even for both. Data: Ship No. As you wish. Length Use L of 130.00' Beam B of 32.00' Initial Draft Forward HF of 8.00' Initial Draft Aft HA of 8.00' Compartment Forward Blhd. from FP XB1 of 52.00' Compartment Aft Blhd. from FP XB2 of 68.00' Waterline Spacing DELZ of 2.00' Number of Station Intervals P of 10 Number of Waterline Intervals Q of 8 Compartment Volume Permeability MU of 0.65

Calculation of the Drafts Fore and Aft of a Damaged Ship Offsets: Station Waterline 0 1 2 3 4 5 6 7 8 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.75 1.60 1 0.25 1.38 2.42 3.18 3.78 4.37 4.96 5.55 6.26 2 0.50 3.88 5.83 7.14 8.16 8.92 9.53 10.13 10.76 3 0.50 7.10 9.70 11.20 12.10 12.70 13.20 13.70 14.28 4 0.50 10.30 12.78 13.80 14.42 14.87 15.28 15.69 16.05 5 0~50 12.30 14.07 14.77 15.10 15.39 15.68 15.95 16.10 6 0.50 11.25 13.70 14.70 15.10 15.39 15.68 15.95 16.10 7 0.50 6.35 11.18 13.30 14.38 15.04 15.50 15.88 16.05 8 0.50 1.25 4.25 8.74 11.93 13.80 14.88 15.62 16.00 9 0.30 0.30 0.45 1.08 3.22 8.41 12.40 14.65 15.65 10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.60 5.52 Instructor's Solution The solution begins by solving for the area of each of the given stations up to the given even keel waterlines and then interpolates between the appropriate values of these areas to obtain the station areas for trimmed waterlines. These trimmed waterlines are defined on the basis of the draft at each station, HH, which also allows an interpolated set of offsets (YY) to be obtained. These station areas and offsets are then used to calculate the volume to the trimmed waterline, the area and moment of the trimmed waterplane, the longitudinal inertia of the waterplane, and the moment of the volume to the trimmed waterline about the fore perpendicular. Next, five equally spaced station areas (up to the trimmed waterline) are determined within the damaged compartment by interpolation, using an internal function. These areas, and the permeability, are used to find the volume of water admitted to the compartment and its centroid. These quantities are sufficient to allow the added submerged volume (DELVOL) and its trimming moment (TRIMOM) to be calculated. These are used to determine the new drafts fore and aft. The expression for the forward draft (HF), for example, includes three terms: the first is the present value; the second is that for the parallel sinkage; and the third that which accounts for the trimming. The latter can be related to the moment to trim one inch (one foot in this case), but is actually in terms of volume. It is particularly difficult to follow because the waterplane area moments are about the fore perpendicular and the lengths involved cancel out. A conditional statement stops the iteration whenever the change in draft is less than.0002 times the length, or on the twenty-first try. -G46 -

Example Problem No. 103 List of Symbols SHIPNO, L, B, H, HF, HA, XB1, XB2, DELZ, P, Q, MU AREA(STA, 1/2) STA1 STA2 HH C ASTA(J) CC YY(J) VOL(TRY) AWL MOMWL IWL VOLXB(TRY) AC(I) FLDVOL FLDCTR DELVOL TRIMOM HF HA See problem statement Area of each station up to each given waterline, in square feet Nearest regular station forward of forward bulkhead of flooded compartment (dimensionless) Nearest regular station aft of aft bulkhead of flooded compartment (dimensionless) Draft at any station, in feet Integer for waterline below HH (dimensionless) Areas of each station up to actual drafts, in square feet Integer for waterline below HH (dimensionless) Offsets of trimmed waterlines, in feet Volumes to trimmed waterlines, in cubic feet Area of trimmed waterplane, in square feet Moment of waterplane area about fore perpendicular, in cubic feet Longitudinal inertia of waterplane, in feet4 Moments of volume to trimmed waterlines, in feet4 Station areas within flooded compartment, in square feet Volume of water in flooded compartment, in cubic feet Distance of centroid of water in flooded compartment from forward bulkhead, in feet Added submerged volume, in cubic feet Moment of added submerged volume about fore perpendicular, in feet4 Calculated draft forward, in feet Calculated draft aft, in feet Flow Diagram 0,.p 7C~., Ippp IM I 7 /PX d A^RlJ,8t)AARw5,A^)/ (.N) 1 4XSx~gM (1Ao)^ z >- 'IC^.*/3 <*, ) W - ppp V^^cZ/P)3 P-I' ' y 3~c / 1 -G47 -

Calculation of the Drafts Fore and Aft of a Damaged Ship Flow Diagram, Continued ASr4-(-r) c ARa Coz ),c).Otq. Z p- Do.L.) _ RA Cf c.l)I /fY(-Cj- ~(cc.)+@ H-<c5* IE)L /L",cD aCJ4 UtL)-v-Tizc) I| v(mrf) -fO. Vs trRi.w) AmJL, H 0.P - ~, pole4 O. lS M'SML AWL e:() II H\ V o 0 6 L f )j. g a7aSI ( A ) Vo 1, Z's &9f) -r-,, V 9 Y)- OA A4c6()= TAeZ.64ir4A, -5r i., srZ, HP, is/ -+ i 'wsz- Y /4,) K~ 6^ I il a IF)omz He g-A |__4 L XC_ _ -_ VP__4_) _ Si~~~~~~~~L l - Iort - - RP~L —FDoL-(IClK+sS)e -G48 -

Example Problem No. 103 Flow Diagram (Internal Function) /fRfl^ / APffA \ /^~~^\ /86M \ ^ PIFCA) SO F^^ A,)-,,I (A) A*+4#t A-(nPsA PV, s, A=-5z 51-. - f \^i^~j \/4 A.~-x___/S \ I PA-J~),, ' (zH^lA Shtrl 5i/$7p l(-P i -)*'oP: |Aps Equations ) ) XVL t)-./ ))#r)z)ASl(.I-Z)+4:ASA(t-t).. r4,:i)) +t z (r< CZ) A S(LJ../g*P~(YCl:z2)t 4.*YtfIA-) t Yr>)).t AWL -) pYJFiYxi-*YX.) r X)k4L (S) VigoaLs(iV(L-Z) 4z1-4 ( l-(i-)*dLw) L -<(+ A Ql)I ir) L-X IL (x) /oLAB(^(L/4C))p)4bA-I^ltA^ t Ace L)SI It) + 0LX (TR') 6t) (LD 4$)-t 1B-4),zz.' (Ac(~4A)43X) 4z4))C^ C sAC4) C7) jWcrg (Z-~XiOLII)/i4 *(4d.* 4 )+ft2)04cCt(4-kCIV) 4))/ ( ) i-Ii lFt VoL/,4i4L^ (,4ob1WL/4W/L;) o&4/(ri4L-. oMIJL*k/O^sh/L /AJI) C9) HA1 tfA+psLoL/Al - (L —AIfDML/AwL)* ori/CiMO/ a L-*AoML * DoML-/AW9L) -G49 -

Calculation of the Drafts Fore and Aft of a Damaged Ship MAD Program and Data $COMPILE MADEXECUTE,PRINT OBJECTDUMP R CALCULATION OF THE DRAFTS FORE AND AFT OF A DAMAGED SHIP RGIVEN THE OFFSETS, INITIAL DRAFTS, LOCATIONS OF TRANSVERSE RBULKHEADS BOUNDING THE FLOODED COMPARTMENT, AND THE RCOMPARTMENT PERMEABILITY RP MAX IS 40 (41 STATIONS INCLUDINr FP STA(O)) RQ MAX IS 16 (17 WATERLINES INCLUDING BASELINE WL(O)) RP AND Q MUST BE EVEN READ FORMAT DATASHIPNOLBtHHFHAXB1,XB2,DELZPQ~MU VECTOR VALUES DATA=$I5,F8*.27F7.2,213,F4.2*$ PRINT FORMAT ECHOSHIPNOL,B,H,HFHAXX1,XB2tDELZPQMU VECTOR VALUES ECHO=$1H1,13HSHIP NUMBER,I5/8HOLENGTH,F8.2,5 OH FEET,7H BEAM,~7.2t5H FEET,12H DES DRAFTF7.2, 5 1H FEET/ 11HODRAFT FWD,F7.295H FEET#12H DRAFT AFT,F7.2,5H 2FEET/21HOBULKHEAD LOCATIONS,F7*2,S2,F7.2,33H FEET ABAFT FOR 3WARD PERPENDICULAR/20HOWATERLINE SPACING,F7.2,5H FEET/19HON 4UMBER OF STATIONS,I4,22H NUMBER OF WATERLINES,14,15H PERME 5ABILITY,F5*2///1HOS1016HTABLE OF OFFSETS/1OHOWATERLINE*$ INTEGER SHIPNOPQ, ISTAWLSTSTA1STA2JCoCCI1,TRY DIMENSION Y(738,DD) VECTOR VALUES DD=2,19,18 THROUGH AAAA, FOR I=O,1,I*G.Q VECTOR VALUES TABHD=$1H+,S$,$ $,$tI2*$ TABHD(1)=DIG(I) VECTOR VALUES DIG=$12$,$18$,$24$,$$$30$$36$$42$,$48$,$54$,$60 1$,$66$,$72$,$78$,$84$,$90$t$96$,$102$5$108$~$114$ AAAA PRINT FORMAT TABHD,I PRINT FORMAT STATS VECTOR VALUES STATS=$8HOSTATION*$ THROUGH BBBB, FOR I=01,I.G.P BBBB READ FORMAT OFFSETY(IO0)**Y(IQ) VECTOR VALUES OFFSET=$10F6o2/10F6,2*$ THROUGH CCCC, FOR I=O,1,I.G.P CCCC PRINT FORMAT OFFTABI,Y(I,0)...Y(IQ) VECTOR VALUES OFFTAB=$1HOS3,I2,S6,18F6.2*$ THROUGH DDDD, FOR STA=0,1,STA.G.P AREA(STAO)=0o THROUGH DDDD,FOR I=2,2,I.G.Q DDDD AREA(STAtI/2)=AREA(STA,(I-2)/2)+DELZ/3.*(Y(STAI-2)+4.*Y(STA, 1I-1)+Y(STA,I)) STA1=XB1/(L/P) STA2=XB2/(L/P)+1 TRY=1 EEEE THROUGH FFFF, FOR J=O*1,J.G.P HH=(HA+HF)/2.+((HF-HA)/L)*(L/2.-J*L/P) C=HH/(2.*DELZ) ASTA(J)=AREA(JC)+(HH-C*2*DELZ/ELZ)/(2DELZ)*(AREA(JC+)-AREA(J 1,C)) CC=HH/DELZ FFF YY(J)=Y(JCC)+(HH-CC*DELZ)/DELZ*(y(JCC+1)-Y(JCC)) DIMENSION ASTA(40),YY(40),VOL(20),VOLXB(20)~AC(5) DIMENSION AREA(369DDD) VECTOR VALUES DDD=2,10,9 VOL(TRY)=O. AWL=0O MOMWL=O. IWL=O. VOLXB(TRY)=O. THROUGH GGGG,FOR I1=2,2tI1G.P VOL(TRY)=(L/(3*P))*(ASTA(11-2)+4o*ASTA(Il-1)+ASTA(II))+VOL(TR 1Y) AWL=(L/(3*P))*(YY(I1-2)+4.*YY(I1-1)+YY(I1))+AWL MOMWL=(L/(3*/P)*(L/P)*(YY(Il-2)*(I1-2)+4**YY(11-1)*(Il-l)+YY( lIl)*Il)+MOMWL IWL=(L/(3*P))*(L (L/*(L/P)*(YY(I1-2)*(I1-2)*(Il-2)+4,*YY(I1-1) 1*(I1-l)*(I1-1)+YY(Il)*Il*Il)+IWL GGGG VOLXB(TRY)=(L/(3*P))*(L/P)*(ASTA(Il-2)*(I1-2)+4.*ASTA(Il-l)*( lI1-1)+ASTA(I1)*I1)+VOLXB(TRY) THROUGH HHHH, FOR I=0,1,I*G.4 HHHH AC(I)=INTER.(ASTATA1STAiSTA2L/PXB1+I*(XB2-XB1)/4.) FLDVOL=MU*(XB2-XB1)/12.*(AC(O)+4.*AC(1)+2.*AC(2)+4.*AC(3)+AC( 14)) TEMP1=HF -G50 -

Example Problem No. 103 MAD Program and Data, Continued TEMP2=HA FLDCTR=(XB2-XB1)/4.*(4.*AC(1)+4.*AC(2)+12.*AC(3)+4.*AC(4))/(A 1C(0)+4.*AC +AC(1)+2*AC2)+4*AC(3)+AC(4)) DELVOL=VOL(1)+FLDVOL-VOL(TRY) TRIMOM=VOLXB(TRY)-VOLXB(1)-FLDVOL*(FLDCTR+XB1) HF=HF+DELVOL/AWL+(MOMWL/AWL) *TRIlviOM/(IWL-MOMWL*MOMWL/AWL) HA=HA+DELVOL/AWL-(L-MOMWL/AWL) *TRIMOM/(IWL-MOMWL*MOMWL/AWL) WHENEVER.ABS( TEMP1-HF).L **0002*LAND.ABS ( TEMP2-HA) L..0002 1*L PRINT FORMAT OUTPUTsHF*HA.TRY VECTOR VALUES OUTPUT=$21HO FINAL DRAFT FORWARDF6.2,17H FEET 1 DRAFT AFTF6.2?7H FEET *I2.20H ITERATIONS REQUIRED*$ OR WHENEVER TRY.G.20 PRINT FORMAT NONCONHFTEMP1,HATEMP2 VECTOR VALUES NONCON=$22HONONCONVERGENT HF LAST9F6.2911H HF N 1XTLASTF6.2,8H HA LASTF6.2,11H HA NXTLASTF6.2/19HOTOUGH LUC 2K OLD MAN*$ OTHERWISE TRY=TRY+1 TRANSFER TO EEEE END OF CONDITIONAL INTERNAL FUNCTION(AAS1,S2SS.XARG) ENTRY TO INTER. THROUGH ALPHAFOR A=0,1,A*G*S2-S1 ALPHA DIF(A)=AA(A+S1) DIMENSION DIF(40) THROUGH BETA9FOR D=11.D.G.S2-S1 THROUGH BETAtFOR A=S2-S1-IpA.L.D BETA DIF(A)=(DIF(A)-DIF(A-1))/(SS*D) PROD=1. SUM=DIF(O) THROUGH GAMMAsFOR D=191.D.G.S2-S1 PROD=PROD*(XARG-SS*( S+D-1)) GAMMA SUM=SUM+DIF(D)*PROD FUNCTION RETURN SUM INTEGER S1~S29AD END OF FUNCTION END OF PROGRAM $DATA 99999 130.00 32.00 10.00 8.00 8,00 52.00 68.00 2.00 10 8.65 *75 1.60.25 1.38 2.42 3.18 3.78 4.37 4*96 5.55 6*26.50 3.88 5.83 7.14 8,16 8*92 9.53 10.13 10*76.50 7.10 9.70 11*20 12.10 12.70 13.20 13.70 14.28.50 10.30 12.78 13.80 14.42 14.87 15.28 15.69 16.05.50 12.30 14.07 14.77 15.10 15.39 15.68 15.95 16.10.50 11.25 13*70 14.70 15*10 15.39 15.68 15.95 16*10.50 6.35 11.18 13.30 14*38 15.04 15.50 15.88 16.05.50 1.25 4.25 8*74 11.93 13.80 14.88 15.62 16.00.30.30.45 1*08 3.22 8.41 12.40 14*65 15*65 4.60 5*52 -G51 -

Calculation of the Drafts Fore and Aft of a Damaged Ship Computer Output SHIP NUMBER 99999 LENGTH 130.00 FEET BEAM 32.00 FEET DES DRAFT 10,00 FEET DRAFT FWD 8.00 FEET DRAFT AFT 8.00 FEET BULKHEAD LOCATIONS 52.00 68.00 FEET ABAFT FORWARD PERPENDICULAR WATERLINE SPACING 2.00 FEET NUMBER OF STATIONS 10 NUMBER OF WATERLINES 8 PERMEABILITY 0.65 TABLE OF OFFSETS WATERLINE 0 1 2 3 4 5 6 7 8 STATION 0 0.00 0.00 0.00 0.00 0.00 0,00 000 0.75 1.60 1 0.25 1.38 2.42 3.18 3.78 4.37 4.96 5.55 6.26 2 0.50 3.88 5*83 7.14 8.16 8.92 9.53 10.13 10.76 3 0.50 7.10 9.70 11.20 12.10 12.70 13.20 13,70 14.28 4 0.50 10.30 12.78 13.80 14.42 14*87 15.28 15.69 16*05 5 0.50 12.30 14.07 14.77 15.10 15.39 15.68 15.95 16*10 6 0.50 11.25 13.70 14.70 15.10 15.39 15.68 15.95 16.10 7 0.50 6.35 11.18 13.30 14.38 15.04 15.50 15.88 16.05 8 0.50 1.25 4.25 8.74 11.93 13.80 14.88 15.62 16.00 9 0.30 0.30 0.45 1.08 3.22 8.41 12.40 14.65 15.65 10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.60 5.52 FINAL DRAFT FORWARD 9.44 FEET DRAFT AFT 8.28 FEET 17 ITERATIONS REQUIRED Discussion of Results and Critique This particular solution incorporates only one of the several possible schemes by which a flooding problem may be solved and is not very general. It is neither the best nor the worst of these, but is typical of many submitted by students. Most of them used either internal or external functions and, as required by the problem statement given to them, used an iterative procedure. This was the first problem in which they had to use a conditional statement. This problem and solution were used to illustrate how the computer can be used to solve problems using an iterative method. The students could presumably elaborate on this or their own program and create a more general program for later use if they so desire. The added complexity of a truly general program would tend to mask the iterative techniques used. -G52 -

Example Problem No. 104 FLOODABLE LENGTH CALCULATION by J. R. Paulling and R. A. Yagle (Solution essentially as devised by Professor J. R. Paulling, Jr., Department of Naval Architecture, University of California (Berkeley) while a faculty participant on the Ford Computer Project during the summer of 1961.) Problem Statement as Given to Students The table of offsets for a ship is given. It is desired to compute several points on the floodable length curve for a specified permeability. Write and test a MAD program to accomplish this calculation for each of the several specified trim waterlines. The program should recognize a non-convergent solution corresponding to a required location of the flooded space beyond the limits of the hull surface. End point calculations may be omitted since it will be possible, by specifying a sufficient number of trim waterlines, to obtain ordinary points as near the ends of the ship as desired. Solving the floodable length problem is initiated by assuming that a ship, floating at initial drafts HF and HA, sustains damage and is flooded in such a location and to such an extent that it sinks to a specified "damaged waterline". Conventionally, several such damaged waterlines are chosen, and the problem then is to determine the location and size of the flooded spaces such that the specified waterlines are obtained in each case. A curve obtained by erecting ordinates equal to the lengths of such compartments at the midlength of the compartment locations on a profile drawing of the ship is termed the floodable length curve. The required flooded compartment volume and longitudinal position of the centroid of the volume are obtained by solving two equations of static equilibrium of the ship in the damaged condition. Thus the compartment volume is given by: V = (V2 - Vl)/4 where V2 = total volume of ship up to the damaged waterline V1 = volume of the ship up to the original undamaged waterline t = permeability of the flooded compartment The distance from the FP to the centroid of the compartment is V2(XB2) - Vl(XB1) c - Vc he -LvTc where XB2 = distance to the centroid of V2 XB1 = distance to the centroid of V1 (i.e., the locations of the centers of buoyancy after damage and before,respectively) It is necessary to find by an iterative procedure a segment of the ship volume up to the damage waterline whose volume and centroid satisfy these criteria. -G53 -

Floodable Length Calculation The procedure begins by assuming the midlength of the compartment is located at Xc. An estimate of the compartment length is obtained by dividing the ship's sectional area at Xc into Vc. By an interpolation procedure, five equally spaced station areas are obtained within this trial length. These areas and their moments about the FP are integrated to obtain the volume and centroid location for the trial compartment. The trial length and compartment midlength location are obtained from the following expressions: V L2 = L1 X V TRY Xc XM2 = X1 X X1 where L2 = compartment length for next iteration L1 = assumed compartment length for present iteration VTRY compartment volume obtained in present iteration XM2 = compartment midlength location for next iteration XM = compartment midlength location from present iteration X= distance from forward perpendicular to centroid of compartment from present iteration This process is repeated until satisfactory convergence to the required compartment volume and centroid location is obtained or until a specified number of iterations is exceeded. In the latter case, an examination of L and XM from the last iteration indicates whether or not there is a solution for the corresponding damaged waterline. Data: Ship No. As you wish Length Use L of 130.00' Beam B of 32.00' Initial Draft Forward HF1 of 8.00' Initial Draft Aft HA1 of 8.00' Waterline Spacing DELZ of 2.00' Number of Station Intervals P of 10 Number of Waterline Intervals Q of 6 Compartment Volume Permeability MU of 0.65 Offsets: Station Waterline Deck 0 1 2 3 4 5 6 Edge 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.75 1 0.25 1.38 2.42 3.18 3.78 4.37 4.96 5.55 2 0.50 3.88 5.83 7.14 8.16 8.92 9.53 10.13 3 0.50 7.10 9.70 11.20 12.10 12.70 13.20 13.70 4 0.50 10.30 12.78 13.80 14.42 14.87 15.28 15.69 5 0.50 12.30 14.07 14.77 15.10 15.39 15.68 15.95 6 0.50 11.25 13.70 14.70 15.10 15.39 15.68 15.95 7 0.50 6.35 11.18 13.30 14.38 15.04 15.50 15.88 8 0.50 1.25 4.25 8.74 11.93 13.80 14.88 15.62 9 0.30 0.30 0.45 1.08 3.22 8.41 12.40 14.65 10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 4.60 -G54 -

Example Problem No. 104 Damaged Waterlines: 3A 2A 1A P 3F 2F 1F Draft Forward 7.10' 9.00' 12.80' 15.70' 19.40' 18.95' 17.95' Draft Aft 16.70' 16.70' 16.70' 15.70' 7.10' 9.00' 12.80' Instructor's Solution The solution presented has been generally described in the problem statement, and this and the list of symbols which follows are probably sufficient to allow the reader to understand the program. In addition, this solution utilizes many of the same techniques used in the preceding sample problem, and even the interpolation,INTER., is the same except that here it is an external rather than an internal function. The areas of the regular stations up to the damaged (flooded) waterlines sometimes involve an extrapolation beyond the areas on hand from the offsets read in. This is taken care of by a conditional and utilization of the mean offset above the highest regular one given. That is, the highest offset and that at the deck edge are averaged. List of Symbols SHIPNO, L, B, H, HF1, HA1, DELZ, P, Q, MU AREA(STA, I/2) HO JJ AO(J) VOL VOLXB HH ASTA(J) QQ FLVOL FVOLXB VOLCOM XCOM PP ATRY XTRY See problem statement Areas of each station up to each given waterline, in square feet Initial draft at any station, in feet Integer for waterline below HO (dimensionless) Areas of each station up to actual initial drafts, in square feet Volume at initial waterline, in cubic feet Moment of initial volume, in feet4 Draft at any station, flooded, in feet Areas of each station up to flooded waterline, in square feet Integer for waterline below HH (dimensionless) Volume to flooded waterline, in cubic feet Moment of volume to flooded waterline, in feet Compartment volume, in cubic feet Distance from fore perpendicular to centroid of flooded compartment, in feet Nearest regular station forward of centroid of flooded compartment (dimensionless) Approximate station area at centroid of compartment, in square feet Distance from fore perpendicular to mid-point of flooded compartment, in feet -G55 -

Floodable Length Calculation List of Symbols, Continued LTRY STA1 STA2 AC(I) VTRY XXTRY Approximate length of flooded compartment, in feet Nearest regular station forward of forward end of flooded compartment (dimensionless) Nearest regular station aft of aft end of flooded compartment (dimensionless) Station areas within flooded compartment, in square feet Trial volume of flooded compartment, in cubic feet Distance from fore perpendicular to centroid of trial volume of flooded compartment, in feet Flow Diagram (3 - V(DCU00)-Jo,1, YYO/(->(g-) <)4r4FI-HA i/ - y.- jFL-/p) -G56 -

Example Problem No. 104 Flow Diagram, Continued ' 2^I=0,K I - '- \.<.4 / Ac(l); INTeK,,-r4AA 1 SLIAZ Lp, /f = EQC10) l 'XfRg- 7~/WL.z*R</Z. tT +^-r LQ/4. ) ^ — orD -G57 -

Floodable Length Calculation Flow Diagram (External Function) f FCI)= /L Al-4 X "\ D A IF(")= \~~J I )S-~ 15ae AA/r^-f^- 5{^ K1 <> ^4 - 1~t~ I~asz AAOIS'U=IIl) "% 1?U Ti~f r C.~... - s / \ 1 - r r ~()-.. (-)) gn 1 4) ~UA;,PI(Q) 1^^ 5U-,i4S)* iA/4A ^ Equations for Flow Diagram ( 0 ) ARA(A)I/rz) =AKEA r~ Vz -I) - pDi/3L /sS r4A-z) 4'4. *Y-z5A-I )~tY(s)I)) () A~(J) = ARV4iC5?^ )+(}ZA~ffI4J;^+ )-ARe (4;,S7J))+lO-^ Z J5j+gtZ)/Cz.^pgLe) C3) aVL= (L /P)-))*64Ao(6-z)+ 4.-Ao6 r-1)+-A<O6)) + /ol(4) VJoL X61- L&/(p))t(L/p)(Ao C-2)O-)4AO-6)*A4) + V/ojLB t() ArA( J)r> AReA QCziJ) - )ARbrQ#t) -A( 4CC-p))*H- Z*Q Q EL)) - C7) FVOL-L/Op))L6 r(-:)A+4 (i))3 4 ThLVo L ( ) FdoLX5^ IL/w(7))(LIP)<fi (-L);@e)t4^T/"I-)4-l) (^) >4L} 6 (9) AiT7 ArT4(w)+ CX t-JPP'C( WP))/(/p)* (AST I) -jAsrkCpp) ) (jo) V'r- TRTf r/2.).A(o)+4A.-~)+,cC^) t+4A (c3)tA 4C(4)) iLl) xRf/ XTR- LTR'/Z. +J-TT 1/4.)(6() 4*AA: IZ.)C(+)4., (4-,)) *)LeRt/lZ)/vr'f -G58 -

Example Problem No. 104 MAD Program and Data $COMPILE MADEXECUTE 'PRINT OBJECTDUMP RFLOODABLE LENGTH CALCULATION RP MAX IS 40 (41 STATIONS INCLUDING FP, STA(O) RQ MAX IS 16 (18 WATERLINES INCLUDING BL, WL(O) AND DK EDGE READ FORMAT DATAtSHIPNOLBbHHF1,HA1,DELZPQMU VECTOR VALUES DATA=$I5,F8.2,5F7.2,2I3,F4.2*$ PRINT FORMAT ECHOtSHIPNO,LHF1,HA1,PQtDELZMU VECTOR VALUES ECHO=$1H113HSHIP NUMBER,I5/8HOLENGTH tF8.2,5 1H FEET,13H DRAFT FWD,F7^2,5H FEET,12H DRAFT AFT,F7.25H 2FEET/19HONUMBER OF STATIONSI4,23H NUMBER OF WATERLINESI4, 320H WATERLINE SPACINGF7.2, 3H FT/13HOPERMEABILITYF5.2///1 4HOSO10,16HTABLE OF OFFSETS/1OHOWATERLINE*$ THROUGH AAAA, FOR I=O,1,I.G.Q TABHD(1)=DIG(I) AAAA PRINT FORMAT TABHD,I VECTOR VALUES TABHD=$1H+,S$9$ $,$,I2*$ VECTOR VALUES DIG=$12$,$18$5$24$,$30$,$36$,$42$,$48$,$54$,$60 1$,$66$,$72$5$78$,$84$,$90$5$96$,$102$ DKEDG(1)=DIG(Q) PRINT FORMAT DKEDG VECTOR VALUES DKEDG=$1H+,S$9$ $,$,11H DK EDGE*$ PRINT FORMAT STATS VECTOR VALUES STATS=$8HOSTATION*$ THROUGH BBBB, FOR I0.1,I.G.P BBBB READ FORMAT OFFSETY(IO)...Y(IQ+1) VECTOR VALUES OFFSET=$10F6.2/10F6.2*$ THROUGH CCCC, FOR I=O,1,I.G.P CCCC PRINT FORMAT OFFTABI,Y(I,0)...Y(IQ+1) VECTOR VALUES OFFTAB=$1HO,S3,I2,S6,18F6.2*$ THROUGH DDDD, FOR STA=O,1,STA.G.P AREA(STA,O)=O. THROUGH DDDD FOR I=22,2I.GsQ DDDD AREA(STAI/2)=AREA(STAI/2-1)+ DELZ/3.*(Y(STAI-2)+4.*Y(STA 1,I-1)+Y(STAI)) THROUGH EEEE, FOR J=01iJ.G.P HO=(HF1+HA1)/2.+(HF1-HA1)/L*(L/2.-J*L/P) JJ=HO/(2 *DELZ) EEEE AO(J)=AREA(JJJ)+(AREA(JJJ+1)-AREA(JJJ))*(HO-2.*JJ*DELZ) 1/(2.*DELZ) VOL=O. VOLXB=O. THROUGH FFFF, FOR I=2,2,I.G.P VOL=(L/(3*P))*(AO(I-2)+4**AO(I-1)+AO(I))+VOL FFFF VOLXB=(L/(3*P))*(L/P)*(AO(I-2)*(I-2)+4.*AO(I-1)*(I-1)+AO(I)*I 1)+VOLXB GGGG READ FORMAT PDATATRIMNOHFtHA VECTOR VALUES DDATA=$C6t2F7,2*$ PRINT FORMAT DDAT,TRIMNO.HF9HA VECTOR VALUES DDAT=$24H4TRIM WATERLINE NUMBER,C6,17H DRAF 1T FORWARD ~F7.2,5H FEET/S33O10HDRAFT AFT 9F7.295H FEET*$ THROUGH HHHH, FOR J=O01J.G#P HH=(HA+HF)/2.+(HF-HA)/L*(L/2.-J*L/P) WHENEVER HH.GE.Q*DELZ ASTA(J)=AREA(JQ/2)+(Y(JQ+1)+Y(JQ))*(HH-Q*DELZ)/2. OTHERWISE QQ=HH/(2.*DELZ) ASTA(J)=AREA(JQQ)+(AREA(JtQQ+1)-AREA(JQQ))*(HH-2.*QQ*DELZ) 1/(2.*DELZ) HHHH END OF CONDITIONAL FLVOL=0. FVOLXB=O. THROUGH IIII, FOR I=2,2,I.G.P FLVOL=(L/(3*P))*(ASTA(I-2)+4.*ASTA(I-1)+ASTA(I))+FLVOL IIII FVOLXB=(L/(3*P))*(L/P)*(ASTA(I-2)*(I-2)+4.*ASTA(I-1)*(I-1)+AS 1TA(I)*I)+FVOLXB VOLCOM=(FLVOL-VOL)/MU XCOM=(FVOLXB-VOLXB)/(VOLCOM*MU) PP=XCOM/(L/P) ATRY=ASTA(PP)+(XCOM-PP*(L/P))/(L/P)*(ASTA(PP+1)-ASTA(PP)) XTRY=XCOM LTRY=VOLCOM/ATRY -G59 -

Floodable Length Calculation MAD Program and Data, Continued TRY=1 JJJJ STA1=(XTRY-LTRY/2.)/(L/P) STA2=(XTRY+LTRY/2.)/(L/P)+1 WHENEVER STA1.L.O STA1=0 END OF CONDITIONAL WHENEVER STA2.G.P STA2=P END OF CONDITIONAL THROUGH KKKK9 FOR I=091,~IG.4 KKKK AC(I)=INTER.(ASTA, 19A1,STA2*L/PXTRY-LTRY/2.+I*LTRY/4.) VTRY=(LTRY/12.)*(AC(O)+4.*AC(1)+2.*AC(2)+4.*AC(3)+AC(4)) XXTRY=XTRY-LTRY/2.+(LTRY/4.)*(AC(1)+4.*AC(2)+12.*AC(3)+4.*AC( 14))*(LTRY/12.)/VTRY TEMP=LTRY LTRY=VOLCOM/VTRY*LTRY WHENEVER.ABS.(LTRY-TEMP)*L..0002*L.AND..ABS.(XXTRY1XCOM).L..0002*L PRINT FORMAT RESULTsXTRY,TEMPTRY VECTOR VALUES RESULT=$25HOMIDLENGTH OF COMPARTMENTFF7.2,14H F 1EET FROM F P,21H COMPARTMENT LENGTHF7.2,5H FEET/1HO9I7,11H 2 ITERATIONS*$ TRANSFER TO GGGG OR WHENEVER TRY.G.40 PRINT FORMAT NONCONoXTRYLTRY VECTOR VALUES NONCON=$14HONONCONVERGENT,S5,21HCOMPT MIDLENGTH 1 ABOUTiF7.2,14H FEET FROM F P/19HOCOMPT LENGTH ABOUT,F7.2,5H 2FEETS5,10HTOUGH LUCK*$ TRANSFER TO GGGG OTHERWISE TRY=TRY+1 XTRY=XTRY*XCOM/XXTRY TRANSFER TO JJJJ END OF CONDITIONAL INTEGER SHIPNOPQIJ,STAJJTRIMNOQQTRYSTA1lSTA29PP DIMENSION Y(738,DD),AREA(369,DDD),AO(41)ASTA(41),AC(5) VECTOR VALUES DD=2,19,18 VECTOR VALUES DDD=2#10,9 END OF PROGRAM $ COMPILE MAD, EXECUTE, PRINT OBJECT, DUMP EXTERNAL FUNCTION(AAS1,S2,SS5XARG) ENTRY TO INTER. THROUGH ALPHA, FOR I=0,1,I.GS.2-S1 ALPHA DIF(I)=AA(I+S1) DIMENSION DIF(40) THROUGH BETA, FOR J=1,1iJ.G.S2-S1 THROUGH BETA. FOR I=S2-S1l-1,I.L.J BETA DIF(I)=(DIF(I)-DIF(I-1))/(SS*J) PROD=1. SUM=DIF(O) THROUGH GAMMA, FOR J=11,iJ.G.S2-S1 PROD=PROD*(XARG-SS*(S1+J-1)) GAMMA SUM=SUM+DIF(J)*PROD FUNCTION RETURN SUM INTEGER S1,S2,I.J END OF FUNCTION $DATA 99999 130.00 32.00 10.00 11.00 11.00 2.00 10 6 *65.75 ~25 1.38 2.42 3.18 3.78 4.37 4.96 5.55.50 3.88 5.83 7.14 8.16 8.92 9.53 10.13.50 7,10 9.70 11.20 12.10 12.70 13.20 13.70 *50 10.30 12.78 13.80 14,42 14.87 15o28 15.69 *50 12.30 14.07 14.77 15.10 15.39 15.68 15.95 *50 11.25 13.70 14*70 15.10 15.39 15.68 15.95.50 6,35 11.18 13.30 14,38 15.04 15.50 15.88.50 1.25 4.25 8.74 11,93 13.80 14.88 15.62.30.30.45 1.08 3.22 8.41 12.40 14.65 4.60 3A 7.1 16.70 2A 9.0 16.70 1A 12.8 16.70 P 15.7 15.7 3F 19.4 7.1 2F 18.95 9,0 iF 17.95 12.8 -G60 -

Example Problem No. 104 Computer Output SHIP NUMBER 99999 LENGTH 130.00 FEET DRAFT FWD 11.00 FEET DRAFT AFT 11.00 FEET NUMBER OF STATIONS 10 NUMBER OF WATERLINES 6 WATERLINE SPACING 20-0 FT PERMEABILITY 0.65 TABLE OF OFFSETS WATERLINE STATION 0 1 2 3 4 5 6 7 8 910 10 0 1 2 3 4 5 6 DK EDGE 0.00 0.25 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.30 0.00 0.00 1.38 3.88 7.10 10.30 11.25 6.35 1.25 0.30 0.00 0,00 2.42 5.83 9.70 12.78 14.07 13.70 11.18 4.25 0.45 0.00 0.00 3.18 7.14 11.20 13.80 14.77 14.70 13.30 8.74 1.08 0.00 0.00 3.78 8.16 12.10 14.42 15.10 15.10 14.38 11.93 3.22 0.00 0.00 4.37 8*92 12 70 14.87 15.39 15,39 15.04 13 80 8.41 0.00 0.00 4.96 9.53 13.20 15.28 15.68 15.68 15.50 14.88 12.40 0*00 0.75 5.55 10.13 13.70 15.69 15.95 15.95 15.88 15.62 14.65 4.60 TRIM WATERLINE NUMBER NONCONVERGENT COMI 3A DRAFT FORWARD 7.10 FEET DRAFT AFT 16.70 FEET PT MIDLENGTH ABOUT 109.99 FEET FROM F P COMPT LENGTH ABOUT 29.13 FEET TOUGH LUCK TRIM WATERLINE NUMBER MIDLENGTH OF COMPARTMENT 9 ITERATIONS TRIM WATERLINE NUMBER MIDLENGTH OF COMPARTMENT 6 ITERATIONS TRIM WATERLINE NUMBER MIDLENGTH OF COMPARTMENT 5 ITERATIONS 2A DRAFT FORWARD 9.00 FEET DRAFT AFT 16.70 FEET 101.70 FEET FROM F P COMPARTMENT 1A DRAFT FORWARD 12*80 FEET DRAFT AFT 16.70 FEET 83.46 FEET FROM F P COMPARTMENT P DRAFT FORWARD 15.70 FEET DRAFT AFT 15.70 FEET 75.98 FEET FROM F P COMPARTMENT LENGTH 37.36 FEET LENGTH 49.18 FEET LENGTH 55.05 FEET TRIM WATERLINE NUMBER 3F DRAFT FORWARD 19.40 FEET DRAFT AFT 7.10 FEET NONCONVERGENT COMPT MIDLENGTH ABOUT -1.72 FEET FROM F P -G61 -

Floodable Length Calculation Computer Output, Continue( COMPT LENGTH ABOUT1571.45 TRIM WATERLINE NUMBER MIDLENGTH OF COMPARTMENT 4 ITERATIONS TRIM WATERLINE NUMBER MIDLENGTH OF COMPARTMENT 4 ITERATIONS d FEET TOUGH LUCK 2F DRAFT FORWARD 18.95 FEET DRAFT AFT 9.00 FEET 44.29 FEET FROM F P COMPARTMENT LENGTH 34.25 FEET 1F DRAFT FORWARD 17.95 FEET DRAFT AFT 12.80 FEET 64.73 FEET FROM F P COMPARTMENT LENGTH 47.81 FEET Discussion of Results and Critique The problem statement in this instance was much more detailed than that for the preceding problem for two reasons. The first is that not all of the students had studied previously the general approach to the floodable length problem which the instructor feels is the most desirable approach to this problem. The second reason is the great variety of solutions (or attempts) turned in for the preceding problem. Thus the problem was stated in a way intended to lead the students into a solution of the type shown. The solution program is somewhat artificial and was made up to match the data given, but the lack of generality is not considered a particular disadvantage insofar as the course in which the problem was used is concerned. Only a few students successfully programmed a workable solution, but all students gained a more clear understanding of floodable length problems because of their efforts. -G62 -