INTEGRATION OF ELECTRONIC COMPUTERS INTO THE UNDERGRADUATE ENGINEERING EDUCATIONAL PROGRAM FIRST ANNUAL REPORT Project Supported by THE FORD-FOUNDATION in the College. of- Engineering UNIVERSIjTY OF MICHIGAN Ann Arbor August 26, 1960 Donald L. Katz Elliott I. Organick Director Assistant Director

PHOTOLITHOPRINTED BY GUSHING - MALLOY, INC. ANN ARBOR, MICHIGAN, UNITED STATES OF AMERICA 1960

PREPARATION OF REPORT The following persons contributed to the preparation of this Report: Donald L. Katz Elliott I, Organick Joseph J. Martin Glen V. Berg Robert M. Howe Assisted by: R.N. Pease Brice Carnahan Hannes Kristinsson R. P. Crabtree J. Piazza In addition, a large group of resident and visiting faculty members have contributed example problems employing a computer for their solution. These persons are identified with the problems they contributed. COMPUTER COMMITTEE, COLLEGE OF ENGINEERING D. L. Katz, Chairman N.R. Scott, Vice-Chairman Electrical Engineering R. C. F. Bartels, Director of Computing Center G.V. Berg Civil Engineering S. W. Churchill (D. R. Mason, alternate) Chemical Engineering B.A. Galler Mathematics G.L. Gyorey Nuclear Engineering W.P. Graebel Engineering Mechanics R.M. Howe Aeronautical Engineering G.L. West Marine Engineering F.H. Westervelt Mechanical Engineering D.H. Wilson Industrial Engineering R.C. Wilson Industrial Engineering R. A. Sawyer, Vice President and Dean of Graduate School S. S. Attwood, Dean of Engineering ACKNOWLEDGMENT The support given The Ford Foundation is gratefully acknowledged. i

ABSTRACT This volume, prepared after nearly two years' effort by the Computer Committee of the College of Engineering and one year's support by The Ford Foundation, is a composite of three reports. Part I treats various aspects of the integration of computers into engineering education. Part II covers the activities which have been carried out under the grant by The Ford Foundation. Part III gives an introduction to the use of digital and analog computers along with example problems and their solution. Part I. Integration of Computers Into Undergraduate Engineering Curricula For a number of years computers have been utilized in university research work, and have also been introduced into graduate class instruction. Only occasionally have students in undergraduate courses had an opportunity to learn about and work with computers. This project was started on the premise that it is time to try the "bottom up" approach. Students should become acquainted with computers early in their undergraduate program so that computers can be used in solving engineering problems in regular courses. To accomplish this goal, first the faculty must acquire a working knowledge of computers so they may include problems in their courses which the students solve on the computer. Second, an orderly method of introducing computing techniques to the student and a sequence of problems suitable for computer application must be developed. A third requirement is that sufficient computing equipment be at hand to service educational needs. Various aspects of these integration problems are covered in Part I. Part II. Project Supported by The Ford Foundation Part II describes the activities which were carried out under The Ford Foundation Project since October 1959. The technical direction for using computers in classroom instruction is one important activity including lectures on programming, editing or writing instructional material, and personal assistance. The plan for bringing visiting professors to the University for a semester or summer is outlined. Workshops for introducing faculty members to the utilization of computers and a conference on the use of computers in instruction are part of the project. Previous reports on project activities are listed, including the paper at the American Society for Engineering Education, June 1960, to be published later this year in the Journal of Engineering Education. Part III. Programming and Solving Problems On Digital and Analog Computers A Primer on programming digital computers, using the Michigan Algorithm Decoder (MAD) language is followed by numerous example problems and their solution. An introduction to the use of electronic differential analyzers to solve engineering problems by analog methods is followed by example problems employing analog computers for their solution. A portion of the problems have student solutions while others are only proposed and have not been given as a class assignment. These problem solutions should point the way to use of computers for solving regular classroom engineering problems. ii

FORD FOUNDATION COMPUTER PROJECT The University of Michigan Ann Arbor, Michigan ERRATA SHEET for A PRIMER FOR PROGRAMMING WITH THE MAD LANGUAGE September 21, 1960 PAGE LINE CORRECTION E-10 9 Delete n in "collection of n numbers." E-ll Basic Flow Chart should be corrected as follows: E-25 15 Should read: > 3) EXP.(SQRT.((COS.(2*THETA)).P.2+DELTA)) E-35 2 Should read: LLIMIT < X < LLIMIT+22xINCRM E-38 4 Should read: D = A.P.2 + B.P.2 - C.P.2 E-41 Correct MAD Program for Example 2 by inserting the statement SUMNEG = 0. after the statement SUMPOS = 0. E-45 1 Should read: VECTOR VALUES DATA = $F12.4,F12.4,F12.4,I3,I3*$ E-48 Picture of card for Example 1 should be: A A A A X 10 10 10 10 10 30 E-58 6 Example No. 1, function is: X2 + Y + Z2 - T2 E-60 6 Replace the Internal function definition program with the following program: INTERNAL FUNCTION (MNA) ENTRY TO SUMPOS. SUM - 0. THROUGH BETA. FOR I = M, 1, I.G. N BETA WHENEVER A(I).G. 0. SUM = SUM +A(I) TRANSFER TO JOIN ENTRY TO SUMNEG, SUM = 0. THROUGH GAMMAS FOR I = M, 1, I.G. N GAMMA WHENEVER A I ).L. 0., SUM = SUM + A I ) JOIN FUNCTION RETURN SUM END OF FUNCTION

TABLE OF CONTENTS Preparation of Report, Computer Committee, Acknowledgement i Abstract ii Table of Contents iii Tables iv PART I Integration of Electronic Computers into Undergraduate Engineering Curricula 1 Goals 1 Effort Required to Develop the Faculty 2 Effort Required to Educate the Student 3 Example Problems 6 Adjustments in Mathematics Requirements 8 Computing Equipment 8 A Total College Program 10 PART II Project Supported by The Ford Foundation 12 Technical Assistance 14 Equipment 15 resident Faculty 16 Visiting Faculty 16 Workshop 22 Reports and Conferences 22 Example Problems 25 Explanatory Information for Example Problems 28 PART III Programming and Solving Problems on Computers E-l List of Example Problems E-l Primer for Programming with the MAD Language Part A E-4 Part B E-20 Example Problems 1 - 41 (Digital Computers) E-69 An Introduction to the Theory and Application of Analog Computers E-471 Example Problems 42 - 45 (Analog and Digital Computers) E-513 iii

TABLES Table IA. Outline for a One-Credit Hour Sophomore Course in Computer Programming 4 Table IB. Sequence of Computer Problems for Undergraduate Curriculum in Chemical Engineering 6 Table IC. Projected Computer Use in Instruction for Hypothetical Engineering College 9 Table IIA. Description of Class Computer Problems Spring Semester 1959 13 Table IIB. Resident Faculty Participating in Project by Having Released Time 17 Table IIC. Visiting Faculty 18 Table IID. Schedule of Activities for Summer Program, 1960 20 Table IIE. Suggested Application Form for Participation in the Project 21 Table IIF. Advanced Enrollment for Workshop September 6-10, 1960 23 Table IIG. Program for Conference September 12, 13, 1960 26 Table IIIA. List of Example Problems E-1 iv

PART I INTEGRATION OF ELECTRONIC COMPUTERS INTO UNDERGRADUATE ENGINEERING CURRICULA At the time this Project was being developed by the Computer Committee of the College of Engineering, the objectives were stated as follows:(1) "The three major objectives of this project for evaluating the potential impact of high speed electronic computers on engineering education are: 1. The technical demonstration of the solution of problems suitable for illustrating principles in all branches of engineering. 2. A review of methods for presenting scientific principles and their applications to students. This study should stimulate the existing faculties to incorporate the most modern material in their courses. 3. The encouragement of all engineering schools to utilize computers more fully in engineering instruction, through faculty participation, conference and reports." Since that timela period of less than two years, so much progress has been made in introducing computers into engineering instruction that the emphasis has shifted to the acceleration aspect. It might be said that engineering educators have seen the hand writing on the wall, "All graduating engineers of the future must have a knowledge of computers just as they have a knowledge of mathematics. Engineering calculations of the future will be done by machines. " A paper before the American Society for Engineering Education in June 1960 (2) reporting on this project emphasized the "bottom-up" approach rather than the "top-down" filtration process for incorporating computers into engineering instruction. A series of six papers in the June 1960 issue of the Journal of Engineering Education, pages 835-862, treats various aspects of computers in education. This report is written with the view that most readers accept the concept that analog and digital computers should be incorporated into class and laboratory instruction for undergraduate engineering students. What are proper goals for those who wish to accelerate the use of computers for instruction? Cannot engineering education be upgraded if instructors and students have knowledge of computers and can use them effectively in regular class work? At what level and in what manner should the student be introduced to the subject? How can the faculty learn enough about employing computers to develop new beneficial uses in instruction? Can the universities afford to provide the needed equipment? The answers to these questions are the subject of Part I of this report. Goals The following goals are set for a college of engineering with regard to use of computers in instruction: (1) Report "Upgrading Instruction in Engineering Education by Use of Electronic Computers for Class Instruction, " December 10, 1958. (2) D. L. Katz and E. I. Organick "Use of Computers in Engineering Undergraduate Teaching, " Presented ASEE meeting June 22, 1960, Purdue University. -1 -

Part I - Integration of Electronic Computers Into Undergraduate Engineering Curricula (1) A faculty trained in the use of computers to the degree that a majority of them can teach courses requiring computer solutions to problems. Each department should have a few computer sophisticates who can advise their colleagues and work effectively with computing center personnel. (2) Sufficient computing equipment to permit students to solve a reasonable number of classroom and laboratory problems on digital and analog computers. (3) Engineering curricula which include a means for introducing students to machine computations followed by a sequence of problem courses which employ computers on one or two problems per semester. Various considerations in the implementation of these goals will be given in turn, such as effort required to educate the student, and considerations in developing a curriculum. Effort Required to Develop the Faculty For many years professors have been evaluated to a strong degree by their accomplishments in research with resultant publications as well as by their ability as teachers. The benefits which students receive when their instructors are working on the frontiers of knowledge in the field of their research become evident to the student only when such information is brought directly to the classroom. However, there is an important by-product of research on the part of the faculty. An experienced investigator is willing to consider new ways of doing things and accepts the concept that our state of knowledge in any area is always transitory. He is more likely to have a healthy attitude toward new ideas in classroom instruction. The increased tempo of scientific and engineering developments during the past twenty years has highlighted a major problem in engineering education. New concepts or techniques which went unnoticed ten years ago now should be included in undergraduate course instruction. The professor who wishes to keep abreast of knowledge in his teaching must make more frequent and more intensive excursions into areas new to him. The factors which influence the degree to which a given faculty member engages in exploring new horizons in his teaching are his attitude (3) toward the advance in knowledge and the competition which other worthwhile activities create for his time. Today, the engineering teacher finds it necessary to learn new concepts applicable primarily to his teaching and to bring these to the classroom along with his research. The use of electronic computers in instruction is only one of many new areas to be mastered by the average engineering teacher. A reliable estimate of the time required for a given individual to learn how to employ digital and analog computers would be helpful in encouraging faculty members to delve into the subject. A goodly number of the faculty along with their graduate students used digital computers in research some years ago and they recall the laborious effort demanded by the machine-oriented languages then in use. It has been very helpful to show that one can master the new problem or procedure-oriented programming languages within a period of a few weeks with an initial intensive effort of 20 to 30 hours. The knowledge of programming which a professor must have to be a successful teacher in courses requiring computer solutions is significantly greater than that to direct graduate students using computers in research. When a man has in an intensive effort learned to program two or three problems, and then, by himself, has selected an engineering problem, programmed it, run it on the computer and analyzed the results, he is now "over the hump" and can progress to problems of increasing complexity with assurance. Development must continue from here with a study of numerical methods and other appropriate mathematics for those unacquainted with these fields. (3) C.'L. Miller and W. W. Siefert, The Faculty and the ComputersJournal of Engineering Education, 50, No. 10., p. 839, June (1960). -2 -

Most schools have provided intensive programming experiences for their faculty. Summer courses and workshops for this purpose are readily available. Many presentations have been made at society meetings portraying the benefits of computers. The real need today is for the faculty member to have an opportunity to learn how to use problem oriented computer languages in solving problems by actually doing it. A minimum of lectures and a maximum of personal effort on the part of the learner is the recommended approach. Personal tutoring for professors while they are programming problems is an effective time saver. What incentives are there for professors to learn how to program, code and process problems through a computer? Even good men who normally rely heavily on intelligence and intuition ("the slightly disorganized man") will become more effective individuals after acquiring the discipline of unambiguous procedure. Lessons are to be learned in communication. There can be no gaps in the logic or steps in solving a problem. The programmer is forced to be an accurate mathematician. The emphasis on the general ease rather than the specific tends to enlarge onets concept of engineering. The organization of nomenclature which is required in programming will encourage more systematic presentation of technical material in the classroom. Teaching of recitation sections of elementary digital computation courses is an effective way of learning or renewing acquaintance for those who are willing to make the necessary effort. When lectures in such courses are given by computing center mathematicians, the arrangement has the merit of presenting current computational practices to the faculty as well as to the students. Many mathematics teachers are reluctant to teach in this area, and the combination of lectures by computer experts and recitations by engineering teachers appears to be a happy solution for the near future. Introduction to the use of differential analyzers requires even fewer lecture hours and laboratory practice than is needed for programming digital computers. Instructor's making the initial effort of attending intensive lectures (8-10 hours) should then be prepared to handle laboratory sections involving simple analog computers. Effort Required to Educate the Student Initial efforts at introducing seniors or graduate students to digital computation have consisted of a lecture series (6-15 hours) and opportunities to process programmed problems through a computer. Fruitful results have been observed with this technique, especially for better students, but many frustrations have occurred as well. This method of teaching has accelerated the introduction of computers into engineering instruction and research, but lacks the thoroughness required for the average student. Startling progress has been made recently in development of procedure-oriented programming languages. Less effort is required to utilize computers effectively with these languages than with machine oriented languages. While a spectrum of programming languages is available for any computer, it is recommended that the most advanced problem or procedure oriented language such as MAD be taught to the students. This experience places emphasis on the structure of the problems and permits the student to gain insight and experience in organizing computational procedures or "algorithmizing." It is believed that a course directed toward an understanding of digital computation and beginning experiences in programming is needed in the freshman or sophomore year. At The University of Michigan it was decided that the first semester sophomore year would seem to be a good place for such a course because the students would have had enough mathematics to understand problems involving calculus. Likewise, courses in subsequent semesters would likely require the use of computers without serious gaps. Table IA is an outline for this course, given as one lecture hour and one recitation hour per week for one -3..

Part I - Integration of Electronic Computers Into Undergraduate Engineering Curricula TABLE IA. OUTLINE FOR A ONE-CREDIT-HOUR SOPHOMORE COURSE IN COMPUTER PROGRAMMING (Math 73) Instructor: Bruce Arden INTRODUCTION TO COMPUTING TECHNIQUES 1. Discussion of mathematical notation a. Single variables b. Linear and higher dimensional arrays c. Compact summation and product notation d. Polynomials 2 2 2. Analysis of the manual procedure in handling the example problem z.i x +, i = 1, 2...... 100 a. Instructions (1) Arithmetic - scientific versus fixed decimal notation (2) Logical - decision steps b. Storage c. Control or execution of instructions d. Input-output - introduction of information into and out of the computing procedure 3. The automatic implementation of the necessary computing elements with specific reference to the IBM 704 a. Schematic diagram of a digital computer b. Word structure c. Storage d.. Input-output e. Control f. Arithmetic - discussion of number system with emphasis on binary and octal representations 4. Coding the example problem in machine instructions 5. Comparison of machine coding to algebraic statement or problem 6. Introduction of algebraic language - MAD a. The example problem is written for machine without formal explanation of language b. A subset of the MAD language is formally described - statement by statement - with examples 7% Numerical methods a. Solution of equations by Newton-Raphson method. A geometric interpretation is used with emphasis on the possibility of non-converging iterations. A complete example including flow charts and MAD statements is presented. The solution of a transcendental equation by the NewtonRaphson is assigned as a problem to be solved on the computer at this time. b. General interpolation. The Lagrangian form of interpolation polynomial is developed by considering the familiar "table look-up" procedure and then proceeding analogously for three points, four points, etc. The evaluation of the formula illustrates the use of compact array notation and iterative statements and an interpolation problem, using the Lagrangian form, is assigned for solution on the computer at this point. c. Solution of simultaneous linear equations. In preparation for the topic of approximation, the solution of simultaneous linear equations by the Gauss-Jordan method is introduced by first going through the step-by-step reduction of a system of three equations and then repeating the procedure -4 -

TABLE IA (continued) symbolically to develop the general formula. A complete example including flow charts and MAD statements of the Gauss-Seidel solution of a system of linear equations is presented. d. Polynomial approximation. Least squares criterion is introduced by means of graphical examples. Considering a second degree polynomial, the normal equations are derived. The extension to higher degree is indicated. Emphasis is placed upon the systematic iterative computation of the coefficient matrix. Using the same set of points that were used in the interpolalation problem, a problem is assigned to construct and evaluate at several points an approximating polynomial by the least squares procedure. e, Numerical Integration. The second and third degree Lagrangian interpolating polynomials are integrated to obtain trapezoidal and Simpsonts rule. Numerical examples are used to illustrate the error in this type of approximation. f. Error estimates. The expression of an arbitrary function as a polynomial and an error term is introduced by developing Taylorts expansion for a polynomial by successive differentiation. An expression for the error term is found and evaluated in some numerical examples. g. Divided differences. The divided difference interpolating polynomial is developed in an analogous fashion to Taylor's expansion. An error estimate is developed by analogy. A numerical example is considered. A complete example including flow charts, MAD statements, data, and results of a general divided difference interpolation, with error estimate, is presented. hour credit. To be on sound pedagogical ground, the credit should be two hours and probably more time should be allowed for concepts of information processing, i. e., symbol manipulation, situation problems, games, etc. The time allotment which most curricula eventually will allow for machine computation depends to a degree on the views held concerning the nature of what is learned. When computers are thought of as super slide rules, one hour seems ample since credit courses for ordinary slide rules have long since disappeared in engineering schools. However, computer experts believe that the very essence of computational procedures can be taught students with digital computers. Hence, an introductory computer course could develop the logic and understanding of the structure of problems as a general philosophy of engineering. In many curricula this would require transferring time now spent in initial problem courses for this purpose to the computer course. Computation courses can well become the focal point in developing generalized computation and information processing procedures now taught by intuition or in conjunction with specialized subjects. One might project that soon three-hour courses on philosophy and techniques of computations including numerical analysis may become common place. A second step in the students' education with computers is to incorporate their use in regular engineering problem courses. Engineering problems which use the computer effectively may occur only rarely at second semester sophomore level. However, it is believed that a sequence of problems of increasing complexity both as regards engineering and programming can be given to the student in the engineering courses leading to the bachelor's degree. Table IB shows categories for computer problems at the various stages of a curriculum in chemical engineering. The early engineering problems solved on the computer should be simple enough to require only short programs involving simple mathematics and simple logic. By the senior year, the problems should involve more complex logic and sophisticated mathematics; the programs -5 -

Part I - Integration of Electronic Computers Into Undergraduate Engineering Curricula TABLE IB. EXAMPLES OF COMPUTER PROBLEMS FOR UNDERGRADUATE CURRICULUM IN CHEMICAL ENGINEERING Semester No. of Prroblems Sophomore year 3 2-3 Introductory Computer Course 4 1-2 Specific Heat and Equilibrium Flame Temperature Calculations in Thermodynamics Junior year 5 1-2 Steady or Unsteady State Heat Conduction Problem and Fluid Flow 6 1-2 Reaction Kinetics (Simultaneous Reactions) Senior year 7 1-2 Multicomponent Distillation Computations Optimization of Systems 1-2 Feed Back and Control Problem Solved on Analog Computer 8 1-2 Process Equipment Design, Such as Heat Exchanger 8-15 for such problems are normally longer and may require more time on the part of the student. From Table IB one can see that from 8 to 15 problems might be solved by a student during the combined second, third and fourth years. Only time will tell how useful computers will become for solving home problems for students, but it seems certain that as the faculty and students develop an understanding of the capabilities of computers, the use of computers will grow up to the capacity of the equipment available. An item worth discussing is the question often asked, "Is it really necessary for students to process problem solutions on a computer?" The answer might be given in the framework of today's practice in problem and laboratory courses. Certainly in a goodly number of cases, students are expected to solve engineering problems to obtain answers, and just so with computer solutions. The incentive for going through the programming stage can be lost if no solution on the machine is contemplated. Important lessons in rewards for accuracy and penalties for mistakes can be found in using computers. In the laboratory, students often are asked to do experiments which the instructor could well do in a demonstration. A parallel could be drawn between this demonstration versus actual laboratory experience and instructorst solutions only on a machine versus student solutions. Example Problems In a recently published book, Ralph W. Tyler wrote a chapter on the evaluation of teaching, wherein he listed nine conditions for effective learning (4). It is instructive to note several of these conditions which are quoted as follows: (1) "student's motivation;" (2) "the learner finds his previous ways of reacting unsatisfactory so that he is stimulated to try new ways of reacting;" (3) "the learner..." should "have some guidance of the new behavior which he tries in seeking to overcome the Inadequacy of previous reactions. If he simply tries new behavior by trial and error,..... he is often discouraged;" (4) "the learner...." should "have appropriate materials to work on. If he is to learn to solve problems, he has to have tasks which give (4) "The Two Ends of the Log, Learning and Teaching in Today's College" --- R. M. Cooper, Ed., University of Minnesota Press, Minneapolis, Minn. (1960). -6 -

him opportunity to practice these skills;" (5) the learner should have "the opportunity for a good deal of sequential practice of the desired behavior. " It is with the above five conditions in mind that an extensive compilation of example computer problems is presented at the end of this report. These problems fulfill the five conditions in a rather remarkable manner. First, as to motivation, the development of curiosity often results in motivated action. These problems have been selected from many fields of engineering, and it would be most unusual for an engineering student or teacher to peruse them and not find at least one or two that cause him to be somewhat inquisitive about the solution. Most persons who have any interest at all in their chosen field are fascinated by new problems in areas in which they have a general understanding. The editors of this report found themselves in precisely this position as they read through the problems submitted for review. The question of how a problem would be solved on the computer and just what the nature of the solution would be excited curiousity and have already led to further study in certain cases. Problems such as these lead to motivation. Second, as to inadequacy of previous reactions, it will not take the average reader long to see that the computer solutions employ new techniques that he will want to try on both old and new problems. His repertoire of mathematical operations will be found wanting and he will be stimulated to try some new ones that are either actually exemplified or at least indicated in the problem set. It will not take him long to contemplate in his own special field of interest new problems that can be handled by computer techniques. This has been proven many times with students who are doing graduate research work, who have been exposed to some computer problem examples. Almost immediately they perceive applications in their research. The same can easily be said for faculty that have taken the time to master some computer know-how. Third, the detailed solutions to the list of problems serve as guidance in the endeavor to master new methods of problem solving. It is well recognized that a certain amount of trial and error in tackling a problem is good for a person, but guidance and teaching certainly lead to much more efficient learning. Were that not so, as college teachers we would merely tell the student to go find out all about a subject himself and thereby remove the necessity for a faculty. The complete problem solutions are considered the major educational contribution. Through them the student and teacher are led step by step to logical answers. If at any point one no longer wishes to be led by the hand, so to speak, he can turn off on his own trail and pursue it to whatever end he wishes. In many cases he will probably wish to compare answers to see if his trail led to the same results as the trail suggested in the solutions presented. Fourth, it should be clear that the included list of problems is only a start in trying to provide appropriate materials with which to work. Engineers must learn to solve problems and here are but a few that they can attempt to solve. These few, however, are intended to serve as the catalyst in the development of many others that will be suitable for engineering instruction. These illustrate the kind of tasks that may be assigned to students to provide them with an opportunity to practice the skills they are learning. Fifth, the problem set as written gives plenty of opportunity for sequential practice in the use of computers. The problems vary in complexity from extreme simplicity to lengthy and involved complications. It will be seen that material is included which can be given to younger undergraduates and to advanced graduate students. Such a range or problems should suggest to an engineering teacher how at any level in the curriculum he can work an appropriate computer problem into his particular course. It is obvious that when this is done all the way from the freshman to the senior year, there will be adequate chances for the student to practice his skills in computer use. The need for computer problems of the kind illustrated in this report is especially great at this time when many faculty are being introduced to the use of computers for the first time. This situation will -7 -

Part I - Integration of Electronic Computers Into Undergraduate Engineering Curricula probably exist only for the next few years. Gradually the particular problems in each field will appear in the textbooks in that field and the instructors in that field will accumulate a file of problems of their own. When the time has come that all instructors are familiar with the use of computers, the need for compilations of the type presented here will no longer exist. Two categories of example problems are included in Part III of this report. The first group was used with classes and have student solutions. The remainder of the problems were prepared this summer and they are proposed for use in engineering courses. Supplements to these problems will be issued by the project as more "tried" solutions become available. Adjustments in the Mathematics Requirements As computers become integrated into engineering instruction, changes will have to be made in the mathematics content of the curricula. Just what changes are needed and how they are best to be accomplished is not entirely clear at this point. It is clear that the student must become better acquainted with relaxation and iteration techniques, finite differences, and numerical integration and solution of differential equations than the standard mathematics sequence now permits. Perhaps this can be accomplished in part by altering the content of the present courses, but to get sufficient coverage, an additional course in numerical analysis is indicated. Statistical methods are steadily gaining in importance in most engineering fields, and computers are accelerating the gain. The same can be said of matrix algebra. It seems doubtful that these could be covered effectively either in the standard mathematics courses or in a basic course in numerical analysis without squeezing out other vital material. Do separate courses for these subjects also deserve a place in the curricula? If these are to be added, along with a course in numerical analysis and one in the elements of digital computation and programming, either some engineering must be eliminated or the present fouryear program is not long enough. The best approach would seem to be for the engineering faculty to get well along the road to using computers effectively in engineering instruction before calling for any drastic changes in the mathematics sequence. The changes will evolve as needed. Computing Equipment In discussing equipment needs, a distinction is needed between digital and analog equipment. For Digital Computers, the same machine is normally used for both research and instruction. At one time it was claimed that because of research needs the most rapid and most versatile machine that can be afforded was desirable. Experience has shown that the huge problem load for a whole engineering school and the nature of instructional problems present essentially the same service requirements as for research. Small, lower speed, and hence cheaper computers have the advantage of being made more generally available. They may appear to be more approachable than huge computing centers. Many excellent instructional problems can be solved on these machines. From the educational point of view, it is preferable to have similar programming languages for all computers available. A projected summary of computer requirements for a full college program of instruction is given in Table IC. The computer requirements for a hypothetical engineering school of two thousand undergraduate engineering students and 400 first year graduate students was estimated, assuming eight problems were solved by each undergraduate during his four years. It should be noted that, whereas 10 to 12 small scale computers may appear to serve the needs of a -8 -

TABLE IC. PROJECTED COMPUTER USE IN INSTRUCTION FOR HYPOTHETICAL ENGINEERING COLLEGE (2400 STUDENTS) IBM 704 IBM 650 LGP 30 or Bendix G-15 Year No. of Problem Computer Total Computer Total Computer Total Students No. Time per Hrs. Time per Hrs. Time per Hrs. Problem per Problem per Problem per per Student, Day* per Student, Day per Student, Day* __inutes Minutes Minutes Minutes Fresh 700 Soph 500 1 3 15 60 2 2 12 45 3 4.5 21 120.42 2.1 9.8 Junior 450 4 3 30 90 5 5.1 45 90 6 7.5 80 160.61 6.0 13.1 Senior 350 7 9 90 240 8 18 225 400.82 9.5 19.4 1st Grad 400 9 36 240 480 10 36 720 1200 2.50 33.4 58.4 Total 2400 4. 3 51 101 No. of Whole Computers Indicated** 1 4-5 10-12 * Six day-per-week operation assumed. ** Medium and small scale computers are assumed to be operated by individual undergraduate students with maximum effective clocked-on use limited to 12 hours per day for the medium scale computer and 8-10 hours per day for the small scale computers (six days per week). college equally as well as 1/2 to 1 large scale computer which is 200 to 500 times faster, problem complexity and comprehensiveness will be far more limited on the small machines, affecting progress and achievement particularly of the upper classmen and graduate students. In general, schools will desire to obtain or share with others the fastest and most versatile machine they can afford for academic use as well as for research. Analog equipment is available in all schools because of the modest cost for simple units. Often its use is for laboratory exercises where multiple units are advantageous. Portable analog units are excellent for classroom demonstrations of solutions to differential equations or dynamic problems. There are advantages to seeing results displayed immediately on oscilloscopes as compared to delayed printout of numbers from digital machines. _9_

Part I - Integration of Electronic Computers Into Undergraduate Engineering Curricula Batteries of analog computers should be available to give each student one or more opportunities during his bachelor's program to set up the circuit and solve engineering problems. A group of eight units will service a laboratory section of sixteen beginning students working alternately or in pairs. At the advanced stage, courses in control or research problems will require as large a group of amplifiers, multipliers, function generators, etc., as can be afforded. It is clear that budgets should be established for computers as an integral part of operating an engineering school. In planning for engineering schools of the future it should be appreciated that engineering is going two ways almost simultaneously. In the first place, desk work is replacing laboratory work at a rapid pace. The advent of computers is one facet of this shift in emphasis. Likewise, computers are simulating laboratory operations to an increasing degree. However, when laboratory work is done today, it often requires elaborate and expensive equipment. The financial requirements of physical laboratories are not decreasing, but are increasing as well because of this increased complexity. It is easy to speculate that within a matter of a few years, the budget requirements for equipment rental, equipment purchase and service personnel of instructional machine computation laboratories will match the budget for instructional laboratories of the experimental variety. There is a need for clear communication between engineering colleges and university administrations to show the financial requirements of computing laboratories. A Total College Program The planning needed to reach the three goals postulated above must be done at the college level. A computer committee or advisory group is indicated to bring together representatives of various departments or curricula who can make recommendations on equipment needs, curricula, and faculty development. Major innovations in engineering colleges are accomplished only by much hard work and encouragement at the administrative level. Some faculty members may respond to personal invitations from the dean or department chairman to attend workshops, special lectures or opportunities for learning to program problems on computers. Development of the faculty may well require released time from teaching to study computation methods. Such arrangements result from administrative decisions. Many engineering colleges share a university-wide digital computing center. In instruction as well as research computing experts and computer mathematicians are needed to develop programming languages, program libraries, and methods of solving unusual problems. Such persons should be connected with the instructional program at the point students are introduced to digital computation. Lectures (and notes) by computing center personnel supplemented by recitation sections taught by engineering instructors is suggested as a means of maintaining an up to date coordinated educational program in the years just ahead. It may be desirable to have an engineering faculty member attached to the computing center on a part-time basis. Analog computing facilities are frequently useful for a short period in a number of courses. To obtain maximum usage for analog equipment, its use should be scheduled to cover the maximum number of courses. This too is an interdepartment arrangement. Curriculum changes during the first two years of college work are normally made with an eye to maintaining as close to a common program as possible. Therefore, it would be helpful if all programs adopted a common method of introducing students to digital computers. Such action comes only by discussion at the college level. Likewise, arrangement s for teaching the students their first course in computation is a significant teaching assignment which may be shared throughout the college. -nterdepartment seminars and discussions help maintain communication between the faculty members. -10 -

Presentation of example computer problems, mathematical and programming techniques, special subroutines and other similar topics provide ways of interchanging ideas at the college level. In the final analysis, the reaching of the three goals, a faculty trained in machine computation methods, a sound curricula including computation experiences, and adequate computer facilities will depend upon the leadership of the college administration. -11 -

PART II PROJECT SUPPORTED BY THE FORD FOUNDATION In the Fall of 1958, an informal Committee in the College of Engineering was assembled to consider the process of integrating the use of computers into engineering education. It was evident that electronic computers had already had an extraordinary effect on business practices and on the procedures of design and analysis in engineering practice because of their abilities to process large quantities of data. Both digital and analog devices had become important research tools. For several years, engineering faculties had been talking about introducing computers into regular engineering problem courses. Individual professors had managed to solve an occasional problem in an advanced course. Analog computers had been demonstrated as useful in instrumentation control courses. Graduate students were learning how to use computers in research. They were taking computer courses from computing center mathematicians or in instrumentation. There were two main activities in the University which were responsible for training students and faculty how to use computers up to this time. The Statistical and Computing Laboratory and associated courses in Mathematics by Professors C. C. Craig, John W. CarrIII, R. C. F. Bartels, B. A. Galler and others treated the digital computer. The Instrumentation Group in the Aeronautical Engineering Department, Prof. L. L. Rauch, M. H. Nickols, R. M. Howe and others, had acquired considerable analog computer equipment and were giving courses both for their students and as service to other departments. These groups gave intensive courses in the summer periods on Digital Computers and on Automatic Control dating to 1953 and before. It was agreed that the time had arrived when a concerted effort was required if the faculty as a whole were going to learn how to use computers and we were going to proceed to accelerate the integration so that all problem courses in engineering made appropriate use of computers. First, time was required for the faculty to learn how to program problems on digital computers. Second, a major effort would be needed to teach both faculty and students. Third, sufficient equipment should be at hand at the time needed. During the spring semester, 1959, Dr. B. A. Galler gave six hours of lectures for students and faculty; Some 300 persons attended. The instructors in most Chemical and Metallurgical Engineering courses assigned a problem to be solved using FORTRAN and the IBM 650 computer, Table IIA. Varying degrees of success were reported; in most cases it was conceded that more time and effort on the part of the student and professor was required than was available during that semester. The experiences -12 -

TABLE IIA - Description of Class Computer Problems Spring Semester, 1959 Problem Course Problem Description Number 1 Engineering Calculation Plant Design Calculation of humidity chart from vapor pressure equation. 2 Undergraduate Thermodynamics Calculation of temperature rise in body of water caused by a mass falling into water from various heights. 3 Unit Operations I Calculation of velocity of sphere falling in a liquid me dium. 4 Unit Operations I Calculations of number of equilibrium stages in a solid-liquid extraction operation. 5 Unit Operations II Calculations of unsteady state heat transfer from jacketed kettle. 6 Unit Operations II Calculation of overall instantaneous heat transfer coefficients from data. 7 Metallurgical Process Design Calculation of CO/CO, ratio in equilibrium with carbon. ~8 Metallurgical Process Design Calculation of equilibrium temperature for metal oxide reduction. 9 Plant Design Calculation of unsteady state water movement into natural gas field. 10 Graduate Thermodynamics Calculation of quantity of steam in steam engine tank after filling from a constant pressure line. 11 Equilibrium Stage Operations Determination of optimum feed plate location in a 3 component fractional distillation problem. 12 Rate Operations Design Heat and Mass transfer in packed bed reactor. 13 Fermentation Processes Statistical analysis of bacteria count. 14 Mechanics of Multiphase Flow Motion of a gas bubble in a continuous liquid phase. -13 -

Part II - Project Supported by The Ford Foundation were helpful in understanding the problems at hand and were incorporated into a report requesting support for an experiment in the use of computers in classroom instruction. The informal committee was given an official designation as the Computer Committee of the College of Engineering. A grant of $900, 000 for a three year study was made by The Ford Foundation to The University of Michigan on October 21, 1959. It provided for Technical Direction, Equipment, Salaries of Resident and Visiting Faculty, Workshops, Conferences and Reports. This part of the report describes the activities carried out on the project. Technical Assistance Dr. E. I. Organick was brought to The University of Michigan from the Computing and Data Processing Center at the University of Houston. From February through September 15th of this year he has been the technical director of the project. During this period he has found many ways to assist in this acceleration process as follows: (1) Gave a series of 3 two hour lectures and one two hour problem session on programming with the MAD language. These lectures were given weekly at the beginning of the Spring semester and again at the mid point. This activity relieved Dr. B. A. Galler of the Computing Center who had given the lecture series in the spring and fall of 1959. 750 students and faculty attended. (2) Prepared a Primer on programming the IBM 704 with MAD language to accompany the lectures, present version is included in this report. (3) Supervised weekly faculty luncheon lectures on computers; programming and numerical methods during the Spring semester. Some forty faculty attended each luncheon. (4) Supervised Mr. R. N. Pease in the adaptation of the ACT I procedure oriented programming language of the Royal McBee LGP-30 computer for faculty and students. Copies of this manual called ACT IA are now available through the project. (5) Prepared an analysis of the Bendix ALGO Decoder (BAD) and comparison with MAD for assistance of faculty and students. Copies of this manual are also available. (6) Gave three weeks of lectures and supervised the nine week program for the summer program for 18 faculty members. (7) Conducted work shop September 6-10 for some 65 professors. (8) Consulted with faculty members on individual problems using a computer, particularly for solutions to example problems. (9) Preparation of reports, including this one. -14 -

On the project, Mr. R. N. Pease, Mr. Brice Carnahan, Mr. Hannes Rristinssen and MV R. P. Crabtree, Mr. Bill Weimer, and Mr. Bill Sanders have worked with Dr. Organick. The members of the Computer Committee have been of general assistance, particularly Prof. R. M. Howe in procuring analog computers. In addition to project activities, the regular instruction in Math 73, Math 173, 174, and advice of the Computing Center personnel was of immense service. Likewise, the courses and assistance of the Instrumentation group carried most of the burden for analog activities. Dr. Silvio 0. Navarro will provide technical direction for the project September 15, 1960 to September 15, 1961. He will be on leave from the University of Kentucky. Mr. Brice Carnahan will spend full time on the project during the 1960-61 school year. Equipment The University changed its supervision of computing facility from the Statistical and Computing Laboratory to a Computing Center in July 1959, with Dr. R. C. F. Bartels as Director. The IBM 650 computer was released in September when the IBM 704 computer was in operation. The 704 system now includes an 8 K core memory, an 8 K drum memory, 8 magnetic tape units, an on-line printer, card reader and card punch. Off-line equipment includes card to tape, tape to card systems and a tape to highspeed printer system. An adjacent punch card installation includes one 407 tabulator, five key punches, one verifier, sorter, collator and reproducer. Three key punches are also available at the Project headquarters. This IBM 704 computer is available for instructors and students upon request. The project provided funds so that the extra capacity needed would be available. An "in" and "out" box is used at both the Computing Center and Project headquarters in East Engineering Building, with messenger service between them. For short problems, the service varies from returns the same day to as long as three days on occasion. In February a Royal McBee LGP-30 computer and in April a Bendix G-15 computer with alphanumeric typewriter were installed in the Project Headquarters. The LGP-30 now has a high speed photo reader and extraflexowriter while a MTR-2 tape unit has been provided for the G-15. These computers have been used primarily by faculty and graduate students to date. Mr. R. N. Pease provides assistance with the LGP-30 computer and Mr. Duane Nugent will do likewise for the Bendix G-15. For analog computers, it was decided to supplement the equipment already available by acquiring eight small scale units to service student laboratory sections and an intermediate computer for more advanced cour ses. -15 -

Part II - Project Supported by Ihe Ford Foundation Two types of small computers were acquired: 5 units of 8 amplifier Type AD-1-8 Applied Dynamics with 2 linear modules (4 operational amplifiers each) and 2 coefficient potentiometer modules (5 each) and Model 152-100B, 2 channel Sanborn recorders, and 3 Reeves C-301 Mod-O. REAC computers with an extra patch board each and Sanborn recorder. The intermediate computer is an Applied Dynamics Type AD-1-64 with preprogram patch board system (3 spares) 4-linear modules, 2 nonlinear modules, 4 coefficient potentiometer modules, 4 electronic multipliers, 2 diode function generators and a Sanborn 2 channel recorder and a Sanborn X-Y plotter. Teaching fellows Robert Timm and Daniel F. Jankowski have been employed to assist with the use of these computers in instructional work. Resident Faculty Faculty members at The University of Michigan have been released from part of their teaching duties to permit them to learn programming procedures and develop their ability to employ computers. The ideal situation appears to be a teaching load consisting of a single course in which a problem may be solved by the students and professor. Table IIB lists the teachers at the University that have been or will be participants in the project. 'Several of the younger faculty have become familiar with the computer through their research, some still find it advantageous to take time to apply their talents to instructional problems. As mentioned earlier, faculty members find th e teaching of the recitation sections in Math 73, the one hour computer course, as a very good way to begin working with digital computers. When visiting faculty teach a course, one of the resident faculty members is relieved of this load, thus giving him time to apply himself to study in the use of computers. Visiting F culty An important part of the project is the provision for visiting faculty from other schools. An invitation was issued to a selected group of schools to join in the acceleration process. It was hoped they would each send three to five faculty members to the University for a semester or a summer and a like group to the one week workshops. The goal was to encourage cooperating schools to have a parallel program in operation by the end of the project. Several schools not on the original list have indicated a desire to cooperate and are joining the project by sending faculty members to the University. -16 -

TABLE IIB - Resident Faculty Participating in Project by Having Released Time. Spring Semester, 1960. Richard K. Brown Professor of Electrical Engineering John Enns Associate Professor of Engineering Mechanics Richard V. Evans Instructor in Industrial Engineering G. L. Gyorey Lecturer in Nuclear Engineering Herman Merte Instructor in Mechanical Engineering Robert D. Pehlke Assistant Professor of Metallurgical Engineering Dale F. Rudd Assistant Professor of Chemical Engineering Brymer Williams Professor of Chemical Engineering Summer, 1960 J. J. Carey Professor of Electrical Engineering J. G. Eisley Associate Professor of Aeronautical Engineering W. A. Hancock Associate Professor of Industrial Engineering Fall Semester, 1960 Clyde Johnson Associate Professor of Industrial Engineering C. W. McMullen Associate Professor of Electrical Engineering Alan B, Macnee Professor of Electrical Engineering Raymond A. Yagle Assistant Professor of Marine Engineering William Mirsky Associate Professor of Mechanical Engineering Frederick K, Boutwell Assistant Professor of Mechanical Engineering Arnet B. Epple Associate Professor of Mechanical Engineering H. W. Farris Associate Professor of Electrical Engineering Spring Semester, 1961 Gordon E. Peterson Professor of Electrical Engineering -17 -

Part II - Project Supported by The Ford Foundation TABLE IIC - Visiting Faculty Spring Semester, 1960 W. S. Clouser Asst. Professor of Mechanics University of Wisconsin Summer, 1960 Frank M. White Asst. Prof. of Aero Engr. Georgia Tech Gerald L. Liedl Asst. Prof. of Met. Engr. Purdue University Henry H. Osborn Asst. Prof. of Mech. Engr. Purdue University John Duby Assoc. Prof. of Mech. University of Alberta C. F. Gloyna Prof. of Civil Engr. University of Texas Chen-Ya Liu Asst. Prof. of Mech. Engz. Carnegie Tech Tang Au Assoc. Prof. of Civil Engr Carnegie Tech Hsuan Yeh Prof. of Mech. Eg,". University of Pennsylvania R. E. Beckett Assoc. Prof. of Mech. University of Iowa A. D. M. Lewis Assoc. Prof. of Struct. Engr. Purdue University P. T. Shannon Asst. Prof. of Chem. Engr. Purdue University H. L. List Asst. Prof. of Chem. Engr. City College of New York Demos Eitzer Lecturer in Electrical Engr. City College of New York Jack CoVan Prof. of Industrial Engr. Texas A & M College Edward Szynanski Assoc. Prof. of Electrical Engr. Wayne State University Fall Semester, 1960 George D. May Instructor in Civil Engr. Georgia Inst. of Tech. Ming Lung Pei Assoc. Prof. of Civil Engr. City College of New York Jack Famularo Asst. Prof, of Chem. Engr. New York University Richard F. Schwartz Asst. Prof. of Electrical Engr. University of Pennsylvania Spring Semester, 1960-61 G. Donald Brandt Lecturer in Civil Engr. City College of New York B, James Ley Assoc. Prof. of Electrical Engr. New York University C. J. Huang Assoc. Prof. of Chem. Engr. University of Houston W. T. Kittinger Assoc. Prof. of Electrical Engr. University of Houston J. T. Elrod Prof. of Industrial Engr. University of Houston Summer, 1961 Joseph Pistrang Asst. Prof. of Civil Engr. City College of New York D. H. Kelly Asst. Prof. of Electrical Engr. University of Alberta Ardis White Assoc. Prof. of Civil Engr. University of Houston A. I. Johnson Assoc. Prof. of Chem. Engr. University of Toronto -18 -

Table IIC lists the visiting faculty both past and scheduled. During the summer, the entire nine weeks is dev.oted to study. Those attending for a 16 week semester will teach one course. Whenever possible the course selected is in the field of interest of the -4 siting faculty member and is suitable for introducing computers into classroom instruction. During the spring semester of 1960, the program for resident and visiting faculty consisted of the programming lectures by Dr. Organick, luncheon presentations including one on analog computers, and individual consultation. It was believed that time for individual study should be given high priority. The summer program in 1960 had greater organization, with the schedule shown on Table IID. Plans are in progress for a schedule of activities during the coming year which will give as much assistance to the faculty as possible. The appointment procedures will be of interest to prospective visiting faculty. Applications are submitted to the Director of the Project, Table IE is a suggested form. These applications are submitted to the appropriate department chairman at the University for approval when they cover a seme ster or a summer period. For the seen ster, the appointment is made by the department chairman with a title of "visiting" applied to the title at the home school. For the summer, all appointments are given titles of "Lecturer in _ ". In both cases, the visiting faculty offices are in conjunction with the faculty of the department concerned. It is necessary for these visiting faculty to complete the regular personnel forms required of all University faculty, they are filled out at the tine the appointment is made. All visiting faculty come under the policy suggested byThe Ford Foundation of "no loss, no gain basis, exclusive of consulting income". The University appointment is for a salary to cover both the home salary and the extra expenses caused by housing, travel, etc. Since the extra expenses are received as income, an item is included to cover the expected income tax on this expense. Semester salaries are paid in five checks at the end of the month, summer session in two payments, July 15th and August 18th. The second semester begins the week of February 6th, 1961 and the summer session in 1961 is June 19 to August 18. The project office assists with finding suitable housing, however, the final arrangements are made between the visitor and the owner. Since such arrangements are part of the determiniation of extra expenses) official appointments in the University are often delayed and may be made after arrival and during the first week of the semester or summer period. -19 -

Part II - Project Supported by The Ford Foundation TABLE IID - Schedule of Activities for Summer Faculty 1. Introductory Computer and 35 hours over Dr. E. I. Organick assisted by Programming Lectures (MAD) period of 3 weeks Mr. Brice Carnahan 2. Analog Computer Lectures and 8 hours lectures Dr. R. M. Howe and Laboratory 9 hours laboratory Dr. D. T. Greenwood over 4 days 3. Numerical Analysis Lectures 13 - ll /2 hr. lectures Dr. R. C. F. Bartels over three weeks 4. Logical Design of Digital Computers 4 1 1/2 hr. lectures Dr. N. R. Scott 5. The ACT IA programming 4 hour lectures R. N. Pease language 6. The BAD programming 1 hour lecture Dr. E. I. Organick language The remainder of the time during the nine weeks was available for study and practice with the use of computers to solve engineering problems. Preparation of Example Problems, some of which are given in Part III, was a major activity. -20 -

TABLE IIE - SUGGESTED APPLICATION FORM FOR PARTICIPATION IN THE PROJECT ON THE USE OF COMPUTERS IN INSTRUCTION AT THE UNIVERSITY OF MI(G IGAN NAME: Birth Date:_ Citizenship: ADDRESS: PRESENT POSITION4 RANK: INSTITUTION: EDUCATION, INSTITUTION, DEGREE, DATES: PROFESSIONAL EXPERIENCE: COURSES TAUGHT: PUBLICATIONS: KNOWLEDGE OF AND EXPERIENCE WITH COMPUTERS: APPLICATION FOR: Semester date, Summer 1961 (), Workshop, September 5-9, 1961 ( ) HOUSING NEEDS: (Number and ages of children) ( Indicate whether you will have automobile with you) ADDITIONAL INFORMATION MAY BE ATTACHED APPROVAL BY DEAN D DATE -21 -

Part II - Project Supported by The Ford Foundation Workshop Five day workshops in September (6-10, 1960, and 5-9, 1961) are scheduled to give faculty members the experience of programming a digital computer and of understanding a simple analog computer. The intensive program is geared to those who desire to initiate a serious effort in learning to use computers in instruction and are willing to work hard toward this objective for one week. Those who desire only to understand the processes involved may also benefit from the experience provided the same amount of effort is expended. The Primer lectures included in this report will be the basis for the workshop. The advanced enrollment for the September 6-10, 1960 workshop is given in Table IIF. The project pays the expenses incurred while attending the workshop as well as travel. Reports and Conferences This report covers the first year's activity on the Project. Earlier reports were issued as follows: (1) Upgrading Instruction in Engineering Education by Use of Electronic Computers for Class Instruction, October 21, 1959. (2) First Progress Report, February, 1960 (3) Second Progress Report, June 23, 1960 Most of the pertinent material in these reports is incorporated herein. A group of experts in the field of computation* were invited to the University to meet with the Computer Committee and Project Participants April 29-30, 1960. The discussion gave a splendid impetus to the Project; the visitors said to us in effect "what you are doing is fine, but don't drag your feet, there is even more to be done, wider horizons to the field of computation, etc." The following ideas were brought out at this conference: A. Contents of introductory computer instruction and placement of this instruction early in the curriculum is critical. Required computer appreciation courses at the Freshman or Sophomore level need to be developed fully. Such a course should convey to the student that: 1. Computers are not merely super-sliderules, but are powerful tools for describing and studying "situation" problems, i. e. Monte Carlo, process simulation, games, * Alan Perlis, Carnegie Institute of Technology William F. Atchison, Georgia Institute of Technology Wayne Wymore, University of Arizona Marvin L. Stein, University of Minnesota Duane Pyle, Purdue University Dean Arden, M. I. T. Silvio 0. Navarro, University of Kentucky Donald E. Hart, General Motors Richard W. Hamming, Bell Laboratories -22 -

TABLE IIF - Advanced Enrollment for Workshop, September 5-10, 1960 Name Position School I. G. Dalla Lana Asst. Prof. of Chem. Engr. University of Alberta Donald Quon Assoc. Prof. of Chem. Engr. University of Alberta C. M. Rodkiewicz Asst. Prof. of Mech. Engr. University of Alberta W. V. Youdelis Asst. Prof. of Metallurgy University of Alberta James T. Lapsley, Jr. Assoc. Prof. of Ind. Engr. University of California (Berkeley) Stanley H. Ward Assoc. Prof. Min. Explor. University of California (Berkeley) George Bugliarello Asst. Prof. of Civil Engr. Carnegie Inst. of Technology Paul Hartman Prof. of Civil Engr. City College of New York Seymour C. Hyman Prof. of Chem. Engr. City College of New York Sherwood B. Menkes Assoc. Prof. Mech. Engr. City College of New York Minocher K. N. Patell Asst. Prof. of Chem. Engr. City College of New York Ronald Brand Prof. of Mech. Engr. University of Connecticut Robert Ahlquist Prof. of Electrical Engr. University of Detroit Yavuz Birturk Instr. in Electrical Engr. University of Detroit Victor K. Shutzwohl Instr. in Electrical Engr. University of Detroit Edward A. Szczepaniak Asst. Prof. Aero. Engr. University of Detroit Charles W. Gorton Assoc. Prof. of Mech. Engr. Georgia Institute of Technology John Hoff Prof. of Civil Engr. University of Houston E. L. Michaels Prof. of Electrical Engr. University of Houston F. M. Tiller Dean of Engineering University of Houston Robert M. Peart Instr. in Agric. Engr. University of Illinois D. C. Scheck Asst. Prof. of Gen. Engr. University of Illinois K. A. Snoblin Prof. of Engr. Drawing Lawrence Institute of Technology E. C. Sword Asst. Prof. of Civil Engr. Lehigh University L. A. Wenzel Assoc. Prof. of Chem. Engr. Lehigh University Raymond I. Fields Assoc. Prof. of Math. University of Louisville. Frederick K. Boutwell Asst. Prof. of Mech. Engr. University of Michigan E. F. Brater Prof. of Civil Engr. University of Michigan L. E. Brownell Prof. of Chem. & Nuclear Engr. University of Michigan Kenneth F. Gordon Assoc. Prof. Chem. Engr. University of Michigan J. L. York Prof. of Chem. Engr. University of Michigan E. H. Young Prof. Chem. & Met. Engr. University of Michigan David L. Jones Lectr. in Meteorology University of Michigan Donald L. Katz Prof. of Chem. Engr. University of Michigan David V. Ragone Assoc. Prof. Met. Engr. University of Michigan Lloyd L. Kempe Prof. of Chem. Engr. University of Michigan Arnet B. Epple Assoc. Prof. Mech. Engr. University of Michigan Alan B. Macnee Prof. of Electrical Engr. University of Michigan Thomas J. Black Instructor of Eng. Drawing University of Michigan -23 -

Part II - Project Supported by The Ford Foundation TABLE IIF - Continued Name Pos ition School Turgut Sarpkaya Assoc. Prof. of Engr. Mech. University of Nebraska T. C. Smith Asst. Prof. of Mechanics University of Nebraska:,:~:::r:: _:A

language translation, etc. 2. Algorithmizing perhaps more so than any other kind of experience reveals the structure of problems. B. Professors who teach engineering problem courses in which problems for the computer are assigned must themselves know how to program the computer and know the programming language used by the students. C. All students should acquire the complete experience of defining problems, programming, coding, and examining the results from the computer. In all four years at least 8-16 problems should be solved by the student on one computer or another. D. University financial support for computer equipment should be determined as much by undergraduate teaching requirements as by the research requirements of the University. A minimum of one shift a day on the major computer of the University should be devoted to student problems. The largest and most versatile computer for research is the best for instruction as well. E. Beginning instruction on the use of computers should be taught with problem or procedure oriented programming languages rather than with machine oriented languages. Copies of the Conference Report on Use of Computers, April 29-30, 1960 are available. A paper *(2) was presented by Dr. E. I. Organick at the Annual Meeting of the American Society for Engineering Education on June 22, 1960. This paper set forth the goals of the Project and progress to date. The paper will be published in a forth coming issue of the Journal of Engineering Education. Some of the material in Part I of this report was extracted from this paper. There were numerous oral presentations of the experiences with computers in instruction including the afternoon session for the Michigan Section of the ASEE, April 23, 1960; the IBM Seminar for Engineering Professors, July 8, 1960, and the IBM Seminar for University Computing Center Directors, July 19, 1960. The program for the Conference in Ann Arbor, September 12-13, 1960 is given on Table IIG. The director visited nine schools to discuss the proposed program and their cooperation. A considerable amount of information was obtained from these visits which was helpful in guiding the Project. Example Problems The example problems discussed in Part I are considered an important aspect of the acceleration process. Accordingly, considerable effort was expended in obtaining reports to document the experiences of the professors who gave engineering problems for students to solve on a computer during the spring *(2) "Use of Computers in Engineering Undergraduate Teaching" by D. L. Katz and E. I. Organick, The University of Michigan. -25 -

TABLE IIG Program for Conference at The University of Michigan, September 12-13, 1960 September 12 Donald L. Katz Presiding 9:15 A. M. Welcome Dean S. S. Attwood 9:30 Programs at Various Schools William J. Eccles Purdue University J. R. Fincher Georgia Tech Tom Puckett University of Oklahoma Charles Scheffey University of California C. L. Miller M. I. T. A. J. Perlis Carnegie Tech Afternoon 2:00 P. M. Gordon J. Van Wylen Presiding The Program at The University of Michigan Overall Program Donald L. Katz Training of Faculty Elliott I. Organick Training of Students B.A. Galler Computing Facilities of The University of Michigan and How They are Used N. R. Scott Integration of Computers into Curriculum G. V. Berg Example Problems J. J. Martin D. F. Rudd September 13 Saul Gorn and E. I. Organick Presiding 9:00 A. M. Overall View of Computers in a University COMPUTER APPRECIATION COURSES R. J. Hamming, Bell Telephone Laboratories and Past President Association for Computing Machinery RESPONSE A. J. Perlis, Director, Computing Center Carnegie Institute of Technology OPEN DISCUSSION ADJUSTMENTS IN THE MATHEMATICS CURRICULUM F. M. Tiller, Dean of Engineering, and E. L. Michaels, Professor of Electrical Engineering University of Houston RESPONSE R. C. F. Bartels, Director, Computing Center The University of Michigan OPEN DISCUSSION APPROPRIATE LEVEL OF UNIVERSITY SUPPORT John C. Calhoun, Vice Chancellor for Engineering Texas A. and M. College System -26 -

Afternoon 2:00 P. M. Group Sessions to Discuss Example Problems Michigan Union Aeronautical, Astronautical, and Meteorological R. M. Howe, J. G. Eisiey, and E. S. Epstein Chemical and Metallurgical J. J. Martin, D. L. Rudd, and K. H. Coats Civil and Mechanics G. V. Berg, V. L. Streeter, and W. P. Graebel Electrical N. R. Scott and R. K. Brown Industrial R. C. Wilson and W. M. Hancock Mechanical F. H. Westervelt and J. R. Pearson semester. Likewise, the participants in the Project during the summer were asked to write up proposed problems for which they had obtained satisfactory computer solutions. The reports submitted by both of these groups have been abstracted and edited by J. J. Martin, G. V. Berg, E. I. Organick, H. Kristinsson, and B. Carnahan. The problem statement, the basis for the solution, and example computer solutions are given as Part III of this report for as many problems as the editorial and typing capacity permitted. The Project proposes to issue supplementary continuing lists of example problems and their solutions as they become available. A summary of the classroom experience of instructors with the students as well as his critique of the problem has been prepared separately from the problem and its solution. Likewise, the proposed courses in which the summer participants expect to use their example problems are described as separate explanatory information. It was believed that such information was historical in nature and should not be intermixed with the problems themselves. This Exploratory Information is presented here. The numbers correspond to those used on the Example Problems which follow in Part III. A list of problems is given on page E-2 along with their page number. -27 -

EXPLANTORY INFORMATION EXAMPLE PROBLEM NO. 1 PROF. D. F. Rudd. SYNOPSIS: The steady state temperature distribution in a conducting solid is computed for the two dimensional case. A solid is heated on top and part of one side and is cooled on bottom. The section of the solid is divided by two sets of grid points, coarse and fine mesh, and the temperatures were computed by a type of relaxation procedure, an iterative temperature correction technique. COURSE: Science Engineering 112, Rate Processes CREDIT: 4 HOURS LEVEL: Juniors and Seniors PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Forty out of 50 students in course had no experience, 10 students with experiences, one had done 15 problems. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Eight hours of lectures on programming with MAD language by Dr. E.I. Organick were attended, students worked example problem given with lectures. COMMENTS AND CRITIQUE: One hour of class lecture time and three hours of recitation time was spent on the problem. Class lectures preceded the problem assignment. These lectures dealt with the formulation of the heat equation and related boundary conditions as well as numerical techniques of solution. The problems associated with the numerical solution for the temperature distribution in solids were discussed in some detail and an iterative temperature correction technique was presented. The students were then assigned, as a home problem, the problem of determining by hand calculation the approximate temperature distribution in the semi-insulated solid (See section 7) using a coarse nine-point network. Their solutions were graded and returned. The next phase of the problem was to modify their approach to the problem to make it amenable to machine solution. These modifications consisted of defining the method of solution explicityly, in particular the mechanism of iteration and the termination criteria. These were handled intuitively in the hand solution but must be defined explicityly for the machine. This re-evaluation of the problem was presented in the form of a computer "Flow Sheet." The flow sheets were corrected and the various methods were discussed in class. The flow sheets consumed a major portion of the students' time and provoked quite a bit of interest. The coding of the flow sheets into MAD language was then assigned and the students were then required to hand in punched cards which were sent to the computer for compilation and execution. Those unsuccessful were returned to the students for corrections and were resubmitted to the computer. A correct solution was required before the end of the semester (three weeks from the time the punched cards were first required and four weeks from the assignment of the original problem). The students had the option of working in groups or alone. The maximum number in any one group was limited to three. The students chose to group themselves as follows: Group Distribution Number of Students % of Class per Group So Grouped 1 18% 2 25% 3 57% Total Number of Groups =23 -28 -

Class Response In an attempt to obtain objective information about time consumption and sources of difficulty a "problem evaluation sheet" was handed out with the problem assignment. Evaluation sheets filled out by the students provides the major source of information for the statistics presented. The problem was divided into five main phases in an attempt to isolate the time-consuming and errorprovoking sections of the problem. The phases are, theory, flow diagramming, coding, card punching, and error correcting, with the time requirement for each phase of the problem as follows: Student Home Time Distribution Group I Special Lecture Group 80% of Class Time in Hours Theory Flow Diagram Coding Punching Corrections Max 2.0 6.0 5.0 2.2 4.0 Average 1.0 3.0 2.5 1.4 1.0 Min 0.3 0.8 0.8 0.8 0. 1 Total Average Tim e =8.9 Hours Group II Math 173 Digital Computation or more 20% of Class Time in Hours Theory Flow Diagram Coding Punching Corrections Max 0.3 6.0 1.5 1.0 0.3 Average 0.2 1.3 0.9 0.7 0.2 Min 0.1 0.3 0.5 0.5 0.1 Total Average Time = 3.3 Hours IBM 704 computer time used by the class is reported as follows: Total time used by the 23 students groups and the instructor was 142 minutes. Each group required on an average of 4 trips to the computer to obtain a final solution with the total time consumed for each group averaging six minutes. -29 -

EXPLANTORY INFORMATION EXAMPLE PROBLEM NO. 2 BY PROF. R. D. Pehlke TITLE: Scavenging of Dissolved Gas from Molten Metal. SYNOPSIS: Hydrogen gas in molten metal is detrimental and may be removed by bubbling argon through the liquid metal. By assuming equilibrium between the purge gas and the liquid metal, the reduction in hydrogen may be computed as a function of the volume of argon purge. COURSE: Chem and Met. 119, Metallurgical Process Design. CREDIT: 4 HOURS. LEVEL: Senior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Only one student had previous experience. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: All were required to attend Dr. Organick's lectures (8 hours) on the MAD language. 5 students were enrolled in Math 73, the 1 hour computer course. COMMENTS AND CRITIQUE: The 22 students prepared individual solutions. It was predicted that 3 hours of out-of-class time would be required. A questionnaire returned by 16 students estimated 4 hours actually consumed. The average student made one error in theory, one in the flow sheet, 2.5 in coding and 3 to 4 in punching the cards. An average of two trial runs was required. Nineteen students obtained solutions to the problem and a total of one hour of 704 time was comsumed for the entire class for this problem. EXAMPLE PROBLEM NO. 3 EXPLANATORY INFORMATION BY PROF. R. D. Pehlke TITLE: Cooling of a Liquid-Metal Transport Ladle SYNOPSIS: The time-temperature curve is computed for molten metal in a transport ladle, a series of short time intervals are employed to solve for the heat losses. The calculation was to proceed to 24 hours or until the liquidus temperature was reached. COURSE: Chem and Met 119, Metallurgical Process Design CREDIT: 4 HOURS. LEVEL: Senior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: This was second problem in course employing computer. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: All were required to attend Dr. Organick's lectures (8 hours) on the MAD language. Five students were enrolled in Math 73, the 1 hour computer course. COMMENTS AND CRITIQUE: Class discussion time was 1 1/2 periods. It was predicted that 4 hours of homework would be required and students agreed this was time consumed by them. Seventeen students submitted flow diagrams and decks of cards, four were tried on computer, none ran successfully. An average of 6-8 errors per problem were made, a high percentage in punching the cards. EXAMPLE PROBLEM NO. 4 EXPLANATORY INFORMATION BY PROF. R. D. Pehlke TITLE: Enthalpies of Some Metallic Elements. SYNOPSIS: The specific heat equation along with the energy of phase transformations are programmed to compute the enthalpy of iron, manganese, carbon, and silicon above 298~ Kelvin at temperatures to 2500'K. COURSE: Chem and Met 119, Metallurgical Process Design CREDIT: 4 HOURS. LEVEL: Senior COMMENTS AND CRITIQUE: The students did not program this problem, the instructor's solution is given. -30 -

EXPLANTORY INFORMATION EXAMPLE PROBLEM NO. 5 BY PROF. D. V. Ragone and J. M. Dealy TITLE: Concentration of Carbon, Hydrogen and Oxygen in Gas-Cooled Graphite Nuclear Reactor. SYNOPSIS: The presence of oxygen and hydrogen in helium coolant for a nuclear reactor will cause chemical reactions to take place between graphite and impurities. The equilibrium gas composition is computed as a function of temperature level. COURSE: Science Engineering 110, Thermodynamics CREDIT: 4 HOURS. LEVEL: Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: A small group had taken Math 173, the 3 hour computer course. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Most of the students attended the 6 hours of evening lectures by Dr. Galler. COMMENTS AND CRITIQUE: About 1 1/2 hours of lectures were denoted to programming in FORTRAN (Fall 1959) and 1 hour devoted to a discussion of the solution by the instructor. It was predicted that 3 to 4 hours of homework would be required to solve problem. Students reported 6 hours were required (their first computer problem). The average program submitted had 2 mistakes. Since the problem was assigned during the last two weeks of the course, student solutions were not obtained during the course. EXAMPLE PROBLEM NO. 6 EXPLANATORY INFORMATION BY PROF. P. B. Lederman TITLE: Stage-wise Extraction of Sugar from Beets. SYNOPSIS: The problem is to determine the number of extraction cells required assuming equilibrium between the liquid and solid in each cell. The problem is normally solved by graphical methods, employing material balances and the equilibrium condition stated above. The computer solution on the IBM 704 and on the Bendix G-15 each indicate 15 plus stages or cells are required for the conditions imposed. COURSE: Chem and Met Engr. 113, Unit Operations I. CREDIT: 4 HOURS. LEVEL: Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: 15% had programmed problems before this course. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: 85% of students were taking the 1 hour (Math 73) digital computer course. COMMENTS AND CRITIQUE: The students solved this problem by the graphical method earlier in the semester. Three hours of class time were devoted to the computer solution, over a three week period. The 44 students worked in 15 groups; ten groups submitted essentially perfect solutions. The students estimated they each spent an average of 4. 3 hours outside of class to obtain the computer solution. The average number of test runs on the computer was 4. 1, and of execution runs 3.2. A total time requirement for class and instructor was 1.017 hours on the 704. This was the first experience by the instructor of teaching a computer problem. In retrospect, he believes the problem was too simple, the students could have handled a more complicated one. -31 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 7 BY PROF. K.H. Coats TITLE: Computation of Fugacity Coefficients from Compressibility Factors for Gases. SYNOPSIS: The thermodynamic equation relating fugacity coefficients to compressibility factors for gases was integrated to obtain the coefficients. Computed results were compared with values from generalized charts of the coefficients. COURSE: Chem and Met. 111, Thermodynamics CREDIT: 3 HOURS. LEVEL: Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS - None PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: All but three students were enrolled in Math 73, the 1 hour computer course. One student attended the special lectures. COMMENTS AND CRITIQUE: Less than 2 hours of class time was spent in discussing method of solving problem. Students worked in groups of 3. From 37 student replies, 2. 3 hours was required to understand the mathematics, 5.8 hours to program and 4.0 hours to debug the program. Of the 16 groups, 5 obtained correct answers. An average of 4 computer runs was required per group for a total time of 8.8 minutes of 704 time per group. Greater emphasis is required on accuracy by the student. Many were careless both in programming details and in key punching. EXAMPLE PROBLEM NO. 8 EXPLANATORY INFORMATION BY PROF. V. L. Streeter TITLE: Preliminary Design and Economic Study for a Dam Project. SYNOPSIS: Given the essential hydrological data, site information, and cost data, make a preliminary design study for a concrete gravity dam project for flood control, power and irrigation. Six programs are involved: (1) Find the most economical cross-section of dam. (2) Find the concrete volume in dams of various heights. (3) Construct a flow duration curve, showing discharge vs. percentage of time exceeded. (4) Make a mass diagram study to determine how much reservoir storage is needed to maintain various rates of steady discharge. (5) Find the maximum operating water level that will limit the peak discharge from a 100-year flood to a given maximum value, for various heights of dam. (6) Make an economic study to find the anticipated annual profit from irrigation water, for various heights of dam and power use rates. COURSE: Civel Engineering 146, Hydraulic Engineering Design CREDIT: 3 hours. LEVEL: Senior and graduate. PRIOR PROGRAMMING EXPERIENCE OF STUDENTS - None PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Students attended three two-hour lectures that were given as part of the Ford Foundation Computer Project. Two of the four students elected Math 73 concurrently with C. E. 146. During the semester about two class hours a week were devoted to discussion of design methods, theory, programming, etc. COMMENTS AND CRITIQUE: The problem was an excellent systems design application, much more comprehensive than could have been handled without the computer. Some simplifying assumptions were made -32 -

Example Problem No. 8 ( cont. ) such as the site characteristics, but the computer could easily handle actual field data. The programs were perhaps more difficult than is desirable for students with such limited computer background. It is expected that in future years the students will have more computer experience before taking the design course. Student reaction to the computer problem was generally favorable. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO.9 BY Prof. H. J. Welch TITLE: Analysis of a Quadrilateral SYNOPSIS: In triangulation a quadrilateral is used more than any other figure. If the length of one side is known and all right angles are measured, the lengths of the remaining sides and the diagonals may be computed. Errors in measurement of the angles cause discrepancies in the results, and the magnitudes of these discrepancies may be taken as a measure of the accuracy of the original measurements. Students were required to write a program that would evaluate the precision of measurement for a quadrilateral, and to test the program with a set of hypothetical data. The instructor then checked each student' s data with his own program. COURSE: C.E. 3, Advanced Surveying CREDIT 3 HOURS. LEVEL: Sophomore PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: One student took Math 73 prior to this course, one took Math 73 concurrently, one took C.E. 105, Geodetic Measurements and Electronic Computers, concurrently, and the remaining 35 students had no other programming experience. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: All students were required to attend the three two-hour lectures of the Ford Foundation program and to submit the home problem assigned there. Other programming instruction was given in two class lecture hours and during lab periods as needed. COMMENTS AND CRITIQUE: The problem certainly has application in surveying. It was incomplete in that it analyzed errors without performing adjustments, but it is a natural part of a total problem very common to the field, The computer work was not permitted to encroach on a prescribed formal class lecture series except for two class hours. The programming was not related to the class work generally as well as might have been hoped. As a result, class morale was low, although several students showed a real interest in the work. The predicted programming time per student was 18 hours and the average time reported by the students was 12 hours. Taking into account the special lectures and individual help, perhaps 15 hours per student would be more reliable. Eleven of the 38 students achieved successful program. On the average, each student made 2. 7 runs on the computer and used 3. 7 minutes of machine time. The instructor is convinced that the computer can be made a most useful tool in education if properly used. The computer must not be presented haphazardly, but rather in a carefully prepared logical sequence. It i's just as serious to create wrong impressions as to create none at all. -33 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 10BY Prof. G.V. Berg TITLE: Response Spectrum for Elasto-Plastic Structure SYNOPSIS: The principal computer problem assigned was to construct a family of curves showing the maximum displacement of a single degree of freedom elasto-plastic system as a function of load duration for a given shape of force pulse. Curves were constructed for several values of load intensity. A response spectrum of this type is used in the design of structures to resist severe impulse loads, such as blast loads. The concept of a response spectrum is of great importance in the field of structural dynamics. The problem requires sowing a second order differential equation of motion numerically for a large number of different values of driving force. One earlier problem, similar in nature but easier to solve, was also assigned. COURSE: CE 231, Structural Dynamics CREDIT: 3 HOURS LEVEL: Graduate PRIOR PROGRAMMING EXPERIENCE OF STUDENTS- None PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: One student took Math 173 concurrently. All students were required to attend the Ford Foundation project series of three two-hour lectures. Additional programming instruction was given from time to time during the course. COMMENTS AND CRITIQUE: The two machine problems were well-received by the students. In both problems the students were led by the hand most of the way to the solution. This is regrettable, but was necessary because of the complete lack of prior experience on the part of the students. Results suggest that the students were not overguided. Input and output were especially bothersome. The first problem was trivial, but was a logical step leading to the second. The second problem could not have been accomplished by other means, and gave the students some feeling for the capabilities of the computer. More important, the second problem enabled the students to construct spectrum curves, thus transmitting a betters understanding of the spectrum than could have been conveyed through the use of handbook spectra. One fringe benefit from this experiment was perhaps equal in value to the direct benefits. Nearly all of the problems heretofore encountered by the students called for either algebraic expressions relating response to input, or else specific numerical values of response associated with given values of input parameters. Here the students were required to construct a general numerical process for obtaining the response without knowing in advance the values of the input parameters. This was a new experience, and gave the students some idea of the power of numerical analysis as a general approach to a problem. In the same vein, the merits of transforming an equation to non-dimensional form became apparent during execution of the spectrum problem. -34 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 11 BY Prof. R. K. Brown TITLE: Analysis of Class C Amplifier SYNOPSIS: An important part of EE 121 deals with the operation of high power radio-frequency amplifiers, and the analysis of the operation of such amplifiers is quite laborious. It is therefore logical to employ the computer in this course. Two problems were assigned. The first (which was also solved by hand) is an idealized situation where the equation for the plate current pulse, the DC supply voltage and the amplitude of the RF voltage across the tank circuit are given and the plate circuit efficiency, power input from DC supply, and power delivered to the tank circuit are to be found. In the second problem the tube characteristics and path of operation are given and the DC plate current, fundamental component of plate current power delivered to plate tank circuit, and plate dissipation are to be found. Both problems involve the evaluation of several definite integrals by Simpson's Rule. COURSE: EE 121, Electronics and Communications II CREDIT: 4 HOURS LEVEL: Senior and a few graduates PRIOR PROGRAMMING EXPERIENCE OF STUDENTS Of the 38 students one was experienced in computers, two were enrolled in Math 73, two were enrolled in Math 173, and the remaining 33 had no computer experience. COMMENTS AND CRITIQUE: In general most students were quite enthusiastic although a few were unable to find time to learn the language in the rather short time available. Approximately twelve students finished the problem with correct answers and this number would have been much higher if more time had been provided. One fact stands out: most students were high in interest. In fact several students came in to discuss the problem after the final examination had been completed and grades turned in, and they indicated that they were sufficiently interested to work for a solution after the course was terminated. The problems assigned in EE-121 this semester use the computer merely to do the same work that could be handled by slide rule. In fact it probably took more time programming the problems than it would have taken by hand methods to calculate them. The next step should be directed toward programming the tube characteristics so that the computer can itself select a set of current values. Once this is accomplished it will be possible to use the computer to seek an optimum design or turn out a wide range of answers such as might be needed if plate modulation, for example, were being studied.. -35 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 12 BY Prof. K. F. Gordon TITLE: Temperature and Composition Profiles in a Catalytic Bed Chemical Reactor SYNOPSIS: Chemical Engineering graduate students who were mainly unfamiliar with digital computer programming were asked to render computer solutions for the temperature and composition profile in an adiabatic catalytic chemical reactor with competing and consecutive reactions. A one dimensional treatment was followed permitting a stepwise advance along the length of the reactor solving for a new temperature and composition at each new increment of length. The two dimensional case was also considered. COURSE: C. M. 215, Advanced Rate Operations CREDIT: 3 Hours LEVEL: 2nd Semester Graduate (Required) Prerequisites: Engineering Rate Operations (1st semester graduate) and Undergraduate mathematics PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Seven out of thirty had taken or were taking either Math 73 (1 hr. ) or Math 173 (3 hrs. ) PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Twenty-two students attended the special lectures offered by the Ford Foundation Project COMMENTS AND CRITIQUE: The instructor's task was facilitated by having Mr. Brice Carnahan, a computer expert and an advanced graduate student in Chemical Engineering, prepare a working computer solution of the problem in advance. Five class hours were devoted to discussion of flowsheets,to input-output details, to numerical analysis of the method used and to natural extension of the problem to the two dimensional case. Required student time outside of class averaged twenty hours for complete solutions including all clerical details, accurately estimated in advance. Typical student solutions required 4 runs on the computer with successful runs requiring 0. 8 minutes for MAD translation and 0. 5 minutes for execution. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 13 BY Prof. M. J. Sinnott TITLE: Metallographic Determination of Size Distribution of Nodules SYNOPSIS: The distributionwof spheres per unit volume is to be determined from plane photomicrographs showing two dimension circles. The equations have been developed previously and involve tedious multiplications and additions. The computer is employed to eliminate the lengthy hand calculations. -36 -

Example Problem No. 13 (cont. ) COURSE: Theoretical Metallurgy CREDIT: 3 Hours LEVEL: Graduate course for MS and Ph. D. students in Metallurgical Engineering PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: None of the students in this course had any prior experience with either analog or digital computers. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: The students were required to attend a set of three introductory lectures given by the Ford Foundation Computer Project during the early part of the term. Some of the students worked the sample problem that was assigned during these lectures. Concurrent with the computer lectures a simpler type of computer problem was assigned in the metallurgy course. COMMENTS AND CRITIQUE: All the students were graduate students who had had from 4 to 8 hours of advanced mathematics. The problem did not employ advanced mathematics, however, and could have been assigned to undergraduates. The time for programming, punching, and revising averaged about 10 hours for most students. Machine running time on the IBM 704 was only 1. 1 minutes. This is a simple problem that can easily be handled at the beginning of computer education. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 14 BY Prof. M. J. Sinnott TITLE: Nucleation and Growth of Solid Phases SYNOPSIS: This is a three-part problem of graded difficulty, concerned with the evaluation of the portion of solid transformed from one phase to another. The fraction is a rather complicated function of time, and the computer is used to evaluate this function for a sequence of times and for specified values of the parameters. All calculations are explicit with no trial process involved. COURSE: Theoretical Metallurgy CREDIT: 3 Hours LEVEL: Graduate course for MS and Ph. D. students in Metallurgical Engineering PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: None of the students in this course had any prior experience with either analog or digital computers. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: The students were required to attend a set of three introductory lectures given by the Ford Foundation Computer Project during the early part of the term. Some of the students worked the sample problem that was assigned during these lectures. Concurrent with the computer lectures a simpler type of computer problem was assigned in the metallurgy course. -37 -

COMMENTS AND CRITIQUE: Example Problem No. 14 (cont.) All the students were graduate students who had had from 4 to 8 hours of advanced mathematics. The problem did not employ advanced mathematics, however, and could have been assigned to undergraduates. Programming, punching, and revising took about 12-15 hours, while running time on the IBM 704 computer took from 0. 9 to 1.2 minutes for each part. The problem is considered to be about as simple and direct as could be given to students working on the computer for the first time. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 15 BY Prof. Herman Merte TITLE: Compressibility Factors of Gases from the Beattie-Bridgeman Equation of State SYNOPSIS: Computation of compressibility factor for a given temperature and pressure required an iterative determination of specific volume in an equation of state of the Beattie-Bridgeman type. This problem introduces beginners to the use of computers determining thermodynamic properties of fluids,normally a straight forward but very tedious task. COURSE: M. E. 106, Thermodynamics II CREDIT: 3 Hours LEVEL: Second Semester Junior Prerequisites M. E. 105, Thermodynamics I and Math through the first course in Differential Equations. PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: None PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: All 19 students attended the special lectures, four 2-hour sessions, offered by the Ford Foundation Project. COMMENTS AND CRITIQUE: The problem was assigned the last four weeks of the semester. Students needed 10 to 12 hours each to produce the initial program. The instructor, also a novice, required 8 hours. Students averaged 3 trips to the computer with only one success. The instructor required 4 trips. Computer time required per trip is 0. 5 minutes for translation and 0. 5 minutes for execution whenever translation was successful. The instructor believes a formal and more thorough computer training program is needed with a number of diverse example problems solved under direct guidance of a competent instructor. Only one regular class period was devoted to discussion of programming details and the numerical method to be used. The advantage of students working in pairs is questionable. It is important to have worked the problem in advance of the students. The problem is ideal as a first experience in applying computer programming. Students reacted favorably to use of the computer as an engineering tool and expressed interest in going further into the subject. -38 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 16 BY R. E. Balzhiser TITLE: Expansion of Gas in a Tank SYNOPSIS: A tank of gas under pressure is vented to the atmosphere. After the pressure has fallen rather rapidly to some lower value, the problem is to estimate the temperature of the gas remaining in the tank. Two different systems are employed in the analysis of the problem. The first system is the batch of gas remaining in the tank at the end. It is a closed system for which it is assumed that its expansion is adiabatic and reversible. The second system is the tank which is an open system. It is assumed to be adiabatic and velocity effects in the neighborhood of the vent are assumed negligible which is the equivalent of the assumption of reversibility for the closed system. COURSE: CM 211 - Thermodynamics CREDIT: 3 Hours LEVEL: Graduate PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Some students were taking a computer course, but most of them had never programmed a problem until the current semester. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Most of the students were taking a short course in computers given at the same time. COMMENTS AND CRITIQUE: The average time spent on the problem was about 15 hr/man. Most of this time was spent preparing and de-bugging programs. For most of the programs the time for compiling in Fortran on the IBM 704 was about 2.5 minutes while execution time varied from 1 to 4 minutes. Students averaged 3 runs on the computer. The instructor's MAD program was translated in 0. 6 minutes with an execution time of 0. 8 minutes. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 17 BY Prof. G. L. Liedl TITLE: Itots Method for Indexing Powder Patterns SYNOPSIS: When attempting to determine the structure of an unknown crystalline material, one of the first steps is to identify the lattice of the material. Ito's Method is the most logical method available at the present time to identify lattices of low symmetry. Ito's Method is a logical step-by-step procedure to index a primitive cell which describes the lattice. From this primitive cell the usually reported Bravais Lattice can be determined. Any other method, especially for a triclinic lattice, is almost impossible to solve without some prior knowledge or intuition concerning the lattice. COURSE: Introduction to Structure CREDIT: 4 Hours LEVEL: First Semester Junior and Diffraction -39 -

Example Problem No. 17 (cant COMMENTS AND CRITIQUE: Instructor required 20 hours to program. It is estimated that students can accomplish similar results in 6 weeks elapsed time including time to learn and understand its method. This assumes a programming language such as MAD. Six weeks is the minimum time that the students now spend for hand solutions for one set of data only. The computer execution time varies from 2. 7 minutes to 10 minutes depending on the number of repeated tries to index the pattern. MAD translation time was 2. 6 minutes. It should be noted that the time to run through the maximum number of tries is beyond question when using just a desk calculator. Some limited knowledge of vector algebra is necessary to work the problem. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 18 By Mr. Brice Carnahan TITLE: Design of a Minimum Cost Air-Cooled Heat Exchanger SYNOPSIS: This is a fairly complex problem involving an optimization study in the design of an air cooled heat exchanger for a certain water cooling application. The program, written in MAD, is generalized to the extent that nearly all design parameters unique to this particular problem are read as input data. This gives the program considerable flexibility in solving more general, but related problems. The program is illustrative of routines which will become more and more common in the equipment design field. COURSE: C.M. 121, Design of Process Equipment CREDIT: 3 HOURS. LEVEL: Senior COMMENTS: Math background: Algebra and Calculus Programming time required: (see discussion below) Running time: Compilation: 3 minutes Execution: approximately 100 design attempts per minute This program was written primarily to determine the programming and checkout time required for solution of a reasonable but difficult equipment design problem. The list shown below indicates the time spent by the author on various aspects of the analysis and programming work. TIME FUNCTION Hr. Min. 1: 45 Conversations with Professor Young (the instructor for CM 121) about the problem statement, roughly equivalent to the two class hours which would be spent on discussion of air cooled heat exchangers and introduction of the problem. 2: 00 Reading through several articles on air cooled exchangers which Prof. Young would normally make available to his students. 1: 00 Outline basic program for exchanger design. 1: 30 Selection of variable names for the problem parameters, their modes, and units. 1: 45 Writing of basic program statements exclusive of output statements and output formats. -40 -

Example Problem No. 18 (cont.) 0: 50 Punching of statement cards except for output statements and output formats. 2: 00 Outline the printout. 6:00 Detailed print and format statement writing, character counting, etc. 3: 30 Punching output and output format statements. 1: 00 Recheck and correction of format statement errors.: 45 Preparing and punching test data (all input paramenters): 15 Correction of diagnostic errors after first pass.:30 Corrections after second pass execution - format stop, several errors in first segment of program caught.: 30 Corrections after third pass - program ran but decimal points weren't lined up etc. 1: 15 Substantial modifications made to limit the amount of printout, select the best unit.: 30 Punching up modifications. 1: 00 Correct error in modifications after fourth run, prepare data for production run. 3: 00 Considerable modification of the program to speed up the optimization process and reduce the running time. 1: 00 Punching up modifications, prepare new data formats. Program ran correctly on fifth pass, reproducing the results of the third and fourth passes more efficiently. Because every effort was made to produce a well labeled report-like printout, nearly half of the total time was spent on preparation of output statements and their associated format specifications. Discounting this time, the basic program still required about 16 hours for an experienced programmer to write and check out. Assuming that a senior level student with heat transfer training had the equivalent of a Math 73 background, and programmed for meaningful but inelegant output, the likely time requirement would be of the order of 30 to 40 hours. Viewed from the standpoint of solving a particular heat exchanger problem, or even as a lesson in heat exchanger design in general, this expenditure of student time probably could not be justified (even though the problem could not be solved by one student in a reasonable time without a computer) However, viewed as an illustration of the power and utility of computing machines in solving formidable but realistic design problems, the time requirement probably could be justified. In fact such training might even be considered essential to the student's engineering education. -41 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO.19 By Prof. Harvey L. List TITLE: Determination of Terminal Settling Velocity of a Spherical Particle in a Fluid SYNOPSIS: Terminal settling velocity relationships are established in each of three flow regimes, where Stokes law, an "intermediate" law and Newton's law apply depending on the Reynold's number. Since the deter - mined terminal settling velocity must be consistent with the flow regime assumed, the desired computer program must be constructed with the necessary logic to seek and test repeatedly, several velocities until a consistent solution is obtained Programs were developed both in MAD for the IBM 704 and in ACTIA for the LGP 30. COURSE: ChemicalPlant Design CREDIT 3 HOURS. LEVEL: Senior COMMENTS: Students should have mathematics through differential equations. This problem may be considered a beginning problem. Even assuming the students have had no programming practice prior to this course, the estimated time for students to program this problem is 2 hours. IBM 704 computer time for this problem is a total of 1 minute for compilation and running of three cases. LGP 30 time is 1 hour for translation of the source program and about two minutes per case. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO.20 BY Prof. Harvey L. List TITLE: Pressure drop and expansion in fixed and fluidized beds. SYNOPSIS: Involves the incrementing of velocity through a bed of granular particles through the fixed bed region, to the point of initial expansion and into the fluidized bed region. At all points pressure drop and expansion is calculated. Calculation of pressure drop and expansion of a bed of granular particles as a function of gas velocity through the bed. At low velocities the pressure drop through the bed is insufficient to expand or fluidize the bed. The program searches for the velocity corresponding to initial expansion of the beds printing values of pressure drop as a function of velocity up to this point. At higher velocities the pressure drop remains constant while the bed expands as a function of velocity. This expansion is computed by an iterative procedure at each selected velocity. COURSE: Chemical plant design C REDIT: 3 HOURS LEVEL: Senior COMMENTS AND CRITIQUE: Mathematics through differential equations assumed. Estimated time for student programming 3 hours. Computer time required on the IBM 704: 1. 3 minutes for MAD translation and 0.5 minutes for execution. NOTE: student assumed to have no programming practice prior to this course. -42 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 21 BY Prof. A. D. M. Lewis TITLE: Reactions of a Statically Indeterminate Truss SYNOPSIS: The redundant reaction of a truss which is statically indeterminate to the first degree can be computed as ZR - Su t/AE R = Iu J/ AE where S and u are the bar forces for the given loads and unit redundant force, respectively, and f, A and E are the lengths, areas, and moduli of elasticity of the bars. The program prepares a table of values of Suj,/AE and u 2/AE, and the summatiors of these quantities, from which the redundant reaction is computed. COURSE: C. E. 371, Indeterminate Structural Analysis CREDIT: 3 Hours LEVEL: Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Little or none. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: One hour lecture and one hour demonstration on LGP-30 with 24.2 Interpretive Routine. COMMENTS AND CRITIQUE: Student participation was optional. About half of the class submitted computer solutions. It was suggested that a term u4,/AE be tabulated also, for use in drawing a Williot-Mohr diagram. This appears to be the most appropriate problem in the course for computer solution by students. Machine time for the program written in ACT IA is 5 min. for execution plus 20 min. for compilation and tape loading. In 24. 2 the execution time is 8 minutes. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 22 BY Prof. A. D. M. Lewis TITLE: Solution of Secant Formula for Eccentrically Loaded Columns SYNOPSIS: The program provides a trial and error solution for P/A in the secant formula EFS P/A e. c. ( It. 1 r+ 2 in which EFS, e, c, r, ), and E are given constants. COURSE: C. E. 478, Steel Design CREDIT: 4 Hours LEVEL: Senior -43 -

Example Problem No. 22 (cont.) PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Little or none PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: One hour lecture and one hour demonstration on LGP-30 with 24. 2 Interpretive Routine. COMMENTS AND CRITIQUE: This problem was assigned as an optional problem and about half of the students submitted computer solutions. The problem appears to be a most appropriate computer problem for students. Machine time on the LGP-30 for this program in ACT IA is two minutes plus 20 minutes for compiling and tape loading. In 24. 2 the running time is two minutes. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 23 BY Prof. A. D. M. Lewis TITLE: Table of Allowable Column Stresses SYNOPSIS: The program prepares a table showing the allowable column stress, P/A, for a sequence of values of slenderness ratio, i/r, as computed by the A. R. E. A. column formula P/A =15- 4000 (L/r)2. The table starts with an initial slenderness ratio, denoted f/r, and increasing by increments denoted?rin, until a final value erf is reached. COURSE: C.E. 478, Steel Design CREDIT: 4 Hours LEVEL: Senior C.E. 371, Indeterminate Structural Analysis 3 Hours Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Little or none PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: COMMENTS AND CRITIQUE: This problem is used as a demonstration problem in one hour of lecture and one hour of demonstration on the LGP-30 computer. Machine time for this example, written in ACT IA, is 1. 5 min. for execution plus 20 min. for compiling and reloading. In the 24. 2 Interpretive Routine the execution time is two minutes. -44 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 24By Prof. Demos Eitzer TITLE: The Root Locus of a Transfer Function SYNOPSIS: In this program the computer reads information concerning the transfer function and the region of the complex plane under consideration. It then proceeds to plot the root locus in this region. COURSE: Servomechanicsm Analysis CREDIT: 3 Hours LEVEL: Senior COMMENTS AND CRITIQUE: This problem needs no additional mathematical background other than that which is already required for the course. (Laplace transform theory.) The problem has been worked both on the IBM 704 and the LGP-30. The solution on the LGP-30 suffers in that the machine is much too slow for the job. Programming for the LGP-30 did, however, lead to two small subprograms: a) Four Quadrant Arctangent b) Argument reduction program which are of interest. EXPLANATORY INFORMATION EXAMPLE PROBLEM NQ 25 BY Prof. Demos Eitzer TITLE: Amplitude and Phase Response of a Transfer Function SYNOPSIS: In this problem the computer accepts information concerning the transfer function and the region of the frequency spectrum in which the response is desired. It then proceeds to bring the magnitude (in db.) and phase (in degrees) of the transfer function in the desired frequency range. It is of particular use in filter theory, amplifier theory, and in servomechanicsm theory. COURSE: Electronics II CREDIT 3 HOtURS LEVEL: Junior or Circuits III or Servomechanicsms COMMENTS AND CRITIQUE: No mathematical requirements beyond those already prerequisite for the course. This program is particularly interesting in the way frequency increments are selected. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 26 BY Prof. Demos Eitzer TITLE: The Series Magnetic Circuit With An Air Gap SYNOPSIS: This problem accepts data in the form of magnetic properties of a particular material, data concerning the physical dimensions of the material, and supplies results to provide a graph of flux density vs. current required. COURSE: Magnetic Circuits CREDIT: 3 HOURS LEVEL: Junior or Upper Sophomore -45 -

Example Problem No. 26 (cont.) PRIOR PROGRAMMING EXPERIENCE OF STUDENTS- None COMMENTS AND CRITIQUE: No additional mathematics required of the student. This is essentially a super slide rule problem but it does have the advantage that the problem is essentially non-linear and as a result the solution is usually one of trial and error. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO.27 BY Prof. Tung Au TITLE: Moments and Deflections of a Simple Beam SYNOPSIS: The problem considered here is computing moments and deflections at equally spaced discrete points along the length of a simply supported beam. The loading is a continuous function whose values at the discrete points are known or given. The beam has variable moment of inertia which is also a continuous function with given values at the same discrete points. Three sets of data are used in the sample problem for illustration. (a) Uniformly distributed load and constant moment of inertia (b) Irregular loading and variable moment of inertia for 7 panel points (c) Irregular loading and variable moment of inertia for 13 panel points COURSE: Structural Mechanics I CREDIT: 3 HOURS LEVEL: Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTSNo more than a course equivalent to Math 73. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: None COMMENTS AND CRITIQUE: 1. Math background of students - Differential and integral calculus 2. Estimated programming time for students - total of 5 hours including flow chart, writing the program in 2 compiler language, punching cards and debugging. 3. Actual running time - 0. 7 minute for compiling (MAD language) and 0.4 minute for execution for all three sets of data on IBM 704 machine. -46 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 28 BY Prof. Hsuan Yeh TITLE: Lift Distribution of a Finite Wing SYNOPSIS: Calculate the lift distribution and induced drag of a wing of finite span given the geometry of the wing planform, wing section characteristics, and angle of attack (twist) as functions of the position along the span of the wing. Numerical methods based on "lifting-line theory" are employed utilizing "Glauert's transformation" on the basic equation of Prandtl for circulation r along the wing span. COURSE: Basic Aerodynamics CREDIT 3 HOURS One or two semesters. LEVEL: Senior COMMENT S: Math background for students is conventional undergraduate mathematics including differential equations and Fourier Series. Estimated student programming time depends on the availability of a subroutine for the solution of simultaneous linear equations. Three to six hours if subroutine is available. Calculation of lift distribution is a basic problem in aerodynamics but one which heretofore could not be handled practically in undergraduate teaching, EIO: ale EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 29 By Prof. F. M. White TITLE: Bending Stresses in a Multi-Flange Aircraft Structure SYNOPSIS: A program was written to compute the bending stresses in a multi-flange aircraft beam by the unsymmetrical flexure formula. The program is general and will handle up to one hundred flanges. The input is assumed to give the areas and coordinates (Cartesian) of all the flanges. The program then computes and prints the centroid of the structure, the moments of inertia, the product of inertia, and the unsymmetrical bending stresses and loads in each flange. COURSE: A.E. 430, Aircraft Structures CREDIT 3 HOURS: LEVEL: Junior COMMENTS: The problem is rather easy and makes a good first problem for a beginner in computer programming. Any student acquainted with algebra can do this problem. The student's total programming and key-punch time should be around eight hours. The run time for this problem on the IBM 704 is negligible (less than one minute for a dozen sets of data). -47 -

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 30 BY Prof. F. M. White TITLE: Numerical Solution of the Blasius Differential Equation for the Laminar Boundary Layer on a Flat Plate SYNOPSIS: A program was written to solve the Blasius Equation: f(x) * f"(x) + 2f"'(x) = 0, subject to the boundary conditions, f(0) = f'(0) = 0; f'( oo )= 1 The program used a Taylor series for integration. The correct solution was obtained through a NewtonLagrange interpolation at "oo". A special study within the problem determined what value of x approximated 100 I, COURSE: A. E. 423 (Georgia Tech.) CREDIT: 3 Hours LEVEL: Senior Viscous Fluid Flow PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: Not applicable PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Not applicable COMMENTS AND CRITIQUE: The problem is not easy and should not be used as a beginner's problem in computer programming. The students must have experience both in ordinary differential equations and in numerical analysis. The student's total programming and keypunch time should be around ten or twelve hours. The instructor's run time for a MAD program on the IBM 704 was 40 seconds to compile and 30 seconds to execute. EXPLANA TORY INFORMATION. EXAMPLE PROBLEM NO. 31 BY Prof. F.M. White TITLE: Steady State Flow in a Long Tube Connected by Flare Fittings to Large Entrance and Exit Pipes. SYNOPSIS: A program was written to study the flow characteristics of a long tube connected in series by means of straight-through flare fittings to large entrance and exit pipes. The system is typical of plumbing systems used in control devices such as barosensors. The mathematical model consists of five simultaneous transcendental equations in five unknowns plus other parameters which can be set arbitrarily. The problem is to solve the equations when various values are set for the parameters. The solution is accomplished by a set of three nested iterations within a fourth larger iteration. The five basic dimensionless parameters are taken as flow factor, Reynolds number, pressure ratio, tube lengthto-diameter ratio, and fitting-to-tube diameter ratio. 48

Sxample Problem No. 31 (cont.) COURSE: A.E. 473 CREDIT: 3 HOURS LEVEL: Senior Internal Aerodynamics PRIOR PROGRAMMING EXPERIENCE OF STUDENTS - Not Applicable PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Not Applicable COMMENTS AND CRITIQUE: The problem makes a nice educational study of the relative efficiency of iterative solutions. The problem is not easy and should not be assigned as a beginner's problem in computer programming. The students should have some knowledge of numerical analysis. The equations themselves are merely algebraic in nature. The student's total programming and key-punch time should be around fifteen or twenty hours. The instructor's run time was 3 minutes for 216 results. (IBM 704) EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 32 BY Prof. C. Y. Liu TITLE: Minimum Weight Rectangular Cooling Fin SYNOPSIS: An analytic solution for a rectangular thin fin which radiates heat to, the surrounding is shown. The parameter which determines the minimum weight fin is found. The value of this parameter is the root of a complicated transcendental equation. A MAD program is suggested to obtain this root. COURSE: Heat Transfer CREDIT: 3 or 4 HOURS LEVEL: Junior or Senior COMMENTS AND CRITIQUE: 1. Math. background required: calculus, advanced calculus preferred. 2. Estimated programming time: 1 hour for programming, 1 hour for punching cards. 3. Actual running time: IBM 704, 10-20 min. depending on the first guessed answer. Though the math. background required seems to be too advanced for undergraduate instruction, the computer problem itself is simple but challenging. A manual solution would be unthinkably tedious. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 33: BY Prof. Royce Beckett, State University of Iowa TITLE: Dynamic Load on a Uniform Beam SYNOPSIS: A uniform beam is loaded by a force which moves across the beam. The displacement of the beam caused by the force is to be found. In the solution the displacement of the beam is expanded in terms of normal modes of vibration. The first three differential equations in the model coordinates are solved by: 1. The Runge-Kutta Method 2. Expressing solution as an integral and evaluating the integral by Simpson's rule. 49

Example Problem No. 33 (cont.) COURSE: CREDIT: LEVEL: Advanced Strength of Materials 3 Hours Senior Vibrations 3 Hours Graduate Elasticity for Engineers 3 Hours COMMENTS AND CRITIQUE: Math Through differential equations Programming time Runge-Kutta - 8 hours when using available subroutine Simpsonts rule - 10 hours Execution time for one Runge-Kutta - 1. 5 minutes (IBM 704 MAD) set of data Simpson's Rule - - 5 minttes (IBM 704 MAD) EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 34 BY Demos Eitzer TITLE: The Solution of Differential Equations by Numerical Methods a) Second Order Linear Homogeneous Equation b) van der Pol Equation SYNOPSIS: In these problems the equations are solved by the Runge-Kutta method using Gill's coefficients. It is shown how the same programs can be extended to solve any order differential equation. COURSE: Electric Circuits CREDIT: 4 Hours (3 credits) LEVEL: Sophomore COMMENTS AND CRITIQUE: It is not intended that the students shall program these problems but they will instead be presented as an illustration of the numerical solution of differential equations. The students will be taught the necessary mathematics to understand the problem. They have already taken differential equations. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 35 BY Prof. Edward Szymanski TITLE: Luminous Efficiency of a Black-Body Radiator SYNOPSIS: The problem is to determine the luminous efficiency of a black-body radiator at various temperatures. In other words, the students are to determine, at specified temperatures, the percentage of the radiant energy of a black-body which is of wavelength such as to be in the visible part of the spectrum. COURSE: Principles of Electrical Design CREDIT: 4 HOURS LEVEL: Senior (Required) 50

Example Problem No. 35 (cont.) PRIOR PROGRAMMING EXPERIENCE OF STUDENTS Problem is proposed for students who have had no prior programming experience. PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Students are expected to receive about eight hours of instruction in programming in conjunction with this assignment. COMMENTS AND CRITIQUE: 1. Only basic calculus is needed to solve the problem. 2. I estimate that the students would need an hour to program the problem and another hour to debug the program. 3. IBM 704 Computer requires 0. 5 minutes for MAD translation and 0.5 minutes for execution of six cases. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 36: BY Prof. Edward Szymanski TITLE: Determination of the Unnecessary Elements in a Switching-Circuit Transmission Function SYNOPSIS: The student, as one aspect of minimization of switching-circuit components, is asked to examine the "residues" of sample transmission functions written in switching (Boolean) algebra. The objective is to determine which, if any, of the variables (literals), or their complements, are unnecessary. COURSE: Logical Design of Switching Circuits CREDIT: 3 Hours LEVEL: Senior or Graduate Elective COMMENTS AND CRITIQUE: 1. The student needs a fundamental understanding of switching (Boolean) algebra. 2. The estimated time for the student to program and debug the program for this problem is three hours. 3. The IBM 704 required 0. 6 minutes for MAD translation of the program and 0.4 minutes for execution of the solutions for four cases. 51

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 37 BY Prof. Edward Szymanski TITLE: Potential Distribution in a Two-Dimensional Field SYNOPSIS: The problem consists of determining the potential distribution in a rectangular block which has a rectangular section cut out of one corner. The top is held at a constant potential and the bottom is held at a different constant potential. All other sides are insulated perfectly. COURSE: Principles of Electrical Design CREDIT: 4 HOURS LEVEL: Senior PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: I plan to give these students about 8 hours instruction in programming. COMMENTS AND CRITIQUE: 1. Calculus background is desirable. 2. I estimate that the student will use about 3 hours in programming this problem and another 2 for debugging. 3. The computer (IBM 704) required 0.9 minutes for compiling and 2.2 minutes for executing the solution for three problems of up to 400 grid points. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 38 BY Prof. Walton Hancock TITLE: Industrial Data Processing SYNOPSIS: Three elementary problems in industrial data processing are presented: 1. Calculating a payroll 2. Posting and updating an inventory 3. Standard for calculating spoilage The three problems are programmed for the LGP-30 computer in ACT IA compiler language. COURSE: Industrial Engineering 165, Data Processing CREDIT: 3 HOURS LEVEL: Senior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS - Not Applicable PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: Not Applicable COMMENTS AND CRITIQUE: These programs require no mathematics beyond basic algebra. Estimated times for programming, debugging and running the problems on the LGP-30 are: Payroll problem, 6 hours, including 4 machine hours. Inventory problem, 13 hours, including 8 machine hours. Standards problem, 8 hours, including 5 machine hours. 52

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 39 BY J. G. E isley TITLE: A Problem in Orbital Flight Mechanics SYNOPSIS: The use of a computer is illustrated in solving for a real root of an algebraic equation. The problem arises in the study of the specific impulse required to achieve orbital transfer of a space vehicle. COURSE: Aero. Eng. 146, Performance of CREDIT: 3 HOURS LEVEL: Senior Elective High Speed Vehicles PRIOR PROGRAMMING EXPERIENCE OF STUDENTSMajority will have had no experience PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: None - It is not planned to assign problem to whole class because of lack of programming experience. COMMENTS AND CRITIQUE: Students will have had math through differential equations. Programming time for student with previous experience - 2 to 5 hours. IBM 704 Time: 0. 7 minutes for MAD translation 1.9 minutes for execution EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 40: BY Prof. Edward Szymanski TITLE: Analysis of Non-Sinusoidal Voltage Wave-Forms SYNOPSIS: A wave-shape obtained from an oscillographic record is analyzed for its harmonic components to obtain the first n terms of its Fourier Series representation. These n components are expressed as a percentage of the fundamental frequency component and the per cent distortion is calculated as a measure of the departure from a simple sine-wave form. The components are then combined to obtain a calculated waveshape which is then compared with the given wave-shape. COURSE: Network Analysis II CREDIT: 3 hours LEVEL: Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: None COMMENTS AND CRITIQUE: 1. A background in only calculus is needed 2. About two hours would be needed to program this problem and another two hours to debug the program. 3. Solution is estimated to take 0. 7 minutes for MAD translation and 0. 5 for execution of problem on the IBM 704. 53

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 41: BY Paul T. Shannon TITLE: Calculation of Vapor and Liquid Fugacity for Fluids Obeying the Martin-Hou Equation of State SYNOPSIS: Utilizing the Martin-Hou equation of state T T RT A2 A + BBT + CT+ Ce A P - + 2 2 2 +3 3 3 (v-b) (v-b) (v-b) (v3,b) -k T A + BT + Ce (v-b)5 where b, k, AZ, B2, Cz, A3, B3, C3, A4, A5, B5, and C5 are experimet ally determined constants for a given fluid, a digital computer program is written for calculating the pressure, vapor fugacity and fugacity coefficient, and liquid fugacity for a given temperature over a suitable range of vapor volumes. COURSE: Chemical Engineering Thermodynamics CREDIT: 3 Hours LEVEL: Junior COMMENTS: 1. No special mathematics background required of the student. 2. Estimated programming time by student with programming experience using a computer language like MAD a. Develop equations 1 - 1 1/2 hrs b. Write compiler statements and punch cards 2 - 4 hrs d. Debug 2 - hrs d. Prepare data and run 1 - 2 hrs 3. IBM 704 Computing Time for Freon-22: 0.8 minutes for MAD translation 3. 6 minutes for execution 54

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 42 BY Demos Eitzer TITLE: The Solution of Non-Linear Electric Circuits on the Analogue Computer SYNOPSIS: In this problem the series RLC circuit with idealized inductance (non linear) is solved on the analogue computer to show that the possibility of generating subharmonics exists. In addition to the fundamental, 1/3, 1/5, and 1/7 harmonics are shown. COURSE: Magnetic Circuits CREDIT 3 HOURS. LEVEL: Junior COMMENTS AND CRITIQUE: This problem is presented so that students can be convinced that subharmonics can be generated in a non linear circuit and to give the students a chance at analogue computer programming. EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 43 BY Edward Szymanski TITLE: Transient Analysis of an R-L-C Circuit with Sinusoidal Excitation. SYNOPSIS: The problem is to determine the instantaneous values of circuit current and capacitor voltage in a simple circuit with a resistor, inductor, and capacitor connected in series with each other and to a sinussoidal voltage generator through a switch. The solution is to be sufficiently general to provide for varying the initial values of the current and charge and the voltage phase-angle at the time of switching. As an extension, the undamped natural frequency and the damping ratio could also be parameters for possible change. For comparison, the problem is solved on both the electronic differential analyzer and on the digital computer. COURSE: Network Analysis II. CREDIT 3 HOURS. LEVEL: Junior PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: I plan to give about 5 hours instruction and demonstration on the electronic differential analyzer. COMMENTS AND CRITIQUE: 1. The student needs background in differential equation theory. 2. The estimated time for the student to formulate the problem and wire the analog computer is two hours. The program for the digital computer would require about 5 hours to write and debug. 3. The total running time on the analog computer is about 1/2 hour for ten cases. The estimated time on the IBM 704 is 0. 5 minutes for compiling the program and 0. 8 minutes for executing the solutions for three cases. 55

EXPLANATORY INFORMATION EXAMPLE PROBLEM NO. 44 By Paul T. Shannon TITLE: Transient Behavior of Batch Reactor Systems SYNOPSIS: A digital computer program is presented for solving the reaction equations occurring in a batch reactor at isothermal constant volume conditions. The initial concentration of reactants and the reaction velocity coefficients are to be considered as constants. The program is restricted to systems involving at most five reactants in which at most second order reactions are possible. Analog computer circuits are shown for solving the reaction equations and results are shown over a range of initial concentrations of the various components. Note: A logical extension of this work is the treatment of reactor systems with variable total mass. COURSE: Chemical Engineering Kinetics, 4 semester hours credit 2 hours lecture and 4 hours recitation per week. LEVEL: Junior. EXPLANTORY INFORMATION EXAMPLE PROBLEM NO. 45 By Prof. E. F. Gloyna TITLE: Oxygen Depletion in Streams SYNOPSIS: This problem depicts the oxygen sag curve and shows the development of a dissolved oxygen profile in a stream. Two differential equations describe the oxygen depletion and reaeration rates. COURSE: Water and Waste Water Treatment CREDIT: 3 HOURS: LEVEL: Junior PRIOR PROGRAMMING EXPERIENCE OF STUDENTS: None PROGRAMMING INSTRUCTION CONCURRENT WITH COURSE: None COMMENTS AND CRITIQUE: Math Background - Calculus Programming experience desirable Machine time - analog - 1 min. digital - 1 - 5 min. 56

PART II PROGRAMMING AND SOLVING PROBLEMS ON COMPUTERS List of Example Problems E-2 Primer for Programming with the MAD Language by E. I. Organick Part A E-4 Part B E-20 Example Problems 1 -41 (Digital Computers) E-69 An Introduction to the Theory and Application of Analog Computers by R. M. Howe E-471 Example Problems 42 - 45 (Analog and Digital Computers) E-513 TABLE III A LIST OF EXAMPLE PROBLEMS Prob. Prof. and Computer and No. Title School Language Editor Page 1 Temperature Distribution in D. F. Rudd IBM704, MAD Conducting Solid U. of Michigan Bendix G-15, ALGO JJM E-69 2. Scavenging of Dissolved Gas R. D. Pehlke From Molten Metal U. of Michigan IBM 704, MAD JJM E-85 3 Cooling of a Liquid-Metal R. D. Pehlke Transport Ladle U. of Michigan IBM 704, MAD JJM E-89 4 Enthalpies of Some Metallic R. D. Pehlke Elements at Regular Temperature U. of Michigan IBM 704, MAD JJM E-95 Intervals 5 Concentration of Carbon, Hydro- D. V. Ragone and gen and Oxygen in Helium Cooled J. M. Dealy Graphite Nuclear Reactor U. of Michigan IBM 704, FORTRAN JJM E-103 6 Stage-Wise Extraction of Sugar P. B. Lederman IBM 704,FORTRAN, JJM E-120 from Beets U. of Michigan Bendix-G45, Intercom 500 7 Computation of Fugacity Coefficients from Compressibility K. H. Coats Factors U. of Michigan IBM 704, MAD JJM E-138 8 Preliminary Design and Economic Study for a Dam Project V. L. Streeter Parts 1 - 6. U. df Michigan IBM 704, MAD GVB E-150 9 Analysis of a Quadrilateral H. J. Welch IBM 704, MAD GVB E-198 U. of Michigan E-l

Prob. Prof. and Computer and No. Title School Language Editor Page 10 Response Spectrum for Elasto- G. V. Berg Plastic Structures U. of Michigan IBM 704, MAD GVB E-206 11 Analysis of a Class C Amplifier R. K. Brown U. of Michigan IBM 704, MAD GVB E-229 12 Temperature and Composition Profiles in a Catalytic Bed K. F. Gordon Chemical Reactor U. of Michigan IBM 704, MAD EIO E-246 13 Metallographic Determination of M. J. Sinnott Size Distribution of Nodules U. of Michigan IBM 704, MAD JJM E-259 14 Nucleation and Growth of Solid M. J. Sinnott Phases U. of Michigan IBM 704, MAD JJM E-262 15 Compressibility Factors of Gases from the Beattie-Bridge- H. Meite man Equation of State U. of Michigan IBM 704, MAD EIO E-268 16 Expansion of Gas in a Tank R. Balzhiser U. of Michigan IBM 704, MAD JJM E-274 17 Ito's Method for Indexing G. L. Liedl Powder Patterns Purdue University IBM 704, MAD EIO E-284 18 Design of a Minimum Cost Air B. Carnahan Cooled Heat Exchanger U. of Michigan IBM 704, MAD BC E-294 19 Determination of Terminal Settling Velocity of a Spherical H. L. List IBM 704, MAD Particle in a Fluid City College of N. Y. LGP-30, ACT IA EIO E-320 20 Pressure Drop and Expansion in H. L. List Fixed and Fluidized Beds. City Cdlege of N. Y. IBM 704, MAD EIO E-324 21 Reactions of a Statically A. D. M. Lewis Indeterminate Truss Purdue University LGP-30, ACT IA GVB E-332 22 Solution of Secant Formula for A. D. M. Lewis LGP-30, ACT IA Eccentrically Loaded Columns Purdue University LGP-30, 24.2 GVB E-336 23 Table of Allowable Column A. D. M. Lewis LGP-30, ACT IA Stresses Purdue University and 24.2 GVB E-339 24 The Root Locus of a Transfer Demos Eitzer IBM 704, MAD Function City College of Nb Y. LGP-30, ACT IA JJM E-342 25 Amplitude and Phase Response Demos Eitzer of a Transfer Function City College of N. Y. LGP-30, ACT IA JJM E-351 26 The Series Magnetic Circuit Demos Eitzer with an Air Gap City College of N. Y. IBM 704, MAD JJM E-356 27 Moments and Deflections of Tung Au a Simple Beam Carnegie Inst. of Tech. IBM 704, MAD GVB E-362 28 Lift Distribution of a Finite Wing Hsuan Yeh U. of Pennsylvania IBM 704, MAD EIO E-369 29 Bending Stresses in a Multi- F. M. White Flange Aircraft Structure Georgia Inst. of Tech. IBM 704, MAD GVB E-375 30 Numerical Solution of the Blasius Differential Equation for the F. JMLWhite Laminar Boundary Layer on a Georgia Inst. of Tech. IBM 704, MAD GVB E-379 Flat Plate E-2

Prob. Prof. and Computer and No. Title School Language Editor Page 31 Steady State Flow in a Lcng Tube Connected by Flare Fittings to F. M. White Large Entrance and Exit Pipes Georgia Inst. of Tech. IBM 704, MAD GVB E-386 32 Minimum Weight Rectangular C. Y. Liu Radiant Cooling Fin Carnegie Inst. of Tech. IBM 704, MAD JJM E-393 33 Dynamic Load on a Uniform Beam Royce E. Beckett State U. of Iowa IBM 704, MAD GVB E-398 34 The Solution of Differential Demos Eitzer Equations by Numerical Methods City College of N. Y. LGP-30, ACT IA JJM E-411 35 Luminous Efficiency of a Black- Edward Szymanski Body Radiator Wayne State Univ. IBM 704, MAD EIO E-423 36 Determination of the Unnecessary Elements in a Switching Edward Szymanski Circuit Wayne State Univ. IBM 704, MAD EIO E-427 37 Potential Distribution in a Two Edward Szymanski Dimensional Field Wayne State Univ. IBM 704, MAD GVB E-432 38 Industrial Data Processing Walton Hancock U. cf Michigan LGP-30, ACT IA GVB E-439 39 A Problem in Orbital Flight J. G. Eisley Mechanics U. of Michigan IBM-704, MAD GVB E-453 40 Analysis of Non-Sinusoidal Edward Szymanski Voltage Wave Forms Wayne State Univ. IBM 704, MAD EIO E-457 41 Calculation of Vapor and Liquid Fugacity for Fluids Obeying the Paul T. Shannon Martin-Hou Equation of State Purdue University IBM 704, MAD JJM E-462 42 The Solution of Non Linear Electric Circuits on the Demos Eitzer Applied Dynamics, E-513 Analog Computer City College of N. Y. AD1 JJM 43 Transient Analysis of an R-L-C Applied Dynamics, Circuit with Sinusoidal Edward Szymanski AD1, and Excitation Wayne State Univ. IBM 704, MAD GVB E-516 44 Transient Behavior of Batch Paul T. Shannon Appl. Dyn., AD1 Reactor Systems Purdue University and IBM 704, MAD JJM E-524 45 Oxygen Depletion in Streams E. Gloyna Appl. Dyn., AD1 University of Texas and IBM 704, MAD GVB E-536 g- 3

A PRIMER FOR PROGRAMMING WITH THE MAD LANGUAGE Foreword These lecture notes are designed to serve several purposes: 1. To introduce any beginner with no prior background to programming digital computers with the MAD programming language. 2. To assist the readers of this report in following the MAD language programs written by instructors and students and reported in the example class problems which follow these notes. There has been so far no wide distribution of programming reference manuals for the MAD language and, for many readers, regardless of computer experience, these notes may very well be the only convenient source of information on MAD. 3. To illustrate the kind, volume and organization of teaching or reference material which may be used for undergraduate teaching as early as the freshman year. Experience has shown that this material may be presented in as few as eight lecture hours. Upon condensation, it may be presented in four to six lecture hours to graduate students and selected upperclassmen. The notes are given in two parts. Part A is a two or three hour lecture which is a general introduction to computers and procedures called "algorithms," leading up to an initial view of a procedure-or problemoriented programming language such as MAD. These notes may be utilized with very little modification for introducing students to programming in any other language such as FORTRAN (IBM 704), FORTRANSIT (IBM 650), ACT (LGP-30), ALGO (BENDIX G-15), etc. Part B is a two to six hour lecture depending upon the lecturer's pace, the amount of home study expected of the students, and upon the degree of condensation. These notes are specific to MAD, but the outline and manner of presenting the basic concepts may be generally applicable to the other languages cited above. Special lecture notes for those already familiar with MAD have also been prepared for students who desire to program in ACT IA, for the LGP-30 and in BAD, the Bendix ALGO Decoder for the G-15. ACT IA is a new version of ACT I especially modified by this Project for convenience in student use of the computer. Copies of the ACT IA and BAD lecture notes are available by writing directly to the Director of this Project. The MAD language is believed to be the most powerful and desirable programming language available at this time. MAD is an outstanding achievement of Bruce Arden, Bernard A. Galler and Robert Graham of the University of Michigan Computing Center, Prof. R. C. F. Bartels, Director. Had not this language been developed for use in the Spring of 1960, it is doubtful that much of the reported progress could have been achieved. I. Organick E-4

A PRIMER FOR PROGRAMMING WITH THE MAD LANGUAGE Table of Contents Part A Page Components of a Computer E-7 Nature of Memory E-7 Basic Operation and Use of the Computer E-8 Programming E-8 Definition of an Algorithm E-9 Communicating the Algorithm to the Computer E-ll The MAD Translator E-ll Some Highlights of the MAD Language E-15 a. Input and Output b. Decisions in the MAD Language c. Statements and Declarations d. The Arithmetic Used by the Computer Part B I INTRODUCTION E-20 II ARITHMETIC EXPRESSIONS AND SUBSTITUTION STATEMENTS E-20. 1.. Constants and Variables E-20 II. 1.1 Integer Constants E-21 I. 1. 2 Floating Point Constants E-21 II.2 Variables E-22 II. 3 Arithmetic Operations E-23 11.4 Precedence of Arithmetic Operations E-23 II. 5 Parentheses E-24 II. 6 Functions E-24 11.6. 1 Functions Available in the MAD Language II. 6.2 Functions Which Must be Defined by the Programmer Himself II. 7 Expressions of Mixed Mode E-25 11.8 Arithmetic Substitution Statements E-26 II. 9 Statement Labels E-27 III LOGICAL EXPRESSIONS AND CONDITIONAL CONTROL E-27 III. 1 Mathematical Relations E-27 III. 2 Logical (or Boolean) Operations E-28 III. 3 Precedence E-28 I. 4 The Conditional Control Statement Pattern E-28 III. 5 The Iteration or THROUGH Statement E-34 IV UNCONDITIONAL CONTROL STATEMENTS E-37 IV. 1 TRANSFER Statement E-37 IV. 2 END OF PROGRAM Statement E-38 E-5

Table of Contents, Continued -- Part B, Continued -- Page V INPUT-OUTPUT E-38 V. 1 The Input-Output Statements, READ and PRINT E-39 V. 1 1 READ Statement V. 1. 2 PRINT Statement V. 2 Specifying Format for Numerical Information E-43 V. 2. 1 Internal-External Conversion Codes for Numerical Data or Results V. 2.2 The External Form of Numerical Input and Output Information V. 2. 3 Field Specification V. 2. 4 Format Declarations V. 2. 5 Record Spacing V. 2. 6 Skip Fields V. 2.7 Printer Carriage Control V.2.8 Discussion V. 3 Hollerith Fields E-49 V. 4 Input-Output Summary E-50 VI DECLARATIONS (NON-EXECUTABLE) E-53 VI. 1 Remark Declaration E-53 VI. 2 Mode Declaration E-54 VI. 3 DIMENSION Declaration E-54 VI. 3.1 Vectors VI. 3. 2 Matrices of Two or More Dimensions VI. 4 Presetting Vectors with Numerical Information E-56 VI. 5 Presetting Vectors with Alphanumeric Information E-57 VII DEFINING INTERNAL AND EXTERNAL FUNCTIONS E-57 VII. 1 Defining Internal Functions E-57 VII. 2 Defining External Functions E-60 VXII CARD FORMATS FOR MAD PROGRAM DECKS E-60 APPENDIX A, B, C, and D E-65 APPENDIX E, F, and G E-67 E-6

A PRIMER FOR PROGRAMMING WITH THE MAD LANGUAGE Part A The newcomer, wishing to learn to use electronic digital computers, may very well approach his task from the same standpoint which most drivers of modern automobiles approach the job of learning to drive such vehicles. It is no longer necessary to understand the technical aspects of automobile construction and automotive engineering, thanks to a long successful history of automotive development. In a like manner, but to a lesser extent, today's user of computers can take advantage of extensive development in the art of using computers and is required to know little or no details of the internal functions of the computer in order to take practical advantage of the computer as a tool. Development in the use of computers is proceeding rapidly and it is expected that the future users of computers will find their task even easier. These notes present an introduction to the use of the IBM 704 computer, a representative largescale computer, taking advantage of a special user's language called MAD, the Michigan Algorithm Decoder. Learning to write programs in the MAD language, i. e., learning to use the computer, is analogous to learning to drive the automobile. One may perfect the former technique without acquiring much knowledge of computers themselves. Components of a Computer The digital computer is physically analogous to a desk calculator, differing in only two main respects. The computer has a memory and the computer is faster. The principal components of the computer are (1), one or more input devices such as keyboard, punched card, magnetic tape, paper tape; (2), one or more output devices such as punched cards, printed paper, magnetic tape, punched tape, oscilloscope picture display; (3), an arithmetic unit capable of addition, subtraction, multiplication, and division along with the ability to sense either a negative or a zero value; (4), a control mechanism whose function is to control the sequence of events within the computer and to interpret and cause execution of the special coded orders which the control unit received; and finally (5), memory, wherein are stored the coded instructions and numbers of the problem being executed. Nature of Memory Memory may be described this way: memory is subdivided into units called "words, " each equal in capacity to store information, Each unit or word is individually addressable, meaning the computer is E-7

capable of fetching or storing information from any word in memory in the course of executing a given instruction. A characteristic property of memory is destructive read-in and non-destructive read-out, meaning each time information is stored in a given word in memory the contents of that word are erased as the new information is "read in. " When information is fetched from a given word of memory the contents of the memory location itself is undisturbed. Hence, information may be "read out" of a given memory location as many times as is needed without destroying the contents of the word itself. Basic Operation and Use of the Computer A. The process which occurs within a computer during actual operation of the computer is this: the control unit picks off contents of successive locations in memory and executes these as discreet instructions employing the memory, the arithmetic unit, the input, or the output device as appropriate to the individual instruction being executed. B. This being the case, the approach to the use of a computer is straight-forward. We must place in the memory a program which is a sequence of instructions to accomplish a particular assignment. C. The instructions which the control unit is capable of executing in any computer are left to the discretion usually of the computer designer. Because individual instructions are indistinguishable from other numbers, they can be operated upon arithmetically and thereby changed into other instructions. Primarily for this reason most programs, even those designed to accomplish elaborate computation,are characterized by requiring a surprisingly small amount of memory. Programming The task of using a computer therefore hinges upon our ability to write and test computer programs which accomplish the required assignments. This function we call programming which consists of first, stating the problem to be solvedand then defining an unambiguous step by step procedure for solving the problem. We shall develop the meaning of "unambiguous step-by-step procedure" with the aid of examples. Example 1: Consider the problem stated mathematically as Ci = Ai2 + Bi2 where i = 1, 2,... n, and we are given n values of Ai and n values of Bi. E-8

A Primer for Programming With the MAD Language In lay language, the problem might be stated thus: Given a collection of n values of A and a collection of n values of B, find for corresponding pairs of elements A and B in the respective collections, the value C which is the root of the sum of the squares of the elements A and B. The following is a possible step by step procedure to solve this problem (not necessarily with a digital computer). 1. Pick up A.1. 2. Square it. 2 3. Store A1 temporarily in a place called H. 4. Pick up Bj. 5. Square it. 6. Add the contents of H to B 2. 7. Take the square root of A2 + B2. 8. Store the result in a place reserved for C-1^ 9. Put the following question: "Have all the A's and B's been processed?" Based on the answer to this question, do the following: 9a. If no, repeat steps 1 through 8, increasing the subscripts used by one, in statements 1, 4 and 8 upon each repetition. 9b. If yes, go on to the next step. 10. Stop. Notice that steps 1 through 6 and step 8 of the above procedure may be considered elemental from a computer point of view. That is, if the typical computer instruction is of the form |OP A I], where OP is a code for the particular operation and A is the name or designated location in memory of an operand associated with the operation, one might expect any digital computer of this type to be able to perform any of these procedural steps by a single order basic in the circuitry of the machine. Thus STORE| H | might be the instruction corresponding to step 3, meaning STORE the result of the preceding operation in the location in memory designated as H. Steps 7 and 9, however, are examples which we would not expect the usual computer to be capable of carrying out as single orders. Rather, we would expect that a number of orders would have to be arranged in each case to accomplish the sense of the statements in steps 7 and 9. Definition of an Algorithm We have seen in reviewing the above procedure, that in order to accomplish an assignment it was necessary for us first to state: the problem and second, to define a step-by-step procedure for solving the E-9

problem. This procedure we will frequently call an algorithm. Finally, a third and necessary component in this picture is the implied presence of the necessary and appropriate data. In the example which follows we will consider in greater detail the manner in which the procedure may be stated. It will be seen that usual verbal descriptions of a procedure are not sufficiently unambiguous and it will be necessary to adopt algebraic oriented statements which help to minimize ambiguity. It will further be seen that the procedure'may be given in written prose form or in a graphical form called a flow chart. Example 2: Consider the problem of determining the largest number in a collection of n numbers A = {ao, a1,..an) for n> 1. Consider first this verbal description. Step 1. Pick up the first number. 2. Compare with the second number. 3. If the first is larger, or if they are equal, keep the first one. 4. If the second is larger, keep the second one. 5. Whichever one was saved is now compared with the next number. 6. Continue to repeat steps similar to 2 through 5 (each time moving down the list, until the last number has been included in the comparison). 7. The number finally saved is the largest in A. Let us now restate this procedure as a refinement of the above verbal description by using what we will call an algebraic oriented language. 1. Let z = a0 2. Letj = 1 3. If j > n, the problem is done; go to 7; otherwise go on 4. If z <aj, let z = aj; otherwise go on 5. Let j increase by 1 (i.e., j = j + 1) 6. Return to step 3 7. z is the answer In reviewing these two ways of expressing procedures we can note that in the first instance, certain words and phrases were used which are clearly undefined, such as; statement 2, "compare;" statement 6, "moving down the list;" statement 7, "finally, saved." The advantage of the refined statement is that it does not contain words or phrases of this character. Hence the refined statement tends to be less E-10

A Primer for Programming With the MAD Language ambiguous to the reader who has training in elementary algebra. Another remarkable feature of algebraic oriented procedural statements is the close resemblance which they bear to actual computer processes. For example, the equation in statement 4, z =aj corresponds to the computer process z -aj meaning, replace the contents of the memory location called z with the contents of the location called aj. The refined statement above may also be presented in graphical form as shown below: BASIC FLOW CHART START) 1 n az: aj J - j - l je 1e c=J+ We see from the above discussion that: 1. Procedures may be stated in a variety of ways, but that the use of an algebraic oriented language helps to minimize ambiguity and 2. An algorithm may be stated either as a sequence of written statements line below line or as a graph or flow chart. Communicating the Algorithm to the Computer Computers can execute in a basic sense only instructions belonging to the order code list which the designer has given the machine. However, in an indirect sense, as a result of the creative work of computer users, computers can execute instructions written in other languages. To accomplish the latter, it is necessary to supply the computer with a specially written program (in the basic order code language of the machine) which converts or translates the instructions written in the "other language" into the basic language. The MAD Translator Translator programs may be written for most computers. The MAD translator program (Michigan Algorithm Decoder) has been written by members of the Computing Center staff at the University of E-ll

Michigan initially for use with the IBM 704 computer. This translator accepts algorithms stated in an algebraic oriented language defined according to a set of rules and regulations. In general, if one submits an algorithm to the computer which can call upon the MAD translator, and if the algorithm contains statements which are compatible with these MAD language rules, the computer automatically converts the algorithm supplied into a program written in the basic order codes of the computer and capable of being executed upon receiving the appropriate data. A reference manual called the'MAD Manual" has been written and is available at the Computing Center which contains a definitive set of rules for writing algorithms in the MAD language. These lectures attempt to present the same rules from the viewpoint of the beginner.* Let ue now return to the preceding example for finding the largest number in a collection of numbers, and see how we would state this algorithm in the MAD language. Presented on the next page are the line by line statement and the flow chart form of the same algorithm. The reader will quickly notice a change in appearance of the procedural steps. Gone are the subscripts, lower case letters and special characters like " <" and ">". This change is necessitated because the computer, which must read these statements, is able to recognize only a limited number of characters. MAD Language Program for Example 2 LABEL STATEMENT or DECLARATION COMMENTS DIMENSION A(l 00) Declaration START Z = A(0) Statement THROUGH BACK, FOR J=l, 1,J. G. N Statement BACK WHENEVER Z. L.A(J), Z=A(J) Statement INTEGER J, N Declaration END OF PROGRAM Statement *This implies a rearrangement and/or condensation of some of the material and a relegation of the remainder, not of immediate interest to the beginner, to the category of appendix, E-12

A Primer for Programming With the MAD Language MAD Flow Chart for Example 2 START z = a0 THROUGH BACK, FOR j=1,1, j > n z: aj I I ( END ) Consider first the line by line program form. We notice first that each line is divided into two main portions, one labeled LABEL and the other labeled STATEMENT or DECLARATION. On the far right a portion of the line is reserved for comments which are primarily for the use of the programmer at the time he is writing the program. The meaning of each line in the program will now be given for the purpose of introducing some of the highlights of the MAD language. Line 1 contains the declaration DIMENSION A( 00) Here the programmer declares to the MAD translator program that space in memory must be allocated (reserved) for up to 100 items in the collection of elements called A. Line 2 contains the substitution statement labeled START, Z = A(0) meaning, into the place in memory called Z place the contents of the location called AO. Subscripts are denoted by expressions enclosed in parentheses. Thus Aj is written as A(J) in the MAD language. The next statement is one called a THROUGH statement or an "iteration" statement THROUGH BACK, FOR J=l, 1, J. G. N meaning, repeat the statement or statements which follow up to and including the one labeled BACK, each E-13

time varying the index J from an initial value of 1 and, upon repetition, in increments of 1, until the condition "J greater than N" is satisfied. The next line contains the statement labeled BACK which reads WHENEVER Z.L. A(J), Z = A(J) meaning, whenever the condition "Z less than A j" is satisfied, replace the contents of Z with the contents of the location called AJ; however, if the condition Z less than AJ is not satisfied, simply go on to the next statement. The next line contains the declaration INTEGER J, N This declaration tells the MAD translator program that the symbols J and N are to be regarded as integers as distinguished from deci mal point numbers whose arithmetic is somewhat different. Finally, the last line END OF PROGRAM is a statement which identifies the end of the program; no other statements follow. In order for the beginner to understand a program, even one as simple as this one, it is essential that he imagine the dynamic process which will go on within the computer during the time that this program is actually being executed. With this in mind let us review the program. After initializing the contents of Z with the first value in the collection, A, namely, A0, we ask the computer to set up and control a repetitive or "iterative" process which is described in the statements following the THROUGH statement. We use the words THROUGH BACK to denote the iterative process which follows by referring to the identification of the last statement in the repetitive process. The statement(s) which are to be repeated are called the scope of the iteration, and the label BACK is used to identify this scope. The iterative process is controlled in the following manner: The arbitrary index J is initialized with the value 1 and increases by the value 1 prior to each repetition of the process. The number of repetitions is determined by forcing the computer to test prior to each repetition, the condition "J greater than N, " requiring that repetition be continued if the condition is not satisfied, and that repetition be halted if the condition is satisfied, If repetition is to cease, the computer is directed to accept as its next statement for execution, the one following the statement labeled BACK. In this case, the next statement in sequence would be the one called END OF PROGRAM. Looking now at the statement labeled BACK we see the question is asked, "Is the contents of location Z less than the contents of location AJ?" If this condition proves to be true we ask the computer to place the contents of Aj into the location labeled Z prior to executing the next statement. Otherwise we E-14

A Primer for Programming With the MAD Language ask the computer to go directly to the next statement. However, the statement in question (labeled BACK) defines the scope of the preceding iteration, and therefore the next statement in sequence will be determined as the result of the condition tested in the THROUGH statement above. Each time the statement labeled BACK is executed the current value of the index J is understood as the numerical value of the index referred to in this statement. Thus Z <Aj on the fifth iteration would be understood as Z <A5, on the sixth iteration, as Z <A6, etc., because the index is augmented by the increment 1 as defined in the THROUGH statement. Looking now at the MAD flow chart equivalent of the above program, we see essentially the same procedure in nearly the same number of statements. Each box, hexagon, ellipse or circle has meaning established by convention. The box or rectangle represents an arithmetic substitution statement, the hexagon is used primarily for THROUGH statements, the circle is used to represent the scope of the preceding THROUGH statement, the ellipse is used to represent logical conditions which at any time may have only one of two possible values (e. g, YES or NO, TRUE or FALSE, etc.). Other shortened ellipses merely identify START and STOP for the reader. Some Highlights of the MAD Language A. Input and Output While the above algorithm illustrates many of the characteristics of the MAD language, the program is deficient or incomplete in that it contains no provision for entering the data required into the computer nor does it contain any instructions for showing the user the result. READ and PRINT statements are provided in the MAD language which would normally be used in writing any program. Here is how input and output statements appropriate to the above example might appear. For reading n + 1 values of A from a0 through an inclusive: READ FORMAT DATA, N. A(0)... A(N) For printing the result from the place called Z: PRINT FORMAT ANSWER, Z The flow chart indicates the appropriate place for these statements. E-15

START / READDATA I 1 1 I / BACK I I BACK PRINT ANSWER f END These statements accomplish input and output, and detailed descriptions of their use are given in a later lecture. Oddly enough, learning to control input and output of a program with statements of the MAD language is, by far, the biggest job for the beginner. We can draw on past experience with the rules of algebra to assist us in formulating correct descriptions of the computational steps in our program. But with input and output, we must describe the forms of numbers and of other information. For this we have little or no past experience to draw upon. Because we desire great flexibility as to the kind and format of information transmitted to or from the computer, a large number of arbitrary coding rules are unavoidable. It is here, therefore, that some simple learning drills (memorizing) and practice with simple problems are essential for the beginner. B. Decisions in the MAD Language It is pertinent in discussing the highlights of the MAD language, to mention briefly some of the key points concerning decisions which we may call upon the computer to perform. We note in the above example that decisions were called for in two types of statements: (1) the E-16

A Primer for Programming With the MAD Language THROUGH statement and (2) the WHENEVER statement. All decisions are binary decisions, that is, of the "yes" or "no" type. Decisions are the result of testing the value of a condition. Such a condition is in the form of a logical or Boolean expression which at the time tested can have only one of two possible values, namely, true or false. These conditions may be complicated ones involving words like and, or, not used as logical operations, and other connector or mathematical relations such as less than, less than or equal to, greater than, greater than or equal to. In an example used in a later lecture the Newton-Raphson iterative technique is demonstrated using a fairly elaborate condition for determining the end of the iteration: INEXTX-XI < 1 and IF(X)I < Z- or I n This expression at any given time will be true for certain values of X, NEXTX and I and false for others. Here is how we might use such an expression in the language of MAD for decision making: a. WHENEVER. ABS. (NEXTX-X). L. EPS1. AND..ABS. F. (X). L. EPS2. OR. I. GE. NZERO, TRANSFER TO OUT or b. THROUGH REPEAT, FOR I=0,1,.ABS. (NEXTX-X). L. EPS1.AND..ABS. F. (X). L. EPS2. OR. I. GE. NZERO where.ABS. means "absolute value of,".AND. means "and" and. OR. means "or." We would interpret this logical expression or condition as follows: The quantity NEXTX-X is less than C 1, and at the same time F(X) is less than 2 or I is greater than or equal to no or both. C. Statements and Declarations The MAD language makes the distinction between a statement and a declaration. It will be seen in the sections that follow that statements are executable while declarations are not executable. By this we mean in general: statements will be translated by the MAD translator into basic IBM 704 commands which form part of the "object" program actually to be executed at a later time; whereas declarations are instructions to the MAD translator about the program to be translated. Hence, the declaration DIMENSION A(100) provides the MAD translator with information which it will require in order to set up adequate allocation of memory. This is indirect program information and hence is "non-executable. " The statement Z = A(O), on the other hand, represents a process which we eventually wish the computer to perform and hence is "executable. " E-17

D. The Arithmetic Used by the Computer Two important types of numbers which the MAD language deals with are integers and floating point numbers. There is a basic difference in the arithmetic used by the computer when dealing with these two types of numbers. Recognition of integers and floating point numbers: We note that MAD statements may contain constants or variables. Constants are written in such a way that the MAD translator automatically recognizes them as either integers or floating point numbers as desired by the programmer. Variables, however, may represent either integers or floating point numbers, and the programmer must declare those variables which he intends to have understood as integers. Additional details as to the matter of representing integers and floating point numbers (constants or variables) are given in Part B of these notes. Integer arithmetic: We have seen in the examples that integers are usually used either for indexes which control repetition in a roblem or for denoting elements of vectors or arrays of numbers. Integer arithmetic has the advantage that, under certain conditions, which are usually easy to satisfy, no round-off error results from operations such as addition, subtraction and multiplication. The conditions which must be satisfied are simply that the integers being operated on and the integers resulting from the operation must all be smaller than the "word size" of the machine, which in this case is ten decimal digits. If, on the other hand, the "word size" is exceeded during one of these integer arithmetic operations, the most significant portion of the result will usually be lost. This form of error would normally be avoided by the programmer. In division of integers the remainder is always discarded. Consequently, if the integer A is wholly divisible by the integer B, the resulting integer quotient A/B is exactly correct. If, on the other hand, for example, the integers 5 or 1 are divided by the integer 4, the resulting quotients 5/4 and 1/4 would register as 1 and 0 respectively since the remainders are discarded. Floating point arithmetic: The phrase "floating point number" refers to the form of numbers most commonly used in computation. This form is a computer version of what engineers call "scientific notation. " In the preceding example it was assumed that the collection of numbers, A, of which the program was seeking the largest value, was stored in the computer in this floating point form. Only the variables J and N were considered to be integers and these were declared as such by a special declaration. The arithmetic of floating point numbers is characterized by an inherent numerical error associated with each arithmetic operation. However, the size of this round-off error is characterE-18

A Primer for Programming With the MAD Language istically small and depends upon the "word size" of the computer. In this case, the size of the round-off error is limited to less than one part in the seventh significant digit of the result of any single arithmetic operation. Naturally, a sequence of floating point arithmetic operations can conceivably cause an accumulated error which is much larger and, in some cases, constitutes a significant error, in the results. Again, the numerical error associated with these operations is the responsibility of the programmer who must consider this fact when selecting a numerical procedure for the computer to follow. Certain procedures or numerical methods, when followed by the computer in the solution of a given problem, will yield results with smaller errors than other procedures. This entire subject of numerical error is one which mathematicians deal with in the field of numerical analysis, and is outside the scope of this set of notes. E-19

A PRIMER FOR PROGRAMMING WITH THE MAD LANGUAGE Part B I. INTRODUCTION These notes are an abridged description of the rules for programming in the MAD language and represent an expansion of a set of abridged MAD notes made available by the Ford Foundation Computer Project in the Spring of 1960. It is believed that the beginning programmer will find these notes essentially complete in themselves. Only occasional reference will be required to the complete MAD reference manual * The notes are divided into a number of subtopics as may be seen in the Table of Contents. Section II is concerned with the rules for writing arithmetic expressions and substitution statements which utilize these expressions. Section III introduces the logical expression and its use in conditional and iteration statements. Other control statements follow in IV. Input-output is discussed in detail in V while declarations and methods for handling vectors and higher order matrices are discussed in VI. Section VII introduces the optional but important subject of subroutines or internal and external functions as they are called in the MAD language. Clerical details for preparing the keypunched cards which form the physical communication link to the computer are given lastly in VIII. A short appendix follows which is intended as a reference to give the reader some idea of the more complete scope of the full MAD language. II. ARITHMETIC EXPRESSIONS AND SUBSTITUTION STATEMENTS 11. 1 Constants and Variables Arithmetic expressions may be written with constant and variable names or both. Attention is focused on the modes of constants and on the modes of the numbers represented by variable names. Constants are identified by their very appearance as being in either the integer or floating point mode. Variable names are in reality symbols for memory locations wherein are stored numerical values representing the variables. These numerical values are either in the integer or floating point mode. In general the constant and variable names of a given arithmetic expression refer to numerical values of the same mode although as will be seen in later sections expressions of mixed * Michigan Algorithm Decoder, Reference Manual, June 1960 by B. Arden, B. Galler and R. Graham, The University of Michigan Computing Center. E-20

A Primer for Programming With the MAD Language mode are permissible in the MAD language. Two examples are given indicating the appearance of typical expressions. Example 1: An integer expression (AA + 4) * (BB + 5) Example 2: A floating point expression 3.1416 + B/2. 5 + (8E-2 * ALPHA-BETA)/GAMMA In Example 1 the constants 4 and 5, as will be seen below, are recognizable as integer constants and the variable names AA and BB may be assumed to represent integer values. In Example 2 the constants 3.1416, 2. 5 and 8E-2 are all recognizable as floating point constants according to the rules given below, and the variable names B, ALPHA, BETA, and GAMMA, are assumed to represent floating point numerical values. II, 1.1 Integer Constants Integer constants may be one to ten decimal digits preceded by sign (- or +). Hence, integers can range from -9999999999 to +9999999999 with the decimal point always assumed to be immediately to the right of the rightmost digit but always omitted. Signs 1. Sign if present is always placed to the left of the integer. 2. Negative sign is never omitted. 3. Positive sign may be and usually is omitted. Example: 2, -2, 0, +0, -0, 100 are all integers. Leading Zeros Leading (but not trailing) zeros may be omitted. Example: 5 and 005 are the same but 3 and 300 differ. II. 1.2 Floating Point Constants There are two basic forms, with and without exponent. II. 1. 2. 1 Without exponent the constant contains one to eight digits and a decimal point (.) which must be written but which may appear anywhere in the number. Examples: 0., 1.5, -0.05, +100.0, -4. II1. 2. 2 With exponent the constant contains from one to eight digits with or without a decimal point, followed by the letter E, followed by the exponent. Exponent is one or two digits preceded by sign and represents the power of ten by which the number to the left of the exponent is to be multiplied. E-21

Examples MAD NOTATION MEANING IN ENGINEERING NOTATION.05E-2.05 x 102 -.05E2 -.05 x 102 5E02 5 x 102 5.E2 5 x 102 Here we see that: 1. Plus signs may be optionally omitted in front of the exponent as well as in front of the number itself. 2. Decimal point may be omitted, in which case it is assumed to be immediately to the left of the letter E. Note: The exponent must never exceed 38 in absolute value. II.2 Variables The name of any variable consists of from 1 to 6 alphabetic or numeric characters the first of which must be alphabetic (A through Z). The number represented by the variable name may be integer or floating point as determined by the programmer. See Section VI. 2, Mode Declaration. Examples: TEMP, KLMZ, F55, P3ZK, RESULT, X, ALPHA II.2.1 Integer Variables Numbers represented: Any integral value between -9999999999 and +9999999999 II. 2. 2 Floating Point Variables Numbers represented: Any value between + 10j8 and + 10+38 II. 2. 3 Subscripted Variables (representing elements of arrays). Notation: An integer or floating point variable followed by parentheses enclosing the subscripts. Examples of array elements: BETA(I), X(J, 5), Y(7), N(B + 4*F, Q) WIte: Subscripts which may be constants, variables or arithmetic expressions should be restricted to the integer mode. II.2.4 Arrays Example: BETA, X, Y, N means, the location of BETA(O), X(0), Y(0) and N(O) respectively, i. e., the location of the first elements of the arrays provided that each has been declared to be an array (See Section VI. 3) in which case X and N would be two-dimensional arrays and BETA and Y would be vectors to correspond with the notation in the example of Section II. 2, 3. Note: All variables are assumed to be floating point unless otherwise indicated by a special mode declaration. See Section VI. 2. E-22

A Primer for Programming With the MAD Language II. 3 Arithmetic Operations A number of unary and binary arithmetic operations are available. The arithmetic of the binary operations is integer arithmetic or floating point arithmetic according to the modes of the operands. If both binary operands are integer then integer arithmetic is used. If both operands are floating point, floating point arithmetic is used. If the operands are of mixed modes the operand in the integer mode is first converted to floating point; the arithmetic operation is performed as a floating point operation, yielding a floating point result. II. 3.1 Unary Operations, i. e., operations involving one operand. Two of these are.ABS., and "-". For example:.ABS.A means IAI.Here the operand is A.ABS. (B - C) means lB - CL H.ere the operand iS (B - C) - Q means negative of Q II.3. 2 Binary Operations, i.e., operations involving two operands. These are: +, -, *, /,.P. For example: A + B means A plus B A - C means A minus C A * Q means A multiplied by Q C / D means C divided by D Y. P. X means yX A. P. 2 means A2 II. 4 Precedence of Arithmetic Operations The sequence in which individual terms of an expression are to be evaluated and collected must be, and in the MAD language is, unique by virtue of assigning a precedence value for each of the arithmetic operations. When unaltered by parentheses, the order of arithmetic operations performed within one expression is, in descending order of precedence, as follows: SYMBOL OPERATION NAME.ABS. Absolute value of (Unary). P. Exponentiation Negation (Unary) *, / Multiplication, division +, - Addition, subtraction (Binary operations) Example 1: The expression A + B/C + D.P. E*F - G means B E A + + D X F-G Among operations of equal precedence, grouping will be from left to right. E-23

Example 2: A * B/C * D/E * F means AB (D) kCI B F \ E / Example 3: C(K) + A(3) * B(J)/9. 7 + 3. 5 * P means C(K) + A(3) * B(J)+ 5* P 9. 7 Special note on integer division: It is important to recall that integer division provides no remainder. Thus 3/4 would yield the quotient zero, 5/2 would yield the quotient 2. II. 5 Parentheses Parentheses as used in the usual algebraic sense may be used to override the usual rules of procedure for a given expression frequently for the purpose of simplifying mathematical expressions. Example 1: A * B - C/D + E * F Example 2: (C(K) + A(3) * B(J))/(9. 7 + 3.5 * P) means means AB - -- + EF C(K) + A(3) * B(J) 9.7 + 3.5* P but A * (B - C)/(D + E) * F means A(B -C) F ' (D + E) 11. 6 Functions One powerful aspect of the MAD language is the ease with which one may write expressions incorporating functions of one or more variables. II. 6.1 Functions Available in the MAD Language Certain commonly used functions are automatically available to the MAD translator from a magnetic tape library. These may be called in by name. The method of use may be explained by the following expressions: 1) A-SIN. (B - C) means A-sin (B - C) 2) 4. +ELOG. (R) means 4 + logeR / 2 3) SQRT. (DELX. P. 2+DELY. P. 2) means Ax + a-y2 Function names consist of 1 to 6 alphabetic or numeric characters the first of *rihch must be alphabetic, followed by a period (.). The argument, which may be any arithmetic E-24

A Primer for Programming With the MAD Language expression, follows the function name and is always enclosed in parentheses. Some of the currently available functions are (in floating point): Sine SIN. Cosine COS. Arctangent ATAN. Square Root SQRT. Logarithm to base E ELOG. Powers of E EXP. Additional examples are given below which illustrate that functions of functions are also permissible in this language. There is no restriction as to the nesting of these functions provided correct use is made of parentheses as shown in these examples: 1) A-ELOG. (SIN. (B-C)) means A-ln sin (B - C) 2) SQRT. ((COS. (THETA)). P. 2+(SIN. (THETA)). P. 2) means (cos2 + sin2 )1/2 3) EXP. (SQRT. (COS. (2* THETA)). P. 2+DELTA) means _(cos2 20 +Sd) 1/2 In addition to the simple functions illustrated above, many others are available to the MAD translator and of these many are much more elaborate, being functions of more than one argument. Current lists of the functions, their names and how they should be used are available at the Computing Center. Some of the more elaborate functions available are, for example, solution of simultaneous linear equations and the solution of simultaneous ordinary differential equations by the Runge-Kutta procedure. I. 6. 2 Functions Which must be Defined by the Programmer Himself The MAD language permits the programmer to define for his use functions of any complexity. Two types of function may be defined, one is called an "internal function" and the other is called an "external function. " For a detailed explanation on methods for defining and using each of these types of functions, the reader is referred to Section VII. II. 7 Expressions of Mixed Mode Occasionally the programmer will willingly or accidentally write an arithmetic expression in which individual variables and constants or function values are mixed in mode. That is, some are integer and some are floating point. The MAD translator accepts expressions of mixed mode, but unless the programmer understands the way in which MAD translates these expressions, some confusion may arise. Accordingly, the following remarks are in order: E-25

1.) The programmer should formally avoid the use of mixed mode expressions because the translator is forced to develop object programs which are less efficient than corresponding uniform mode expressions. 2. ) Any mixed mode expression when evaluated results in a floating point number. The beginner should bear in mind, however, that any component parts of the expression which consist of only integer terms will be evaluated using integer arithmetic. The resulting integer, when paired with a floating point value for an arithmetic operation is first converted to floating point and the arithmetic is then accomplished in floating point. II 8 Arithmetic Substitution Statements Substitution statements employ the replacement operator, "=". This section illustrates arithmetic substitution statements. Form: = = meaning, replace the current value of the variable Vwith the current value of the arithmetic expression, ~. If the mode of E differs from the mode of A, convert the value of to the mode of _ before performing the replacement operation. Example 1: VAR1 = VAR2 * CONST4/5 means, "replace the current value of VAR1 by the result VAR2 XCONST4 5 Example 2: ALPHA = EXP. (A(4)*Z. P. 3+A(3)*Z. P. 2+A(2)*Z+A(1)) means, 0( = e(a4Z + a3Z + a2Z + a) Example 3: Y = ELOG. (COS. (THETA))+5. 9 means, Y = ln cos G + 5.9 Example 4: I =+ 1 means, replace I by I + 1 or "update" the contents of I by adding 1 to the value in I. Groups of substitution statements are required when results of more than one expression must be stored. Example 5A: Y = A + B These are equivalent in effect, requiring two statements if X = A + B + C values of both, Y and X are to be stored. Clearly 5B is somewhat more efficient. Example 5B: Y = A + B X=Y+C Example 6A: TEMP = A Accomplishes the interchange of the values of two variables, A and B. B = TEMP E-26

A Primer for Programming With the MAD Language Example 6B: TEMP = T(1) Accomplishes the cyclical displacement or shift by one eleT(1) = T(2) ment of the three elements T(1), T(2), and T(3) of a vector T. T(2) = T(3) T(3) = TEMP IIo 9 Statement Labels It is frequently desirable to assign a name to a statement. This is true not only for arithmetic substitution statements but for all types of executable statements. The programmer should never label non-executable statements (declarations) because a statement which refers to such a label is meaningless and unacceptable to the MAD translator, Statement labels, like variables, consist of from one to six alphabetic or numeric characters, the first of which must be alphabetic. Statement labels may be subscripted. Labels are used in order to refer to a statement in other statements, usually for purposes of altering the sequence of events in a program. Labeled statements may also be thought of as junction points in a program. Use of statement labels is illustrated as concepts of control statements are introduced. III. LOGICAL EXPRESSIONS AND CONDITIONAL CONTROL Conditional control statements and iteration statements which are described below are statements which involve logical expressions. These expressions resemble arithmetic expressions but contain operators which designate "mathematical relations" or logical operations (Boolean operators). A logical expression is characterized by the fact that at any given time this expression can have only one of two possible values, namely, true or false. III. 1 Mathematical Relations A mathematical relation is used to make a comparison. The following are simple logical expressions employing mathematical relations. Examples: 1.) TONY. LE. ALPHA means, the current value of TONY is less than or equal to the current value of ALPHA. 2.) X. G.Y means, X greater than Y 3.) X.G.Y + 3 means, X greater than the quantity Y + 3 Comparisons may be made using any of the following mathematical relations: E-27

SYMBOL MEANING. E Equal to.NE. Not equal to.L. Less than.LE. Less than or equal to G. Greater than. GE. Greater than or equal to III. 2 Logical (or Boolean) Operations Two of the most useful logical operations are: OR. and.AND. Examples of their use in logical expressions are: 1.) X.G.3.AND. Y.LE.2 meaning, X > 3 and(at the same time) Y < 2 2.) A. LE. X. AND. B. GE. Y. OR. C. G. Z meaning, either A < X and (at the same time) B > Y, or C > Z, or both 3.) (X. G. 3. OR. Y. LE. Z). AND. (GAMMA. L. EPSILN) meaning, either X > 3 or Y < 2, or both, and (at the same time) ~ <E. 2._ ) and 3.) are complex expressions involving three relations, but even more complicated expressions are permissible. For example, 4.).ABS. (X1-X2)/X1. LE. EPSILN. AND. F. (Xl). L. EPSILN meaning, (EXl n3 and (at the same time) F(X1) <~ II. 3 Precedence In the evaluation of logical expressions, mathematical relations and logical operations are assigned precedence values in relationship to each other and in relationship to the arithmetic operations as follows: PRECEDENCE SYMBOLS High Arithmetic operations (See Section II for details).. NE.,. G.,. GE.,. L.,. LE. I.AND. Low.OR. III. 4 The Conditional Control Statement Pattern In general, conditional control is accomplished by a pattern of statements rather than by a single statement. Examples will be given with the aid of graphical representations or block diagram sketches. Example 1: The simplest form of conditional control is the case where, when a given logical expression is true, consequence 1 is executed, and when the same logical expression is false, consequence 2 is executed, and the execution then proceeds along the same path regardless of either of the E-28

A Primer for Programming With the MAD Language two consequences. A graphical picture of this conditional is given side by side with an equivalent MAD program pattern: Graphical Sketch MAD Pattern Label Statement I ~ ( B ) true V(*< ~~ I.-,)^ WHENEVER B fal e se Cl Cz Ci OTHERWISE END OF CONDITIONAL In the sketch, the ellipse with the capital letter B stands for the testing of any logical expression, B. If true, execution of consequence C1 is implied. If false, execution of consequence C2 is implied. In either case the end of the conditional is represented by the junction point E from which execution proceeds. The MAD pattern for such a program appears to the right of the sketch. The statement WHENEVER B corresponds to the ellipse, where B represents any logical expression. The statements which follow are executed as consequence one when B is true and are indicated by the line C1. The end of C1 is indicated by the line with the word OTHERWISE which is followed by one or more statements marked C2 executed if B is false. The end of C2 is marked by the junction point END OF CONDITIONAL. A specific example is now given, first shown in block diagram form and then as a MAD program: Example 1A: Sketch of a Specific Example MAD Program WHENEVER X.G. Y Xt. > --— trueY TEMP = Y ( X> Y +ff_ true Y = X -~v s ~~ —I-,J~ oX = TEMP A false OTHERWISE Let Z = Y Interchange Z = Y i nd ALPHA = BETA ALPHA=Bn A and X END OF CONDITIONAL IALPHA=HErA E-29

Other common patterns of the conditional will now be illustrated: Graphical Sketch _MAD Pattern Example 2 WHENEVER B C1 T END OF CONDITIONAL Cl Example 3 WHENEVER B1 C1 7 ^ ~ ~ T ~OR WHENEVER B2 C IF r I OTHERWISE r B2 ^ T Cl C _r B 2 ) — I IEND OF CONDITIONAL Example 4 WHENEVER B1;- -- T C1l B1 T OR WHENEVER B2 (2 ^ F,, OR WHENEVER B3 C^D ---- ^J C~03 ('- — I:2 ~f JI~ | OR WHENEVER BN!3 OTHERWISE ( BN 2)- CN+l END OF CONDITIONAL E30 \ic cN CN+1 E-30

A Primer for Programming With the MAD Language Graphical Sketch MAD Pattern Example 5 WHENEVER B TRANSFER TO ' 3 OTHERWISE END OF CONDITIONAL C2 Example 6 WHENEVER B C1 T T OTHERWISE I B - TRANSFER TO,:. —I -END OF CONDITIONAL @P —' Cl l Example 7 WHENEVER B1 WHENEVER B11 ' B1 L cll ~ ] ---— T OTHERWISE ~ r- -- Ci C12 ^ B11 T END OF CONDITIONAL | |I ' |1 1 OTHERWISE I*2 _ END OF CONDITIONAL ----- E-3 E-31

Graphical Sketch MAD Pattern Example 8 WHENEVER B1 X (any series of substitution statements) W ---- I -r' """ '' WHENEVER B11 (Bl 011c, 11 ~2: I C11 OTHERWISE F I C12 ~~I 1, I I END OF CONDITIONAL -, I l I END OF CONDITIONAL I B11 T F Cil C12 CC1~~~~~~~ 1 _ 1 _ 1 OTHERWISE R _1 _ 1 11 I _ OTWHENEVER I l L - I - -I I END OF CONDITIONAL I B OTHERWISE i' --- -- r I C OHl1 Example 10 WHENEVER B, Q T ~~B~~~~E3 $ —E E-3NDO2CNITOA

A Primer for Programming With the MAD Language Example 2 is the case where there is no special consequence, C2. As a result the statement OTHERWISE is unnecessary and the junction statement, END OF CONDITIONAL, marks the end of C1. A frequent situation requires a multiway branching operation where in the general case for an N-way branch, N-1 logical expressions must be tested. In the sketch for example 3, B1 refers to the first test and B2 to the second test required for a three-way branch. In the MAD Pattern equivalent of the sketch in example 3 the second logical expression, B2, is tested in the OR WHENEVER statement which follows C1. Example 4 sketches the general case of an N-way branch. Examples 5 and 6 illustrate the possibility of combining conditional control with unconditional control which are the statements of the form TRANSFER TO d (See Section IV). Examples 7 and 8 illustrate the nesting of conditionals. Whenever, in the case of a true condition, the consequence contains within it another conditional, we have what is known as nesting of conditionals. Example 9 is an extension of Example 7 showing the nesting one level deeper. In MAD there are no restrictions on the depth to which conditionals may be nested. Alternate Form of Conditional for Special Case: WHENEVER B, Q Example 10 illustrates an alternate program form for the special, but frequent case, shown in the sketch. It may be seen that such a conditional is expressable in a single WHENEVER statement, where the logical expression B is followed by any consequence, Q, which may be any single statement (except certain statements such as, END OF PROGRAM (See Section IV or another conditional). The statement WHENEVER B, Q would have the meaning: if at the time of execution, B is true, then the statement Q is executed. If B is false, just go on. The junction point shown in the sketch, and heretofore marked by the statement END OF CONDITIONAL, is not necessary and indeed should not be used when using the WHENEVER B, Q form, Specific Examples: 1) WHENEVER HIGHT. G. ULIMIT, PRINT FORMAT REMARK means, if at the time of execution the value of HIGHT is greater than ULIMIT (i. e, HIGHT. G. ULIMIT is true), a comment is printed (See INPUT-OUTPUT, Section V) before control is sent to the next statement in sequence. If B is false, Q is ignored and control is immediately sent to the next statement in sequence. 2) WHENEVER A. L. X. AND. B. L. Y. OR. C. G. Z, ALPHA = 5Y + Z means, if at the time of execution, either A < X and at the same time B < Y, or C > Z, or both, set o(= 5Y + Z. Otherwise go on. E-33

III. 5 The Iteration or THROUGH Statement The truth or falsity of the logical expression B, may be used to control the repetition of one or of a group of statements within a program. The form of the iteration statement is as follows: THROUGH,, FOR Lf= EJ, E2, B This statement causes the statement or the block of statements which follow immediately afterwards to be repeatedly executed, each time varying the value of some variable until a specified condition is satisfied. Specifically, the block of statements through and including the one labeled 4 is repeated. This group of statements is called the scope of the iteration. Prior to the first of these repetitions the variable /Vis set to an initial value equal to that of expression E1. Condition B is then tested and, if true, control is transferred to the statement immediately following the one labeled A and the statements of the scope are not executed at all. But if B is false, the execution of the scope of the iteration is performed. Then, prior to each successive repetition, the variable J'is incremented by the value of expression E2o Condition B is then tested again and, whenever true, repetition ceases and control is transferred to the statement immediately following the one labeled Example s: 1) THROUGH RETURN, FOR X=LLIMIT, INCRM, ALPHA. G. BETA means, repeat the statements which follow through and including tte one which is labeled RETURN, each time varying X from an initial value of LLIMIT in increments INCRM until the condition is reached where o(>. When this condition is satisfied, the scope is not repeated and control is transferred to the statement immediately following the one labeled RETURN. The above THROUGH statement might appear in the following sequence of program statements if ALPHA and BETA are assumed to be integers: MAD PROGRAM HELEN ALPHA = 1 THROUGH RETURN, FOR X = LLIMIT, INCRM, ALPHA.G.BETA Y(ALPHA) = A*X.P.2 + B*X + C RETURN ALPHA = ALPHA + 1 This sequence beginning with the statement labeled HELEN will compute BETA values of the function Y = AX2 + BX + C. For Y(1) the value of X is LLIMIT, for Y(2) the value of X is LLIMIT + INCRM, for Y(3) the value of X is LLIMIT + 2 X INCRM, etc. Thus if the current value of E-34

A Primer for Programming With the MAD Language BETA were 23, values of Y(l).. Y(23) would be computed for equally spaced values of X in the range LLIMIT X LLIMIT + 22 X INCRM. The statement labeled RETURN is the scope of the iteration and, each time this statement is executed, control is returned to the THROUGH statement where X is incremented and ALPHA is then compared with BETA. If during any such comparison ALPHA exceeds BETA, control is sent to the next statement following the one labeled RETURN. 2) To evaluate a sum of products, Y =Ci ~ Xi, where i is an integer which runs from 1 in increments of 1 to N, we might write: MAD PROGRAM Y = 0. THROUGH SUM, FOR I = 1, 1, I.G.N SUM Y = Y + C(I) * X(I) INTEGER I, N Note: In this example it is desirable to state that variables I and N are integers. If this is done the execution time is reduced. The mode declaration INTEGER I, N is inserted for this purpose and is described in detail in Section VI. The computer would otherwise assume I and N to be floating point variables. The above two examples may be characterized by the following graphical sketch: The hexagonal figure represents the THROUGH statement with the symbol O( representing the scope of the; o0( - -- y ) iteration. This is followed by the block X consisting of ~I i ~ one or more statements which are to be repeatedly executed X and the circle marked o( represents the location of the scope of the iteration. The dashed line running from the - < _>/ ~ - — scope back to the hexagon illustrates the implied return of control back to the iteration statement. Nested Iterations Iteration loops may be nested, that is, one loop may be nested within another. This, too, may be illustrated graphically. E-35

Structure of a Loop Within a Loop Case a. General Case Case b. Special Case.?- — eI I x case a the block marked Y represents the statement or block of statements repeated! I In case a the block marked Y represents the statement or block of statements repeated in the inner loop whose scope is. The outer loop whose scope is o( has as its block of repeatedly executed statements all the program steps beginning with the block marked X and concluding with the block marked Z. Case a is perhaps the most general form. Either blocks marked X or Z or both may be missing. Case b illustrates this rather important special case. Since block Z is missing, the last statement of the inner loop and the last statement of the outer loop are identical. Therefore the name given for the scope of the inner loop and for the outer loop are identical. Example 3 which follows illustrates this special case in the evaluation of a double sum. 3) To evaluate a double sum M N Z = i (A(J)+ALPHA- B(I)) j=l i=l E-36

A Primer for Programming With the MAD Language MAD PROGRAM Z = 0. THROUGH DUBSUM, FOR J = 1, 1, J.G.M THROUGH DUBSUM, FOR I = 1, 1, I*G.N DUBSUM Z = Z + A(J) + ALPHA * B(I) INTEGER I, J, M, N IV. UNCONDITIONAL CONTROL STATEMENTS Unconditional control statements are essential in MAD programs. Two of these types of statements are given here. IV. 1 TRANSFER Statement Form: TRANSFER TO 4. where ' is the label of a statement to which control is to be transferred. Example: TRANSFER TO SUMX meaning, the next statement to be executed is the one labeled SUMX. The use of the transfer statement permits the programmer to alter arbitrarily the sequence of execution of the program statements. Thus he may cause some statements to be jumped over as illustrated in Example 1, with the forward transfer, or he may wish to cause repetition of certain steps in the program by a return transfer as illustrated in Example 2. Return transfers are frequently required in connection with input-output. Example 1: Forward Transfer MAD PROGRAM BLOCK DIAGRAM WHENEVER Y.G.X, TRANSFER TO GAMMA THROUGH BETA, FOR I = l, 1, I.G.N BETA C(I) = I + 1 GAMMA Z = A + SIN.(X + B) I ___ E-37

Example 2: Return Transfer* MAD PROGRAM BLOCK DIAGRAM START READ FORMAT DATA, A, B, C D = A.P.2 + B.P.2 + C.P.2 -- INPUT WHENEVER D.L. O. PRINT FORMAT REMARK, A, B, C OTHERWISE DATA X = SQRT.(D) PRINT FORMAT RESULT, A, B, C, X END OF CONDITIONAL TRANSFER TO START D=.. 0e0 D. L. 0 T END OF PROGRAM X=~~- ~ I IRE.ARK RESULT IV. 2 END OF PROGRAM Statement Form: END OF PROGRAM Every program must be terminated with this statement, without exception. Since each program is punched onto a deck of cards, each statement being placed on a separate card, the card containing the END OF PROGRAM statement must be physically the last card of the program deck. A program may at any point be terminated by a TRANSFER to the END OF PROGRAM statement. V. INPUT-OUTPUT Input-Output refers to the transfer of information to or from the internal memory of the computer. The MAD language permits information to be transferred to memory from one of several types of input devices and from the memory to one of several types of output devices. However, this discussion will be confined to one form of input and one form of output, namely, input from data punched on cards and output (i.e., results, alphabetic description of the results, general comments, headings, etc. ), on to printed paper. Thus we will discuss only one type of input statement, namely the READ statement and only one type of output statement, namely the PRINT statement. * READ and PRINT Statements used in this illustration will be defined in Part V. E-38

A Primer for Programming With the MAD Language Programming of input implies two parts, an executable part and a declarative part. The executive part is the READ statement itself which serves to denote by name the item or items being transferred from the punched cards to the memory of the computer. The declarative part defines in a precise manner, the exact form in which the information listed in the READ statement is to be found on the data card(s), Thus the (executable) READ statement provides the list and the (non-executable) declaration provides the format of the information being processed. In a like manner programming of output implies two parts. One is an executable part which is the PRINT statement denoting by name the item or items stored in memory which are to be printed out. The non-executable part is a declaration which denotes the exact description of the printed line or group of lines which are to be printed. While the preceding description of input and output and the manner in which it is treated is perhaps an oversimplification, the beginner would do well to form the following general conclusion: For every item or group of items of data to be "read in" the computer, there will be required an input or READ statement and associated with this a format declaration* containing input format information describing the punched cards column by column and card by card. For every item or group of items to be printed out there will be required an output or PRINT statement and associated with it a format declaration containing the required description of how the information is to be printed, column by column and line by line. As will be seen in Section VI entitled DECLARATIONS, the particular type of declaration required to declare format information is called the preset vector declaration which is characterized by the words VECTOR VALUES. Some overlap between the discussion of format in this section and the discussion of declarations is unavoidable. However, discussion here will emphasize the format per se and the discussion in Section VI will emphasize the characteristics of the preset vector declaration in general. V. 1 The Input-Output Statements, READ and PRINT V. 1. 1 READ Statement Form: READ FORMAT,~ meaning, read the list, e,, from cards having a format described in a format declaration which begins with the words, VECTOR VALUES. Example: READ FORMAT MCARD, IDENT, A, B, C, UPPERT, LOWERT meaning, read a card containing the list of six items, IDENT, A, B, C, UPPERT * Different PRINT and READ statements may be paired with the same format declaration, if this is appropriate, but the beginner need not be concerned with this and other less obvious concepts. E-39

and LOWERT. The precise format of the card will be found in the declaration which begins with the words, VECTOR VALUES MCARD. V. 1.2 PRINT Statement Form: PRINT FORMAT <,, meaning, print on paper the list, e, in a format described in the format declaration which be gins with the words, VECTOR VALUES. Example: PRINT FORMAT RESULT, PROBNO, ANS1, ANS2,ANS3 meaning, print on paper the list of four items, PROBNO (problem number), ANS1 (answer 1), ANS2 and ANS3. Format is given in the declaration which begins with the words, VECTOR VALUES RESULT. V. 1.3 Lists Elements of a list are separated by commas. Elements may be single variable names or array names with subscripts. Example of a list: AB, D, P(14), J(I, K), J(25*I-L), A(K+1), A(L*2). Also, an element may consist of a block of consecutive elements in an array (which may even be the entire array). The entire 10 X 9 array, A(I, J), would be printed out if an element of the list is written as A(1, 1)...A(10,9) The first 5 rows would be printed out if the element were written as A(1, 1).. A(5, 9) V. 1.4 Examples Two simple programs emphasizing input and output but not yet showing the required format declarations are given here. Example 1: Summing positive terms of a series ai(il, 2,...n) Example 2: SUmming positive and negative terms of a series ai(i=l,2,...n) separately and printing the absolute value of individual sums as well as the algebraic sum of all terms. E-40

A Primer for Programming With the MAD Language MAD PROGRAM FOR EXAMPLE 1 MAD PROGRAM FOR EXAMPLE 2 PRINT FORMAT TITLE START READ FORMAT AI,N,A(1)...A(N) START READ FORMAT AI,N,A(1)...A(N) PRINT FORMAT DATLE, N,A(1)...A(N) SUM = 0. SUMPOS = 0. THROUGH BETA,FOR I=1,1,I.G.N THROUGH BETA, FOR I = 1,1, I.G.N WHENEVER A(I) *L. O. WHENEVER A(I).L, O. TRANSFER TO BETA SUMNEG = SUMNEG + A(I) OTHERWISE OTHERWISE SUM = SUM + A(I) SUMPOS = SUMPOS + A(I) BETA END OF CONDITIONAL BETA END OF CONDITIONAL PRINT FORMAT SUMPAI, SUM PRINT FORMAT RESULT,SUMPOS,.ABS.SUMNEG TRANSFER TO START 1,SUMPOS + SUMNEG END OF PROGRAM TRANSFER TO START END OF PROGRAM BLOCK DIAGRAM FOR EXAMPLE 1 BLOCK DIAGRAM FOR EXAMPLE 2 PRINT TITLE -(-s, [STARTS, ____~SEAR pART ' i H J [ READ A (I).( L. O T F (A(I).L.O),F PRINT V1/ SUMPAI T PRINT RESUL Each input and output statement in the two examples will be discussed in the order of their appearance. For Example 1, the first input-output statement is the one appearing as: PRINT FORMAT TITLE E-41

Note there is no list to this PRINT statement. This illustrates a case where the list is empty and the sole purpose of the statement is to print a title the wording of which would be found in the declaration VECTOR VALUES TITLE... This PRINT statement appears before the read-in of any data. The title is to be printed once for many sets of data and results. The next statement to be considered is the one labeled START. START READ FORMAT AI, N, A(1)...A(N) Information is to be read in from cards containing numerical value of N, which is the total number of values of A to be read in, and the sequence of values A(1) through and including A(N). The last input-output statement in this example is the one which reads PRINT FORMAT SUMPAI, SUM The list consists of the item SUM which is the result of this calculation and is to be printed out according to the description given in the associated FORMAT declaration. In Example 2, the first line contains a READ statement similar to the one in Example 1. The next line is a PRINT statement for the purpose of printing out the data read in. This is always recommended to verify that the proper data was stored correctly in memory and serves also as identification for the results. The last PRINT statement is of some interest. It reads as follows: PRINT FORMAT RESULT, SUMPOS,, ABS. SUMNEG, SUMPOS + SUMNEG Note the list consists of three items, SUMPOS, the absolute value of SUMNEG, and the expression SUMPOS + SUMNEG, illustrating that items of the list may be either single variable names or expressions. In this case the last two items on the list have not been previously computed, but since SUMPOS and SUMNEG have been computed, values of expressions involving these quantities may be called for as items of the printout list. Occasionally a statement is so long as to require more than one punched card. Such might be the case in the above PRINT FORMAT RESULT statement. MAD places essentially no restriction on the length of the statement, however, when a statement requires more than one punched card the statement is continued on successive cards anda continuation mark such as the digit 1 is used (in column 11 of the card) to indicate such a continuation. The continuation code or symbol is always placed immediately to the left of the space provided for the statement or declaration in question. Further details on this are given in Section VIII, CLERICAL DETAILS FOR PREPARATION OF PUNCHED CARDS. E-42

A Primer for Programming With the MAD Language V. 2 Specifying Format for Numerical Information When information is read from a card into the computer it is necessary to know how this information has been allocated among the available columns of the card. Similarly, whenever information is to be printed, it is necessary to know how this information is to be allocated among the columns on the printer. There are 80 card columns and 119 printer columns effectively available for input-output information. A format declaration provides a description of the allocation of available card or printer columns and the form in which the particular information is to appear. V. 2. 1 Internal-External Conversion Codes for Numerical Data or Results Specifying the form of a number entering or leaving the computer implies a conversion, internal to-or-from external. Three basic types are: Code Internal (Binary) To-or-From External (Decimal) E FLOATING PT. FLOATING PT. WITH EXPONENI F FLOATING PT. FLOATING PT. WITHOUT EXPONENT I INTEGER INTEGER The beginner will not be concerned with details of the internal binary forms of numerical information, but only with the external decimal forms, V. 2, 2 The External Form of Numerical Input and Output Information Integers (I Fields) Integers are printed out or punched on cards for input directly, without any decimal point, such as + xxx See also Section II. 1. 1 Floating Point With Exponent (E Fields) Form: + 0. XX2X3X4X5 E + nln (if 5 decimal places are requested, for example) The decimal point may be located anywhere within the number on input but is always placed immediately to the left of the leading significant digit on output. Floating Point Without Exponent (F Fields) Form: + X1X2X3 ' X4X5X6X7X8 (if 5 decimal places are requested, for example) Decimal points always appear on output of E and F fields although their use is optional on input. The convention for "+" signs in I, E and F type fields is the same, namely: "+" signs are optional on input but never appear on output. E-43

V. 2. 3 Field Specification A field specification for an I, E or F field consists of one of these letters followed by an integer which indicates the size of the field, i. e., the number of available columns to be used. For example, 13 indicates a 3-column integer field. For E and F fields the specification requires an additional integer giving the number of places after the decimal point that are to be rounded and printed (output) or read (input). Some illustrations are given for input: Number Punched on Card Field Specification Understood as +9032 F10.2 +90.32 +9032E3 E10.4 +.9032 103 +9.032E3 E10.4 +9. 032 X 103 9032 14 +9032 -9032 15 -9032 -9032t I6 -90320 Note: 1. On E and F input fields, data cards need not have the decimal point punched. If the decimal point is not punched, the field specification determines the position. If the decimal point is punched, it completely overrides the setting of the point given by the field specification. 2. All blank columns on input cards are considered as zeros. V. 2.4 Format Declarations We will now give the form and structure of format declarations with the aid of three examples. Example 1: Suppose we wish to read in variables A, B, C, J, K punched on a card whose format is shown in the diagram. EXAMPLE DATA CARD FORMAT* XXXXXXXX XXXXXXXX J A B C J K X 12 12 12 3 3 38 12 13 2q t. 36 Zi S t A, B, and C are punched as F-fields. J and K are integers. If the input statement were READ FORMAT DATA, A, B, C, J, K then the format declaration might appear as * In the card picture shown here the numbers below A, B, C, J, K and X are the number of colinna allocated for each field respectively. Contents of the X field represents blank or extraneous information which is to be ignored. E-44

A Primer for Programming With the MAD Language VECTOR VALUES DATA = $F12.4, F12. 4, F124,13. I3$ or VECTOR VALUES DATA = $3F12 4,213*$ Each of these format declarations describe data cards, which begin with 3 F-fields, each twelve columns long (with the decimal point assumed to be 4 places from the right end of the field but not punched), followed by two integer fields each three columns long. Note: The asterisk symbol, (*), must be used to mark the end of the format vector. The dollar symbol ($) must always appear to the left and right of the format vector as shown here. These $ symbols delimit any vector composed of a mixture of alphabetic and numeric characters. The order of the elements of the list reading from left to right must be in one to one correspondence with the fields to be read from the card, proceeding from left to right. This correspondence must also exist for elements of an output list (left to right) and the appearance of the numbers on a printed line (left to right). If the list is so long that more than one card for input or more than one line for output is required, the correspondence is in the sense of left to right for the first card or line, left to right for the second card or line, and so on for all cards or lines. Example 2: If the same list in Example 1 were to be printed out instead of being read in, an output statement would be required such as: PRINT FORMAT RESULT, A, B, C, J, K A suitable format declaration might appear as VECTOR VALUES RESULT = $3F14. 4, 215*$ Here the size of the fields are each increased by two positions in order to assure adequate space between the items printed in the interest of readability. Leading Zeros in an element of a list which is to be printed are always suppressed. If the value of A in the above example is 42. 72 it will appear on the printed page as 42. 7200 even though more spaces are available to the left of the decimal. Trailing zeros are not suppressed, however. Example 3: Suppose we wish to print out computed values of variables X, Y and Z along with the first 4 rows of a 7 row X 4 column array, K(I, J). Values for X, Y and Z are to be printed on the top line with decimal point two places from the right, while values for K(I, J) are to be arranged four elements per line with decimal points four places from the right as shown in the sketch. E45 E-45

line no. Printed Printed 1 XXXoxx xxx xx XXX. xx Result 2 x. xxxx XXe xxxx -Xe xXxxx Xo xxxx Sheet Shet3.xxx xxxxx x xxxx -.xxxX 4 -xx. XXXX. XXXX -XX. XXXX X. XXXX 5 X.XXXX X XXXX X XXXX X. XXXX 6 If the output statement were either PRINT FORMAT ANSWER, X, Y, Z, K(1).. K(16) or PRINT FORMAT ANSWER, X, Y, Z, K(1, 1)... K(4, 4) then a suitable format declaration would be VECTOR VALUES ANSWER = $3F10. 2/(4F10. 4)*$ The parentheses are used to indicate repetition of format description contained within the parentheses, on the second and on all succeeding records (lines) until the list is exhausted. V. 2. 5 Record Spacing A slash ( / ) may be used in the format vector to denote the end of t.record. An input record is the 80 column card. An output record is the 120 column line the last 119 of which may be printed and the first of which is used for control of paper spacing (See Section V. 2. 7). When the format vector describes input, the slash denotes the end of a card. When the format vector describes output, the slash denotes the end of an output record or the end of a line being printed. Thus on output, line spacing is controlled by use of the slash ( / ) in the format vector. In the above example the slash ( / ) specifies the end of the first line. A double slash (//) would be interpreted as the end of a line followed by one blank line and a triple slash (//) would be interpreted as the end of a line followed by two blank lines, etc. V.2.6 Skip Fields (S-Fields) When one or more columns of a card record or line record are to be ignored or skipped we designate this group of columns as a skip field and we indicate in the format vector that these fields are to be skipped with the specification Sxx where xx is the integer representing the number of columns to be skipped. (The S-field will be illustrated in later examples. E-46

A Primer for Programming With the MAD Language V. 2. 7 Printer Carriage Control The first position of the 120 position output record is always used as a code for printer carriage control and never for printing. Thus the first print position is actually the second position of the output record. The most important carriage control code is the blank (3) which controls the paper to advance or space one line in the vertically upward direction. Other codes are given in Appendix G. The beginner should see to it that each output record begins with a blank (Q). This can be most easily assured by making the first part of the output format vector a skip-field of one or more columns. Alternately, if the first item in the vector is to be an I, E or F field specification, then one must provide more than enough columns in the field to print the given number and its sign. Since leading zeros are suppressed, one blank (e) will consequently be forced into the first position of the output record. V. 2.8 Discussion The foregoing rules for describing format for input and output were illustrated only to a limited degree. The basic approach of format specification is to provide maximum flexibility to the programmer. Hence, to provide the beginner with a full appreciation of these inputoutput rules would require too large a group of illustrations to be permissible here. However, to assist the beginner, the additional illustration given below will emphasize the concept of input-output flexibility per se. Consider the following problem. We desire to have the program read in the series of values designated as A(1),. A(N) where N is some integer stored in memory at the time these data are to be read in. Writing the READ statement is simple. We may write, for example, READ FORMAT DATA, A(1).. A(N) where DATA is the name given to the format vector around which discussion will now center, There is a large number of choices as to how to punch values of A(l)...A(N) on to the data cards. For each card pattern we select, however, we must be sure that the format vector called DATA contains an accurate description of this pattern. Let us further restrict the problem to say that every element of the A vector is to be punched in the same nume rical form, say, as an F10. 3 field. Since there are 80 columns on the card we have the freedom to punch up to 8 items per card. However, if we choose a card form permitting fewer than 8, the possibilities as to the locations of these fields can become numerous. Thus with up to 6 fields per card, the 20 remaining spaces may be located anywhere on the card. They may all be placed to the left of the first item in columns 1 through 20; they may all be designated E-47

to the right of the last item, column 61 through 80; or they may be scattered anywhere and in any arrangement in and around the 6 items. A few of the possible card patterns and the corresponding required format vector descriptions are given below: ILLUSTRATING FLEXIBILITY IN CHOICE OF CARD FORMAT Case A: Fixed Pattern for All Data Cards No. of A's Example per Card Card Design* Required Format Vector 1 5 1A A A A A A $5F10.3*$ 10 10 10 10 10 30 2 6 $X A A A A A A $S20,6F10. 3*$ 20 10 10 10 10 10 10 3 4 X A x A X A X A X $S4, F10. 3,S4, F10. 3,S4, F10. 3,S4, F10. 3*$ 104 10 4 10 4 0 1 24 4 3 AX A A X X A X $S5,F10. 3,S6,F10.3,S10, F10.3*$ 5 10 6 10 10 10 29 Case B: Patterned Pattern for Data Cards No. of A's Example Per Card Card Design* Required Format Vector 5 3 and 7 A A A X $(3F10.3/S10,7F10. 3)*$ repeated cyclically 0 10 10 50 XAAAAAAA 10 10 10 10 10 10 10 10 * In each card picture the numbers below X and A are the number of columns allocated for each field respectively. Contents of X fields (which may be blank or contain extraneous information) are to be ignored. E-48

A Primer for Programming With the MAD Language Case B - ContinuedNo. of A's Example Per Card Card Design Required Format Vector 6 1, 2and4 X A X $(S20,F10. 3/2F10. 3/S40, repeated 4F10. 3)*$ cyclically 20 10 50 A A X 10 10 60 X A A A A 40 10 10 10 10 7 3 on the A X A AX A X$F10. 3,S6,F10. 3,S4, F10. 3/ first card, (7F10. 3)*$ and up to 7 10 6 104 10 40 on all suc- _ ceeding cards. (A A A A A A A X 1010 10 10 1 10 10 10 all succeeding cards One could in a like manner show many possible ways to print out from memory this same list of items, A(1).'. A(N). One would simply substitute "line design" for "card design" and bear in mind that the line has 119 printer columns whereas the card has only 80. Otherwise the principles are essentially the same excepting for the additional requirement of carriage control mentioned in V. 2, 7 V. 3 Hollerith Fields It is possible to provide for printing of alphanumeric words and phrases along with the output variables to better identify the results. Such printing is defined as a so-called Hollerith or H-field. Use of Hollerith fields in identifying output is frequently desirable, but optional, especially for a beginner. Example: Suppose we wish to print out two numbers, A and B and properly identify them. Suppose A i s the difference between a computed and an observed value of a function and may properly be called the ERROR. Also, suppose B is the number of iterations required to achieve the ERROR A. Hence we wish to print a line of the form E-49

AFTER B ITERATIONS, ERROR IS A where B and A are the actual numerical values of B and A respectively at the time the computer prints this line. Suppose in this case that B is a 3 digit integer and A is to be printed with an F8. 2 field specification. The output statement might read: PRINT FORMAT Q, B,A and the corresponding format declaration would be VECTOR VALUES Q = $6HOAFTER I3, 21HHITERATIONS,, ERRORQIS F8. 2*$ Careful inspection of this format vector reveals: 1) An H-field is of the form: sssHhh... hh where sss is a space count. May be any integer up to 120. H is the symbolidentifying the Hollerith field. hh,.o hh is the contents of the sss spaces immediately following the letter H. hh... hh includes all blanks and special characters, i. e., all blank spaces shown as the symbol (a) must be included in the space count. 2) Any character lying within the Hollerith field, i. e., any character found within the sss spaces following the H will be printed exactly as punched on the declaration card. Spaces following the H may include all card columns of the declaration card up to and including column 72 of the card and resuming again on column 12 of the next card. 3) Since the left-most position of a printed line is used for carriage control, in this example the space preceding AFTER must be a blank (C) (or any other carriage control code. See Appendix G). 4) "13" specifies the form of print-out for B and "F8. 2" the form for A. V. 4 Input-Output Summary We will terminate the discussion of input-output by completing the discussion of examples 1 and 2 first given in Section V. 1.4. In these examples no details were suggested for input data card or printout sheet design. The programmer would be expected to select a card format for his data and upon making such a selection could now add to the program the appropriate format declaration. Input Decisions: We will now assume the programmer has made the following decisions for input: E-50

A Primer for Programming With the MAD Language 1) The quantity n, the number of terms in the series ai, is to be an integer whose largest possible value is 999. 2) All values of ai;are to be punched in fields of six columns each (decimal point not punched) with the largest possible value of ai being 999. 99 3) The data cards for one problem are to be designed as follows: X(ignore) First Card 3 77 (columns) A A A A A A A X Second and all Succeeding Cards 6 6 6 6 6 6 6 38 These decisions permit us to write the format declaration as follows: VECTOR VALUES AI = $I3/(7F6. 2)*$ When the READ statement is executed in Example 1, data cards of the above design are read in order to satisfy the input list. The first item on the list is N and the format vector declares that the first item is a three digit integer (13). The slash ( / ) following I3 of the vector indicates this is the end of the record or, in other words, "There is nothing else on this first card. Proceed to read the next card. " The remaining items on the list, A(l) through A(N) are read from cards having the description 7F6. 2, meaning these cards have up to seven fields, six columns each reading from left to right. Thus if N were 64, a total of eleven data cards would be required. The first card would contain N, the next 9 cards, each containing 7 values of A, and the eleventh card containing the 64th and last value of A. In reading one card after another the computer correctly anticipates the pattern of each succeeding card. The quantity 7F6 2 is enclosed in parentheses, hence, after the second data card is read, the third and all succeeding card patterns are taken to be the same as that which is enclosed in the parentheses. Taking a simple numerical example where N is equal to 4 and A(1)...A(4) are -53 95, 7.29, 197. 63, and 17. 77, the following would be the appearance of the required two data cards. E-51

0(4 ~ ------------ blank (3-5395 OuQ729319763 D1777 blank Output Decisions: The programmer would also be expected to make a decision as to the appearance of the output for this problem. We will assume the following output format has been selected: This position corresponds to the first of the 119 print positions. Ia DalSUMQOFQPOSITIVE TERMSOIND A DSERIES DIPOSITIVEEISUMo = xxxx. xx Q0POSITIVEISUMOl = xxx. xx InPOSITIVELSUMcl= xxx. xx e The required format declarations for the two PRINT statements in Example 1 corresponding to this desired appearance would be: For the first print statement, col 12 co 72 VECTOR VALUES TITLE = $S5,33HSUMQOFDPOSITIVE.DTERMSOINDAOSERIE 1 S/*$ and for the second print statement: VECTOR VALUES SUMPAI = $S3,14HPOSITIVE SUMO=F8. 2*$ The skip fields shown in each of these declarations accomplish both vertical carriage control and left margin control. For example, the S3 causes the page to be spaced up one line because S3 forces a blank in the first position of the output record, A left hand margin is stipulated by the remaining two positions of the field. Thus the word POSITIVE is printed beginning in print position number 3. A double space is accomplished between the TITLE line and the RESULT lines by placing a slash ( / ) following the 33 position Hollerith field of the first format vector. The slash in that position marks termination of the first printed record and the asterisk identifies the end of the second E-52

A Primer for Programming With the MAD Language printed record. The second printed record, however, is empty. By way of summary we will again present Example 1 here, this time with the format declarations included: MAD PROGRAM PRINT FORMAT TITLE START READ FORMAT AI, N, A(1)...A(N) SUM = 0. THROUGH BETA, FOR I = 1,1, I G. -N WHENEVER A(I) *L. 0. TRANSFER TO BETA OTHERWISE SUM = SUM + A(I) BETA END OF CONDITIONAL PRINT FORMAT SUMPAI, SUM TRANSFER TO START VECTOR VALUES TITLE = $S5, 33HSUM OF POSITIVE TERMS IN A SERI 1ES/*$ VECTOR VALUES AI = $I3/(7F6.2)*$ VECTOR VALUES SUMPAI = $S39 14HPOSITIVE SUM = F8.2*$ INTEGER N, I DIMENSION A(999) END OF PROGRAM Note that the location of the non-executable declarations iis;immaterial as long as it appears ahead of the END OF PROGRAM statement. Two additional declarations are included here in order to properly complete the program. These declarations are discussed below. VI. DECLARATIONS (NON-EXECUTABLE) Declarations are non-executable statements and, with one exception not dealt with here, may occur anywhere in the program. The purpose of a declaration is to furnish information to the translator program or to the reader of the program. Declarations, like other statements, may have statement labels but, because they are non-executable, they are ignored by the translator and hence it is advisable never to label declarations. VI. 1 Remark Declaration A remark declaration consists of any string of characters acceptable to the computer. This statement is completely ignored by the MAD translator and serves merely to furnish commentary information to the reader of the program. Every card of the remark declaration must have an "R" in col 11. Example of a card containing a remark statement: RTHIS IS A TRIAL PROBLEM......COMPUTER Col 11 Col 12 Col 72 E-53

VI. 2 Mode Declaration Unless otherwise declared, all variables encountered by the translator are assumed to be in floating point mode. Therefore, it is necessary to declare the mode of any special variables such as integers which are not floating point. This is done with a mode declaration the first word of which is the declared mode, following which is the list of variables whose values are to be in that mode. Example: INTEGER A, B, I meaning, variables A, B, and I are in the integer mode. VI. 3 DIMENSION Declaration Array variables, such as vectors, or matrices of two or more dimensions, must be declared to be array variables. VI. 3. 1 Vectors A special and simple convention is adopted for declaring vectors which are one-dimensional arrays. Form: DIMENSION V(M) meaning, the array J/is specified as consisting of M+1 elements, where M is a positive integer constant (never a variable name) specifying the largest subscript which an element of the array is expected to assume. Example: DIMENSION W(10) meaning, the array W is specified as consisting of the eleven elements W(O)...W(10). The symbol for the first element, W(0) is equivalent to the symbol W, whenever, as in this case, W is declared to be an array. VI. 3.2 Matrices of Two or More Dimensions Each array is stored in a region whose elements may be referred to by means of a single subscript called a "linear subscript," such as A(0), A(1), B(16), etc. Elements may be referred to not only by these linear subscripts but also by the usual matrix notation, such as A(1,1), A(I,J), B(I+6,J/3+3). All subscripts for matrices of two or more dimensions must be constants, variables or arithmetic expressions which are in the integer mode. Two dimensional matrices will be stored inside the computer in the order: a 11 a12, a13o,...aln, a21,.,aZn,... e,amn. In general, matrices are stored in the order determined by varying the right-most subscript first, then the next right-most, etc. E-54

A Primer for Programming With the MAD Language Form: DIMENSION '(M, D(k)) meaning, the array ', is specified as consisting of M+l elements, where M is a positive integer constant specifying the largest linear subscript which an element of the array is expected to assume. D(k) is an element of a special dimension vector, D, which defines additional descriptive parameters of the arrayS In general, for an N dimensional array, l, the contents of the dimension vector, D, will be as follows: Location Contents D(k) N (number of dimensions of the array) D(k+l) Location in 6/reserved for the base element, i. e., the linear subscript in "of the element with array subscripts all 1, This will usually be the integer 0 or 1. D(k+2) Number of columns D(k+3) Number of layers (if N > 3) D(k+4) Number of layers (if N > 4) D(k+n) Number of layers (if N = n) Note: The D vector itself should be declared in some DIMENSION declaration with highest subscript at least k+N. D(k) will be automatically treated as being in the integer mode, no mode declaration being needed. Example 1: A Two-dimensional Array Consider a matrix, PAT, which can have up to 9 rows and 10 columns for a total of up to 90 elements. The DIMENSION declarations required might be: either DIMENSION PAT (90,DIM(1)) DIMENSION DIM (3) or, alternately, DIMENSION PAT (90,DIM(1)),DIM(3) As many variables as desired may be "declared" in any single DIMENSION declaration. In this example the name of the special dimension vector has been called DIM, and the value of k was selected to be 1. The contents of DIM must be as follows: Location Contents Explanation DIM(l) 2 Number of dimensions DIM(2) 1 If base element is to be located in PAT(l) DIM(3) 10 Number of columns E-55

These values may be read into these locations from cards, computed, or preset. (See "presetting vectors" below). Example 2: A Three-dimensional Array Consider a matrix, TENSOR, which can have up to 3 rows, 4 columns and 5 "layers," for a total of up to 60 elements, and whose base element may be located at any of 21 consecutive locations. The DIMENSION declaration required might be: DIMENSION TENSOR (80, DIMVEC(5)), DIMVEC(8) where the contents of DIMVEC are preset as follows: Location Contents Explanation DIMVEC(5) 3 Number of dimensions DIMVEC(6) 21 If the base element is located in TENSOR(21) DIMVEC(7) 4 Number of columns DIMVEC(8) 5 Number of layers Contents of DIMVEC(1)...DIMVEC(4) may contain the parameters of a different array, or for that matter any information not having to do with the array called TENSOR. VI. 4 Presetting Vectors with Numerical Information Any vector or portion of a vector (or array when described by its linear subscripts) may be preset by a declaration of the following form: VECTOR VALUES V= Cg, C1,.. C Here i'is an element of a vector of the form V(n) or V if n = 0. The elements V(n)... V(n+f) are preset to the values Co, C1,.. Ca, where Ci must be constants. Note: V is automatically set to have the same mode as Co and given a storage reservation of n+A+l locations, i. e., this is equivalent to writing DIMENSION V(n+, ) which need not then be written. Example 1: We wish to preset the DIM vector in Example 1 of Section VI. 3 above. The proper preset vector declaration would be: VECTOR VALUES DIM(l) = 2, 1,10 Example 2: We wish to preset a portion of the DIMVEC vector as required in Example 2 of Section VI. 3 above. The proper preset vector declaration would be: VECTOR VALUES DIMVEC (5) = 3, 21, 4, 5 E-56

A Primer for Programming With the MAD Language VI. 5 Presetting Vectors with Alphanumeric Information Alphanumeric information is stored in memory in a binary coded form. Although details of this coding are unnecessary information for the beginner, it is helpful to know that any group of six alphanumeric characters, when coded in binary form, occupies one full word of memory. Format description, as already discussed, is basically alphanumeric in nature. Thus, if we wish to store a series of alphanumeric quantities describing format, this material in binary form would, in general, occupy a sequence of memory locations, each containing up to six characters of the format description. It is for this reason we have referred earlier to the format vector. Since format information is to be stored as a vector, declaration of this format information is in the form of a preset vector declaration similar to that for numeric information. The difference in presetting vectors with alphanumeric information is we must signal the MAD translator that the information is alphanumeric and this is done by embracing the information with dollar signs. That is, the dollar signs may be thought of as codes representing left and right parentheses delimiting the alphanumeric information. Example: VECTOR VALUES SUMPAI = $3 14POSITI OSU sF8*$ Individual memory locations SUMPAI() SUMPA(2) SUMPAI(4) wherein format information SUMPAI(1) SUMPAI(3) is stored. This declaration was used in the example in the preceding section. We declare that the format information is to be stored in a vector whose name is SUMPAI. The information enclosed in the dollar signs is to be broken up and stored six characters to the word beginning in SUMPAI(O) as shown. Thus in this example five locations, SUMPAI(O)... SUMPAI(4) are required to store this information. The last word, not being entirely utilized, is filled out with blanks. VII. DEFINING INTERNAL AND EXTERNAL FUNCTIONS The reader has already been introduced to the concept and the use of functions in Section II. 6. The purpose here is to show the reader how functions, not available in the library or not available in the form of standard package programs, may be defined. The INTERNAL FUNCTION is the name given to a function defined and used in the main program. The EXTERNAL FUNCTION is the name given to a function and used in the main program but defined as a separate or external program and translated separately. VII.1 Defining Internal Functions There are two types of internal functions. First there is the class of internal functions which may be defined in a singl e program statement of a form: INTERNAL FUNCTION (. (Xn, X2,.., Xn) = ) (X1, X2...,Xn) E-57

Here 4. represents the name of the function being defined followed by a list of the one or more dummy arguments, set off by commas if more than one, enclosed in parentheses. The right side of the equal sign represents any valid expression,, involving the same arguments. Several specific examples are given: Function Dummy Example No. Name Argument(s) Function MAD Language Definition 1 SUMSQ. x, Y, Z x2+y +Z-T2 INTERNAL FUNCTION SUMSQ. (X, Y, Z)=X*X+Y*Y+Z*Z-T*T 2 D. X 2X3+AX2-C INTERNAL FUNCTION D. (X) k3X2 +2AX+C =(2. *X. P. 3+A*X. P. 2-C)/ (3*X. P. 2+2*A*X+C) 3 POLY. N, X, FN. FN. (J' X)N-X/A INTERNAL FUNCTION POLY. (N, X, FN. )=FN. (J*X). P. N-X/A Defining Internal Functions in the General Case Whenever a function definition requires more than one statement, a prescribed pattern of declarations and statements must be followed. The pattern consists of beginning and closing declarations embracing the defining statements. The embracing declarations are: INTERNAL FUNCTION (X1, X2,... XN) and END OF FUNCTION where X1, X2,...,XN is the list of dummy arguments (one or more) of the function being defined. The defining statements themselves must include at least one statement which accomplishes entry to the function -. being defined and at least one statement which accomplishes return from the function with the results in 0R. The statements are: ENTRY TO. and FUNCTION RETURN The pattern is as follows: E-58

A Primer for Programming With the MAD Language a. Single entry and return b. Multiple entry and return MAD PATTERN MAD PATTERN INTERNAL FUNCTION (X1, X2,.., XN) INTERNAL FUNCTION (X1, X2,..., XN) ENTRY TO. ENTRY TO 1e ENTRY TO 2e FUNCTION RETURN T e e END OF FUNCTION FUNCTION RETURN FUNCTION RETURN 2 END OF FUNCTION Example 1: Define the function SUMPOS. which computes the sum of positive values of a series of elements A(M)...A(N), where M < N. Arguments will be the integers M and N, and the vector A. MAD PROGRAM* fary~ INTERNAL FUNCTION (MNgA) ENTRY TO SUMPOS. SUM = 0. THROUGH BETA, FOR I = M,1, I.G.N WHENEVER A(I) *L. O. TRANSFER TO BETA OTHERWISE r'~/ \SUM = SUM + A(I) BETA END OF CONDITIONAL y~~~/ |FUNCTION RETURN SUM:/ END OF FUNCTION We may wish to use this function in a program which requires sums of certain positive elements in a vector B: MAD PROGRAM DIMENSION B(150) START READ FORMAT DATA, N, B(1)...B(N) PRINT FORMAT RESULT, SUMPOS.(1,N/3,B), SUMPOS.(1,N/29B), 1SUMPOS.(1,N,B), SUMPOS.(N/3,2*N/3,B) INTERNAL FUNCTION (MN,A) lie go. END OF FUNCTION VECTOR VALUES DATA = $ I3/ (7F10.2)*$ VECTOR VALUES RESULT = $4F15.2*$ INTEGER INM TRANSFER TO START END OF PROGRAM * The special declarations and functions explained earlier are underlined for emphasis. E-59

Example 2: We may wish to define the functions SUMPOS. and SUMNEG. in the same INTERNAL FUNCTION definition pattern. SUMNEG. is the sum of negative elements in the series A(M)...A(N), and SUMPOS. is as above and M <N. Here is an example of an INTERNAL FUNCTION defined with two entries and one return: MAD PROGRAM INTERNAL FUNCTION (MINA) ENTRY TO SUMPOS. TRANSFER TO JOIN ENTRY TO SUMNEG. JOIN SUMN = 0. SUMP = 0. THROUGH BETA, FOR I = M,1, I *G. N WHENEVER A(I).L. 0. SUMN = SUMN + A(I) OTHERWISE SUMP = SUMP + A(I) BETA END OF CONDITIONAL FUNCTION RETURN SUMP + SUMN END OF FUNCTION We may wish to use these functions in a program as follows: MAD PROGRAM DIMENSION B(200), BB(300) INTEGER N, NN, I START READ FORMAT DATA, N, B(1)...B(N) READ FORMAT DATA, NN, BB(1)...BB(NN) VECTOR VALUES DATA = $ I3/ (7F10.2)*$ {I~ ~ PRINT FORMAT RESULT, SUMPOS.(1IN/3,B) + SQRT.(.ABS. 1SUMNEG.(NN/3, 2*NN/3, BB) ) VECTOR VALUES RESULT = $F15.2*$ INTERNAL FUNCTION (M,NA) END OF FUNCTION TRANSFER TO START END OF PROGRAM VII. 2 Defining External Functions External functions are separate and complete programs having the same pattern as internal function definitions except that the opening declaration is of the form: EXTERNAL FUNCTION (X1, X2,.... XN) For additional understanding of these definitions, see the MAD reference manual. VIII. CARD FORMATS FOR MAD PROGRAM DECKS A MAD program deck usually consists of the following sequence of cards and colors: 1) Two identification cards. Yellow 2) An asterisk card containing the information "*COMPILE MAD EXECUTE" Blue 3) Statement and declaration cards of the MAD program Pink Stripe 4) An asterisk card with the information "*DATA" Blue 5) One or more data cards or data card sets. Pink Stripe In the event that the program does not contain any READ statements, items 4 and 5 would be unnecessary, In the event that one or more external functions are defined, a somewhat different sequence would be required as follows: E-60

A Primer for Programming With the MAD Language 1) Two identification cards. 2) An asterisk card containing the information "*COMPILE MAD EXECUTE" 3) Statement and declaration cards of the MAD program 4) An asterisk card containing the information "*COMPILE MAD" 5) Statement and declaration cards of the first external 6) Same as 4 and 5 for second external function if any. (n-l) An asterisk card with the information "*DATA" (n) One or more data cards or data card sets. It will be seen that regardless of the sequence of cards in the program and data decks, only three basic card forms are required, one for the identification card, one for the asterisk card and one for the statement and declaration cards. Data cards have no special format and are designed by the individual writing the program. The format for the identification card is as follows: All columns not specifically described should be blank. For all numerical fields, leading zeros must be punched. Columns Contents 2-24 Name 32-36 Project Number 39 Student Problem Number 46-48 Estimated Translation Time (Minutes) 52-54 Estimated Execution Time (Minutes) 58-60 Estimated Pages of Results 64 1 = Production Run 2 = Check Run 58-70 Estimated Cards Punched During Execution 73-80 Identification The format for the asterisk card is as follows: An asterisk must be punched in column 1. (No other type of card may have an asterisk in column 1). Following the asterisk in column 1, but disregarding spaces, the words COMPILE MAD, EXECUTE or COMPILE MAD or simply DATA may be punched anywhere on the card up to but not beyond column 72. The format for the statement and declaration cards is given below: I I.,L. I 73 to Statement Card No. Label <Statement or Declaration or other Ident. * Column 11 may contain a code denoting either of two types of cards as follows: E-61

Contents of Column 11 Card Type R A remarks declaration 0,1,2,... or 9 A continuation code, meaning that this card contains a continuation of information found on the preceding card. Blank All others. Example of a MAD Program Showing Data Card and Results Problem and Numerical Method To compute the solution of the equation x3 + ax2 + bx + c = 0 by Newton's Method. Starting with an input value for x0, using the iterative formula: 2xi3 + axi2 - xi+1 3xi + 2axi + b which is obtained from the standard Newton's Method formula f(xi).+l = xi - f'(xi ) for the problem f(x) = 0. (Here f(x) = x3 + ax2 + bx + c) The quantities no, ~, and ~2 are specified, and the iteration is stopped when the following condition is satisfied: ( xi+l - Xil < 1 and If(x)l< Z2) or i > no no is some upper limit to the number of iterations which we can tolerate. The inequalities involving l1 and 2 are illustrated graphically. We require that at xi the value of the function f(xi) be between the upper and lower bounds E Z and - 2. Also, the distance d between xi+l and xi should be less than E i. El2. \ < f(xi) -2 --- E-62

A Primer for Programming With the MAD Language ALGORITHM IN THE FORM OF A BLOCK DIAGRAM Appea c of tDTHROUGH P FOR I0, 1M E ~ < ([INEXTX-X|(< AND \F(X)|<C2) OR / XRN 61 F TITE AI, S N PNREAD AF B T C C ZO P E2 R X = NEXTX PRINT, I X TITLE AND T NEXTX=D( X) DATA _______ EPRINT NEXTX=D(X) Appearance of the Program and Data * COMPILE MAD, EXECUTE GAMMA READ FORMAT CARD, At Bo C, XZERO, EPS1, EPS2, NZERO PRINT FORMAT TITLE, A, 8, C, XZERO, EPS1, E-PS2, NZERO PUNCH FORMAT TITLE, A, B. C, XZERO, EPS1, EPS2, NZERO X = XZERO NEXTX = (2.*X.P.3 + A*XP.*2 - C)/(3**X.P.2 + 2~*A*X + B) THROUGH BETA, FOR I=O, 1, (.ABS. (NEXTX-X).L. EPS1 *AND. 1 ~ABS. (X.P.3 + A*X.P.2 + B*X + C) *L. EPS2) *OR. 2 I.GE. NZERO X = NEXTX BETA NEXTX = (2.*X.P.3 + A*X.P.2 - C) / (3.*X.P.2 + 2.*A*X + B) PRINT FORMAT RESULT. I, X TRANSFER TO GAMMA INTEGER I, NZERO VECTOR VALUES CARD = $6F10.5,I4*$ VECTOR VALUES TITLE = $27H SOLUTION OF CUBIC EQUATION/ 16Fll1.5I6*$ VECTOR VALUES RESULT = $I8,F14,5*$ _ END OF PROGRAM * DATA 12500 -600000 350000 250000 00500 00500 10 E-63

Picture of a MAD Program Card...HEXTX... (2. X.P.3 + AUX.P.2 - C) / (3.*X.P.2 + 2.*AUEX + B>) / I I II I I II I II I II I li I II I I I I I 00|0000000000|||000|000|000000000100000000000|0|000000000000000.0000000000000000 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 111|11111111111111111.11111111. |11111111111111 111111111111111 1111111111 1111 1111 12222222222222222222|22222222222 2222222222222I22 22222|222|2222222|222222222222 33|3333333333333333333333 33333333333 3333333333333 4444444444444,' -4444144444444444444444444444444|4444|4444444444 4444 444444444 55555555551.555555555555555555555555555555555555555II5555555555555555555555555 66666666 - -:6666666666666666666686668f6 8 066686 608668 86666 77777777 777 7 777777 71 7 77777 77171777777777 7 7 7 7 7 7 7 7 777 7 7 7777777777777 8888088808 8 8 f 381818118181888881818188888188818118181888881181 8888818888888888 8 999999999 9:,: 999999999999999 9 9999999999999999999999999999999999999999999999 4 2 3 4 5 6 7 8 9 10 I! ii 13 i7 i i5 i 17 18 19 20 21 22 23 24 25 26 2' 23 29 30 31 3 33 3 3 3fi 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 5 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 TC 5081 Picture of the Data Card / 1250 350000..0000000 00500 00500 10 /!I 00oooooooollo0ooooll0000looooo000000 000000o0000oo0000000o00000000000oooo 0000oo00 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 22222212222222222222222222222222221222222222222222222222222222222222222222222222 33333333333333333333333 3333333333333333333333333333333333333333333333333333333333 44444444444444444444444444444444444444444444444444444444444444444444444444444444 5555555|555555555555555|5555555555555551555 555|55555 5555 |5555555555555 666666 66666 11, 66688688 6 66666666666606666666666666'66666666 7 7 7 7 7 7 77 7 7 7 7 711 7 7 7 7 7 7 7 7 7 7 7 7 7 7 77 7 77 7 7 77777777777777777 777777777777777 777 7777777 88888888888&:`. 388888888888888`e888888888888888888888 88888888888888888888888 99 9 9 9 9 9 9 9 9 9; 9 9 9 9 9 9 9 9 9 9 9 9 9 9 f 3 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 99999999999.:.999999999999997..9999999999999999999999O999999999999999999999999 * 2 3 4 5 6 7 8 9 10 11 i;;4 i, 17 18 19 20 21 22 23 24 25 26 27 23 29 30 3;, 3:.4.i 3, 37 3S 33 40 41 42 43 44 45 46 47 48 49 50 51 52 3 54 55 ts 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 TC 5081 Picture of the Actual Computer Solution 'SOLUTION OF CUBIC EQUATION 0. 1 2500 -6.00000 30 000 30000 2500.............0,..050_0_.._........ Q. 050_......1.0.......... _. 3 2.00018 E-64

A Primer for Programming With the MAD Language APPENDIX A List of All Classes of Constants Available in MAD Integer Floating Point Alphabetic Boolean APPENDIX B List of All Operations Available in MAD in Descending Order (of Precedence) Subscription.ABS., +, (as unary operations) o P. ARITHMETIC - (as unary operator) +, - (as binary operations, i. e., addition and subtraction) RELATIONS E.,.NE.,.L.,.LE.,.G.. GE I NOT. 3.AND. BOOLEAN.OR.. THEN..EOV., (as used to separate function arguments) = (substitution) APPENDIX C The Five Modes of MAD FLOATING POINT INTEGER BOOLEAN STATEMENT LABEL FUNCTION NAME APPENDIX D List of All MAD Statement Types (Executable) Statement Form or Illustration Substitution ALPHA = Y+Z+F. (X, Y, Z) TRANSFER TRANSFER TO, Conditional (a) WHENEVER B1 OR WHENEVER B2... C2 E-65

APPENDIX D, Continued -- Statement Form or Illustration OTHERWISE E C. K END OF CONDITIONAL (b) WHENEVER B, Q CONTINUE CONTINUE THROUGH (Iteration) (a) THROUGH, FOR VALUES OF V=E1, E2.Em..E (b) THROUGH 2, FOR V=E1,E,B PAUSE PAUSE NO. n Function EXECUTE LSORT. (ARRAY, MAP, N) ERROR RETURN ERROR RETURN END OF PROGRAM END OF PROGRAM FUNCTION RETURN FUNCTION RETURN F, ENTRY TO Function ENTRY TO. List Manipulation (a) SET LIST TO / (b) SAVE DATA 8 (c) SAVE RETURN (d) RESTORE DATA t (e) RESTORE RETURN Input-Output (a) PRINT FORMAT, a) (b) PRINT ON LINE FORMAT i, J (c) PUNCH FORMAT <, V, (d) READ FORMAT F,. (e) READ BCD TAPE?2, 9, J WRITE BCD TAPE n9,. (f) READ BINARY TAPE 9z,, WRITE BINARY TAPE 9. j, (g) READ DRUM 2Z, al, < WRITE DRUM 9Z, a, (h) REWIND TAPE 92 (i) END OF FILE TAPE 'u (j) BACKSPACE RECORD OF TAPE (k) BACKSPACE FILE OF TAPE 92& IF LOAD POINT TRANSFER TO E-66

A Primer for Programming With the MAD Language APPENDIX E List of All MAD Declaration Types (Non-Executable) Declaration Form or Illustration Remark RHAPPY NEW YEAR Mode INTEGER I, N Change of Mode NORMAL MODE IS INTEGER DIMENSION DIMENSION V(10),A(100), B(40, D(5)) EQUIVALENCE EQUIVALENCE (A, B), (MATRIX, XARRAY), (C, D(3)) ERASABLE ERASABLE MATRIX, XARRAY, YARRAY PROGRAM COMMON PROGRAM COMMON MATRIX, X, Y1, BO Presetting Vectors (a) VECTOR VALUES C=, C1, C,.. (b) VECTOR VALUES V-= $kl... km$ Function Definitions (a) INTERNAL FUNCTION SUMSQ. (X, Y, Z) =X*X+Y*Y+Z* Z-T*T (b) INTERNAL FUNCTION (M, N, I, P, Q) (c) EXTERNAL FUNCTION (M, N, I, P, Q) END OF FUNCTION END OF FUNCTION APPENDIX F List of All Permissible Input-Output Field Types and Their Codes Field Type Code Letter Skip (or Blank Info) S Integer I Fixed Point Number F Floating Point Number E Octal Number K Characters C APPENDIX G List of All Printer Carriage Control Functions and Their Codes (Carriage control codes are single characters which follow the letter H in the first Hollerith field on a line) Carriage Function Character Code Single Space BLANK Double Space 0 No Space + Skip to Next Page 1 Skip to Next Half-Page 2 Skip to Next Quarter-Page 4 E-67

Picture of Identification Card as Described in Section VIII - LLruY ~ia f- -j- 9 p - _1 PI oa pE"EXEC.A R CENTER STUDENT EXEC PE CUED NAMEimb I, PROJE NPROBLEM TIME OUTPUT OUTPUT IDENTIFICATIN \ ' HI | | ~ NMBE N-UMIBER EsT ESIT ET. I 1 2 3 4 5 7 8 s 10 11 121314 15 1 1t3 201 2l22232425 2627 262933 323334 35 3 637 383 8 13U4041 4243 45464484 50 51 52 53 54155 5857 58 59 601 B62 B63646566 67 34 70 71 72 77 TTU 0 IDENTIFICIION CARDt HlPUNCH Il|AL ZER(|Il I Iil _ o 1 I j ILLEGAL PUNCHES IN PROGRAM. 5 READ WRITE CHECK AT _______<___,w- 2 W2~~~~~~~~~~ 2t w O INCORRECT (*) SPECIFICATION CARD. D RUNAWAY TAPE _ STOPPED AT 03 I I I 3-, v O TIME ESTIMATE EXCEEDED STOPPED AT SEE REVERSE SIDE. o.4 I I I I a PAGE ESTIMATE EXCEEDED STOPPED AT, a 5 I 5_ HPR AT___ 6 6 J HTR AT 7 7 [] LOOP HIGH LOW _ _ USE GREEN ID-CARD WHEN YOU HAVE ANY 8! g~~~~~~ | *|'~~!SPECIAL INSTRUCTIONS TO THE OPERjOR 8 *~~~~~~~~~~~~~~~~j ~~~ LOOPSTAMPED CARD MAY NOT BE RE-USED. 9 I 19 112 3 4 5 I 7 i 10 111 31 4 1 1171 8 17 1 222 1 3241252a 27 2 303113 33435313733 839 4 1424344.446 47449505115253541 5555715859606162631I746 8 8 9707172m3747576n77 7 nuM 048887E-68 E~-68

Example Problem No. 1 TEMPERATURE DISTRIBUTION IN CONDUCTING SOLID by Dale F. Rudd Write a computer program to solve for the temperature distribution in the following conducting solid T ~~~~~~~~~\\A Thermal \\^XV^ \\\\ insulation 0 TL C Two dimensional solid The upper surfaces are maintained at temperature TU, the lower surface at' TL, and the sides are semi-insulated. The problem may be considered as two dimensional. The program should be capable of handling up to 400 mesh points and the computations should terminate either when a maximum number of iterations have been performed or when some degree of accuracy has been achieved, whichever comes first. You may want to prepare several sets of data for the computer to study, for example, the effect of mesh size on the solution. Hence the program should be able to handle arbitrary mesh size up to 400 points. The iterative correction method suggested in class is recommended. Instructor's Solution Divide the solid into an array of mesh points: Tu JB 1 ___ ____________-o1-2 ICTL The first subscript refers to the horizontal direction and the second to the vertical. T1,JB is then the temperature at the upper left hand mesh point, for example. E-69

Temperature Distribution in Conducting Solid At steady-state conditions the temperatures in the two-dimensional solid are related by the Laplace equation, 6x2 y2 In difference form this is 2 A2 A 2T A2T x + = (Ax) (Ay) where the second differences are A T=T -T iT -T x i+l 1i iJJ i\j j -i-Lj and A T=T -T I T-T y T +i, Ji, j, jIf now Ax =Ay, the difference equation becomes Ti+ - Ti, jT+l T i - Ti j-T i ) = o or Tj (.l+T +T +T /4 ij ij-l i, j+l+i-lj0Ti+lj/ It is clear that this relation holds only for interior points and not for boundary points that are determined by boundary conditions. Where a boundary temperature is stated, such as T- and T, that temperature U L is fixed. At an insulated boundary a heat balance may be written around a half section as shown. Here q,= -A Boundary \ 6x! Conducting Insulation.-kA x kA T -T Solid = x ( i,; i-l) |T. j while -kAy T -T.j. r.,j Ay ij+l Tij ) and q3= -kA 6T -kA y IT..-T.1 A y I i,j-1 i,j Section of Solid for analysis of By heat balance boundary condition. ql =q2 + q3 E-70

Example Problem No. 1 and by the shape of the half-section A =2A x y Combining these relations with A =-A gives for a point on an insulated boundary x y T Ti hl tiT, J+l Tij-i 4 The finite difference forms of the heat equation and the boundary conditions relate the temperatures at the mesh points for the given problem by the following relationships: 1.) Ti, = (Ti, -1 + Ti, J+1 + Ti-l,J + Ti+l,j)/4 for 2 < i < IC-1 and 2 K J < JB-1 2.) Tij = (Ti,+ + Tij-1 + 2Ti-l, )/4 for 2 < j ~ JB-1 and i = IC 3.) Tij = (Tij-1 +Ti,J+l + 2Ti+ l, )/ 4 for i = 1 and 2 < J < JA 4.) Ti TU for 1 < i < IC and j = JB or i =1 and JA ~ J < JB 5.) Tj = T for J = 1 An initial temperature distribution is assigned (in this case, linear) and it is then corrected by repetitive application of equations 1 through 5. The program is terminated when either the temperature at each point has been corrected N max times or when the absolute value of successive temperature changes is less than E at every point. N max (NM) and E are arbitrary constants given to the computer. The instructor's flow diagram, program and solution follow for the case of a square-shaped solid with 20 mesh points(19 spaces) in each direction. The high temperature, TU, has been taken as 100, while the low temperature, TL, has been set at 0. E-71

Temperature Distribution in Conducting Solid RUDD'S FLOW DIAGRAM READ PRI,V /rHROVW\ /rRO Mr00 J TBr, ~, A joo,JB,IC, i_.PA / 4ooPA, T 7(T'I- -TL)VZ f4 2>)Nlr/, M T ', TZ O FR Zw I(, LR '-xf O ITROU C\ RO \ CT LOOM) 40 rPC, I.! Ago N^I; >ICJ / F ---,-/ k F ' lF (i --- —-I ALPUM i A/ — CT F. ~F Tr-,;j = TN ~^<A(wTZ -I>ir E T PR/I AT C -A ERESULIT N=Number of Iterations of Loop C C=Number of Failures of E Test for Each Iteration E-72

Example Problem No. 1 INSTRUCTOR' S MAD LANGUAGE PROGRAM DALE F RUDD X18-N 001 001 001 1 009 DALE F RUDD X18-N 001 001 001 1 009 *COMPILE MAD EXECUTE R SCIENCE ENGINEERING 112 CLASS PROBLEM HEAT TRANSFER DIMENSION T(400,DIM) DIM(2) VECTOR VALUES DIMa2,1,20 READ READ FORMAT DATA(1) JA JB IC NMTUTL E PRINT FORMAT DATA,JAJB,ICtNMoTUtTLsE THROUGH LOOPA FORJ 1,1 J G JB THROUGH LOOPAFORIl 1, I.G IC LOOPA T( I J) TL+(TU-TL)* J-l )/(JB-1) THROUGH LOOPBtFOR J=JA.1 J.G*JB LOOPB T( 1J)aTU NuO ALPHA CuO THROUGH LOOPCFOR Isl,1,IG.eIC THROUGH LOOPCtFOR J=2,1 J.E*JB WHENEVER I.E.1AND.J.L.JA TNsI T( T(IJ-1l)+T(I J+1)+2*T(I+1,J )/4. OR WHENEVER I.E.IC TNs(.T(I J+1)+T (I, J-1)+2*T( I-1,J ) /4. OR WHENEVER I.E.1.AND# J*GEeJA TNwTU OTHERWI SE TN('T(I+lJ)'+T(I-l*J)+T( I J+l)+T(I*J-1) /4, END OF CONDITIONAL WHENEVER. ABS ( TN-T( I J ) *G E tCC+1 LOOPC T(I J)=TN NwN+1 WHENEVER.NOT (N.GONMoORo.CEO) TRANSFER TO ALPHA PRINT FORMAT RESULT.N.CT(1,I).**T (ICJB) TRANSFER TO READ INTEGER ItJ.JAJB.IC.NM9CN VECTOR VALUES DATA"$1H $S$414,3F102*$ VECTOR VALUES RESULTS$3H N1I493H C=I4/(10F10I2)*$ END OF PROGRAM *DATA 10 20 20 60 100.00 000.00 0.10 E-73

Temperature Distribution in Conducting Solid FORMAT OF INSTRUCTOR'S RESULTS JA JB IC NMAX TU TL E "N="XXX "C=" XXXX T(l, 1) T(l, 2)........... T (1, 10) T(, 11) T(1, 12)............ T(1, 0) T(2,1) T(2,2)............T(2, O) T(2,11) T(2,12)............T(2, 20) T(20, 1) T(20, 2)............T(20, 10) T(2, 11n)................... T(20,20) T(2,).T(Z0, Z0) 10 20 20 60 100.00 o.00 0.10 N= 50 C=g.N0 7.19 O 14.55 22.20L 3031 39.08 48.88 60,39 75.45 100.00 100 00 100.00:10000o 100.00 100l0o 100. 00 100;0o 100.00 100.00 0.00 7617 14.49 22.09 3 010 38.72 41.748 2 3. 6 9-. 6 7 S.87 8 95.3 r 96. 19 970- 9''77-7 98.6 0o00 7.07 14.27! 21.71, 29.48 37.71 46.47 55,78 65.44: 74.52 60.070 85.7 83 05 92.58 94.30. 9 98.66 71'90. 100349 21.14' 28.60 36.35 4440 52.67 60*86 68*42 74,59 79, 3 86F 89*3 -7VI77 -T -yVr - 7.5- --- 7 0.00; 6.72 13.53; 20.47 27.59 34.88 42.32 49.80 5710 63.89 — 69,86 —74';.,/9.311 8~. 9, ---['g-~ — ^^ S3.O9-^ —0- 6,3.4-9.~ ' 0.00- 6.52 13.10 19.78 26.56 33.45 40,40 47.30 54*02 ' 60.36 66. 15. —7, —5?8T3.9 '849 — 90.79 9394 97.0 — 10 60.006 0.00 6.i32 12.68 19.10 25 ~60 3215 38.70. 45.19 5152 1 57 56 63.22: 68. 462-.T2: 81_* —9 -5-1My. _ — 0.,-_ 0.00 6.13 12.29i 18.49: 24.73 H3100 3725 43i44 49.49 55.32 0.00 i 5.96 11.94' 17.95 23 98;3002 36.04 42.00 47.85 E53.54 0.00 5.81 11.64 17.49 23.35 29 21 35.05 40.84 46.54 52.12 5 7 * 255 7_7 * Y.63Z_,;T2W77 r82-8 F r_6 T 9565- D0U ~TO00 0.00 5.69 11.39 17.11 22.83 28.55 34.25 39.90 45.49 50.99 0.00 5.59 11.19 16.80 22 41 -28.02 33.61 39.16 44.67 50.11 -85,4- 5 —6-07 9 —6 - J1 0'; 76 * 00U 80.91 85.75 9O534 95.28 T700UO 0.00 5.51 11.03 16.55 22.08 2 27.60 33.10 38.59 44.03 49.43 -icT~ 54 _. 90.77 9-3:T 100.00 0.00 5.45 10.90 16.36 21.82 27.27 32.72 38.14 43,54T 48.91 0. 00 5.40 10.80 16.21 21.62 27.03 32.42 37.81 43.17 48.51 5 3. 8 59~-~P i 64.- 6-9.5 7-t4.67.7 77; 8 94.9 100.00 0. 00 5. 36 1 0. 7 3 16.10' 21.47 26.84 3i.2 1 37.56 42.90 48.22 5 35 ~ 58. 7- 6 67427 77 9 _._2 _4' Z- 7T9I 5T s; 8 oV,''. 100-. 0.00' 5.34 10.68 16.02 21.37 26.71 32.05 37.38 42.71 48.0j0.00 5.32 10.65 15.97: 21.30 2 26.63 31.95 3 7.27, 42.58 47.88 — 657T7Xi 5 8. 47-^ 7 _-_3_4 —. 0.00 5.31 ' 10.63i 15.95'i 21.26 26.58; 31.90 37.21 ' 42.51: 47.80 568785574 0 1' 63 ]- 9. 8 - 741 O 7 00 0.00 5.31 10.62 15.94 21 26 26.57 31.88 37'9 42I.49 47,79 Student Solutions Two student solutions are given here which, in the instructor' s opinion, are superior to his own. The first is by Lee H. Frame, and the second is by John Herman. E-74

Example Problem No. 1 FRAME'S FLOW DIAGRAM UD /E PRI>Elr THRouc H\ /HTHROU&S \,',' I_ ^< /rHRO&H\, / B tRour \ u, T, \ I>ICI- / \ J,B / (J) -*Cb J'l A A ArlV-7Z. '}I TN= TL, f/I r -u J>L r, — TN UTZI~i N= NUMBER OF AITERATIONS OF LOOP- A C= NUMBER OF FAILURES OF E TEST FOR EACH ITERATION E-75 e.' &j 4Z ~^.r~g^^^^g^F^ N= UMER F TEATINSOF OOmb T1. ~ C NUBROCALRE>FETS OREC TRTO Re-lu5

Temperature Distribution in Conducting Solid FRAME'S MAD LANGUAGE PROGRAM R LEE H. FRAME SE. 112 HEAT TRANSFER PROBLEM DIMENSION T(400,DIM) READ FORMAT INPUT9 IC9 JA JB9 NM9 TU, TL, E PRINT FORMAT TITLE, TU9 TL, JA~ JB4 IC, NM, E THROUGH BARB, FOR I=1, 1 I *G. IC THROUGH BARB. FOR J=1.1. J.G. JB BARB T(I J)=5*(J-1) N=O SANDIE CzO THROUGH ANN. FOR 1 I.G IC_ THROUGH ANN* FOR J=1, 19 J *G. JB WHENEVER J.E. TN=TL OR WHENEVER J.E.JB TN=TU OR WHENEVER I.E.1.AND. J.GE. JA -TNTU OR WHENEVER I.E.E1 AND* J*G.1.AND. J.L.JA TN T( T I( 1J~+ 1) +T ( -1.-J- )T+2* TTZJ( ) -— +) — -- OR WHENEVER I.EIC.AND. J.G.1 *AND. J.L.JB TN=(T(tICJ+1)+T(ICeJ-1)+2*T(IC-l1J)!/4 OR WHENEVER I.G.1.AND. J.G.1.AND. J.L*JB.AND. I.L.IC T-N- 'T-( I-Y,-JY-1 ) +T TT —J —i ) + -T IB+-T'-J-T-+T-I" - 1 J )-) /4.. — - - - - -- -- -- - - - - - - - - -- END OF CONDITIONAL WHENERV-E.A-S-. (.TN-T — TJ) ) ).G.E- C=C+1 ANN T(tIJ)=TN NzN+1 WHENEVER N.L.NM.AND. C.G.O, TRANSFER TO SANDIE -- - PRINT ---FRMAT RESULT,, -- tT-nTr...-TTC-JBT - ---- - ------- INTEGER I J,JAJB ICNMCN___ VECTOR VALUES DIM =2,1.20 -- VECTOR VALUES INPUT=$414~ 3F10.2$* VECTOR VALUES TITLE=$1H1 30H HEAT FLOW IN CONDUCTING BLOCK 1 /// 4H TUaF6.2 / 4H TL=F6.2 / 4H JA=I4 / 4H JB=I4 / 4H IC=I4 2 — / 4H NM=I4 / 3H E=F4.2*$ - - VECTOR VALUES RESULT=$3H CsI4 / 3H N=I3 /// (20F6.2)*$ END OF PROGRAM - ---- E-76

Example Problem No. 1 0 0000 0 0000 000000 obobo bobobo 000000oooo 0 *.000 0 0 C * 0 0 0...... o~obobobo'c; aa000 b 0 0 0 0 00 r-4 r-4 H r4-4 - -4 4-4 r-4 r-4 -4 H '4 4 '-4 '-t - r4r- - 0 0%4-40%400 a% -4 0 N 0 *-4 - U 0j'J0.-4%. r4 It N 0 to - 0 Ln in ItIt 4- 0 0n 0N S 0 0t * 0% 0 0 @ * * * 0 0% 4IC Cc) Ch 0%0%~O4 ~ 400%0, K%00 **@ *Sl@@000 0100~~~* 0 000 CCC 0 ~~~O " ~~~~~ 0 ~0% 0Q% 0% 0 o c 0> 0% % 00% 0% C 00 Cy% co bco C00 b co o 0 v 0 OI In CCI 1V Cv N I.A 0J % U -4 a \ 1(f 0 Ln r4 Cc co a O cn M "INP\oOlo a 0 03 0 OC 0 o 0 0o10o co0 0 co bo0 o (0 30 I 0 ~~~~~~~~4odJo~~~0 ~ 0 D -4 Ai l r- -M0 D M 0 %0 N NP-4 C ID 00 OD 40% CkIOD0 C:) 7% ~~~~~~~00 * % *3 CI * 0 co ee. *o *' l O Ln ao Co to ao\0 M n 0 4 co ak n n 4i o - 40 M 0 Vco ko Ln 00 O M M I 0 ~~~~~~~~~~~~~~~~~0 n 3 ~A 000 Z -4bC1% 4 N 1 N ~~~~~~~~~~~~ ~~~~~0 3s0% 3000000 00 r 0, 11 r r- r-. - p.0 0 r-~~ ~~0N0% 0k~~-(~Q C~B-400pIA4 CN l0 4* OnCrO 04i.o r — A 00-4 1c Ir-N HH H ~~~~~~~~~I- 000000 00\ I o00 00 O e~e 0000~Oee - 10IO A DpN0C 4 O0N aN oh II~ 0%ON4 eJ ~ ~ o l0 0 0% N 0 0 I -4lC% c o 0 h-p- r-o o 10 c00 00 r- r O0 r C0 't r-00 N O 0 n aO 0% o%l0IcUA N~~ ~ IV o a t~~~~~~~~~~~ a tu~~~~J - 0 o 01 bo 0 IO 1n Ln H- 00P000 -; %O N OlO 4 C%0 r-4~* * * 00~~~~~~~~~~~~~~~~~~~~~ 7 o0000-r-0 % %00JC oeeee0 CO 10 D0 ii F On iN N -ON 01 OQIA0 co E-1 0 n -4~~~~~~~~~~~~~' N DO '- 0%t-4 %O-.OO'%O cr01, -1 14 C In, CZ 0H00 1 0 r In %04.CZA " A IA IA 0 H~~~ C9 I (30 %O% 0 L i '6 -4N N ~O j~ F 0 - 00 0000a0040 o ~ i~ ~I~ ~I~ ~i~ ~j~~~~~~~C;%D 'tCt IC DD r- FI- % O L cO-n % Va 6 00 0 r %!U iA O H 4 4H0 %~~~~~~~~~~~IA~~~~t~~~N'-4 '-iO~~~~~~~~~~~iOO~r~~~ ~ ~ ~ ~ i~~~~~~j~~~~j~~~~j1~~~~~~'-4 5 I ir~~~~~~~~~~~0 n - U%0% %cc 't 4N O '0 bkJ IA~cV) L '- 4 *.1 0 * 010 0 0 0* 010 j 0 " b4 CA o 1 1 4 IcI! t- 0 C O D Ln!Ln Tax x x 0 00 r-N K4 0n U 00r on IA PI~~~~~~~~~~~~~~~~~~~ F' Fc I c'c~ N0N'- h %NOCrH0004 0 I- V Ln F O %O O U~~~~~ I 4O \oc~ C\ Inc gu Oi O N 00*0 ~C - e~0% b e IA4 NNc OO 3 N n 0 n M -4400C'JIA 0 0%r'- I CD 0n 0,0 M -.0!c j %0 ON C7% kN U, %D In 4Ln 0 4 E-l a w kc L n w o o Ln o ct - %0 n l 4 I-.- O 00 O O tO I,. 0 - 00%a,00 co 0OIALAI u IAI An IA I iU NCCJ Nfr-4 —D 0 - N4 '. r 4C-4. ( IALAcr; n IA. — P 0bL0 CL 'Ou-4 't 4 00 ~~~~~~~~~~~~~~00Oe00 000O 0 0 00.J 00 '0%ODIA ~ AI AI An INII CA IAIA C)I IAIAIA ILN Ch a C'.. N C0 i OD It ilkn I i n L* N co t O\ I D %i iu-~ k n Ltjern Lf 0 'I n-40%0 0900000000000 0000001 N 'I i j lnn 0 a% Ln C44 M n Cr n 0 ION r,- Ln Uc 0 4 00~~~~~~0 00 w00900o n 000900000l0 r co Ii OD 0 - 0 n ' N* 1110-40 c o - n - -4 t coN r — n c7% r u-N % r-4 r- r 4 rO0 0 0; 0 0, 0 0 0 0: 0 0i 0 ' 0 0 0. 0 0' 0 0 0 0 0% w ar- %D:% U,) n Lr% in In ~ n LO i DnJ<00VWIIIIII 000000000000000 400000 0: 9 aD o\ 0\ D~~~~~0:O or 0 ia e r O e 0 c. N e r t31~~~~~~~~~~~M I r-4 N O I 0 c 0 0.0 0N 0 10.1- I- ) ) - ZW U Z~~~~~~~~~~c 94 -4C) 0 n 1 E-77 16 ccLn 00 Cc: 1 i i I 0~~~~~~~~~0,0 tn 4 N C OD ~C, I (IC) - N r y 0, 0 0 0 C) 0 C>a '40 0 D 0 0 -N M-N L n Ln Ln n U- n rn U- n.n Ln )Ln

Temperature Distribution in Conducting Solid HERMAN'S FLOW DIAGRAM /RtA PR/iWA/r 7,TNROOG /RTHRoaH C\ JA, 38r, JL,, ru, r TUr, -Y= x OR 2, FOR2 I\,I1 r:.re j.,,, J+JBz /,,, +z,/ IF, R= TEMPERATURE.END 1 NUMR OF ITEATIS OF A7, END 2=NUMBER OF FAIURES OF EE TEST FOR EACH ITERATION.E v~"c Vl* A*D J^JB JA - "^ n / 4i;ey lj'Zi +0^ 2i i,4tt F iR = TEMPERA TURE X= TEMPERATURE GRADIENT PER ROW ______^____ _______________ ^(E^H) ---

Example Problem No. 1 HERMAN'S MAD LANGUAGE PROGRAM DIMENSION Z(400,V),V(5) VFCTnQ VAI IIFC = 2,1,?n ALPHA READ FORMAT CARD1,TU,TL,EE READ FORMAT CARD2?,JAsJBtICsNM PRINT FORMAT TITLE,TUTLEE PRINT FORMAT DATA, JA-JBTIC~NMX=TU/(JB-1) Y=X THROUGH A19FOR J=2,1,J.E.JB+l THROUGH A2, FOR I=1,1,I.E.IC+l A2 Z(JI) = X A1 X = X+Y END1 = 0 BETA END2 = 0 THROUGH A7, FOR J=1,l,J.E.JB+1 THROUGH A3, FOR 11,lIE.IC+1 WHENEVER 1.L.I.AND.I.L.IC.AND.l.L.J.AND.J.L.JB R=1(Z-(J+1TI)+7(J-1T,)+7(JT+1)+Z(JI-1))/4, OR WHENEVER J.E.1 R = TIL OR WHENEVER (I.E.1.AND.J.GE.JA).OR.J.E.JB R = TUi OR WHENEVER I.E.1.AND.J.L.JA R=(Z(J-1*T)+Z(J+1,t)+2*Z(JIT+1))/4. OR WHENEVER I.E.IC R=(Z (J-I T)+Z(J+1.TI+2*7Z( J *T-1))/4e END OF CONDITIONAL WHFNFVER AABS.(Z(JI)-R).GE,FFEND2=END2 +1 A3 Z(JI)=R A7 CONTINUF END1=END1+1 WHENEVER END1.GE.NM.OR.END2.F.OtTRANSFER TO PHI TRANSFER TO BETA PHI PRINT FORMAT ANSWER*END1 WHENEVER IC.G.10TRANSFER TO GAMMA A4 PRINT FORMAT R1,END1 THROUGH A5, FOR J=:,1,J.E.JB+1 A_ 5 PRINT FORMAT RES1I T 7 (.s1)-7(. J. C) ( ) TRANSFER TO ALPHA GAMMA PRINT FORMAT R2,END1 THROUGH A6, FOR J=,191J.E.JB+1 A6 PRINT FORMAT RFSULT J 1 1 ), (J,,Z J. IC ) __ _ __ IC=10 TRANSFFR TO A4 INTEGER I,JEND1,END2,JAJBICNM VECTOR VALUES CARD1=$3E106*$ VECTOR VALUES CARD2=$4I4*$ VECTOR VA LJFS TTT1F=$41H15011JTTON OF SF 112 PROBLEM BY RFLAXA 1TION/5HOTU =F10.2,S1,4HTL =F10.2,S1,4HEE =F10.6*$ VFCTOR VAI [IFS nATA=5HnAJA =T4.S1.4HJR =T4*.SI,4HTC =T4.91, 14HNM =I4*$ VECTOR VALUES RESULT=$1H *10F11.4*$ VECTOR VALUES ANSWER=$8H ANSWERS///23HONUMBER OF ITERATIONS = 1I4*$ VECTOR VALUES R1=$18H Z(11)...Z(1010),10H+ s7H+END1 1 =T4*$ VECTOR VALUES R2=$20H Z(1111)o*.Z(20,20),10H+,7H+EN -. i__ _ 19_Inl =I4*$ END OF PROGRAM E-79

Temperature Distribution in Conducting Solid FORMAT OF HERMAN'S OUTPUT "SOLUTION OF SE112 PROBLEM BY RELAXATION" "TU= XXXXX" "TL=" XXXX "EE= XXX" "JA= XXX" "JB=" XXX "NM=" XXXX "ANSWERS" "NUMBER OF ITERATIONS=" XXXX "Z(11, 11...Z(20,20) + + END1 =" XX T(ll1, 1) T(12), 1 ) 1)....... T(20, 1) T(11,2) T(12, 2)........... T(20, 2) T(11,20) T(12,20)......... T(20,20) "Z(1, 1).... Z(10, 10) + + END1 =" XX T(1, 1) T(2, 1)........... T(10, 1) T(1, 2) T(2, 2)............ T(10,2) T(1,20) T(2,20).. T(10, 20) CASE A COARSE MESH SOLUTION OF SE 112 PROBLEM BY RELAXATION TU = Inn.00 TL = 0.00 EE = 0.005000 JA =_- 2 Jf = 4 IC = 4 NM = 100 ANSWERS NUMBER OF ITERATIONS = 11 7( 1. )-Z.7 Z(.n01.0)+_+ +END1 = _1 _ __ 0.0000 0.0000 0.0000 0.0000 ___ 1 00o0000 56,2606 42,4218 39.19Q n0 100.0000 82.6249 74.2408 71.9179 1000noon nnnn 10 l an.nn 100Inn0non-_ 100 100 100 100 I82.62 74.24 71.91 Q1 0 0................ 1..... "' 56.26 42.42 39.19 0 0 0 0 Computed Temperature Distribution for Course Mesh. E-80

Example Problem No. 1 o 4C 0 Isn <c a C4 0 NIO -4 4 OD c ' Fcq- L -n r- 4 ON o o S 0 r_ 0 q 4 4 0'01 00 -aN 4 ' _ O o - 0 0 _n t 0 4 r4 N c0 oO 0 N 0.^- - 0 M 4 %O N n O ro oo rC N o oc co'0c NLn lr- O 0o' N o o 0 CI o o0 - 0 o \ O c0 ( nf 0 I O' 0ic aLo r o0 O - ^ ac ' 0 o a% N LOn fr 0 % 0^O * 00 0 0 I 0. * 0, 0 0 0 0 * * I 0 0 0 o 0 o N - o' cn0 o oa N N c 0 o 4 M r L A I o o.oo n oM r- o n oO r- CC Jt L N - 40 a OIO O\ C-C C i Lnl *0 c: a,.. - I- 0 l O' 0r- ON 0 O r' 'O Nf Mv% LA 0 r-4 Coo00 00 o e r-C r- CY 0( Ln o N4 0co LnON0inO'scno o <: a * 4 %f if << 4 rs o N o < X a N cr O O ( X d. o-q % O r-c N cz o 4 00 n o o *n o C a so M?4 r r o c N n O o O o o o a o o o o aa n 0 o C L a o; n r-4 o r - M 4 M o O011_ r NbNa 01s 0r j o n 000'040^ o 0i^Oo a4 ' 0. c0 o4 Ao44 zNNco0o~~ r-oo i i o a 0!4 sIC, o CZns O rc4 ONo c 0 oc N 0. r4 % ni"o 0 F co ooooo oo ' L — *4 N\ MO 4 L '0 'l l c 00 0 4I r 0 0 O 00 oI \0 N 0O 'or- O \ o oO M n 'n i N cn o n o0 4 4 r- 0 4 %o a o4 4 1 M0 aL 0 0M LAo 0 o o4 M - cL N UlO Ln- c4o Ln Ln Lin O Oi a o0 0 o t cs - 0o0on '- oo o N a cOn 0o inr- o 0' oN ' 4c N 0-Io - ^ sO N lm a I* 0 0S 0 c *0 00 0 0 * 0* * * 0 0 * * *0 * 4 * 7 * M *0 * O * 0 * O 0 0 0 0 0 0 ir.- Nc r cn a c^ I 4 ON n c Ua c c 4 4O C L M 0 ^ n r M I" A - -4 n n a c 0o 0 l 0 00 c N o 's 4 0 cc - A0c rn0 o N O n 7 A n 0 *d o n n osc on C <0 o0 s c, - < - cN o oN OD 00 o r qc 0 n ^ 4 0 0 LA - 4 r- o cc 0- N L a 0 O C V F rac 4 0 C O ) 'c 0 ' % 0 0 0o0 t 7 a r Ct - L n L - 4 LA C 0 N 4c 'Ln 'I0 N a O 0 I-4 N rC N 0 0 O 0o 0 - N N 0 o 0 ' O C r 0_ - oo O C4')n M 4 0o 4 - 0 o00 e* 0 0 o 4 0 0 0 0.. (. 0 e e.. a. 4.. 0.. 0 0 0 0 0 0 0 0 0 ~~~r-4N, r, —4 0 L0 n ~ It a: 4 o oLA C'n o n cn q co ^ co o n o no0 ir0 o ' 0 r — o 0 Ic (<"c l c C IL n oo r-o I r oo ooI O r - 1I "i rc n 1 "11 1sno \Iir 0 I o o, o X 1 n e% 4 r-1 a; ^ n FN ' (I 0' LA U 0 ONM LA 0' 0 t-4 C") Mt 0' 40 1' 4t N 000 O n oN c a r4 -c so 0' r ) qOc" '-cc 00 " at0 00 r- 4 0 0 Lo 0,Jo - M LO a oLN 0 0i r N " 4 4 LA LoAoc ^ LA LA C- a L cc UA o 0o N o c a —4 00o — 4 0o - ' o I-4 (I 4 o tco LA NC % 'I-'- 00 0' N-o C) 4 tlrOo r r- 00 00 00o O N o0 0 N 0 r*00.00,- * 0.- a - '* 0 00 0. *^ * t* *co * -. iON. O *It - *- 0 * UI o 0' I- 1 '- a 4 o4 q0q c 04 c L A - 0 0c ' - _ - 4 0 N 1 -41 t- ' _-4 L o ~~Z~~~ ~~ ~~~ m | oe c c r I \0 C c c (1 0 % c C4 C 0' 0(I cIt 1 0 N C 4C 0I N N 0 1 C" C)I A O cO ) l M C) l 0 * 0 e0 0 e e 0 0 0 0 0 a 0, 0 0 I 0 0 0 0 0 ' Io N o c _ 4 aLA LA LA LA LA C NON r- N 0 -4 r - 0C L r- 0 a 0 '-4 o- ' O LA Ln r — ', ) L-1A C'- ON c 0' '-4 C- LA c oAL A A A OC " 0 M 0' M 0 0 LA aI 4 o0 1' % c- 'IC f 0''- 4 0 c 4 N0 LA ~ x 0 LA Ln M w 0 0 C~ 1L A ~O M M 0 0 LA o \ - N N 0' N N 00 c M U LA I- L c nN M M,0 0 1- ~ n Ln r 0 Iz~* 0 0 0 0 0 0C0 0 0 0 0 I 0 I0 0f _- N 4 L, A L C A '-'-4c0 LA L C'- N 0 0 4 It O00 I - I^^ ~~~~~ cr- j( n IoO-<-n I0 0( r oo cr un.. U n \, -i,-. -O cX c O r^.. r ^. o 0 0 4 - LA '- 1.0 C- 0' 00 a cM C") N C'- 0' CI, r-C 0 ")00 4-1 00 404 14 0 EL Octrnc 0' IO a, 0 NN Nm NC 0C- M M N 0' O N \Ln ol I o C in^ O- ct - 0^ 44 O- o 0 0' CN C C'- N4 It 0 4 r-i C- 4N Cx 4 a 0 cr Lf \- - - ~1 C\ \4 C0 '- Nj 0' 00 LA00co0000 0 0 f0 '0 L c" \ \ (ON rOc C-fLN 4 fnZf\ 0 4('It ) r- O N0'l 0 I 1 q0, — 0N L A 0oM 0\ OD0 in* c C o4 * c0 * *0 I * * * o 0 * 5 0 o * * 0 * * * * * i* * * in - 0 C-4 C" ) C I o N 4 LAn c - - C\0O '.-4 \0 '0 LA + J-LA" 0N 1~ ' ~| - 4 " 4 OC r-i N cCc 4 O A C0 Cinb- - c 0 co o 0 -N( v ) LAn C r- W (ON O \0 C a0Nocr 0 ON 00 H,- c I r-4 III,, C I rl I I I I I I ~l I. I, C o \r i cs c J r vo M 00 r — Zo N a c c c 0> Co N, r-o 00 - -4 I avC' 0 0 a 0 I Fl- O o\ col N OM M U cc ' r N C (% o V LOqn C O 1 Ln0 4-n ON LA C- 0 L4 r- 00n 01 000 C 0 O aI0) I I.n" co I M C O O o - o q Z c A4 —I cLA co 0' C- L M ACl "rL ~C 1 ) V-4n I 0l ~ I c d I o I H c N A n J M-, r 01 e - 4 0 C ~ ~~ ~~N~~ N I o I I I I I N 0I 4I 0 0 0 - In I- HC.1 l 0 I I 0 U') r aI I I 0 00 0 0 0 U U I0 co0 c 0 cc,\ 4 -q -It U,) Ln 1Z \D - r- O co 0 0\ 0 N \N 0 0 0 \ 0 0 1 - 01 Z I1 II I I I I I - I C l cl \ I 0 o wO co 4 r- I \c n Oc O \ O\ C L ac 8 a1 n N c r- r c N o o o c o X! I O ~ ~ < U S ^Y s 4 oA CC %O CCC i cc O > %D OI( r-q 4 a 0 0 UO\ N r4 r-00 N C J r 0 0 0 c- C a Q 0 -4 l a M I C\ (f 0 C\ - Lr \J M C ON o C e C M \0 a- Cf 00 -> 0J n('\ (OI C 0 c ~ 0 1 oa II z-o \ C C N C C n r 01 n C n 0N -1> r- r r- C.0 00 O-c0 o r C'-r C N 1r-cc c C js ~ N I.1 o c) * # * * * I * nl * * # * 1 * n e 4 * 0 + * # * * a * 1 * - * * * *1 * * * 1 _ Cu l ( O _ I W n 1It LC \0 r-I r 00 00 0N > 1 a I ^ C I f rq N c o tol CC %O r 01 r 0 0\ o o _X u 11 I L C I r o:, —In j S I,:, — I0 fOI q I Lnf C I e Dc I:, r — t oOo ocI c i L z O ri - ~ ocy F Oir -I.. -.i I*, I, I r- o c -m ( o C f-. I- '- oi o c Ic o - i o I I I I I I c 1 c*c c ocooo ococoI _ | =- I'-_O ' 1 a X c 01 ao ' 0 c A 1_ _ ' q -C 1- od n G, Nq C O O O q O C O C O | LLI c U e a c d N s n + -I o o q o o c c c 1; a. I z C I I | 1 ae | I CO'1~ 1 4 1 0 1 E-81

Temperature Distribution in Conducting Solid Solution to Problem No. 1 by Rudd Using "Algo" on Bendix G-15 by R. P. Crabtree PROGRAM 1. TITLE HOME PROBLEM 3 [MODEL 2] ~ 2. FUNCTION ANSWER ~ 3. FORMAT A(S4DT), B(S8DP2DT), C(S4DP2D), o(S2DP4D) ) 4, SUBSCRIPTS (JKl)f K. 5., DATA T(250)" ~ 6. BEGIN ~ 7. PRINT(A) a N ~ 8. PRINT(A) a COUNT ~ 9. PRINT(D) = ERR ) 10. CARR(3) ~ 11. FOR J3'=O(15)JLIM BEGIN ' 12. FOR I=0(1)IC ( 13. PRINT(C) = T[Jl] + 00005 ~ 14. CARR() END ~ 15. CARR 5) 16. RETURN ~ 17. END.... 18. BEGIN ~ 19. START: CARR(5) ~ 20. CODE = KEYBD ~ 21. CARR(3) ~ 22. JA = KEYBD ( 23. CARR(1) ~ 24. JB = KEYBD ) 25. CARR(1) ~ 26. IC = KEYBD ) 27. CARR(3) ~ 28. NMAX = KEYBD ~ 29. CARR(2) ~ 30. TU = KEYBD @ 31. CARR(1) ~ 32. TL = KEYBD ) 33 CARR (2) ) 34. E = KEYBD ~ 35. CARR(4) ~ 36. STOP ~ 37. PRINT(A) = JA ) 38. PRINT(A) = JB ~ 39. PRINT(A) = IC ) 40. PRINT(A = NMAX ~ 41. PRINT(B = TU ) 42. PRINT(B) = TL ) 43. PRINT(D) = E ( 44. CARR(2) ~ 45. JLIM J J * 15 46. JBB B JLIM - 15 ' 47. JAA = (JB- JA + 1) * 15 ~ 48. DIFF (TU - TL) / JBB ~ 49. FOR J=( 15)JLIM BEGIN ( 50. FOR I0(1)IC ) 51. T[JI] = TL + DIFF * (JLIM - 15 - J) END ~ 52. FOR K=15(15)JAA ) 53. T[K] a TU ) 54. N = 0 ) 55. COUNT = 0 ) E-82

Example Problem No. 1 56. ERR =0 o 57. BACK: IF CODE > 0. 58. DO ANSWER ~ 59. COUNT s. 0 60. sl: ERR =0 ~ 61. FOR J=15(15 JBB BEGIN ~ 62. s2: FOR l( 1)IC BEGIN ~ 63. IF I = 0 BEGIN ~ 64. s3: IF J < JAA BEGIN ~ 65. TN = TU 66. GO TO DONE END ~ 67. s4: TN = (T[J-15,I] + TCJ+15,I] + 2 * T[J,I+1]) / 4 ~ 68. GO TO DONE END 0 69. IF I > IC - 2 BEGIN ~ 70. s5: TN = (T[J-15JI] + T[J+15,I] + 2 * T[J,I-1]) / 4 ~ 71. GO TO DONE END ~ 72. s6: TN = (T[J-15,i] + T[J+15,] + 2[jI-i] +'Trjl+])/7 4. 73. DONE: IF ERR < ABS (TN - T[JI]) ~ 74. ERR = ABS (TN - T[J,I]) ] 75. s7:' IF E < ABS (TN - T[JjI]) I 76. COUNT = COUNT + 1 ~ 77. LOOK: T[JI] a TN END END ~ 78. N = N-+ 1 ~ 79. IF N > NMAX - 1 80. GO TO FINE ~ 81. IF ERR > E ~ 82. GO TO BACK ~ 83. FINE: IF CODE > 0 ~ 84. STOP ~ 85. DO ANSWER ~ 86. GO TO START ~ 87. END ~ 88. E-83

Temperature Distribution in Conducting Solid CASE A COURSE MESH INPUT DATA: 2 4 4 20 100.00.00.0050 INITIAL TEMPERATURE DISTRIBUTION:.0000 100.00 100.00 100.00 100.00 100.00 66.67 66.67 66.67 100.00 33.33 33.33 33.33.00.00.00.00 FINAL SOLUTION: 11.0031 100.00 100.00 100.00 100.00 100.00 82.62 74.24 71.92 100.00 56.26 42.42 39.19.00.00.00.00 CASE B FINE 'MESH INPUT DATA: JA JB IC NMAX TU TL E 5 10 10 100 100.00.00.5000 INITIAL TEMPERATURE ASSIGNMENTS: 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 88.89 88.89 88.89 88.89 88.89 88.89 88.89 88.89 88.89 100.00 77.78 77.78 77.78 77.78 77.78 77.78 77.78 77.78 77.78 100.00 66.67 66.67 66.67 66.67 66.67 66.67 66.67 66.67 66.67 100.00 55.56 55.56 55.56 55.56 55.56 55.56 55.56 55.56 55.56 100.00 44.44 44.44 44.44 44.44 44.44 44.44 44.44 44.44 44.44 33.33 33.33 33.33 33.33 33.33 33.33 33.33 33.33 33.33 33.33 22.22 22.22 22.22 22.22 22.22 22.22 22.22 22.22 22.22 22.22 11.11 11.11 11.11 11.11 11.11 11.11 11.11 11.11 11.11 11.11.00.00.00.00.00.00.00.00.00.00 FINAL RESULTS: 11.4448 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 96.92 94.32 92.37 91.01 90.13 89.59 89.28 89.13 89.10 100.00 93.69 88.46 84.59 81.94 80.23 79.18 78.57 78.27 78.21 100.00 89.90 81.93 76.28 72.52 70.12 68.65 67.81 67.39 67.29 100.00 84.62 73.90 66.89 62.41 59.61 57.91 56.92 56.43 56.32 100.00 75.40 63.04 55.82 51.35 48.56 46.86 45.87 45.37 45.26 61.37 54.75 47.90 42.78 39.26 36.95 35.49 34.63 34.20 34.10 37.09 35.05 31.76 28.76 26.48 24.89 23.85 23.22 22.90 22.82 17.73 17.10 15.79 14.44 13.34 12.54 12.00 11. 1111.49 11.45.00.00.00.00.00.00.00.00.00.00 E-84

Example Problem No. 2 SCAVENGING OF DISSOLVED GAS FROM MOLTEN METAL by Robert D. Pehlke Write and test a MAD Program which will permit the calculation of the volume of pure argon gas which must be bubbled through a ladle of liquid steel to reduce the hydrogen concentration from some initial value, c, to a final value, c. Assume the purging gas leaves the melt at one atmosphere pressure and in equilibrium with the residual hydrogen content of the liquid metal. Express the volume of argon in liters, and the concentration in parts per million. The equilibrium between hydrogen in the liquid steel and hydrogen in the gas is given by the relation, H (ppm) = 27 'PH (atm) 2 The concentration of hydrogen will be assumed uniform throughout any given phase at all times. A steel company using 50-ton ladles has experienced hydrogen problems in the following three areas: Steel Purpose Hydrogen Analysis PPM Ladle Maximum Tolerable Rolling Stock 14-15 6 Light Forging Blanks 7-8 4 Heavy Forging Blanks 5 3 Inert flush degassing in the ladle has been recommended in these three cases to solve the gas-metal problem. The equipment available will supply 1500 liters per minute of purified argon, and the purging operation is limited to less than 30 minutes. Plot the result of your computer trial, and state whether or not you are in accordance with these recommendations. Solution A material balance around the ladle on argon may be written for an infinitesimal period of time. Thus, moles argon is equals moles argon out plus accumulation, or (PF _ dN wdo- w d + de PFG d+ + do Here w is the constant molar flow rate into and out of the ladle, PF is the partial pressure of the flushing gas argon, PG is the partial pressure of the gas to be removed (the hydrogen), NF is the molar quantity of flushing gas in the ladle at any instant of time, and 9 is time. Since the total moles of gas in the ladle is practically that which is in the gas space (the amount dissolved being exceedingly small), and since the gas space does not change volume, any change E-85

Scavenging of Dissolved Gas from Molten Metal in the moles of argon must be offset by an equal and opposite change in the moles of hydrogen. Therefore with N being the molar quantity of hydrogen, dN = -dNG So that w do W ___ d 6- dN PF+ PG ) G For ideal gases the molar quantities are directly proportional to volumes measured under fixed conditions of pressure and temperature. Since w d 6 is the moles of flushing gas entering the ladle during d O, it may be replaced with dnF, the volume of flushing gas in, while dNG may be replaced with dnG, tihe volume of hydrogen changing in the ladle by virtue of being removed. The material balance in terms of volume become s dnF = (1 dn - dn F +FP+ F G This may be rearranged to -n = ( dnF + dnG) - G+ PGG Since the total pressure is always atmospheric, p + F =1, so that -dnF dn = F JPG If these volumes are in liters, dnG may be converted to dCG parts gas per million parts iron by multiplying by pm/2000 RTW, where p is pressure in atm, m is mole wt (in this case 2 for H2), R is the gas constant (20. 65 liter-atm/lb mole -~R), T is temperature in ~R, and W is tons of iron. Combining the constants gives -0. 0495 M dnF dC = PG J The equilibrium relation C = KG /PG (atm), may now be substituted and after a slight rearrangement, VA dC AdC N _ dCG.0495 M dN - [+ 2- 2 F Co where Co is the initial concentration and VA of flushing gas to reduce the concentration to C. Integration then yields E-_86

Example Problem No. 2 [ 2 r 20.24 W K2 1- 1 C o - C V + A M C Co 2 2L ~K (Co - C) (K + CCo) = 20. 24 M Co If we let J =20.24 W VA = J (Co -C) (K + CCo) / CCo M This equation will now be programmed on the computer and volumes of flushing gas required to decrease the concentration of hydrogen by a factor of 0.95 at each stage, starting initially at Co = 27 ppm. The last figure would be the concentration in equilibrium with pure hydrogen gas at atmospheric pressure. It may be seen from the tabulations that to take the concentration from 14. 59 ppm (which might be typical of a rolling stock ladle) down to 5. 795 ppm ( which would be just below maximum tolerable for rolling stock), the liters of flushing gas would go from 17900.. 74 to 60, 718. 75. The net gas required would, therefore, be 42, 818. 01 liters which could be pumped at 1500 liters/min in less than 30 min; thus, giving a feasible operation. FLOW DIAGRAM /T ROU&^\ ALPHA READ FORMAT INPUT, W. KH, CO. CLOW, NMAX, M 1 PRINT FORMAT TITLE, W9 KH, CO, CLOW, NMAX. M 2 J = (20.24*W)/M 3 MAD PROGRAM RDP ROBT PEHLKE X17-N 005 003 008 2 RDP ROBT PEHLKE X17-N 005 003 008 2 000 ~COMPILE MAD, EXECUTE ALPHA READ FORMAT INPUT~ W, KH, CO, CLOW~ NMAX, M 1 PRINT FORMAT TITLE, W, KH, CO, CLOW, NMAX, M 2 J = (20.24*W)/M 3 C C0/0.95 4 THROUGH BETA, FOR N=0,1 C.L.CLOW.OR.N*G.NMAX 5 C = C0.95 6 VA = (J*(CO-C)*((KH.P.2)+(CO*C)))/(CO*C) 7 BETA PRINT FORMAT RESULT, C, VA 8 TRANSFER TO ALPHA 9 INTEGER N, NMAX 10 VECTOR VALUES INPUT = $ 4F10.3, I5, F5.0*$ 11 VECTOR VALUES TITLE = $59H1REMOVAL OF HYDROGEN FROM LIQUID IR 12 O1N BY INERT GAS FLUSHING//17H DATA,4F10*.3 13 2I5, F5.0// 14 344H C HYDROGEN PPM VOLUME LITERS STP*$ 15 VECTOR VALUES RESULT = $F20.3, F20.2*$ 16 END OF PROGRAM 17 *DATA 50000 27000 27000 1000 100 2 D-1 E-87

Scavenging of Dissolved Gas From Molten Metal REMOVAL OF HYDROGEN FROM LIQUID IRON BY INEPT GAS FLUSHING DATA 50.000 27.000 27.000 1.000 100 2. C HYDROGEN PPM VOLUME LITERS STP 27.000 0.00 25.650 1402.15 24.367 2808.00 23.149 422i.23 21.992 5645.57 20.892 7084.77 19.847 8542.61 18.855 10022.93 17.912 -11529*63 17.017 13066.67 16.166 14638.09 15.358 16248.04 14.590 17900.74 13.860 19600.56 13.167 21351.95 12.509 23159.53 11.883 25028.06 11.289 26962.45 10.725 28967.79 10.189 31049.37 9.679 33212.66 9,195 35463.34 8.735 37807.35 8.299 40250.86 7.884 42800.29 7.490 45462.35 7.115 48244.05 6.759 51152.70 6.421 54195.97 6.100 57381.86 5.795 60718.75 5.505 64215.44 5.230 67881.10 4.969 71725.41 4.720 75758.46 4.484 79990.88 4.260 84433.80 4.047 89098.92 3.845 93998.50 3.652 99145.45 3.470 104553.32 3.296 110236.32 3.132 116209.41 2.975 122488.32 2.826 129089.57 2.685 136030.53 2.551 143329.46 2.423 151005.58 2.302 159079.08 2.187 167571.21 2.078 176504*32 1.974 185901.91 1.875 195788*71 1.781 206190.76 1l692 217135.40 1.608 228651.46 1.527 240769.23 1.451 253520.61 1.378 266939.14 1.309 281060*15 1.244 295920.79 1.182 311560.16 1.123 328019.43 1.066 345341.92 1.013 363573.21 0.962 382761.25 E-88

Example Problem No. 3 COOLING OF A LIQUID-METAL TRANSPORT LADLE by Robert D. Pehlke Write and test a MAD Program which will permit a calculation of the temperature drop of liquid metal held in a closed transport ladle of cylindrical shape. Carry the computations to either the solidification temperature or until an elapsed time of 24 hours. Suggested Approach Assume the following: 1. The temperature of the liquid metal is uniform and equal to the internal interface temperature of the refractory lining of the ladle car. 2. The heat losses may be estimated by determining the rate of loss over short intervals of time and approximating the heat loss as the rate-time product. 3. Neglect the thermal resistance of the thin steel shell which surrounds the ladle. Problem Preparation Do the following in the given order: 1. Prepare a flow diagram for the problem in the form of concise algorithmic statements. 2, Convert the flow diagram to a set of MAD statements. 3. Keypunch the statements and required data cards. 4. Flow diagram, MAD statements, and keypunched cards should be submitted. Data and Nomenclature The program should be tested on a ladle car used for aluminum transport under the following conditions: TM, Temperature of Charged Metal, 2150~R. TA, Temperature of Surroundings, 540~R. AO, Area of External Surface 625 ft.2 AI, Area of Internal Surface, 440 ft. K, Thermal Conductivity of Refractory, 2. 35 BTU-ft/hr-ft -~R L, Thickness of Refractory, 1.5 ft. 0.25 HC, Convective Heat Transfer Coefficient, 0.28 BTU/~R' E, Emissivity of Steel Shell, 0.8 W, Weight of metal charged, 45 tons M, Molecular Weight of Metal, 27 F, Factor to account for specific heat of ladle, 1.4 EPS, Tolerable error in surface Temperature, 1 R.~ E-89

I, Time Interval, 0. 5 hours J, number of time intervals IMAX, Maximum time of holding, 24 hours NMAX, Maximum Number of iterations to determine surface temperature, 100 TLOW, Temperature of Initial Solidification, 1676~R. CP, Specific Heat of Metal, 7.0 BTU/lb. -mole —~R. R, Radiation from Surroundings to the Ladle AM, Log mean area for heat- transfer through the refractory CPM, Gross heat capacity for ladle and metal, BTU/# ~F TO, Temperature of Metal at time P, ~R P, Elapsed time from loading of ladle, hours TS, Temperature of outside surface, ~R N, Number of Iterations required for Temperature convergence QC, Conduction heat transfer, BTU/hr QR, Radiationand Convection heat transfer, BTU/hr TI, Most Recent value of TS during iteration, ~R TN, Metal Temperature after iteration, i.. e. latest to, ~R Solution Heat is transferred to the surroundings by conduction through the refractory and then-by radiation and convection to the ambient sur- \\ '. \\ roundings at TA. The conduction heat transfer during unit time is K' AM QC =- L ( TO-TI) A UA where only the vertical cylindrical refractory wall are considered TA so that the area AO - AI AM-= AO Cross section of Transport Ladle In AI The radiation loss during unit time is Q =0.173 x108 (0.8)(TI4 TA4 r The convection loss is Q = hAO (TI - TA) c Here the convection coefficient h is a function of the temperature difference to the quarter power, 0.25 (TI-TA), therefore, one may write Q = HC. AO (TI-TA)25 c E-90

Cooling of a Liquid-Metal Transport Ladle The combined convection and radiation loss is QR = Q + Q r c The heat loss from the metal results in its fall of temperature. This decrease in energy is AE= 2000 W.CPF T M o N By energy balance QC =QR If either of these is multiplied by the time. interval I ( it must be short enough so that the changes in the temperature during the interval are small), a quantity of heat is obtained which determines the decrease in -metal temperature during the interval. Thus, 2000 W-CP.F (T - T ) o N I. QC = =CPM (T -T) M o N where CPM is the combination of a number of constants. At the start of any time interval the metal temperature TO and the ambient temperature TA are known. The surface temperature TI is not known, so a first guess is made. This allows a QC and QR to be calculated. If TI has been guessed correctly QC comes out equal to QR, and then the temperature of the metal at the end of the short time interval may be calculated as I. QC TN = TO= CPM CPM If TI has not be t ermined within R, it is necessary t corren t the assumed temperature. The magniIn this solution it was decided that if 100) QC-QR > lOEPS, QR where EPS is 1~R, the new assumed surface temperature would be shifted appreciably to TS = TI + (100) QC QR \ QR / If, however, (100) QC QR < 10EP.S, QR meaning that the assumed TI is much better, the new surface temperature would be taken as EPS TS = TI + depending on the which is greater, QC or QR. E-91

Example Problem No. 3 It is clear that a higher order approximation might be made in the heat transfer equations by putting in the average metal or average surface temperatures during the time interval. Thus, for conduction one might write Q L 2 ave The anticipated change in temperature, however, did not merit this refinement, so it was simply assumed for the heat transfer calculations that TO and TI remained constant during the short time interval. The results of the calculation verify that assumption that the change was indeed small as seen in the table following the program, where TO changes only 15~ during a half-hour interval. Flow Diagram for Cooling of Liquid-Metal Transport Ladle RI- ILC:.,J ACP -ro- rl E9 /A/PU T 7 ITL G Tg r-(TA + rM) Al _ 7ROU& \ /TROUw& \ d RIT = I \ MMA\ ^ \KeSUiFr R:7.wf FOR Al- i, Ts< TZ r Z- /ooC4C-QR)/I eR @ RI ui,, A! TO \ > TOo \ * rIAX/ zTS L iPs, Go — ^( < -/ogP o X /~OEPS ~)t TZtX - o (X<o 4s3 X> —/OrSPS -^TITI- ^ -^ (X 1OEPS op, X > o 1 -7 TA T + X - X ->- - Tr 7If. 1 -dooV+R Rka ioss LoS Q~ C- auib 1 s NE -?92 ^)^TA TO - Ql)/cp^ PRIN T ET92

Cooling of a Liquid-Metal Transport Ladle MAD PROGRAM RDP ROBT PEHLKE T12-N 002 004 030 2 000 RDP ROBT PEHLKE T12-N 002 004 030 2 000 *COMPILE MAD, EXECUTE, PUNCH OBJECT, PUNCH LIBRARY ALPHA READ FORMAT INPUT, TM, TA, AI, A0, K, L, HC, E, W, CP, M, 1 2F, EPS, I, IMAX, NMAX, TLOW 2 PRINT FORMAT TITLE1, TM, TA, AI, AO, K, L, HC, E. W, CP, M 3 PRINT FORMAT TITLE2, F, EPS, I, IMAX, NMAX, TLOW 4 R = (0.173E-8)*E*(TA.P.4) 5 AM = (AO-AI)/(+ELOG.(AO/AI)) 6 CPM = (W*2000*CP*F)/M 7 TS = TA 8 TO = TM 9 TI = (TM+TA)/2 10 P 0 11 N = 12 PRINT FORMAT RESULT, TM, Pt N 13 QC = 0.0 14 QR = 1.0 15 BETA THROUGH CHI, FOR J=l,1, TO.LE.TLOW.OR.P.E.IMAX 16 THROUGH GAMMA, FOR N=l1,l N.G.NMAX.OR..ABS.(TS-TI).L.EPS 17 TS = TI 18 WHENEVER (100*(QC-QR)/QR).L.(-lO*EPS).OR.(10O*(QC-QR)/QR)*G.( 19 210*EPS) 20 TI = TI + (100)*(QC -QR)/QR 21 OR WHENEVER (100*(QC-QR)/QR).L.O.AND.(100*(QC-QR)/QR).G.(-10 22 2*EPS) 23 TI = TI - (EPS/2) 24 OR WHENEVER (100*(QC-QR)/QR).L.(10*EPS).AND.(l00*(QC-QR)/QR). 25 2G.O 26 TI = TI + (EPS/2) 27 OTHERWISE 28 TI=TI 29 END OF CONDITIONAL 30 QR= AO*(HC*((TI-TA).P.(1.25))+(O.173E-8)*E*(TI.P.4)-R) 31 GAMMA QC = K*AM*(TO-TI)/L 32 P = I*J 33 TN = TO -(QC*I)/CPM 34 PRINT FORMAT RESULT, TN, P, N 35 CHI TO = TN 36 INTEGER J. N, NMAX 37 TRANSFER TO ALPHA 38 VECTOR VALUES INPUT = $4F5.1, 11F4.1, I3, F5*1*$ 39 VECTOR VALUES TITLE1= $48H1TEMPERATURE DROP OF LIQUID METAL I 40 2N A LADLE CAR //5H DATA/32H INITIAL METAL TEMPERATURE, TM = 41 3F7.1/ 23H AIR TEMPERATURE, TA = F6.1/ 19H INSIDE AREA, AI = 42 4 F5.1/ 20H OUTSIDE AREA, AO = F5.1/ 27H THERMAL CONDU 43 5CTIVITY, K = F4.1/ 27H REFRACTORY THICKNESS, L = F4.1/ 44 630H CONVECTION COEFFICIENT, HC = F4.1/ 23H SHELL EMISSIVI 45 7TY9 E = F4.1/ 24H METAL WEIGHT TONS~ W = F5.1/ 27H SPE 46 8CIFIC HEAT METAL, CP = F4.1/ 29H MOLECULAR WEIGHT METAL, M = 47 9 F4.1*$ 48 VECTOR VALUES TITLE2 = $18H HEAT FACTOR9 F = F4.1/ 30H TEMPER 49 2ATURE DEVIATION, EPS = F4.1/ 21H TIME INCREMENT, I = F4.1/ 37 50 3H MAXIMUM NUMBER OF INCREMENTS, IMAX =F5.1/34H MAXIMUM NUMBER 51 4 OF TRIALS, NMAX = I4/ 24H FREEZING POINT, TLOW = F6.1//// 30 52 5H METAL TEMPERATURE VERSUS TIME ///55H METAL TEMP 53 6 TIME HOURS ITERATIONS//*$ 54 VECTOR VALUES RESULT = $F20.2, F15.1, I15*$ 55 END OF PROGRAM 56 *DATA 21500 5400 4400 6250 24 15 3 8 450 70 270 14 10 5 24010016760 9 E-93

Example Problem No. 3 INSTRUCTOR'S SOLUTION TEMPERATURE DROP OF LIQUID METAL IN A LADLE CAR DATA INITIAL METAL TEMPERATURE, TM = 2150.0 AIR TEMPERATURE, TA = 540.0 INSIDE AREA, AI = 440.0 OUTSIDE AREA, AO =.625.0 THERMAL CONDUCTIVITY, K = 2.4 REFRACTORY THICKNESS, L = 1.5 CONVECTION COEFFICIENT, HC = 0.3 SHELL EMISSIVITY, E = 0,8 METAL WEIGHT TONS, W = 45,0 SPECIFIC HEAT METAL, CP = 7.0 MOLECULAR WEIGHT METAL, M: 27.0 HEAT FACTOR, F = 1.4 TEMPERATURE DEVIATION, EPS = 1.0 TIME INCREMENT, I = 0.5 MAXIMUM NUMBER OF INCREMENTS, IMAX = 24.0 MAXIMUM NUMBER OF TRIALS, NMAX = 100 FREEZING POINT, TLOW = 1676.0 METAL TEMPERATURE VERSUS TIME METAL TEMP TIME HOURS ITERATIONS 2150.00 0.0 0 2134.75 0.5 10 2119.50 1.0 1 2104.24 1.5 1 2088.99 2.0 1 2073.74 2.5 1 2058.49 3.0 1 2043.23 3.5 1 2027.98 4.0 1 2012.73 4.5 1 1997.48 5.0 1 1982.23 5.5 1 1966.97 6.0 1 1951.72 6.5 1 1936.47 7.0 1 1921.22 7.5 1 1905.96 8.0 1 1890.71 8.5 1 1875.46 9.0 1 1860*21 9.5 1 1844.95 10.0 1 1829.70 10.5 1 1814.45 11.0 1 1799*20 11.5 1 1783.95 12.0 1 1768.69 12.5 1 1753.44 13.0 1 1738.19 13.5 1 1722.94 14.0 1 1707.68 14.5 1 1692.43 15.0 1 1677.18 15.5 1 1661.93 16.0 1 E-94

Example Problem No. 4 ENTHALPIES OF SOME METALLIC ELEMENTS at REGULAR TEMPERATURE INTERVALS by Robert D. Pehlke This problem requires that a computer program be written to integrate a specific heat equation over the temperature range from 298. 16 to 2500~K. Phase changes may be involved at any temperature and in any number in the range up to a maximum number of nine. The enthalpy increments are to be printed at each 1000K interval as well as for the primary phase at the transformation temperature and for the transformed phase at the same temperature. The input data include in addition to the name of the material the coefficients, A, B, and C, of the specific heat equation, C = A+ BT + C/T, p for each phase; the temperature T of transformation; the first temperature rabove T which is an integral multiple of 100; and H, the enthalpy of the transformation. A flow diagram, tested program in the MAD language and printed output for a few elements are to be presented. Solution In regions where there is no phase change the increase in enthalpy between two temperatures is C. AH= (A + B.T + ) dT 1T. TJ J T This may be integrated and (T2 - T1) factored out to give AH rA. + B.(Tz + T1 C..H A.. 2 + 1 -2 (TZ T1) It is this form of integral that is used in the computations. At a phase transition point the increase in enthalpy will simply be that stipulated by input data. Since enthalpies are to be printed every 1000K and also at the beginning and end of each phase change, the program must be alert to the occurrence of a transition at any conceivable temperature between 298. 16~K and 2500~K. The method by which this is done is to feed as input data not only the transition temperature, but also the next higher temperature above transition that is an integral multiple of 100. Use of this integral multiple temperature Xj is demonst rated in the following logical program. Consider, for example, a metal that has two transitions within a 100~ interval, say one at 627'K which will be denoted T and the other at 685 K which is denoted T. A comparison is first made between Xj_, which for j = 1 is X = 300, X. which is X = 700. Since 300 does not equal 700, the procedure is to calculate the increase in enthalpy between 298. 16 and 300 using A1, B1, and C1. The temperature T is then incremented by 100 and the enthalpy increase between 300 and 400 computed and added to that at 300. This process is repeated until T at the lower end of the integral is equal to or greater than T1 - 100.E-95

Enthalpies of Some Metallic Elements or 527. Thus, the last calculation will be between 500 and 600, since 600 is greater than 527, and the procedure will stop short of that. The next calculation is to integrate between 600 and T1 which is 627, using still A1, B 1' and C1, for so far we are dealing with only the first phase. At 627 the AH of the transition is added to the enthalpy to give the enthalpy of the transformed phase at 627. In considering phase 2, a comparison is made between X = 700 and X2. Since the second transition is in the same 100o interval as the first, xz also is 700. Because these two are equal, the program transfers to a calculation of the integral between 627 and 685. Then the AH at 685 is added to give the enthalpy of the transformed or third phase at 685. Continuing with the third phase the program determines the integral between 685 and 700 first and then proceeds again by 1000 intervals until a new transition temperature is reached. Examination of the computed enthalpies for iron shows how the calculation advranced by 1000 intervals up to 1000~K. At this point the program proceeded to 1033, the first transition temperature. There it added a AH of 410, and then went on to 1100 etc. The computed enthalpies (H) are calories per gm-mole. Nomenclature A = A for jth phase B. = B " " " C. =C t" " T. = transition temperature between j-1 and jth phases X. = temperature just above T. that is integral multiple of 100 3 J N = number of phase changes (N < 10) H. = enthalpy change at phase transition temperature T. 3 3 J = counter on phases I = counter on 100~ intervals TL = low temperature in an integration DELT = temperature interval (in this case 100~) MA, TE, RI, AL, and S = material names. E-96

Enthalpies of Some Metallic Elements ~(a)= 0 - - lpr.. '. 1 \ E) FoR Xii, =- '.V:,W-oo/ TECJV.-T _ Ta x +~)r 77L71-. PRN 7J V - TL = TCr^-J-(T Flow Diagram for Computing Enthalpies E-97

Example Problem No. 4 MAD PROGRAM RDP ROBT PEHLKE T12-N 002 002 008 2 000 *COMPILE MAD, EXECUTE, PUNCH OBJECT, PUNCH LIBRARY DIMENSION A(9), B(9), C(9), T(9), X(9), H(9), E(9) 1 ALPHA READ FORMAT INPUT1, MA, TE, RI, AL, S, N, DELT 2 READ FORMAT INPUT2, A(1)...A(N) 3 READ FORMAT INPUT2, T(1)...T(N) 4 READ FORMAT INPUT2, X(1)...X(N) 5 READ FORMAT INPUT2, H(1)...H(N) 6 READ FORMAT INPUT3, B(1)...B(N) 7 READ FORMAT INPUT3, C(1)..C(N) 8 PRINT FORMAT TITLE, MA, TE, RI, AL, S 9 T(O) = 298.16 10 E(O) = 0 11 X(O) = 300 12 PRINT FORMAT RESULT, T(0), E(0) 13 THROUGH BETA, FOR J=ll, J.G.N 14 WHENEVER X(J-1).E.X(J), TRANSFER TO DELTA 15 E(J) = E(J-1) + (A(J)+(B(J)*(X(J-1)+T(J-1))/2)+C(J)/(X(J-1)* 16 2T(J-))(XJ-(J-)))(XJ T(J-1)) 17 PRINT FORMAT RESULT, X(J-1), E(J) 18 T = X(J-1) 19 TL = X(J-1) 20 THROUGH GAMMA, FOR I=1ll T.GE.(T(J)-100) 21 T = X(J-1) + I*DELT 22 E(J) = E(J) + (A(J)+(B(J)*(T+TL)/2)+C(J)/(T*TL))*(T-TL) 23 TL = T 24 GAMMA PRINT FORMAT RESULT, T, E(J) 25 WHENEVER T.GE.X(N), TRANSFER TO ALPHA 26 PSI E(J) = E(J) + (A(J)+(B(J)*(T(J)+TL)/2)+C(J)/(T(J)*TL))*(T(J)- 27 2TL) 28 PRINT FORMAT RESULT, T(J), E(J) 29 E(J) = E(J) + H(J) 30 BETA PRINT FORMAT RESULT, T(J), E(J) 31 INTEGER N, J, I 32 TRANSFER TO ALPHA33 DELTA E(J) = E(J-1) 34 TL = T(J-1) 35 TRANSFER TO PSI 36 VECTOR VALUES INPUT1 = $5C6, I5, F5.0*$ 37 VECTOR VALUES INPIJT2 = $8F9.2*$ 38 VECTOR VALUES INPUT3 = $8E9.2*$ 39 VECTOR VALUES TITLE = $35H1HIGH TEMPERATURE HEAT CONTENT FOR 40 2, 5C6, /// 41 355H T DEGREES KELVIN H(T) - H(298.16) /*$ 42 VECTOR VALUES RESULT = $F2(.0, F30.1*$ 43 END OF PROGRAM 44 E-98

Enthalpies of Some Metallic Elements *DATA IRON 5 100 D-1 337 1040 485 1030 1000 D-2 103300 117900 167400 180300 260000 D-3 110000 120000 170000 190000 250000 D-4 41000 21000 11000 370000 000 D-5 7.10E-3 O E+ 300E-3 O E+ 00E-3 OOE+O O.OOE+O D-6 0.43E+5 O.OOE+O O.OOE+O O.OOE+O O.OOE+0 D-7 MANGANESE 6 100 D-11 570 833 1070 1130 1130 626 D-12 100000 137400 141000 151700 236800 260000 D-13 110000 140000 150000 160000 240000 250000 D-14 53500 54500 43000 350000 5370000 000 D-15 3.38E-3 0.66E-3 O.OOE+O O.OOE+O O.OOE+O O.OOE+O D-16 0.37E+5 O.OOE+O O.OOE+O O.OOE+O O.OOE+O O.OOE+O D-17 CARBON 1 100 D-21 410 D-22 260000 D-23 250000 D-24 000 D-25 1.02E-3 D-26 2.10E+5 D-27 SILICON 2 100 D-31 579 613 D-32 168600 260000 D-33 170000 250000 D-34 1210000 000 D-35 0.56E-3 O.OOE+O D-36 1.09E+5 +O.OOE+O D-37 TEST PASS OF IDEALIZED DATA 8 100 D-41 100 100 100 100 100 100 100 100 D-42 101000 102000 103000 111000 112000 121000 131000 260.000 D-43 110000 110000 110000 120000 120000 130000 140000 250000 D-44 20000 30000 40000 50000 60000 70000 80000 000 D-45 D-46 D-47 E-99

Enthalpies of Some Metallic Elements %0 re. 0 0 O r- C1 N — q 0 N r(C\ Ln If O4 a' '0o 00 00 CO co0 a C\ c O C 0) 0 C 0 0 00 C( - i o IO ~ 0 ~0 - r- 0 00 D L0 00 0 0 0 0 0 O0 LN g O 00 O O 0 0 (3 o0 — 4 00 0O 0 00 ~ O M r-I acorl n '% O \ 0O C Cr- M (cN r Cl- 0\ 4 It VL% %Dt O^ O c -lqC O f- O\ %O a,, 0, —4., a'~1,,0 I 4 0) \0 a'- 4 ('v0 oO 0.0 ~ U' 1 L- (~ C (,o, c' ~ ( (,, ' ~, ( '. N' N: ) L- - -' Ii o,-or-, -I ' --- H -4 C,'- '-4 (4,4 ( Nr —. r- - I — Lu z - 0 Iz 3 0 U-.1 -z UJ Z Z > 0 - U UJ < U U U 0 0 * 0 00 0 0 0 0 0 ** 00 0 0 0 0 O 0 0 a' 0 0 00 0 00 0 0 000 f 0 o'-'r-40oo0o0o0 0oo0 j O0 0 0 0 0 0 0 0 0 0 0 0 -- "O- 0 I -C,-, r-4,- 0 0 0 0 0 0 0 0 ~O % 0 0 C0k U r-L r- r- -4 -4 4r —4 -4 '-4 '-4 <-4r-4 r-4 '-r-r-4~-4 N-4 N N N D C {< 1 -=r u_ 2: I I v0 0 0 0 M C N a' '4 M \0 \0 4 0 0 0 0 0 a0 0 0) 0) 000 00 0 O O 00 *O 0 @ 0 0 * 000 00 Cy\.0 M d,:0 MO 0 0 0 r.,_ ~j (v~,, ur 40 q 0 ~-o o 0a -,- to <w Or a' 0D Mw n U ( 0 OD t 4- -( r-I r- r-I Cr - r - 9 -Z - 0 I iz > 0 4 U L u~J I Lu0)0'0' L a'00 00oooor-ooooI00000000000 ~ Lu ' —4 '-4-4 4-f '-4 '-4 r-4 '-4 '-4 r-4-4 r- ' r —I - C4 C j C j C4 ' N N N uJ

Example Problem No. 4 HIGH TEMPERATURE HEAT CONTENT FOR CARBON T DEGREES KELVIN H(T) - H(298.16) 298. 0.0 300. 3.8 400. 274.5 500. 625.4 600. 1021.5 700. 1447.8 800. 1896.8 900. 2364.3 1000. 2847.9 1100. 3345.9 1200. 3857.3 1300. 4381.3 1400. 4917.5 1500. 5465.4 1600, 6024.7 1700. 6595.3 1800. 7177.0 1900. 7769.5 2000. 8372.9 2100. 8987.0 2200. 9611.7 2300. 10247.1 2400. 10893.0 2500. 11549.4 HIGH TEMPERATURE HEAT CONTENT FOR SILICON T DEGREES KELVIN H(T) - H(298.16) 298. 0.0 300. 8.7 400. 516.5 500. 1066.2 600. 1639.7 700. 2229.1 800. 2830.6 900. 3442.1 1000. 4062.2 1100. 4690.1 1200. 5325.2 1300. 5967.2 1400. 6615.8 1500. 7270.9 1600. 7932.1 1686. 8505.7 1686. 20605.7 1700. 20691.5 1800. 21304.5 1900. 21917.5 2000. 22530.5 2100. 23143.5 2200. 23756.5 2300. 24369.5 2400. 24982.5 2500. 25595.5 E-101

Enthalpies of Some Metallic Elements HIGH TEMPERATURE HEAT CONTENT FOR TEST PASS OF IDEALIZED DATA T DEGREES KELVIN H(T) - H(298.16) 298. 0.0 300. 1.8 400. 101.8 500. 201.8 600. 301.8 700. 401.8 800, 501.8 900. 601.8 1000. 701.8 1010. 711.8 1010. 911.8 1020. 921.8 1020, 1221.8 1030. 1231.8 1030. 1631.8 1100. 1701.8 1110. 1711.8 1110. 2211.8 1120. 2221.8 1120. 2821.8 1200. 2901.8 1210. 2911.8 1210. 3611.8 1300. 3701.8 1310. 3711.8 1310. 4511.8 14Q0. 4601.8 1500, 4701.8 1600. 4801.8 1700. 4901.8 1800. 5001.8 1900. 5101.8 2000. 5201.8 2100. 5301.8 2200. 5401.8 2300. 5501.8 2400. 5601.8 2500. 5701.8 E102

Example Problem No. 5 CONCENTRATIONS OF CARBON, HYDROGEN, AND OXYGEN COMPOUNDS IN A GAS-COOLED GRAPHITE NUCLEAR REACTER by D.V. Ragone and J.M. Dealy I. A nuclear reacter containing graphite uses helium as a coolant. Oxygen occurs as an impurity. Reaction with the graphite yields CO, CO with a very small amount of 0 remaining. The total oxygen content 2 2 of the gas is represented by the parameter: OT = XCO + XCO + 2O where X = mole fraction of component i. The "gaseous carbon" is represented by C =X +X T CO CO2 -4 1) Solve for C, XCO XCO X /XC at 1000~F, O = 10, and a total pressure of 20 atm. T CO, CO' CO CO T 2) Set up a computer program to solve for these parameters in 100~F intervals from 500 to 1500~F -5 -4 -3 for 0 = 10 10, and 10. Use a total pressure of 20 atm, but put the pressure in the program so that it can easily be varied. II. Solve the same problem considering both oxygen and hydrogen impurities and only the species H2, CO, CO2, CH4, and H 0. 2 4 2 O = XO + 2XCO + XH + 2 X H =2X + 4X + 2X T H CH4 H2 Solve for T CO CO + CH4 2 4 Set up a program using 0 = 10 to 10 in decades -5 -1 HT = 10 to 10 in decades T = 500~F to 15000F in steps of 100~F P = 20 atm. E-103

Concentration of Gases in Graphite Reactor Data 1. C+ 2H =CH 2 4 AG = -16520 + 12.25 T log T -15. 62T log base 10 T in ~K AG~ in calories, /gm mole of first reactant 2. C+02 = CO G~ = -94200 - 0.2 T 3. C + 1/2 02 = CO AG = -26700 - 20.95 T 4. CO2 + H = H O+ CO Z 2 2 AG~ = +8600 - 7.65 T Solution to Part I Two reactions need to be considered: 1)+ C + O AG~ = -94200 -0.2 T ' Z2 1 2) C + 1/2 07 CO AG = -26,700 -70.95 T Since AG~ - R T In Ka AGO ln Ka =- R RT For the above reactions then 94, 200 to. 2 T 47, 500 In K_ =. + 0.101 I (1.987) T T and 26,700 + 20.95 T 13420 lnK + 10..52 2 (1.987) T T where T is in ~K. From the definition of the equilibrium constant, a X P X co2 co co CK2 C= 2 CO2 K =, = _. -_ a a (1) X P X c ~2 ~2 ~2 a X P X P12 CO Co co 2 1/2 1/2 1/2 1/2 aa (1) X P X c ~2 ~2 ~2 E-104

Example Problem No. 5 where it has been assumed that the standard state for all gases is the pure gas at unit fugacity (i.e. fl= atm) and that the gas phase behaves ideally with the fugacity equal to the partial pressure. The activity of the carbon is unaffected by small pressure changes and so is taken as unity. For part I the given conditions are T = 100~F, -4 T = 10, and P= 20 atm Thus, K and K2 may be calculated as follows: 1000 + 460 T: 8 811~K 1.8 47,500 n K = 811 + 0. 101 = 58.56 1.811 58. 6 log K =.30 25.43 K = 2.68X1025 1 13, 440 n K 13440 + 10.54 = 27. 11 2 811 log K = 11. 77 K = 5.90 X101 It can be seen that the values of the equilibrium constants in the entire temperature range of this problem will be very high, so that the mole fraction of oxygen is negligible compared to those of CO and COL. This permits dropping X in the expression for 0-, so that O = X + 2X It does not permit dropping X from the equilibrium relations, however, unless one combines the two reaction equations into a simple one which does not involve oxygen (i.e., 2 CO= CO +C). -4 This single equation could be used with O = 10 to solve the problem; though, here it was decided to use the two equations. From the equilibrium relations X 2 P X CO 0 = 2 K2 and 2 ~~and K X P I CO P CO2 1 0 2 ~2 1 2 K2 E-105

Concentration of Gases in Graphite Reactor Putting this into OT gives 2K1 X P T = CO 2 K 2 Where X is the only unknown. Rearrangement yields CO Z 2 K 2 K 2 2 2 2 T x + X - o CO + 2K P CO 2K P 1 1 The constants are next evaluated as follows: K2 ( 5.90 )2 (1022) 3-4 3. 25 10 12K (2) (2.68) (20) (1025) 2 K 0 _2 __T_ = (3.2 X10-4) (10-4) = 3.25 108 1P 2 -4 -8 X. + 3.25 X 10 XCO 3.25 10 = O CO CO Solving the quadratic equation, we have X _ -3.25 X 10 +.57 X 10 + 13.0 X 10 CO 2 X = 8.0 X 10=5 'CO The other unknowns are 0 = = 1.0 X510 T T, - CO 2.0 X 10 -5 and X Co2 1.0 X 10 5 0.125 CO 8.0 X 10 E-106

Example Problem No. 5 The above is the hand calculated solution of Part I. Following is a suggested computer program for the same part with varying T and 0T. This program has never been run on the computer, so it cannot be stated definitely that it is complete and workable. Computer Program Diagram for Part I POGRA TSYMBOL TAL E.T TX-'P N.l=.I. 1 ~ -1 K = CK2 XCO = XCO2 InK = CKlL 0 =OT ]Orz, oTF:T n K CU-CK2L CT = CT temp, ~K =R TK limits on 0 = OTI, OTF K~ Co Al irAt7 XCOPIN7T temp, ~F 7= T X F o T= T - 1o O T- /0oT PROGRAM SYMBOL TABLE CK1 XCO XCO K= CK2 X CO= XCO2 in K, = CKL T = OTE-1 in K = CK2L C = CT 2. T temp, ~K = TK limits on OT = OTI, OTF temp, ~F = T X E-107

Concentration of Gases in Graphite Reactor SUGGESTED FORTRAN PROGRAM FOR SOLUTION TO PART I SUGGESTED FORTRAN PROGRAM FOR SOLUTION TO PART 1' * COMPILE FORTRAN, EXECUTE 1 WRITE OUTPUT TAPE 6931 2 READ INPUT TAPE 7,32,OTI,OTF,TI,TF,R 3 OT = OTI 4 WRITE OUTPUT TAPE 6,33,0T 5 T = TI 6 TK = (T+460)/1>8 7 CK1L = 4700./T + 0.101 8 CK2L = 13420./T + 10.52 9 CK1 = EXP(CK1L) 10 CK2 = EXP(CK2L) 11 B = CK2**2/(2.*CK1*P) 12 = B*OT 13 XCO = (-B+SQRT(B*B+4.0*C))/2. 14 XC02 = (OT-XCO)/2. 15 CT = XCO + XC02 16 RATIO = XC02/XCO 17 WRITE OUTPUT TAPE 6,34,T,XCO,XC02,CT>RATIO 18 IF(TF-T)21,21,19 19 T = T+100. 20 GO TO 6_ ___ 21 IF(OTF-OT)24,24,22 22 OT = 10.*OT 23 GO TO 4 24 CALL SYSTEM 31 FORMAT(1H1,15(1H ),33HSOLUTION TO PROBLEM 32M647 PART 1) 32 FORMAT(2E10.2,3F8.2)_ 33 FORMAT(1HO,15(1H ),14HTOTAL OXYGEN =E10.2//) 34 FORMAT(1H,20(1H ),F8.2,4E10.2) * DATA 1.OOE-05 1.00E-03 500.00 1500.00 20.00 E-108

Example Problem No. 5 Solution to Part II If all oxygen is assumed to be in the combined state as in Part I, only three reactions need be considered: 1) CH *-o 2H + C 4 2 3615 AG~ =16,520 - 12.25 T log T + 15.62 T,, log K = - + 2.681 log T - 3.418 2 2 2 2 aa P x P c (1)(xH H K= - 2P K ac xOx P xCH4 CH OCH CH 4 4 4 It will be convenient to let x H K z 1 K' = - - 2 xH P 3615 log K' = - T + 2, 681 log T - 3.418- log P 2 T 2) 2 CO -- C + CO2 Obtained by combining C + 0 = CO AG2 = - 40, 800 + 41.7 T 2and2 2and C + 1/20 = CO -og K 89278 - 9.125 o2. T aC aCO (1) xCO p x K2 2 2 2 CO CO 2 CO As before let x Xco2 K'= 2. PK 2 2 2 CO 8927.8 log K = 9.125 + log P 2 T 3) CO +H2. HO + CO 3 2 K 2 2 aGO = 8600 7.65 TH 2 2 a? aa a xCO XE- 109 E-109

Concentration of Gases in Graphite Reactor Now, under any given set of conditions, T, P, OT, HT, five relationships govern the system: XE 2 K' x = f ( T, P) 1 x 1 CH4 XCO K'= - = fT (T, P) 2 2 2 X X CO CO H20 XCO K = x - f (T) 3 Xco XH 3 2 2 = CO+ 2 C 2 + H20 H =4CH + 2H + 2H 0 T 4 2 2 Since there are five variables involved, it remains only to solve the five simultaneous equations. The system of five equations can be reduced to one equation in one variable. Choosing X as the variable, — 2 XCOCO xHi_ 0 Xco EQ2 CO - 3 Co2 2 2 2 H 'O CO XCH (4 _ 2 2 "K' K K XO 13 C3 o Inserting these into H gives 2 2 4X X 2X X H 2 + 2 + 2X 1 3 CO 2 Since X~o = K' X co E-110

Example Problem No. 5 4X?- H ZXH O HNT 4X2H20 + _ O +zx H T H22 + 2X K1 (K')2 K32 XCO2 3 K2' XXO 2 3 K3 c XO Now let M = XH2 0 = OT - XCO ' 2XCO2 or M = OT - X - 2K2' X O2 Also let N = K21 K3 XCO so that HT 4M + 2M +2M K1I N2 N or: 2 f(XC) = = M + 2M 2HT GCO) - N K I'N 2 This is a rather complex implicit function of (Xco), and Newton's Method of approximation will therefore be employed for its solution. It will then be necessary to know f' (XCO) fM ' - MN' 4 N4 N' f' (X c)= M' + (- + (M)[ N2 N M l NM N - M+( + 1 NM - MNi) 1' 'iN 2 N2 where: M' = -1 -4K2' XCO N' = K2' K3 E-lll

Concentration of Gases in Graphite Reactor Once X has been determined within a stated precision, all the other unknowns may be computed CO as follows: XCO = K'Z XCO XH O = OT -Xco '2XC 2 T CO Cc02 X x x - 2 H2 X CO K -~2 XC02 T ~K -2 TK H (final) H 4 K' C X + X + X 2T CO COM CM The Fortran program to carry out the above indlicated operations and the tabulated results from this program are presented on the following pages. 'Program Symbol Table C 3 XCO TF T E-112 XCO XCO2 TK TK 0T (initial) B- OTI XH O XH2O OT (final) -. OTF 2 T XH - XH2 HT (initial) HTI H2 x, - N XOH4 HT (final) HTF CH 4 T (initial) - N TI Or~~~~~ -*' —~ OT ~T (final) - ~ TF T Pressure P HT - HT x YCO Ti + 1 CT - CT M - CM N CN log K'1 -- CK1LP - NMP N' ip CNP log K, 2 CK2LP N C F(xco) FXO log K3 g CH3L F, (X ) DFXCO K' - CK1P /required\ ---- CRIT accuracy _K2PZ\for X K - - CK3 E-112

Example Problem No. 5 FORTRAN PROGRAM DIAGRAM FOR -PART II ~ ri - [4r-f r o T rbr Trb I ----I TL UIT- C-. OT ---i TI,ALC T'fAre I/c'..J r rX~, t; P CALCA o C-ULAT6 N, '< T~TI T+IT~460 )/, X;, AK3 d, Al. #V, @ * F'6~ (XO), ) Z = (Cxo)j - Fx//Cxco) _ RX (xiot -)/XX iXi)X ^ F TF T -TllO+~iT oT~l~! E-113

Concentration of Gases in Graphite Reactor FORTRAN PROGRAM * GOMP4-L ---. -F-FR T RAN E XE Q-.T-F — 4U ---— _ ___MP 1 WRITF OUTPUT TAPE 6,51 2 RFAD TNPIIT TAPF 752.?TT.OTF. HTHT F.CR TT. TF,P 3 OT = OTI -... — 4 —4-RI.-T-E OUTPUIT TAPE 6,53- OI-,T 5 HT = HTI 6__ WRITE OUTPUT TAPE _654,HT _ 7 T = TI 75 TI = ( T-46, Ntl /1-8 8 CK1LP = -3615./TK+2.681*ELOG(TK)/2.303-3.418-ELOG(P)/2.303 9 CK2LP = 8927.8/TK-9.125+ELQG(P) /2.303 10 CK3L = -1882./TK+1.674 1-! CK —P = l.*CKILP __ _ ___ 12 CK2P = 10.**CK2LP 13 CK3 10r(,**CKBI 14 XCO = OT/2. _ 15- M = OT-XC Q —2-*CK2P*( XCO**2 ___ 16 CN = CK2P*CK3*XCO __ 17.. CMP._= - 1_. -4...*C.K2P* XCO _____ __ 18 CNP = CK2P*CK3 19 FXCc = CM+CM/CN+(2./CK1P)*(fCM/CN)**2.)-HT/2. 20 DFXCO = CMP+(1.+4.*CM/(CK1P*CN))*((CN*CMP-CM*CNP)/CN**2.) 2.....-... 1 Y.-YCO......XCO....XCO _X_____.__._C__.. ________ 22 R = (YCO-XCO)/(YCO+XCO) _.__._...23 _XCQ _= ___.._......................_... ____ _ ___ 24 IF(CRIT-R)15,25,25?5 XC)O = CKP*XCn**?. 26 XH20 = OT-XCO-2.*XC02 __..2..XH2 2_.__=__XC*n2/ H o/. i CK3.XC2 _____ ________ ___.__-__ 28 XCH4 = XH2**2./CK1P.... 9CT - XCO_+XCO+X CH _______ 30 WRITE OUTPUT TAPE 6,55,T,CT 31 TF( TF-T)1.4 't.37 _ 32 T = T + 100. 33. GO TO 75. — -.. —...... --- —....-..........-.-. —.-.-. —........-.-.34 IF(HTF-HT)37,37,35 35 HT = 10.. T H-...-.................. —. -..... - -.- _ 36 GO TO 6 17_ TF( TF-nlT E 4 F n L4F. ln 38 OT = 10.*OT......39.GO TO.-.....-......_ _ __ _._-_ 40 WRITE OUTPUT TAPE 6,56. 41_-CAL. L SYSTEM..... -.-.-_........__. _. 51 FORMAT(1H1,15(1H ),35HCOMPUTER SOLUTION TO PROBLEM 32M647) 52 FORMAT(fF10O.2,2F8.2?,F.1) 53 FORMAT(1HI,15(1H ),14HTOTAL OXYGEN =E10.2//).......54 ifERMA.L1H L2.1 C DU. ) 2.16HTOTAL HYD.ROGEN L_.FL..2//J20 1 HJ ) 3 HITEM.PERATLUR CE TOTAL CARBON/21(1H ),9HDEGREES F//). _..._55_EORMA TI 22.(1l.H...)F7 2.-13( 1H ) El1.QL____._ __ ___..___ 56 FORMAT(1HO,25(1H ),14HEND OF RESULTS) * DATA l.OOE-05 1.OOE-03 1.OOE-05 1.GOE-01 l.OOE-04 5CO.OO 1500.00 20.0 E-114

Example Problem No. 5 INSTRUCTOR'S RESULTS CO i M1P ' l UT Ir T0L iTIl, E., 2;, T:L 3 '-:-:'..'E" - 1i. OO Ei- E —0 -__ "F E I P F-E R T ' R ^E TR..-.O T R:!i.' R ' A ' —Oi: -DElGI EE, F _ 1 5 `' iI i I i. 1 I i- 13 '-, 00 O. 5! 0 5 1. 0, ". -._. -, 4_., -.-.i-_,-,, 1400.00 -IT —,_ L,- O- - ---- - '0_ _n! 1 F_ '. OE.::.:'.. _.._.............................. 15"0.0 0 - -" ' -CS ' — i '-i ~... ______________0.. _..... _._ _ 1 3! 1OT. i-, '-! O. 9 '3 '-.: ': E-! L' I 3 1 i_0 i. I n,;. — 05 ' I 40 0 J!:1 500.00-': "',. i i'i.10 - T!1T RL H-' D RFE., F E-01, " - 1 E t I,-j 'p ' T i: ' L iR F. Ti.. 0_. _1 __.. 'L E E,,R i. *_:1 E,-", F 1 I I i.0. 09 1 20i E-04: 1. 1 I - 1. 0 '' ' i. - '- 'i.i..-.,. —..,'' C 115, "' i L Hi i;! 1E i i F. i i- T 1.!. 1 i. L C Di- E 't-3 F"'.. 1 E i:1i- '- F..- i-..........., E i F' F:: i: T U -.': E T.. i Ri i.Fi?'51? i..i. "::', 6 4 ':.'-.:_.: '., r-i ' _ I. ~........ 1;i,, J ',i,',.................. '3.', i i":! 07i O. i, i:' ' /: i-i 4t E-115

Concentration of Gases in Graphite Reactor INSTRUCTOR'S RESULTS (continued) TOT RL H'-DROGEN H.. 0 E-0!]_ 44~ TE TURE T ''RL r T!J R.: DEGREES F..00.00. '?',:09 4 13 0 100.00 10. 9 2 'i.E-0 C-: 0 O. 00 O0 1:-. ', 1 000. 00i. 8 1 2 E I- 0 4, 1 200. 00. 99:: E-04 1 4 0 H0. 00_ ' J?.;I 1 -- 0 4 I.500. ~............ T0TP;q-L H':,:"D!'0'" C ~ E J ' C-.3.. TE r PE R. iT U' F. E iT TL C:RRL:OIN DEGREES F 50 CI r.0 0 I '0.70 92.E 0 0._11,, I 0- I 100. 1 Q -- - o 924E- - 70 0i. 00 O_. 1 48.:~0 __E-C.3 1 C-I 1. 8. 3 9'0 i- 0.0 ' 0.-C7211E1 E - 04 1 0 Ci. 00. OC ',; - 756.3 E-il- 4 1100. 00 O. 0.9 5 577E-0-4_ 1 4.........0. - C.i0 E 30._1 CI L 010 C 0 1 E- 03 i 1 0 T Oq L HYDRG F. OOE "-!0 I 2 I qE_ - _ 02 1 'r EM H FE:. R T i IJ R E T O'T i::L:RRSiN i;.: E: 0 5 0o, 0i.':' ' 00 II............. - _11~..J. I. 1 i'i i l ' ' _ "i 2 T400lT.00 0.1 0E 1 0 C. 0 0 0. 2Ci2. -0.:, 11 00. 040 L -, 03 1 200.OQ i. ' I.. 1"" 0.1 ~............~';:.' -. ---.-,. I1_ PE T. 0.! 1-, 1 S 4E — 0.C TOTL " '...:-.. - 14. i R0 0.i i....J2.. 1OU. 00 0..i f. E-0 - "" ~.I ' " F" ~ 111 1 200.0 0. i.:-44_::-02 1500. 0t '. _ I. 05:_'-02

Example Problem No. 5 INSTRUCTOR'S RESULTS (continued) TOTRL HYD'fROGEN - 1 OOE-02 TEMPEMAIRTU RE T0'ML CTRBONi DE'GREES F 5................ 0 -. 04 '4 -,IE-702 L 00. 00_ I,- I^4 52 _ 4 EII 1:O0. 00 o ~ O.~. '? - 0..350i..3 1800. U 0 1 203 i. E - 0 1 9010 0. 00 -31' 4 - E- 02 100.00 I_ E i.51 7' -E-1. 1 1 00. 00 n!.:2 2. 7 E-1.3 _,00 _ _..120 -0_ __ _ ____ _ 1 D!. 12 Ii 1300.001.. O.'9'I;.- 4 1 '400. 00 Oi0. 3 ___ __ E, - t-,. 4r^QuoQ 0.293i~-00 1 5 ilI 1 0. 3- -- 0 't _ TOTPI _.i"H.DROG_ I E11 1r CD 0! ~"- r j17 1T 0 II IE 1".! —^- 1. — 1 ' I 1P E R T 1 I!' " r iIL CF.-,,_RER H1 __ DEGREES F_,1 0i.,1. '0 0 I. 2' '. 4 1- -E - I 1 0 O1. 00.4 2cS.-.- I 00. 0" i j u.l- CIOE-1 I. 1 i.'ll0 i- I. i_ 1 7F 4-_-'02 T 00. T A L H ',''," 0 E- 0 0 E. 1100.00 ' 0 9'5I-, _-. _'___ T 1E M P E 1' i R. 1E 'l-R 1200. 00._.._............ O.C"._;, ':-.. ~ F. I _... i800. - i '. TOTtL H DROGEr i 1 O 0 i __0 u,800. 0 0 _..324 E-I0 C- _ L 140. 1 TEtO 14 Tt,L O_ jE = 1. Q E-, rI '' '. i., 1.1. i, t -.'. E.-:I 1 5.^'1.L' i iF..!-'i. L. q__..70: i, _],, f ' 1 4 i" il, l.,-.j O ' 1 2 J:.,:0 0 ir- i.!.'. i-!-l i'-it ' 15700.00' 0.0E-117 E-117i,,-, 29 E- i-i 4, n~ I;JE-11

Concentration of Gases in Graphite Reactor INSTRUCTOR'S RESULTS (continued) TOT____RL H' DROGIENi 1. OE 00 TEMPERF.TiLRE T T ' L CRB:ti fON DEGREES F 5 0 00. ii00 0.4575E-. 00 _ _ _ - _ ___ 600. 00 _ _ _______ 0. 10331- E-Cl00__1 7R~_E _.,. —?tOOTl 1-1. "tOF 0.1261 E 02. i0 13. O! — 1_ _. 1 2 5 4.0-_i' 1 l i0 -0. l 1-: 01 i 1900. I 0. 0.4387E 01 1100.00 0.172 4E35 01 1 i 31 O. 00 0.5. 5 7 2 E 0 i ^1 400. 0. r 257 E-001 1.5_0 E. 0 0 0 8559 ' E- 01 0 _T t TAi_ 0 _, X'.. '!5E f~ H -.1 0^: r -. O 3 T 0 T4-' HI," E F: 0 G E - t1-I F I' rt TI lT9' HS'ORO r ^ 1 ~ OOE-05 TE-MPEA RTUiFE — fTRTL C R F.RiBON ____DElGREES FE i 50 0. 1 1 I0 '.71 1. 02 S 00. 0 ', 0.2:lIE 01 7 r00. C O 0 U. 1 0201E- 00 C- C-00.I 0. 1022E 02 __900.. 00 O. /272I 2 E-02 -1 10 000. '00J O,,0 5 ' E- 03 1100.00 0.8514E-03 1 2 I'l O~ 0.4.3.3 -0.3 1 3 1I OL. * ' 1. 1 - 0 - 1400.00 0. ' 9.36 E- 0.3 1 50 _ I. O. E0 ':-.' ),!J E _ 0.3 0,__________ TRL HY R'F r' E- 1 00 E I- 04. TEi F' 11 FT I R E T,, ' iHL C'-,R B -iH DEGREES F.:-"~..... 50 0ti.0 0 *i.71 3: E 021 I ':ii. 2' E ' — 3001_ 0.S E 1 0_i i _, i.3 t r __ 1)3 -0.; 9 0 0 11 1. 3 2 i.E- 0 10...0 C 0 _. 9. I E- 0.3 I E D I. 1 4 E j 2 E - I0 3 O 0.307E-0 1400 0 0_0 I-0. 93E0_- 0_. - 't t - -031 11i-'' O. i_. 9' '- -7 i-03 1 40. -.. 1 00.i -I. E- i.3 T n., 0L. '.3. EE - 'i. D EGRPEES F 5 0 0 00,,O. 1 1. 0 -i: D'-.. i I. 0 _,i 7. I - 0- IIi' I '1 00., "'1,! 3 0 17t9,:"'_.',, i.- _.!, i. 7E-03_______ ---','-, ___ 1 0- i 00,.9 1, E-0.3 15 0 0] fl. 0 0 * O ''. -;' 3 - 0.3_____-__ J E-118

Example Problem-No. 5 INSTRUC TOR'S RESULTS (continued) TOTAL____ W__ _ _T I RC;1 3:F1 2 0 E ir E-i TEPIPERPTIJR T C'T F4L CEP 0ON D' E H f F02/E F. 500- 1 — 0 71 1 '0 I' I I0 1 0 0l Hi. Ii __________ ~~ ~ ~~ ~ ~~1 HiO C' O. S 47 71 H2 1 ~i~ f i i' FI 1 13OCI.i 'i;0 ID' II 1 1f I ' i I " 2 TOTL4L H''D R C G E N E-~ 1 TEMPERAP-IR E L ~Ir i- T RL i',- BN DEGF~r-ES F G I 0 Ii -. 0 2!11'!'- 1 II -1~~~~~ I I 3 I. Oi.3 0 -74 Ji I A. 4' -'1'~ I 1-300. LO 4D 1 4 i. 0 1 3 1 ill0 I ~ID -Ii 1 * 01~ T i' L H'I DiR H3it.1'OfUl fli cr * I 1 T E PIP E R P T UPPRE TIP L N-'~iif DEG.-S 5 O 0 ii 7 OS 02-1t5 1 I 1I i3 FZI 0. 0 ~E- 19 900. OCI --:"fF —'1 1 C ".1 F- 7 -,-1,1-= 01 3 00. 00 0. 51C.~G~3 -O 1 400f O. O O 0. 1,27'6 54 - [J 1 500. Ok. 5.331 0 N I — "' 0 F T

Example Problem No. 6 STAGE-WISE EXTRACTION OF SUGAR FROM BEETS by Peter B. Lederman This problem is taken from the textbook, Unit Operations, by Brown and Associates. The problem as stated in Brown et al. is, "A countercurrent multiple-contact extraction system is to treat 50 tons/hr of wet, sliced sugar beets, with fresh water as the solvent. The beets have the following analysis: Component Mass Fraction Water 0. 48 Pulp 0.40 Sugar 0. 12 The strong solution leaving the system is to contain 0. 15 mass fraction sugar, and 97% of the sugar in the sliced beets is to be recovered. Determine the number of extraction cells required, assuming equilibrium between the underflow and overflow of each cell, if each ton of dry pulp retains three tons of solution." Solution The basic solution requires the solving of the overall material balance and then stage-wise calculation until the overall material balance is satisfied by the bottom stream coming from the Nth stage. A diagrammatic representation of the system is shown in the accompanying figure. Xetl J 1 X, 2. U^, wb~n x- l ~ ^-m 2 ^j ^l iu)^ \^& AMV RAWrIAIA l L "" i —i - i —)- I. X0^X ML^ Stagewise Extraction Scheme The overall material balance around the whole extraction battery is +VN+ = V N (1) Brown,, G. G. et al., Unit Operations, John Wiley, New York, 1950, pp. 294 E-120

Example Problem No. 6 while for the jth component x L +y V y V +x L (2) o,j o N+,j N+l 1,j 1 N,i N (2) As the desired recovery is specified the quantity y1 V is determined as: -i! L (3) Y1,1 1 o, 1 o o where R = fraction of sugar recovered. Defining W as the ratio of mass of solution per unit mass of pulp in the underflow, the amount of underflow from any stage is L. (l+W)x L 1 ).i.3 i-i (4) Taking the concentration of the sugar in the overflow to be the same as the concentration of sugar in the solution in the underflow on a pulp-free basis, one may write an expression for j = 1 or 2 (but not 3), Xi. = WYi /(1+W) (5) Here W may be a function of sugar concentration, though in this problem it is given as a constant. For the case of the pulp where j = 3, one notes that if W is constant, L. is constant after the first stage, so that Eqn. (4) gives xi 3 - (6) i+W Material balances around the i th stage yield equations similar to (1) and (2); namely, L + V L. +V. (7) i-1 i+l 1 1. and x. L + Y., Vi = x L +y V (8) i-l,ji- i+ i- i+l i+l i,j i Ii,j i These equations are sufficient to start a step-wise calculation beginning with the first stage. The known quantities in this problem are L,x,x x YN+ R, and W. These may be used in the above eight equations to calculate the following quantities for the whole unit: V =, O.,1 0 Y1. 1 -N =(l+W)0, 3L0 VN+1 = V + LN - WYN, 1 N,1 1 +W WYN 2 N, 2 XN,2 = - 1+W Y1 2 1 -Y1, 1 1 N, 3 1+W The quantities for the i and i+l stages are L = Lx0, 3(1+W) i 0 0,3 x - 1 i, 3 1+W E-121

Stagewise Extraction of Sugar from Beets Wy Xi, 1+W V =L. + V. -L i+l i i i-l y =i i, 1+Vii, 1-Li-l -1, i+1, 1 i i, 2+V iyi 2 Li lxi- 1, 2 Yi+l, 2 i+l Yi +1, 3 = l-Yi+l, 1 Yi+l, 2 Following are the flow diagrams and the instructor's MAD computer programs to carry out the stage by stage calculations until a concentration less than xN 1 is reached. As seen in the tabulated results, this occurs between the 15th and 16th stages. In addition to the program to determine the nearest minimum integral number of stages, there is included an interpolation procedure which determines the fractional number of stages required above 15. This produced an answer of 15.52 stages. Following these two MAD programs by the instructor are two programs written by two different groups of students. It is noted that in these cases the student groups computed the material balances around the whole unit by hand and then programmed the computer to do the intermediate step-wise calculations. At the very end will be found a solution performed on a Bendix G-15 computer using the Intercom 500-x interpretive routine. The results of this calculation agree with those performed on the IBM 704. Persons with a more sophisticated background in mathematics will recognize that Eqn. (8) combined with Eqns (5) and (7) gives for the case of constant W a linear difference equation with constant coefficients. The solution to such an equation may readily be obtained in the form, r V(l+w) V(1+W)N xl1 - ' LW Insertion of the numbers for this problem gives a value of N= 15.5, in agreement with the above interpolated solution. If W had not been constant, but had been some function of the sugar concentration, the difference equation might not have been linear and its analytical solution might have been impossible to obtain. The computer solution, however, would still be applicable since it can be made to carry out the precise stageto-stage calculations, utilizing the exact functions such as W that might hold. As an example W was taken to be the following function: W=2.0+4.5Yi1 + 6.Yi 1 A program to compute the number of stages utilizing this function was completed by the instructor at the time of preparing these notes. It is included at the end of this problem, where the result is seen to be 11.98 or 12 stages. E-122

Example Problem No. 6 Instructor's Flow Diagram for Sugar Beet Extraction Problem _ EAD ': [CALCUL ATE. E- PR/A START.Nuo)9 PR/M PT'',vN.to),.! PRIA/T _ _. V~ /o.. V',. (3) START ^ ^ J W/Vr V^:,iX(Ol)... X(o,~)., ^ T/otl~twaX(48 71 m L(N), XCM, ).. (N, 3 xrl^,...xr,3 J3L GEN1 D', i" r(a, p) (m *I) Vlti T U D FL f ith stag+ CALC LA PR7TE/A LV)=TOS XTRACT fro tCtg t'T i7i = MS frcioV(),i CALCULATE (~SCT 5TA(5t~I 7-V-X- Y^TE^. ST^S' d y _ rA0 ==.~_j -,_,,,.,LEG END -J.~ L(i) - TONS UNDERFLOW from ith stage X(i, j) = Mass fraction jth. component in L(i) V(i) = TONS EXTRACT from ith stage Y(i, j) = MASS fraction jth component in V(i) R = fraction sugar recovered. W = Liquid/Solid ratio in underflow j = 1 sugar j = 2 water j. 3 pulp E-123

Stagewise Extraction of Sugar from Beets INSTRUCTOR'S PROGRAM FOR INTEGRAL STAGESEIE JI I I 'i 6 Li: ',' 1i 65, H 11 REID FORF:NfT HMrX, NU V.ECTO. '.LUEl S Mi::=i3$T Y___ ECTOR )f ALUES D0 INU1C1i: 2,'.43, RERD FOiRMrl T FEED, L ' F R 1 ' 0.3::',TF+D 1. — Y':]*+1,3 CVEC:TOR.: VR LUES! FEED.1:0F7.3'. PRINTi'T F! c TIT'LE INTEGE R i N L CN) ==a O+W Co,.:CO, ''C I, 1 - 1. -L: ' %'Cl,: 1 ]::L CO0*XCO,-. '......,:+. 1.,! } CPN M r 0 3: PRII T FORi M T OUT,, L ',.' H.:1, ' - I: i 1 CN 3 ",",.: ' —' — =1 I C' 1 I;.' INT FORMA1 lN.3)- 3.. WHEN H El".EVER V U R I LEB. C. '1 'R.. N.S,ER TO.' PH.,I L F IUT FL:'', * ':. ' CO 3. C 1.:. 0+W. P'._I TFF OL",:. T" T E ' " r 1.- ---- H 1J..:1 '..",'::H+T I.4-1 F'R IT 1n~-'fT C' "R E ', ': 1 ", I:'1, +" ',',"1,3} 1 1..H -- 1 4H r,' F u.-.. V I1 '-'I - 9H=-,-'-'I L I.: -f~!f LOR T NC 0':, '-.:C,:C I:,,.".. X, I l.:, C' I, + 7 1 '.T I. i9. 4:.E. T21LTF +T4- ' " 'I + 7-j =L T + ' l'* +C I I T i 1':''F I ''LIIE,:' i,- F '3 = '~.' I 2i L.',' 4- Fi + - PR':.': I. -,:.'L, I..:,:. 1: +V!; e'.,!, 1 ) -L F,:. I -. ': i — 1..T..V C I +!I;.'.'.,.. ',.T','.:IRIN FlP +!.IL3I.I T',i. F.4-3::!. +..',::! +!. I H EN E )E R I.G.0,!T 1 TR AlNS1 F ~ER TO0 E CES S ZEE' EHE! OTRRNSFER TO FP W H t'i EXCESS PR I'NT FOF.:RT,..l A... D-, b.!HETR ESF'E R TO T -ED__.::_._:. —.,,':_. VLCTOR pLUE S MAD = S20 15H N:-:: -: E DD*'. 1 7 H STRE I0 H A S ',15. 14 MSS FRRCTION H AR S3 H AT2 Ei"RTERS35H PULP*Tn.' ___ECTORRL.ES 1 0 I OH R,-,-.- 4.... VECTOR.V.LUES OL S1., S' S7 _.. "'::S2,E. F I,,, ____ 'EC TR VlLUEf,.. PR =T... C. IH3T2CT;S7FI 43. F7 L.;ECTOR. VA.LUES RE5SUL2T- S1 2T 3H L-I3O S5 F 0. 4 ' —.- H LV - I3. S5. F1 4 S-2 n 3C"S2F7.4 *gT iZ E C D EIN iDT OF F'.:R- 5f i - A M,.,,' 'f-1-f~ v.. ~~~,, I I 'i' ~ ]i:LZ

- Example Problem No. 6 RESULTS, INTEGRAL STAGES ' -"F,,':.R BEET E'?,TR.,CTI H';_l STRE tEFI If! ''iSS F.'AI:RfCTIOIN _______________':' 3_SUl..RT ',; i:-.,; t F W T R 'L P' SOLV E tT SS3.,0 0 0.......0.. C_'T,* 2 _Tt ___ 63,,.3000 ____ 0, 12 2.3719.000___.- T, C:7 s. F iL_ E, D.:;."O.. '" 3*. i 'i - 4 I.':I 0 i!, "1 'i._i!_ i" - f,..3' A sr..- r..- I i'"1 i —i T E ' O i i] Ii if~ Ol -i x i_,.-i; I12 3_j! "7 - 7. SS x _1 -I 3sl ______________ VI - ___.6. 0.0_ r7 1CCIB~.i7 C 's O i a; i i t..;_i i_ Zi a. i i i n t 1_ - i. i:.; T! i i T 8 * '". s.5 i i. S!l- i S... I,..._._1. _l -' -:;. i''1 6::', 3 i.00-!; 4,, 0020SS 'i i' 7I_':-,,6,.,,, i 3i __i, i.0545 0.94 i 5.0 00 jIj J l ]: _ ii 3: ': Ii n ] ci L: i1 izi l _' i3 O. ("i -, '. 9 i. ':._:i i! i x._i ii iz. t.: i_- _S 1_.-,; tl:;,;j tj *,, i j _ '-" i. l[ _::,_ -;i ii 'ii:i i I iI L-il,, S. Z i_;_t;:._i n ii,., _j - '"! - i.i i, ' I.i. t _ _'" i. 'i.l,_ *:" -;,. L-.,. ',D., i j-,.-Sj t, 1,, '.'.t iO a.i '7u ju 0 j S S! i"_'! t,_ '; i.+:.;,;.;|: i i,,. |:: B Si i ii,. ~.. ~ - S SS _..,.... L't,1_" 7t:0.:0,'- QOO..-., i_!.;..,; 7vi e t-.; L 09 0-!79 0 '-010 iL.-.: i 3 i i. "i 0 0 0 a0 3 3 0. 'i 63., ' i. 0 ' '!- is L- ZO 2 5'-' 3.7 i:...,' ' -, 0 ":. 6. i i30 _ _ i ' 29 3.9 '7 i:'. i *i, i7: 0 -i_ i i -- i:.'], i-3;.;0;: _ n 0 0 2 2 0 0.' -,;'7! 3 0..250 0'"i i *......7 2 0, 7 3 2,25 0 0... - IJ'I:J.' '. i._ 'L -,1.2..5 0.0 0.:5 1 0S,. -I 3..20 ______________!..!*-~~~,.3___ 6.:.. 0.:1..S...;. -- 3 3 0. 0:' 0 0.'o 0] 9 4i ' 7 4 " 6. 5 j 'i E-14025.43 0.250 J J" II"E-125

Stagewise Extraction of Sugar from Beets INSTRUCTOR'S PROGRAM WITH INTERPOLATION TO FRACTIONAL STAGE DI ME SIO ':' L C, C5:. ' 1:' D:15 I S 1 DI,'1,:s '[I:, _REAPD FOR.'.MrT M::PI.::, VECTOF.: 'R.'; LUES i ':..' ",., E 1C- T 0 R,LUES D1:,':_ =2 4: 3__________ REPD fi F 0 R?,IPT FEED,L. 0::, 1:,.,::::* ' O,.. '-:+!.,.. + - 3:, 1",:,::1, 1 ":,, RF.:., i.'t VECTTOR VR LUEES, FEED E=S10F7.3 FPRINT FORAT1-' TIT LE I NTEGER IH, N~ L. 'a,. L -':,,: L 1: L,.',:: =1 1:: +::, -!.... 1 L3 -= L,:,:'-: ' 1 - - 1 ': -:. '' ':, +,,: 1 " +::, d::r ", F'PINT F2 V' '1- ' + -1' 0' 1 I C I PR I NT FORMINT OUT T L '1 4 ^ C 1 14. =3 PRFII1T FORRT SIO. TF1 T...... 1l '.3.... -PRINT FORMtli PROOVrV 1.,S'13 I=O MH.EN ",". WHENEVER:, - I.- ",: 1.': '. " 1 TRFISFER T SC:T 1=-+1 L C: I -=L C 0. ^ CO, 1 + '- 3... 1 14 -..........: " Ii 1 T 1::-. 1.::. F'F.: i T L 0.. + ',:r.!L ]:, - r _____-RF r~ ti"i' T REI -- I.: I i '.::::: I. ':.'., WHEH H E 1 E ~E R I:":;:.':,E. I::.': CI,:: H: 1::,T.:F-I H '5 Ev. T 0 25 r-: i.:. I *':, ' - ' S' I. 1 - + l:' E'e___11:s,...:IT _ i.. ' Eti E I +. = 0:. T L, I ' S S.'I 1 1. 1.IL +: '"- 1, -: 1 +!. P.'. I rt T A FG I 4 1, I 1 E lEIL_1 T C::L::::,.1::'..:::."].,i,::.::,..-i, ____T:R!P"SF ER TO b'JHEH__ E'PHIC E R S F T' IH!tT MF I NF:'r _____TRfIHSF EF TO ZED -. E C: TOR L. R _UE S t,1',D.=$ S2 15H D'.- M i', F '.: I E::':!: EEDE'E `-''_;E: CT ST-iT FI E - ''H T'E '1I2 1'..9H 1: TRI. H SFER TOPH' T'il 'H 0 ilTA 'DE'L ' - 1'. ' 'L 57F -' 1, T F- 1F:.]. I::4: DEL2= TR1.::: I 2. 1::,lC -:.:,:' L - F1,:,:,,'ECTOR:.ILUES E!HD - 205:?:O'"i- OF E r:! UI T... IE:R.:i UM s.T GE'-; I F:S2*;:''E -TO R'':'LUES T I TLE'=-'g 1 H 1 " " "'44S'' 22H ''U!51:tR BEET E. ''T:R: ' T'! 0::"!H..*... ' 1 0r-! 7 H:TTRE' S!" 15 'i " 5H 'l'5S. S" 15' 1 4 H HM!'S5 F'PCT I O'!.:" —38 H 'i: '!.i:5 S:'_:" _" 26H i~iRTER S'i3?5H '~P: LF::.^',IE:CtOR LES UT -10.: H -. 'F: I TE. S5., F! f1 0:.4 ':.2 ''.": F7 '. 4.::' 'S. $ ''F.' iF E OR '.'L..... S. -..4 2. 3 -. S 0 F,.',:. ~ 2...~ 1.3 H -I3, 5, F1 0 4,. S2, 3:CS 2, F7. 4.$ ZED EtjED O F PF';;.:3f.R,1IM E-126

Example Problem No. 6 INSTRUCTOR'S RESULTS,INTERPOLATION TO FRACTIONAL STAGE SUGAR BEET E'.',TFCTI Ol"r IiSUGiR.l TER PUL F' L- 2 80.0000 0.0P61 0.65.35 0.2500 F E E D~: 50 1-!. I000 iEll 0 1- i 1 _1 I. I-. It ',i 1 C f CI1:I 3F F I 00 i, T E 0E:O 12.. 4.' -100 Q 1 8,.1E~1 4I '-. 8 " 0 - I 0. ', 0i t. 2, C1 l ' 0. 0 0. l 0 0 0 E f 4 80-00T R. -0, 5 00 1.:-: 0 5. 0 25 00 L- 5. i0 00 0 0.058. 0 1 '4. 0.2500 V -.. -, i.-. I. i 1" ij L- I. I8.0 iJ,1 00 _ 0. 4,.!, '0.94 '. 00 C,,.3 _ "I. " _4 0. 551 ',.,~ - 4 6:3. ',-: 0 r] ~"' l O. 02. C 9.00 r'0, _,i, ii 1 1. 1 i 1 L- 8 80. 00 r0. 37 0.1 G 05 O. 2500 L' - 1 0,-. 000. 3 0 O.9 O. 0. 000I L- 10 1_l I"!1 " 4 '. 1_ 1 9. J.O0 C I0. -0 i Li, - 1., a 3 _1 1.1ti.,,?,I v1...- 1114K 1,. 8. 000 - C0. 0..75 4 4 0.0000 L 1- 1 il.-.!1-. 7. 0.2500 i L- - i ' -: 3 -i 1-1 1-1 1- l!-10... 1- 1- ' ' 8 00 _.0174 0.9- r8-2 0.0000 L- 7 1.. 0 3, 7 0 O1 1 0. 25 0 0 '.1- 1!"1 I l 1 " 11.8000.5 51 Ii.!fi!1 f-987 0. I L- 13 8. 0i O. 0000 0 I 0i".. 7 41_ iS J. l.2500 1 4 8 i. O C C140_. 0 6.3. 80. I08. 0.0000.' L.,- 41 0 i.',,.,.1_, 0 0.0 1, 2., 0.2500 Ii L - 4 t: t I_-!!. t1 I-I - O, Cl '2 2 i!]t~ 7 8':-' 0 _.: i]1 J,.- 15 J6 Cii.80 0 0 0 4.9 9 5 0._ 0 1!10_ L - 1 1 - S:-.: 10 O - O. i0 2 2 0. I,,. 0. 2 5 0 0 NO OF E 1U I i " BR, ' SAE -.5 2 8 2 - - 1 2: -: -1 1l 1-1'-1 1' Ii 1.i,- a i'7 0 -! r, 5 _ i'" C, Flow Diagram of Bull and Boss Extraction of Sugar from Beets U1- I.3,:3 0 _.....,:::,'......... READ DATA, L(O) X(O), Y(0)2 P(O) M T1(O) '.V(O) IN DATA, L(O), X(0), Y (O), P ). '" ". P'-WV(0)PRINIT42 TITITLE. 1. ] t — C4 4 "06(O EE ~~~~~~~~~~~~ "..".. 'P(I). /_ I_ ) L- 1 X(I) 0 7, Y(I. 1"1 74. 21 \vL(I) = 1-X(i)-?P(0) IY ) t,.,0 _ I5 (I:' ), Y 1-1) P(I), (I). C (I l1)' I. IXd h.E-127~.....I m 'DA='_V(o,I)-,Y(o-) L', I)' / -) o'I) -L( I- ) ). P'T DI'A, L(0), X(O), Y ( o), P(O), \s z;('o),,;,W(oi ' = PRINP. I::, X('), ',l (T-:.), 'PZ), ~(T), ~,('. l E-127

.Stagewise Extraction of Sugar from Beets MAD PROGRAM OF BULL AND BOSS:RL:= f'ARSf IU UDO F, ~______________. ' M= R1 SS F O'?ER FLO.. R: MOSS F~FRqCTIOH 'SUGfaR IH UHN ERFLO.Ai R___ __-_ FR:' PTION S'1I G-:,R..R IIi l- ' 'ERFLlWi ____ RP =' F.''RqCTION P'! LP INH ' - ERFLOi _________________ IRkL '1- hi-. F-.:FIiCTION ji:TER I". Ui".IOERFL.O.I ______________ R Ill L t i,.;WSS FI -.; T I 0 H1 i. 1::. T E -iR,! "11. ~3,. E;. DE_ L. 0. R WP,. 1*l A C I F -i'INM!' TE' IN ''i'E' FL'J ',- l FO 1 -: h,: ' X I I C 1 0! ':' PRINT F 01 T DTfA, IL 0);-= Y'_O),' P<:00 P '1L. C, W C: '' —O' FPRIN T FORKIF TIL'__ 1 THFR G Li 4'L' i FTR II 1 1 G. 0 R. C 1 'LE 00225,, L'( I S CI P.: I..., 0. I.I..... I... ''C I -.:, I: - I: ~LF'I F'I.T 1 '!'' 'FN:-t1:lT T H P, L 1,:" [- ": -.!.[('),. l iL.,::: ", I.. (" -1:) A L A PF-F I'l F'' 0 R '"I I rIN' R I A __INTF-[EGEIR I= ______P_:I___________________________________________ ''H R 0ITa 1'4p': iRI-, L IJ II0. OFG. I.L'E^.: Ii i L E. H.0 (. 1 yECTOR I'L..NT. "H ' F3..3.3 E ND OF P.0,.p- 4-3 fl' 1E.':iL I1 I 1 U::, I f,: 4 - P I -: "/,111:' 1 F9.5 * 'I ___________________________________________._.: -,...'.,",( I - '", I': C ' ':'.:, - 3, 1 }::. ': - 1 " ". 2 J 1'' 1' '' 00 ': ' -o7 0 9:'.,::1 ":~ 3 ':"09G. 3 0.'.." "S'. " 8I.. '.i <r 50 0 C I-71: 2: 0. i, 5509 F F..IT f',i I'7,:.!, 4,I,....:i',.2 1,I-' C. T:-; I '.' O ]. C,6* 1 - 1 0 1, - 'i 0C.'..2.' 0 0. 11 C. 0. 7 1 71 9 0 I.J 2 2.'2. 4 0 0. " 3.'3 1::T.. 9 7 8.I 7: 12..- I::, ',:C ]7 3:, ht I3 I: 1 7 hi'i: S "-3 ':2 r X.... J., 1 0.' 0 0.0 4 0.2500 O0,_,.I5 0:995365 163 0.0 4:: 10'89 0.0091: 260.25000 0,7 4. 5 0.:,:9:',..::1.:. '::,.25 i 4 7 NO.L. -. _ 3. S..... *.0 6

Example Problem No. 6 FLOW DIAGRAM OF HELSTROM, HAMMER, AND HUIZING (START )-fp~% Y^vr: -<Eiy Xss YP FUD | X YP:X F XFYp F- W.>FED - <S (. -< F~o'~~ r-ri R'/Al Er d LEGEND X = Concentration of sugar in underflow solution leaving stage FS = Amount of sugar in underflow leaving stage FWV = Amount of water in underflow leaving stage YP = Concentration of sugar in overflow leaving stage PROD = Amount of overflow solution PW = Amount of water in overflow entering stage ZW = Amount of water in underflow entering stage FEED = Amount of underflow solution XF = Final concentration desired in underflow leaving last stage I = Number of stage ______._ MAD _PRQGRAM_____ REARD FLOF:RMi'T DrITR, FEED,.:F, F'ROiD, Y' F'.., Zsl. PRINT FORMfT TITLE I NTEGER i JAN FS-= 'Y*FEED IIRHENEER X. L.:F.'FT, TRF.NSFFER TO DIC.K` FW - FEED - FS' P i.l - P 1.i. + F!.: Z i..l ZW F4il P= PRIOD-P!.J F'1'PROD I-I+1 PRINT FORt.IT F2, I., TRRHSFER TO.fN.1rt VECTOR '.ILUES D r:i = 6:F12.7*, V'YECTOR I'.'LUES TITLE=4;24H PROBLEM1 ONE PEGE tNO' 2'94.-)2H. OtlI LI 1 QI ID EXT',r: FlT I -52H I COtP I UTER C:HECK ON t L NU-1 ERe I C: L i:RN'tI GR!:i F HI C::i 2L SOLL IT I 01S ONS"_ 'ECTOR.LUES F2 "- I 10, F 1 2,.7* _DI0CK: II+1 PF I NtT FORF.1 IT F2, I.: '. END OF PROGRRFt E-129

Stagewise Extraction of Sugar from Beets NOTE: This program does not consider the solid pulp as-it remains a constant amount of solution. This procedure employs a manual solution for the overall material balance and first stage calculations. The program computes the following stages. For one program it is quicker manually to calculate the overall balance than to construct a program including them. SOLUTION " -' "" I "" ' "' '' "".... __ ', a <:)9 i "'" '!": 1' i ',...........! ' 0 i,..' '.,: 4:: ':: 'i 'i, ' ',,. ': 2 ',.*' r',.- i a *O *i A s:. -. 5:-....i.. The limiting concentration desired is.003%. This is between stages 15 and 16. Pages 131-135 give the instructor's program solutions to this problem using the Bendix G-15 computer with the Intercom 500-X programming language. Pages 136 and 137 give the instructor's MAD program and solution for the non-linear underflow. E-130

Example Problem No. 6 V- 11 --- —— 1 - -_ 1 1 |\. | C C _ (1 (l CO C ~ C L ' I (,, uO - o C 0 - C - =C C C - - oV o -c _ O C - LC _... 0) "c c c a)c o c Lo - o 0)o 0- 0.. - o;~i C^ G ~ N Il C, L, x.l ( O C O 0 C. o) | | oa c c o o o o | o - Li Li 1-C I- I 1 t- 1 oS o11 M CZ t -Inl _I r, o l dzl del co l col arl 1 c o o_ - o_ < _ 0 (/ (0, g D Fi 0 0 M ~ | Z I I | " I I I I I I M | Z 0 0 '-EQ ~> 0C> ) O -.O '< C~ h OO - o OJ ~ r- t- C) 0-z i-00 Co <_ >_ _ > LL ) 0 Li OD E I X cr LC LO LO LO LO L Li LC) 0. Li M 1-4 D D CO cl 0 0 0 0 0 o -0- 0 (Y LO D (D O C 0) 0 O C( M CIO Lt LO 0 r — OD CJ 0)0 < O Co< Co * m H < 0 Li O z z Mic ir u ~ i- u 0 0... > - Co o- - HI E-131-1 W V) W U. ~ ~ ~ ^ 2 ~' C3 U r' C) a. L WI W: W v- ~rj (/ C) Ci CO Ct (f) LCC 1 - < z CY ci F-0 M 0 0 C " "'to — -,0(~~~~~~3~ ~ +I v, Z E-131

Stagewise Extraction of Sugar from Beets 0 N l 0 CN C'J 0 C 0 CI) o) U CT 0 0 C) O 0 0 - N ) ~ ) V) V) V) O- C O O O IC C CO O L co co LO L o o -e C l O oo Co - N -~ i iU) C N inC Coo 0o N Coo ooU oo CN- C o io Co 0 oo EU N- ). C o Co Co Co- Co C" Co Co C. Co Co Co Co Co Co o Co Ii I 0 o 0 _ 0!c O 4 cn 0 I O4 cn cn O4 cn 09 c- 4 I 4 O4 - On cn xt o o. C o cI o o Co o Co O o o Co Co o Co o Co o o o o o o o o C) _CO_ V) - CC ) 0 M w4 V 0 d _I cn - N CO _a a) a) CY 0 ' ' 0a 0a 0D C; a) ) CD ) I- 2I x h- 0- v. 0... 4- U) N 0 0 0 0 0E aV~ ~ ~~ ~~~ a ~ ~~~0 00 0I 0 0 *r0" 0 C Co - '- (0 00 r-]. _ I, uI,.4 0 uUI C ~/Uo ~ CI Oo) o W, O W C C C, — C C C O C, — -- -W - -- -- - — =- O - "~0 a CC::: C o 0 0 00 Oo ooD 00 a — oo LO O D LO o L O 00 ~V - - C 0 0 r-, - V- - 0 0 V — -- V — -'- V-' - 'I C),c O CY) CY) CY) 00 0 (D CI CM CY) 0~L CU 0 0 qdQ qtOt OC CT -4 1-41 PI r r- C Y) C Y) CY ) CY) M Rd-JCD O-C nIt C.3'00 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ q C) i ~ i, ~ ~ el ~ ~ ~_ ~ ~ ~_ ~ ~ ~ ~ ~ ~ e CM 14. LO 0- cc a C C\J Cr "Ci- CLO Q F CO Co o ) C: CLOU3 C.. -O ' U Lr.M O Lr V 4L (CCa (.C c~ -0. D CD L I. r - t X 0' 0 4 - U) IL 0 a: o o F o ) Z IL W 0 +1 C -o a: z D L - X0 ' Z LI 4 a: a: U- U) 0 M^~~~I W ME (I L W I-F - W X X X C 0 Z M e - W 0 Z-J 0 - 0 - - x x z I v) W L2 I - A <I I o WI E-132

Example Problem No. 6 '4 C)O N OCJ 0.- N - 0) ~ ~ N.~ - 0.- o 0 0 0 o 0 0 C C- - - - 1 — 0- 0 0 -0 -0 0- 0 -- 0 0 0- -- - - 0 a c C) 0 0 0 0 co 0) 0 o) LC O L 0O) " J- ) O L U) 0) - n f. C. -,- a C O -,,N — _ O 0 0 C 0 c- O O - 0 0-. O 0 0 o C c N,N - No o 0- o o g C) ) CCo o 0 o ooco C)o Co ) oCo Co -r=I o o~ o o~ i- r, -.. cu ~ r --- o or — c oo o o Co CY CY) CY CoY) Co cu 0o o 0 C, LO (.0 N- 0) CD 0. \N Cr) 14 LO) (0 N1- co 0) 0 J Cr) t- o:' <.. ' ' <oo U.L tC X O h Wo o Lo 0! =0 cd - J - Z i u C D aU 1 H u ol ol 1 CD ol u O o so a, o ol C1 >1 o I c " 1' IUUI U2 1 q 1.' ar @. m~ ". 1 1U. '..' J. ' aUi 0 v 0 3 0: LA. t. UJ 2 =~-J 02 Tel Lo 2 0T L1 S1 _n I-o o o- oZ o -o o- oZ o 2 L I~ -11-I -I -I- - - -I a. - C -I - Li '0 ~) o 0 0 LO v- v- U' LO LO 0 cn i - Fr F - 0 - - \ 0 ~- - 1 C U ( 0-1 0 0 ) 0 0.- ) 0 I- N-(0 a N 0 N- 0. N.f Ut ) ) acao ) a) U) O) a) U) if) a) a) U-) a) a a)cao)LOo a) 0 0 0 0a a) co Cr) Oa) 0) N ~ 0) N 1 - 0) I - C) ) ) N C) C) C) 00,W C) N- N — N- CY) CC) Cr) I=I 0 I C', u, i- n, ( i ll I i I Z " I i'............. 0 0 0 LO@4 e ~ 10 — * -^- f; I- 0 2 ~f0 1 a. e].. o.n, cQ --- - O O o,- - - O - - O O - H O 00 E-133

Stagewise Extraction of Sugar from Beets INPUT AND SOLUTION _- --- - --- -- ft — - - - - - - _ _ _ _ _ SOLID LIQUID EXTRACTION PROBLEM 69090...0.....- - - o -.. 1500 5000 ~ 52050000......... 1809 50 550.....000 ---____.....__. ______.._ —_ -.......... 1810 00o12 ~ 50.12000........... 1.811..........00 48......._ _ 50 48.Q00 _........................_......___.__._._... 1812 0040 ( 50.40000.__1814AO_15 5....__0_501O __________________ _____-,...1806 o00 ~.00000...........1807. __..o.o...)51_.1 0000................_.._............- - - -............ _......... 1808 Oo0 ).00000 1501...... 97.... 50 7000......__....... 1502 3o0 ~ 51.30000....-. -..................................... -.. I J... EAM...... MASS FRACTIONS STAGE.0000000 RAFF tNATC 80.0000000 SUGAR.0022500 WATER.7477500 PULP.25000 E. XT.RACT. 68.8000000......_...0000000..............00000........0000000 FEED 50.0000000.1200000.4800000.4000000 SOLVENT 38.8000000.. _.1500000....85000 _ _.. 000000 STAGE o.0000000 L(, 'o 80.0000000....-.. 1125000.6375000 Y(r).25000 V(l+1)' 68.8000000 v(l+1,s).1282000 Y.C+1,w).8718000-..-Yl+1,P).0000000 2.0000000 80.0000000.0961480.6538500.25000.................. 68.8000000............................98. 0........,819..8.........90_Q8100._____00 00100.. 3.0000000 80.0000000.0818880.6681100.25000.68.8000000.0926020. -.........9074000 —. -.0000021 4.0000000 80.0000000.0694520.6805500.25000 68.8000000.. 0781420.92.18600......... 0000022 5 0000000 80.0000000.0586060.6913900.25000 _......6.8. _L00000 ^...........,. ^^.....065,53..1. 0...,.......93~44ZeQ ___o,000019..... 6.0000000 80.0000000.0491480.7008500.25000....68.. 8000000.0545330.......9454700..0000012 7.0000000 80.0000000.0408990.7091000.25000 6____8_, 8~._. 68__._.. _ __-....._0449410 ____ _.9550600..00000005. 8.0000000 80.0000000.0337060.7162900.25000 68.8000000.0365770.9634200 -.00___OQ05 SEE NOTE __ 9.0000000 80.0000000.0274330.7225700.25000 68Q08.Q00.0292820,9707200 o0000015 E-134

Example Problem No. 6 Continued -- Input and Solution for Solid Liquid Extraction Problem 10.0000000 80.0000000.0219620.7280400.25000 68.8000000.0229210.9770800 -.0000029 11.0000000 80.0000000.0171910.7328100.25000 68.8000000.0173730.9826300 -.0000044 12.0000000 80.0000000.0130300.7369700.25000 68.8000000.0125340.9874700 -.0000070 13.0000000 80.0000000.0094008.7406000.25000 68.8000000.0083150.9917000 -.0000104 14.0000000 80.0000000.0062363.7437700.25000 68.8000000.0046353.9953800 -.0000137 15.0000000 80.0000000.0034765.7465300.25000 68.8000000.0014262.9985900 -.0000176 16.0000000 80.0000000.0010696.7489400.25000 68.8000000 -.0013724 1.0014000 -.0000199 1.0000000 1.0000000 1.0000000 NOTE NEGATIVE VALUES OF YfI+1,P) STARTING AT STAGE EIGHT ARE DUE TO ROUND OFF ERRORS IN MACHINE COMPUTATION 150E E-135

Stagewise Extraction of Sugar from Beets MAD PROGRAM FOR STAGE- WISE EXTRACTION WITH N= 2.0 + 4.5y + 6. Oy i, 1 II -TC I E MR E'::: E UT EDU..: H -8.J ET J T —!_'./,R, 1 FOR __ _.___,....:.E L U!E - ', F-' R';<!]......4,: i;;:, -n. i ';.'i F N F.!-:::.: - ':.'!-::: *: 1::' " S:,:,. 1 1 ': T DIT DR PT TILE__.........................;:.-,r!.-!.. — r...-;,:'i;: =: 5_0._ 0'-! +:.._-_.'."- -.::'. V-,:: "2.: —.,:, +'.:.... vC,: - 1 ',.I::, *I L ' 5 ' -.4. + G M '+,:., 7...... L-*..>,: 1 4:, - L,:! O 7..:';........"I n... i,. ~... _TTT"',: I +! ":,..:.!.F:, 1,.,- I ":-, L,:...:,: I H.'2,.: +:,' T F: r 6: T S:..',:: '!. ":,. S: " +:.1:" - S -:::.,., I ".! 1'::. I... _______"' ',. I,1' t _ T: 0:.",:".1:,,. -. '::,____________________________... - i..... 3'.,. 1.":..J~**..? 0+.... 1 EXCESS ____ ~:<: R"' L: T F.1: R T 1 TI',',q n_ __,,,k.........,:, I.j. T E136 TRPNSFER i...:' T ~r 'j HEH ' - "' T T EE-F13-T 06 IT.

Example Problem No. 6 Continued -- MAD Program CPH I P' R I 7 T F G E,.,! E L E E 2. 7 H L! F I L.. I:.:T... T i I., E: T 0 R. U E: T I T L E ' 1: 4 22 H ET E:: Tr:: C 1;H iTER.. 5: H:,: 5, H I: F: 0... S.:., i: H 1 4-EV~~~~~~~~~~ECTOR~~ LSLUE I NSS FEE S1..-......... F___ _ T-F P F P TI R -j C' 'T' " I S:i i...,..: i VECTOR -r LUES F.,^S 1 T I 8H 174 3? __ _,. __ _ ECL:TOR. R ~,.,~~:::L U E ":-1 F' R;: 5:.-.! [! _-?.. S *! 0:, 8', H E -::':: T R C i..-.:' T.-.:..:.;?: F t:.?. '".3 2.7 F 7: Z4:? F -' *___ 3H**** *- 3 5 ^...,!.. U.. 4.....:EDTF. ED f:: -:P 'F'1: F:.T -,- I r,~ [. — E.... ij T II J P B E _____ SREfSULTS WITH W _=2.0+_4 j5.qs3 + RPC 6 O I4 - TS i Tp i [._ F" E0L - 0'7 T _ 4, 2R:" C,:!'::. G 1::. ':::: ', n ':- ~'!/ U.E ":R'C-, T._ 0 0,!'"5 0.:~ -'r i 'i i -::' n: ~"i-'!, '"' I I ~~~~~~~~~~~~~ ~ ~ ~~~~ ~.................. _. L-.: s ':'. 4; -. - " '7:'_:.'.. n::i:_', 1 t..7 " ' ]::",! "^ I ".~. J T. 7...' L 4 n 1 2 y o '"'" i::l ~ S^.n?^^ "" ^n^O " CL9460 O.OO. ___ L.- 7'5.2 2!: 2:- RESULTS WITH W 2.0 + 4.5y 6 oy V-y~~~ 1347~~~~~~~.-.':'.:,"7....:,: ':'::: -....'::J::' ": -I::':: E-137 I, " -: I~~

Example Problem No. 7 COMPUTATION OF FUGACITY COEFFICIENTS FROM COMPRESSIBILITY FACTORS FOR GASES by Keith H. Coats The fugacity coefficient f/P is given by the equation, f /P dP P r r where z is the compressibility factor, PV/nRT, which is a function of the reduced temperature and pressure, T and P. Use Simpson's rule of numerical integration with a step size of 0. 1 to calculate f/P as a function r r of P for each of the several T values, 1.0, 1. 1, 1.2. A reduced pressure range of 0 -2 in increments of r r 0.2 should be covered. The value of z should be obtained from Van der Waals equation in its generalized form, / \ P P2 3 /r, '\ 2 27 r 27 r z -8T + z +6451 3 = 0 r r or f(Z) = 0 for given T and P. Newton's method can be employed to solve this implicit expression in Z. r r Compare the calculated f/P values with those plotted on a fugacity chart of some thermodynamics textbook. Solution: /P dP /P The integral (z - 1) pr- is of the form F(P )dP, where F(P ) = and z is a 0 Or 0 r function of P alone at a fixed value of T. The values of z at various P values when T is fixed may be r r r r determined by utilizing Newton's method where the (i+l)th approximation to z is given in terms of the ith approximation as f(z.) Zi+l i f'(z.) Here f(z.) is given directly by the Van der Waals equation and f'(z.) is given by its derivative, 2 27 r f(z.) x 3z. f(a) + 4f(a+h) + f(b f'(z)64 1 2 (8~r T When the value of z differs from z. expressionby less than some prescribed tolerance, the iterative process is terminated and zi+ is taken to be the value of z being sought. With this value F(P ) is now known and can be inserted in the integral. Since the integral is to be evaluated over an interval of 0. 2 in P with a step-size r of 0. 1, it requires determining the area under a curve of F(P ) vs P for values of P of n, n+0. 1, and n+0.2. Simpson's rule permits doing this by a numerical procedure, whereby in general a(x)dx h- 7{f(a) + 4f(a+h) + f(b) J F(P )dP = - F(a) + 4F(a+0. 1) + F(a+0.2) ar E E-138

Computation of Fugacity Coefficients or if j is used to count the number of steps, FdP =0.! FjZ +4F + F jdr =3 [i j - 1 j] P rj-2 Following is the instructor's flow sheet for setting up the MAD program to obtain z and FdP over the ranges required. The symbols employed are: P = current value of P r T = current value of T r z-1 F - at P = jAP = jh = O. lj r G - lnP f A - The instructor's program and tabulated results follow the flow diagram. A few values of z and f/P from several thermodynamic textbooks have been written in beside the calculated results. Since f/P depends upon z, it is clear that the discrepancy between the calculated results and the textbook values is due to the failure of Van der Waals equation to predict realistic values of z. Had a better generalized equation been used, much closer agreement would have been obtained. A solution of one student group (Westin, Henderson, and Van den Bos) is included at the end. Although the program is slightly different from the instructor's, the basic logic is the same and the results are practically identical. Of course, a number of incorrect student solutions were submitted, but these involved either a lack of complete understanding of the mathematical steps or errors in logic or punching programs. E-139

Computation of Fugacity Coefficients Instructor's Flowsheet for Fugacity Calculations AREA f PRI N H PMAX/AZ /H ROU N,42jPMAX_ N1,*2,P4 _ Zo /,o _ SE TtF~l T, FOt0R T — i, P=JI~ tnlE MI = tj~/7WOUr t OROO" \ M~ZX^\ 1,1, F li Z-OL2D=R/ Z ^A/ W 0 12-2 - fC?0)/f.CaE ) S2 DEI>V E.r:O' \ _ _ /o -- -------—,, i,f —.A:, /.... To P, A(^ ^/^ PSJ^ "" ~~ -

Example Problem No. 7 INSTRUCTOR'S MAD PROGRAM _________I- -.TEGE.- =.- N2 I-. - - K______________._..______________________ K ' E i T 1H!..i: F' i5 'F:;*. F I 0- F i::: {- '. 2 F) 0'i. 1 {3 U:'l 0 f' E. -' - 4 _-''.y c R m L ^ N"^ ^ --- - -- -...-...-.,......-..-..-.....-.-.....-.-..................... __________ R~,., E C T 0 R U u F::|-. N2 i: L.. N.- T ':i....:.'F., E! '7 *.i 7,........__..._ __._ __________ ~ ~~P F' I i"' ' FOnR i':P T D Fi', F. i. 1"!: "1. M 2.-. P'b FM:'.:-:. ' '..P Li-?.M:,. T,:.: 'I _::-., T ': H 1::,________ __~~~~~~~~~~',;'1!D^:'":'. ' " ' _" ' '-. _ _...::- T 'i H: 0 U EI. ' 4,::.. F ' 1F.' ].:::: __ ____P. MT F__' _ _R__, i_ _ T:.'.: '! ~.- ____ T. T C7. - -. I ~~~~~~~~~ T r-.- IH! ~ ~ E-14... IU J.. -- -.......... _ __ ______ THRDUGHI..., _ '.:_ F:: ": ~... 0 R..'"I: '..: ~:: 1" T= t'" ".:,.. ' ' i!."'.'"'F'i --:.-: '" 2 F" '.=".F=J- " " - - - - -*..._...-..-.- _.-.-.................................. TI: '1' '.!:, __ ____ __~THF.O-UGH1 '::.! FOR j-. 1.i..... 3!:R!..!,6,H2EP L N. _ __ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~.................................. P-J~~~~~~~~~~~~~~ ',,-7 I " F -'2.,:. J T.: 1 i 0- L D '~F - 2., F 0^^I^r Tc 'r" F.:.:: J **::3 i. - u Dii-Z~ -_:,-::.!':.,.,!7,^^. ~"Z E1,..-,T E. F:::-.1 i-.! H ^ ^ _-~___~ ~ ~ ~~~~~~ ~ ~~~~~.^ ^ ^......-._ -..-_...._.............,:_ 0.D Z"._p:*=:.:,-u - ~ - -*- -- - * -*-.-...... ~..................... 3 2 2 E! E"J"-, i..-.i 'F: E;,::' 22?'.! E W- Z 0 L D 1:,_____ 0. 2GOOE 01 t. OFO':_' J 3.:,: 21jO, _ *j.7, i *j *:...... 0 E 0*:-.3 F':":!.!T F: 'FlT 2..T..J::.: "E W: ': ~!k-. 4...

Computation of Fugacity Coefficients RESULTS RED!CED TEi P R D D ij ': E;:pr Npr Z - _: (:'E E7" T. E:- ' L E. I______ 1. 1 0 __'l~I 0,: 0_- O".!9!O::O "; - _;. 0.633E 0 1~. 100,)! " O ^ Og -" " - 4" iDi "..3-...... ~ i ' i ". iM!.!0 0.702: 0 5...:.......000.... 'ii. 6 i 1".. I ii0 1 16 0 6 ___ 1........ 100. ___ 1. ___0.737210...-_....... 1.1i0 0 2.00003323 '2.6 D ~! 0 3 -i. =i{1 0 ' -,, 3 2 6_ -:. 0 '? 0_0_0_000 I J ED~ I D'"P E E Fi.:' 0 " T.? 2 E!: F" 0?...... 1 0ii 0 0 1*~ 16.!i 0."53 _I. ':~::4 1 lb1 4 e~7 1. ~ii.i............................................. fr~. i.", I..i @ '.............. 1 Ii.sf5 I - E 1 Ji

Example Problem No. 7 INSTRUCTOR'S RESULTS, CONTINUED — RED3I E.r' TEiP r'EDUCED PFRES -,URE.rN O_...r 1TE -:.Pi T i E —_ -7 LJt CL 1 I. 1 '.4, 3 3 i 20 0 20 1,I: 9 Textbook4. 1311 E7.i E.. 2.30 0.:-i. 40I-4 5. Values 1 6 E-. ___ I__. 20g- - O. 40.:., 2006:,:: Q, 4. 2056 i'. - 0 1.20 0Ei0. r0 Ill:",":-.' i.9 5 020 I } ' -- - 2 4!.,_:0.264.5E-05 i__2_i1..i 1i 0.8 7 r:,!iS1 90_ _ _i 4 i_._ —. i2.E-'05 'I1~.20. 0.70 0. P,35.'_":30633 '. '4,,:: ' 0. 450 E: E -05:F. 1. 1 ' 1 00 4 - J;_IE__. 20 1.4 0 iE0. 6 tt 3 0 OE-. '74!5 E- 0 r; E.' ' -t!.- 5l.::-: 4!.:!, ii j,.5 0'. 37 25_ — 0 _______ 1.20________1 05'.0 0 0I I0 0 1i 2 0ii r' i',.. 7 0 5 'i1 ' uI1... 4 9 0 1t. 2 i-ii ~1. i ' _ 7 -.'i. - _ 6 r. r.! 51 E!3i iX56t-:_'. 1 E E_ l T d___jr_ j1! 20 I__'I! —! t. 0. 5 4349i r r;", i33 1.;_!0::!'35: r-!!__E-07 t. 20!i E i-,.!!.i_i.. 7. '-. '!r 1.!200-1_!_-_0. 2! 00 _T D!C. _. 528:!__ r t J' ' 1. 2000!- 3 3!7.3;!; 7 7 ____ 1 _ 200___. 800._ 0. 67 49 3 E-143

Computation of Fugacity Coefficients t - 4, —6 XS 0 s -4 ----# —. o..,., -4 — J- '- - U z 9 - ' to '~ 0., / ' ^~:).~ -14 i~ ~. ^- 1c -'" o - 4 - I '-r 0 44- 1jA-1. Uj CO'? j ~ -e ~ i ^.?;: a: J ^ ^ - _j' ' V -;^J4^-^^^s^]^^ C r. 0-^

Example Problem No. 7 Exam~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~C. i?~~~~~~~~~~~~~~~~~~~~~~I I I3 X. A H L'I 0 -'I I 2 I- 1' -V *~^ X ^1 i ^ls, ~ i j ~~~~~~~~~~~~~~~~~~~~( ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ' ).). 2.. tesr~ - (Y), - 1J a-, 0 ^2 r o \ 14 m ^T ^ t-? \~ 'plu^^r^~~~~~1a- -g - ^ ^~~~~~~ Fi % \I ~ -^ 4^ -;yM ^I^A~~ ^s -~; a. + -C -'i~a ^s~ J ku~~~~~~~~~~4.~,,.,. /J-f4- 44,I C%-J ~ ^' ^T'_ i-. ^ + o -I - Cd ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~C E-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~145 ~ a fT 1~ ^ * ^ ' ^ ' '-o 0-~~~~~~~~ — IS 5; ^ |,u < ^ " -^ P^SO III 4^ Ir1~~r1~ -. '-, ILC 0 r~~~~~~~~~~~~~II 0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0 - E-145

Computation of Fugacity Coefficients STUDENT 'S MAD PROGRAM PRINT FORMAT TITLE READ FORMAT CARD, EPS, NZERO, ZBASE, Z(O), P(0), JMAX, DELY, IDELX, TBASE, PMAX PRINT FORMAT INPUT, EPS, NZERO, ZBA'E, Z(O), P(0), JMAX, IDELY, DELX, TBASE, PMAX DIMENSION P(20), Z(20) RDIMENSION P(DELY), Z(DELY) THROUGH BETA, FOR J=l,1, J.G. JMAX T=TBASE + DELX*J PRINT FORMAT SKIP THROUGH GAMMA, FOR K=1, 1, K.G. DELY INC = PMAX/(DELY*1.) P(K) = INC*K Z(K)=ZBASE WHENEVER K *NE. 1, Z(K) = Z(K-l) FUNC = Z(K).P.3 - (P(K)/(8.*T)+,1)*Z(K).P.2 + 1(27./64.)*(P(K)/T.P.2)*Z(K) - (27./512.)*P(K).P.2/T.P.3 FPRIME = 3.*Z(K).P.2 - (P(K)/(4.*T)+2. ) *Z(K)+ (27./64. ) *P(K) i/T.P.2 NEXTZ = Z(K) - (FUNC/FPRIME) THROUGH ALPHA, FOR I = 1, 1, *ABS. (NEXTZ - Z(K)).L. tPS -1____________ __1.AND..ABS. FUNC.L.EPS WHENEVER I.G. NZERO-, TRAN-SFRTOI DIOT Z(K) = NEXTZ — FUNC- -— FTK.TP.'3 - -PTK)/(8.*T)+1.) Z(K).P.2 + 1(27./64.)*(P(K)/T.P.2)*Z(K) - (27./512.)*P(K).P.2/T.P.3 FPRIME = 3.*Z(K).P.2 - (P(K)/(4.*T)+Z.)*L(K)+ (27./64.)*P(K) ' 1/T*.P.2 ALPHA NEXTZ = Z(K) - (FUNC/FPRIME) WHENEVER ((K-1)*1./5.).E. ((K-1)/5) PRINT FORMAT SPACE GAMMA PRINT FORMAT FIRST, T, P(K), Z(K), I PRINT FORMAT JUMP W = 0. THROUGH BETA, FOR K = 2, 2, K.G. DELY W=W+(INC/3.)*((Z(K-2)-1i)/P(K-2)+4.*(Z(K-l)-1.)/ __ _ 1P(K-1)+(Z(K)-1.)/P(K)) ____ _ __ ANS = EXP.(W) BETA PRINT FORMAT RESULT,T,P(K),W,ANS TRANSFER TO END IDIOT PRINT FORMAT COMENT, T, P(K) _ INTF"FR I,J,K, NZERO'DELYJMAX VECTOR VALUES FIRST = $8H TSUBR = F5.2, S10, 7HPSUBR = F5.2,__ 1510, 3HZ = E13.5, S10, 3HI I4*$...-.......................... -1-0.. 'Hi..... ~ —' 3, s" - —;. 3-H 1................. --- — -......-. —. VECTOR VALUES CARD=$F7.5, I4,F7.3,2F4.1,213,3F4.1*$ VECTOR VALUES JUMP = $///////*$ VECTOR VALUES SKIP = $1H1$ VECTOR VALUES INPUT =$5H4DATA//F7.5,- I4,- FR.3,2-F4-,23, 13F4.1*$ VECTOR VALUES TITLE -E=$34-HiS-O5LU-T-TON -'FCi-ITI-P-R-OB-Ff33-4-92-*$ VECTOR VALUES RESULT=$8HOTSUBR = F5.2, IS10,8H PSUBR = F5.2,S10,.9H LN F/P = 2F12.4,S10,6H F/P = E12.4*$ VECTOR VALUES SPACE = $1H *$ VECTOR VALUES COMENT=$31HONO SOLUTION FOR Z WHEN TSUBR = i.F5.2, 12H AND PSUBR = F5.2*$ FND END OF PROGRAM E-146

Example Problem No. 7 STUDENT'S RESULTS J JIL L L LL U. LL U L LL - LLJ UL II It I I II I I II II 0 0 00 00 00 00000a~~~! 00 0 0I 0. 0. I. 0 0 1 I II I ~~0 0 0 0 0 0 C 0 0 0 -0'O'Ot0- r -', N r ', 1',4 r1, J 00000~ 00 0 0r 0~ 0~ 0~ 0 0 SO O O 0 nO w n O II ~* ~ ~ ~ ~ ~ ~ ~ ~ ~ 0 * I O 0 O 0 0 0 0 0 0 0 0 C 0 a 4 I ) I0 01 o o oo o o ~ 1 1ooo ot ooo -1 00000 0 0100 0 0 000 0 C 0 0 00 ' N0 I-4 1"' O 0 0 > O D;I r- It - 000 00 1 I I I I I0I I n IIt I II II II. I I I \I I I I I I I I I II 1I II f \ 1~ j i o lo o o ol ~ 0 0 |0 0 | o D o o c l o? ~ 1 ~\0 O I' c l-1 ~- ON c n | I'D ) MN \ ck 0 O C O 0 C O 0occ cc Occ' c 0 0 0 0 0 0 LL 1 1 ~ljJL J 10 l- LU Ls JJ LU > 0 L jj LU LL I * I~* * I~ * I* * 0* 0 * 0 J | 1 010 0 01 01 O 010 N 1 1 r0 '0 01 1 1 ^ ~~~~~~~~~~100000 00000 030000~ 0C0D 0 0 1 00000 00000 00000 0I0f0 0.-'j -' co 0 0 0 co 0 | ) ) ) LI) 0 0 0 0 Io lo I I I I I I O n co i oo ~ oo co c c c loccr~ o o o ho d o o lo o o E 1 7,J j Ic li | ol o: O OlO o| O O O c lo oj o ~1~ c In co pco | c lo co o cl CID LO Ml Mo loi | | C I LD |D D D LD | | D) L D LD D D D LD |LD D |) LD -) D |J | m | LD 'I I * O LO V) LO LO LO n L) V ) n f) U LO (f) V) t V *n Ln I ) _ 5 1 V) ) 1) L/) c- Ii oo oo o ooo o ooo oooo C Q Q I -- -.! E-147

Computation of Fugacity Coefficients STUDENT'S RESULTS 0 O O 0 0! 0 0 0, 00 h Mo ~ oo o o] i oo o o0 II II i I t I I I II II llJ 1-1LJ.1J ILd i 1.1 LL.1J LLJ L1JI L,1 J- L L 1-1 LLJ lLJ LLJ 0 O O O l o o L D ID _- 4 NF <- It < 4 <-. J M sj t - Ch < - 4 cN c1m t N0 C\I It r4 ON N In C It I CD 4 | N O N NNO rq 000 0 0 0 00000,I- L 00 0 N 0 It M -0 V M I- n 1O ~ l LUUH!jJL LUJJI0 L ~IJ 0 0 0L 0 0 0 U 3 0 -r< C\10 r,,' N N N N 0'N N 00- <P)rN (< I — i I i I I I <\ I n o n o l n o o1 11 1 1 1N1 ' 1 1 11 101i U Ioso 0 0 0 0I-\ I O Om~- 0i0-fs<f0 ~ i I - - I OD O) D LIO O O)) 10 O. O O L OI O 00 0 I I10 0I 0 Q- IC O O O r) O DO O 00 l. 0l LJL Ua C.! L l-:L l i- O) m ** 00 * * I * *j * * *. * * * * * * * * * I I l I II!j Ij1 I l I1 1 1 I! 11I II II II II II II II II II IY:Y co co M co co D cK!CY Ii Q n c co c! n I lal mco n c c co Dn CD co Z 000D D oZ)! 0 c| -5 0 ID Z) D Z)D ) D D Z) D ) ) i 0io LIO IO 0 UO U|Oi U) I TO )n^ ) |) <I) Uj ) V n) ) vi V) VI VIC V CL |L QC V) |) Q CL HI-I-0 H-HOO I — O ~1 -HI OOOiOO O 0 0 0 0 0 0 0 0 0 E-148

Example Problem No. 7 STUDENT'S RESULTS O 0 C O 0 S I'D 0 0 0 0 0 o O O 0ON NO O O C0 O" C Cq Cc O O. 4 44 4 O C'COCt No0X) O Xooa 0 0 IIr 0'll liol CO 0ill 4il ll 4 o0 I f I I IIJ I IJ IJ II 1 0 00a) ~O 0' CO 0 CO' O CQO 0' 0'0'Co Co Co C- C- -0 N1 >O LOU1LC1 N N N N1 N N N NI N OOCOO 00000 0I000 00000 ^ ',,J N Li,,_ L',, 0 0 J J CJ U L UL0 0 Z) 0 U 0 0 O 0 0 0, 0 M coCo o o L o 0o o o:o oo o-.. 0.0 0 0 0 0- 00 c o o 00 0 c0 o o 0 0 M 0o 0 0 0 0 e O0s0 rD ItJC^^Oen O X Nlin - Y,r- n N O l r>n N 1= 1- M 1 %D t C C00000 00000 0 00000 a m D a | 1 - a L - a- a - a Q- a a0 0v) S~ 0 0 ~ 0 0 I | 0 ) o 0 0 I Z) 0 0U 0 0o 0 0 0 0 0 0 0 o oo IcD0 0 0~~~O OO 0~00 0~o o~J C C Co C N N N NC C,-.f~en!<j-m \o — ooc~o ~-i\)en~j-Lr\ \o^ —coo~oj, c M.._ Q,z 0 OOOOO 0 0 0 0,\l r-1 j -1 N MN1 r1 1 r-1 C1 I I. I...... 11 ~1<~1 11 ~-~1~1 ~~1~1 1 1 11 It 11 1i ii ii ii ir I OC X w Ir Of Q CY-: | r CY Qr Q | CY-: O C O fO 1r co | | CO C ao l c 0 o tCO t) i CD i CL C, C m c CD M CD I c cc) c CD M Eni D I II D tn D D Z n D _ Z D 1U.)..tl t 0t 0 ) /) ) 1 0) 1 ) t')3.. 0 1) 0 1 1 l(2 _ 0 u C L u COsJof\ o fMCM osj Cosl [ oMMCoMo~o Co M CM CM CM o CMoCMoCMoCM~o 'o.',. J,,, II I I II II I I II IIII II II II/I)I I IIV II I, I-I — 1 — - F1- F - F - F- F- I- 1- F- 1-, * 1

Example Problem No. 8 PRELIMINARY DESIGN AND ECONOMIC STUDY FOR A DAM PROJECT by V. L. Streeter Make a preliminary design study leading to recommendations for construction of a concrete gravity dam, spillway and outlet works, the dam to have possible heights from 100 to 300 feet, depending upon economics of the project based on selling price of water power and of irrigation water. The following data are given: 1. The canyon profile is trapezoidal, having a width of 500 feet wall to wall at bedrock and 1:1 wall slopes. The rock foundation is covered with 25 feet of silt overburden. Bedrock is at elevation 6, 000 ft. 2. The reservoir area in acres is A = 20 Z + (2/9) Z, where Z is the elevation above bedrock, in feet. The cost of land is $20 per acre. 3. A 20-year record of mean weekly discharges (not shown here) was given. 4. The first 1, 000 c.f. s. flow is reserved for prior irrigation rights downstream from the dam, but power can be developed from this water. 5. A downstream city will pay the cost of a 100 foot dam if the project will provide that no flood of more than 40, 000 c. f. s. will pass through the city more than once in 100 years. 6. A 100-year flood hydrograph starts at 4, 000 c.f. s., increases linearly for two days to 60,000 c. f. s., and then tapers back linearly to 4, 000 c. f. s. in six more days. 7. Downstream tailwater discharge information on the river (not shown here) was furnished. 8. Water for firm power can be sold to a power company at the dam for 1.5 mills/kwh. 9. A 50-year amortization period is to be used. Several prices of irrigation water were given. Students had to consult the library to find unit prices, designs, interest rates, etc. This assignment was a full semester project. The computer portion of the assignment resolved into six sub-problems which are presented separately below. Part 1 - Dam cross-section Problem: Find the most economical cross-section of a concrete gravity dam for any height between 100 feet and 300 feet. Loadings are (a) 2,100 lb/ft wave force at 0.5 ft. below top of dam, (b) ice load at spillway crest level (turned out to be less critical than full reservoir loading), (c) full hydrostatic uplift, (d) water forces on upstream face, and (e) weight of concrete. Solution: The top width of the dam and the batter of the upstream face at the top of the dam are independent parameters to be chosen initially. Several choices of these parameters were tried to find which would give the most economical section. Figure 1 illustrates the process, adapted from Hinds, Creager and Justin, "Engineering for Dams," Volume II. Having chosen a top width and upstream batter for the top block, and taking the downstream face E-150

Design and Economic Study For A Dam Project to be vertical, one finds the height of th'e top block for which the resultant of all forces on the base of the block, with the reservoir full, falls at the downstream third point of the base. This results in no tension in the dam. For succeeding blocks (see Figure 1) the block height c is preset. Using the same upstream batter m as for the previous block, one determines the base width d for which the resultant of all forces on the base, with full reservoir, falls at the downstream third point, i. e., for whichl1 = - d. For all blocks beyond the first, one must check to see that the resultant of all forces on the base with the reservoir empty also falls within the middle third, i. e.,zd/3. If this condition is not met, m is increased by.05 and the determination of d is repeated. Wave force / ~ Vertical water f rce on blocks above / l Vertical water f rce on this block ~/ |~ Weight\of blocks above Horizontal water fo ce \ Figure Weight of Dam cross-s loc ction I~ ~ ~~~-5

Design and Economic Study for a Dam Project The heart of the program is an internal function, called MO.(C,D) in the instructor's solution, which locates the point at which the resultant of all forces, with full reservoir, intersects the base of the block. In the instructor' s solution this function is written in such a way that its value is zero when the condition 2 - d (see Figure 1) is satisfied. The desired zero of the function is found by the interval halving method. 13 Two initial "guesses" for the value of d are made by the machine, namely, the same value as found for the previous block, which is certain to be too small, and twice that value, which is certain to be too great. The function value at the midpoint of this interval is then found. If this turns out to be effectively zero it is the desired root. If not, its sign tells which half of the preceding interval contains the root. Repeating this process bisects the interval repreatedly, making it converge to the base width that is sought. After finding the base width of each block, the computer finds and stores in memory the magnitude and location of the resultant vector for the vertical water force above the base of the section. These are needed for design of the next block. Output data include the block dimensions and resultant forces, and also the angle of inclination of the resultant force for full reservoir, which is needed to check shear stresses if the inclination is too great. NOTATION FOR INSTRUCTOR'S DAM DESIGN PROGRAM B = Block height, taken constant after first block BASE = Base width of dam (output heading) BLOCKHT = Height of block (output heading) E = Fractional part of full hydrostatic uplift FHOR = Horizontal water force FREEB = Distance below top of dam to maximum water surface FWAVE = Value of wave force per foot length of dam H = Block height HH = Y(I) - FREEB HHH = Y(I-l) - FREEB INCSTR = Inclined stress, kips/sq.ft. MAXSTRKIPS = Maximum vertical stress in dam, in kips/sq. ft. MO. (C, D) = Moment equation of forces about upstream toe of dam MVOLCY = Area of cross-section, in thousands of cubic yards per foot length of dam OFFSET = Upstream displacement of bottom of block over top of block R = Vertical component of resultant force S = Height of block TALPHA = Slope of resultant at base of dam U = Weight of all blocks above UWC = Unit weight of concrete UWW = Unit weight of water VWF = Vertical water force on dam W = Weight of dam X = Horizontal block width XBAR = Location of c.g. of dam from upstream toe (horizontal distance) XBARV = Distance from upstream toe to vertical wate. force vector XEMPTY = Fractional part of base width from upstream toe to resultant force when dam is empty. Y = Height of dam YY = Base width of first block YW = Distance wave force is applied below top of dam Z = Height E-152

Example Problem No. 8 FLOW DIAGRAM FOR INSTRUCTOR'S PROGRAM for Part 1 ~~ + ].cesY, Y E-ADt;V o VWHo - XX=Xo V A^r i, WW,FREEB,I B HSO X?03ARV- I Zl). (AA + BB )/2. H/Z= Z.t ~- R~-8/_ '__,E / ry)ou&V\,)^~xor z/.z W,Jt=wcar, x0_d.... ) CAICWiAZF C,4CUlT c - - F (__r~.,~, ~,,. ~,- X., "- vwrl T 7T Cxftv,, '~....... ', -O+ U+OwC-S -C.XX +,)/~-rV +(,H-S/z_)- M.S.WW - /-dwW *HH -XL/ VW - F. VWF_, -4 M, S-(H - S/a).vW W E-153

Design and Economic Study for a Dam Project FLOW DIAGRAM FOR INSTRUCTOR'S PROGRAM foF Part 1 Continued CALCULA T- CALCULA rTE fAx~;rR, 2R/ looo Xi) FFS,'= M Alc* H' 7/ys &fl/L M c v Yi C^ A.T r Y6..0 o. K ~ 2.,, =-: F T Cro TZBBYY B2 Al AA'YY 2 wi= We- f,+ UWC (Xi *,Y + &o',) -2 I N ST ( = M fk~Kt-1 t _(-,*-,H A'LA (~ o.w -+)/Z -VVYY -+ < H)-.b'GC7 + B.(\Ny c.x S K *=. T + M -.-. M,:.(C, b) =(' u-(MM. +v) +(C -.)'. C/3 + Q.-W-,-M+Ce+XX/Z) + (b -H-.Q.~/~.' (/3. (z. Cx-,.M3)/3)). uw.-+vv. C.-C-+X*Xx) + uwW -. c- C-HH-C -M/a + -z/. cy ) +ww.()' -E-.UWW-r, f/)/H (C o+owc *.-C. +,/~.. vv +~ I -c/& ).. c.AWW - *T)/).).'.(,<,( A)-I E-.154

Example Problem No. 8 INSTRUCTOR'S PROGRAM FOR PART 1 RDESIGN OF CONCRETE GRAVITY DAM SECTIONtE=FRACTIONAL PART OF........-R-HY-DROTA-T- C -UPL-FT'-,OQ —CE —X=HOR IZ BLOCK W TIDT-c —.;L- -- RBLOCK WIDTHtY=HEIGHT OF DAMsW=WT OF DAM*XBAR=LOC OF C. G. FRO ROM UPSTREAM TOE. M=UPSTREAM SLOPE;FWAVE=WAVE FORCE;YW=LOC OF RWAVE FORCE BELOW TOP9 FREEB=LOC OF MWS. FROM TOPtUWC=UNIT WT....... ROF- CONCRE TE- 4JW.-UNI T ---W-T -OF- WA-T-E-R-OF- -U S D ISR —F- BLOCK --- RXEMPTY=LOC RESULTANT -. -- -.... VWF-V-ER-T CONP -OF- -W-A-T-E-R — FORCE+X-BARV= D I-S-T —FROM N-O-R —T ----WF- R D-/L-MENSION X(30) Y(30) XBA R(3 0 ).W(30) 'H(30 );'WF(30) XBARV(30 ) Al READ FORMAT CARDX(O),MFWAVEUWC.UWWEYWFREEBB....... -VEC T-OR- -VA-LUES -A-R-D=$- - F-5 F-*.3- -7F-8 ------------ ------------- - PRINT FORMAT TITLEX(O),M.FWAVE.UWC*UWWE.YWFREEBB -—. V-EC-TOR -VALUE-S -TI-TLE =$-H-lXX(-)- F-5 ---3H M —M-=F ---7-F- F-A —= —E - 5-2 --- 1UWC=F8.2~5H UWW=F8.2,3H E=F5,2,4H YW=F5.2,7H FREEB=F5.2, 13H B-=F5.2*'$ PRINT FORMAT HEAD. --- —- —.. -VE-C-OR —VAL-UES -HE-AD=$1-20H --— I K — HEIGHT — BASE M ----TAN1 XEMPTY INCSTR 1000CY BLOCKHT OFFSET XBAR R -- - —; ---FH-OR ---- -- MAXSTRKIPS *$. ---... --- —------ - ---- INTERNAL FUNCTION MO.(CvD )=(U*(M*C+V)+((M*C)P.,2*C/3,+C*XX*( 1.-4_IJC+XX/2 4 )- + -~XX — -)*'C/2-(.*(D /3;+2.*(XX+C*M)/3&) )*UWC+V lV*(M*C+XXX)+UWW*M*C*(HHH*C*M/2s+M*C*C/6,)+UWW*HH*.P3/6.,-E*UWW......- - i-.*HH*D *P 2/6.) / (( U+UW.C*C* XX-+D —)-/2.-+VV - 4 ----..C-J2H)~4IC*XUWW-.E* --- lUWW*HH*D /2.)*D *.6667)-1. u=o1 U=O. HHH=0,.... —. =o =....... _.-... —.... - -.-..-. _....._... XXX=0O. *..W.............-) =. -_ XBARV(O) =0O A6 K=0 A. A=.8*X-0) -...-. BB=4.*X(0) A7 - ZZZ=(AA+BB )/2....-.......-...................-....-.. —. -.YY=X(0)+M*ZZZ __- __ --- HH =-Z-Z-Z -— F'RE.._.. --- —---..-_ _ GG=MO. (ZZZYY) PRINT FORMAT AGG,GG... - -. -----. - ----—... VECTOR VALUES AGG =$S1,F9.4*$.K = K + 1......................................... WHENEVER.ABS.GG.LE..002.ORK.GE.20,TRANSFER TO All -.-WHEEV E-R ---GL0T-F --- TO A 8-___ —.- T - BB=ZZZ TRANSFER TO A7 -- - -- A8 AA=ZZZ TRANSFER TO A7 --—. ---All X(1)=YY THROUGH NEXTtFOR J=2t19J.G.15 Y (J) =Y(J —1 ).+B. NEXT H(J)=B Z.. _................. -.-. -. W(1)=UWC*(X(O)+X(1) )*Z/2. __XRAR L-l =UW(* ZZZ),,P 2 *ZZ Z7/ +X ({ O ) *Z7Z* (M*Z7Z+X (0 ) /2 ))/W ( 1 1) E-155

Design and Economic Study for a Dam Project Continued -- Instructor's Program for Part 1 - t tu - -, ---.................... S=Z 4-12 - XE-M'P-TY-X BAR4 t4/X( I)WHENEVER XEMPTY.L..333 TRANSFER TO Bl --- END OF- CONDITIONALR=U+UWC*(XX+X (I) )/2.*S+VV+(HH-S/2 )*M*S*UWW-E*UWW*HH*X ( I/2, -- ----- VWF —(1) =V.W-F -1- T*M- ( HH —/ —2-4-,UWW WHENEVER VWF(I)*LE~O0 ---— XBARV( I)=O —. TRANSFER TO A13 END OF- CONDITIONAL XBARV,( I)=(VWF(I-I)*(XBARV( I-)+M*S)+UWW*(HHH*(M*S) *P2/2.+ M —' M*SS*SxS/6;) )/VWF( I_A13 FHOR=FWAVE+UWW*(Z-FREEB),P.2/2. TALPHA=FHOR/R. MAXSTR=2.*R/(X(I)*1000.) -NCS-TRMAXSTR*J-R14 — ( (X(I ) -M*H-I ----X (I -) )/H( I ) ) P2) - OFFSET=M*H(I) -- _ — MVOLCYW-(-) / (UWC*27000)- -- PRINT FORMAT RESULTIKgY(I),X(I),MTALPHAXEMPTYINCSTRMVOL CY,.. I TI)..Q.nrFFSET C XBAR( I ),,R~tFHOR, MAXSTR, TR VECTOR VALUES RESULT=$2149F9.2,F8.2 F6*2.F7.3.2F8.3tF9*4oF8. --------— 3r — 2-2 F&-.-3E2+3-E —1-O+-3-t-3S —. ----F-. ---.-3-* ---...-.. WHENEVER (XBAR ( I )-3333*X ( I ) ),L.. 5 M=M+.02 __ — -4EN-VE-R.Y. I )-. —30...- T-RAN-SF-E-R-TO A ---- 1=I+1 B! K=OU=W( I-1 ) — V=X-BAR -1 -I --- —-- _.. __ _______________ ____ XX=X( 1-1 ) Z=Y( I) VV-VWF ( 2-1 ) HHH=Y( I-1 )-FREEB __ — _HH = Y(-44-FR-EEB --- —_ --- AA=XX _..__-.- _. _..-......+ —'_... - _______.. —__-___ _ B2 YY=(AA+BB)/2* GG=MO.(B-YY) K=K+1...........-.-.-WHF_-NgVEJR-ABSQGG;LE 40-O02 *OR~ K;GE. 20; TRANSFER-T-O- B1_____ WHENEVER GG*LO.*.TRANSFER TO B8 TRANSFER TO B2 -B8 -- BB=YY TRANSFER TO B2 ~ -S! - X ( I )= YY --- - WHENEVER (X(I)-X I-1)-M*B).L. ( 9*(X(1 -1)-X ( I-2)-OFFSET)) 1!TRANSSFER TO A1 W( I )=W( I-1 )+UWC*B*(X I-1)+X(I ) )/2, XBAR (T)=(U*(V+M*R+( (fM*R P.2*R/3. +XX*R*-M*R+XX/2. 1,+ 1B*(YY-XX-M*B)*(YY/6.+(XX+M*B)/3.))*OWC)/W(I) S=B TRANSFER TO A12 TNTFGF TIJ~K END OF PROGRAM E-156

Example Problem No. 8 H!-sta> -( < t rv im r 4 C r Jm 4\o | aw OOc,N ~, ~ ~,oir S r Qf. -t-ir 4 r-1^r 4 - I,-l %.N lr - It I ' h r-.,!ir- rt- - - r- r-IN C N N C4 JI I *n4Xq,X iZZ>,> >! ui o c> O oo oo oc~o~oo j I ~Ln % J - %I Oor I,-,I I I i 0 0 Cooooo'4'Ocooo 0 I iO I i cc ot osor r o0 r -, O N o r4'-I' * t* ',. o **,,,.II I,! I,. ~;I 1! i;o i o Cl) t;> U l I U LU l UJOl bl I,',) O, O J c! 4N cJ S ' o co, N0 a or+ n ^ ct ao;, o ii i;< "(Nlr-<0|\0(NJC<^~-|<t h Lo N CA 4 L N co cb i i I ^ *n,r-H r- Ir- CN cn i: LrLJ _ - 0 0 O cx < o 0l ux.L 0, 4. *y ~U J,oo Jp,, oC i ' i. i o.^ i;; I I;n c! o rj o N o o, o I; } C | O Ol inM v l d ~ $ ~ co R o o o,,3 rI - { <r L'c) o irnO —<r0r ' —r -!; U I I O O Oy 0 O C OO I 4,- I iI I-.4 4..O It, 1Ir-r44H 4iw-l0 c) I-t 6 c s C?)~ i 0 1 g 04tHN~i^4M,>X i o t N o 0 o ouo~oooooooo co o P o~ op j! t tN crl,4 0o 0: ts 0I0 CM4C0 0 0 0,CL40 %*.. I i u, c. ~. ' i E * i I, t! | |ti ' I: '. o o o oo o.ooo o o H 0 0 | 0o 0 0o )00g 0 0 LL ': ~r LO C> 6, (7? O )OC O oo r-q \; O 4 0 o OQ < O.,.... c4 \J O. 4 0.- ', i *, * * * * I i i ocooo ooo o! * I -I N j O (-D c>>*gE oo ar -c,oo 0; Zc u; * e * < t l * * < 3p < S H i 4 ^i tio r4 M St e \n Si r-4 N 0r n CO r — o 4 o- ir - o ccc O D <o, o o Rnfl~llf^E-17

Design and Economic Study for a Dam Project Student's Dam Cross Section Showing Notations Used in Program No. 1 'r a > co 3 I u Of FWAVE = 21000LB/LIN FT w() I H(1).5 FTI 2T I IM(2) (3) PASSING THRU C.G. OF WATER 3 \Y(l) ACTING ON THE DAM / C ' k 4 \ '/ v(I+1) 8=2 FT FHORI '\ /M (i1 1M \I I/ I/ I PASSING THROUGH C.G. OF THE SECTION /______ C I ~~ t 1 ~~~~~X(l+t) IV W (l+l).E < aH-= FHORI + FWAVE 1/ /+1 FUP R IV = W + WV - FUP 1/3 X(1 +)tl t I TALP'=-= - k- i(I+1) - T E- 158

Example Problem No. 8 Student Program for Part 1 Design of the Most Economical Section for the Dam M.A. MAHDAVIANI XO08DN 002 2 003 v04 2 COMPILE MAD, EXECUTE, DUMP DIMENSION X(20), Y(2u), WV(20), W(20), XBAR(20), 1 XBARV(20), M(20) H(20) All READ FORMAT CARD, XZERO, B, E, M(1), FWAVE, YWAVE, 1 FREEB, UWC, UWW VECTOR VALUES CARD=$9F7.1*$ PRINT FORMAT TITLE, XZERO 3B, E, M(.1), FWAVE, YWAVE, 1 FREEB, UWC, UWW VECTOR VALUES TITLE=$9F7.1'-S N=O AA=XZERO BB=3.*XZERO H(1)=(AA+BB)/2,GAMMA FHORI=(UWW/2.) )-( ((H (1)-FREEB) P.2) FUP=E*UWW-R( H(1 )-FREEB ) r ( XZERO/2, ) W( 1 )=XZERO*H( 1 )*UWC R=W(1)-FUP N=N+l iMvOF=(FWAVE-*(H(1)-YWAVE)+FHORI*((H(1)-FRELb)/3.) 1 +W( 1)-XZERO/2.-FUP*.3333*XZERO)/(R *.6667-'- XZERO)-1 WHENEVER.ABS. MOF.L.*005.0R& N*.G50, TRANSFER TO A10 WHENEVER MOF.Go.O, TRANSFER TO A9 H(1)=H(1)+(XZERO/(2..P*N)) TRANSFER TO GAMMA A9 H(1)=H(1)-(XZERO/(2o.P.N))TRANSFER TO GAMMA INTEGER N A10 TALPHA=(FHORI+FWAVE)/R MAXSTR=2.-X-R/XZERO PRINT FORMAT ALI, N, H(1),MAXSTR, TALPHAP W(1),Y(1), MOF VECTOR VALUES ALI =$I4, 6F18.2*$ X(1)=XZERO WV( 1 )=0. XBAR(1)=X(1)/2. XBARV(1) =0. Y(1)=H(1) _=0 BETA I=I+1 __== __ M( I+t =M ( I Y(I+1)=Y( I)+B AA=X(I) BB=X(I)+3.*-B GAMM1 X( I+1)=(AA+BB)/2. N=O GAMM FHORI=(((Y(I+1)-FREEd)sP.2)/2s)'-*UWW W( I+1)=W (I) +UWC C(X( I ) -6+( P 2) i (M(I+1)/2.) 1 +(X( I+1)-X( I )-M( I+1) ) —b/2 ) WV(I+1) WV( I )+( (. P. 2) - (M( +)/2. + ( *M (+ ) (Y( I )1 FREEB)))*UWW XBAR(I+1)= (W(I) - (XBAR(I)+Bt M(I+1 ) )+UWC- (X(I) -'-( (X () /2 )+ +bdi 1(I+1) )+( ( (M( 1+1).P.22)-.DP.3) /3. )+( (X( 1i+1 )-X( I )-BM( I+1)) 1*B/2. )-(.3333-X( I +1)+.6667X X( I )+.*6667ii( I+1) ) ) /W( I+1) XBARV( I+1) WV( I )CX XARV( ( II ) + —M ( I+1) ) +UWW ( ( Y( I+1 )-FREtBi ) 1*(((B*M(I+1)).P.2)/2.)-(((LI.P.3)-(M(I+1).P.2))/3.)))/WV(I+1) R=W(I+1)+WV( I+1)-E((X ( I+1)/2 )UWW-e(Y( I+1)-FRLE 'B) N=N+1 MOF=-(W( I+1 )- XBAR(I+1) +WV( I+1 ) *XBARV ( I+1 ) +FHOR I 1 (Y(I+1)-FRR EE )/3. )-E- ( X ( I+ )/3. ) I UWW-. 5 - X ( I +1 ) I E-159

Design and Economic Study for a Dam Project Continued Student Program for Part 1 i(Y(I+1)-FRELB) )/(R-,6667 X( i +1) )-1i PRINT FOFRMAT CHECK1,FHORI 9 W(I+1), WV( 1+1 ) R, MOF VECTOR VALUES CHECK 1=$5F2. 2*, WHENEVER.A6tSMiLOF L e.J5 OR.NG l 50 TRIANSFER TO A1GO WHENEVER MOF.G,,,TR/ANSFER TO A90 X(I+1)=X( I+l)-(( 1.5-3)/(2.P.N) ) TRANSFER TO GAMM A90 X( I+1)=X( I+1 )+( ( 15*-i3) /(2*.PN)) TRANSFER TO GAMM,7 M( I+ 1 )= ( I+ )+ 5 TRANSFER TO GAMM1 A100 WHENEVER XBAiR(I+1) L. (X(I+1)/3 ) TRANSFER TO A7 TALPHA= (FHORI+FWAVE)/R MAXSTR=2. *R/X( I+1) PRINT FORMAT ROMAHD, N, X(I+1), MAXSTR, TALPH-iA VECTOR VALUES ROMifAHD=$I4, 3F16 2- sC WHENEVER I G. 14,TiiANSFER TO All TRANSFER TO 'BETA iNTEGER 1, N Nix OF PROGRAiM; "; 5 J 2^' 1 U 222 o1 0J 3 5 2 0 15 0 625 3,uO 2_ u 1) u0 2 ilJuu O 5 2 15 0 625:-0 20...-.2 Uu 2 i: 2-1 j 5 2 500 625 E-160

]Example Problem No. 8 0~~~~~~~~~~~~~~~~~~~~ C)~~~~~~~~~~~~~~D O'. ) 3% 0 0 0.0 **O 0 00 0.00a0 0 S4 a S "I ~ C) -— 4 NJ 'I "- C)<- J\- \-O \NJ C)C) C)C C) > C) 'Y\ —4 C )C ) ')' - C-C *.0 n JO n 0.0 0 -4C'C)C) C)..0~~~~-4.D -C) '~C-4 C)Cn - \ 7)'C).-\4.C C\C)'C) C'C)\C ID -,O: C)(n C) D C)L C)' C) \D OC-C "N -- C')' -J%- C) C)CCCCCC4 C c'- 2;) (CN r0)07' ~~~~C).C).N~~~JCC ) '4JCCNJCW C:o 2J ',- 4)C: 4 LC. C N C)C)XC)C) 7\i4C)4~~~~~~~~~~~4 '\~~J tn n::)O C)C C)C -N 0 \C)2 DO C)2 C) J' '4 It(CT\ JO -\:,JAj~ i) t _J_-I t t t n nul:n13)O NJ~~~0 H ') C:) `1 D- C.) C)> ) C) D ' ID ('\J NJ N'NJN(AN "C''C) (C)CC C)LC).C)Jo CC) -00.0 )'C)2) C)'C)C).C) 3)~ ~~~~~~~~~ D 2 ( )CC )'C D ).CC )) CCCCC* ') ) 2 ) '- ~~~,*,~~~~~~~~~~~*C) 43 C)~~~~~~~~~~~~~~~~D- C) \0-0 -o C) C) C) (',JC) N-\: 0 COC) 4444 "C) C.0 CD )-J( "-\ 0 - C' >\0-.0C, 0 O:O:n:n - t 1,0\O'. -~~~*; ~ ~~ N 1'~~I I4nC \0). -J\,Jf 0 0 -4 ~ ~ ~ ~ ~ C) 4 - 4-. -4 - -4 C. C )')() C C ) ')CGO ) C )' - ~ ~('( (J - CC"'C'2 4').> 0C) '.C).)'C)(C)C).) C).) 2C''C'-C) C)C C'') C' C 0C C C 0 0 & C C C 0 C a C 0 C 'aC C C C 4 C C N (.4 —r" —.3'N.-' C'-~~D J I U "I J C"-4"4 >CcCoJC\ -— N'N)-:"2" '- -t'.2C2 (YC)- C. C. 'N C- (C\ -I 2 — 4 '" 'r) C C C C 0C-i in- ON- 4 C) 0 ) r -4 - ) '4- -4 ") (JC JA~~~~ ' —' ' '4 44~~~~~~0 O\r 3 - O"' C,-4 --- '4 '4 ~C J a 0 0 0 40 0 0 0 0 CO S 0 a 0 C 0 0 0 0 410 0 0 0 0 p ~~~ -~~' ~~' NJ -- 4 4 ~~~~~ C 4 C)n~ -C) C) -C ) 0 )) ''` 'C) C' n 'C C C) nC u 'C) (4' T 'C) 4"". 'C.)'-"4-,-'44- )C)C ) '(C" C' C C 7 0 2. 2 - -4 -, - 'N D N.4 C-D '' -C' -) -C) -) 'C) - 4-i L4o 1) 4 'o - C).C ) ' 2) ~~~~~~~~~~-J '.I 'C' ItIb. D, r c ) 4P&~~~~~~~~~~~~~~~~~~~'J

Design and Economic Study for a Dam Project ANOTHER STUDENT PROGRAM FOR PART I R CE 146. SPRING 1960. PRILIMINARY CROSS SECTION OF A R STRAIGHT NON OVERFLOW GRAVITY DAM R X(I) = THICKNESS OF THE DAM AT SECTION I R Y(I) = HEIGHT OF THE DAM - FREE BOARD RMEANING OF SYMBOLS IS AS FOLLOWS R UWC = UNIT WEIGHT OF CONCRETE SAFEP = ALLOWABLE STRESS R SAFEF =.ALLOWABLE TALPHA FREEB = FREE BOARD R E = COEFFICIENT OF HYDROSTATIC UPLIFT X(O) = TOP WIDTH R UWW = UNIT WEIGHT OF WATER VOLC = VOLUME OF CONCRETE R YW = DISTANCE OF WAVE FORCE FROM TOP OF DAM R YMAX = DESIGN HEAD H = BLOCK HEIGHT R M = UPSTREAM BATTER N = DOWNSTREAM BATTER R XBAR1 =MOMENT ARM OF FVERTE R XBAR2 = MOMENT ARM OF VWF VWF = VERTICAL WATER FORCE R FVERTE - VERTICAL FORCE DAM EMPTY P FVERTF = VERTICAL FORCE DAM FULL R FWAVE = WAVE FORCE PER FOOT R MOWAVE = MOMENT DUE TO FWAVE R MOWW1 = MOMENT DUE TO VWF R MOWW2 = MOMENT DUE TO HORIZONTAL WATER FORCE R MOWW3 = MOMENT DUE TO UPLIFT R XBARF = LOCATION OF RESULTANT WITH DAM FULL R XBARE = LOCATION OF RESULTANT WITH DAM EMPTY R TALPHA = TANGENT OF ANGLE BETWEEN RESULTANT AND HORIZONTAL R PFD = STRESS.ON DOWNSTREAM FACE WHEN FULL R PEU = STRESS OH UPSRREAM FACE WHEN EMPTY R FHORF = HORIZONTAL FORCE WHEN FULL R TMOFUL = TOTAL MOMENT WHEN FULL READ FORMAT DATA1, UWCSAFEFFREEBtSAFEPEYWoUWW~FWAVE BEGIN READ FORMAT DATA2, X(O), YMAX,MN PRINT FORMAT DATA3,UWC, SAFEF, FREEB, E, SAFEP, UWW, YW9 1FWAVEf X(O), YMAX PRINT FORMAT HEAD DIMENSION X(33), Y(33), VOLC(33),VWF(33) I = 1 Y(O) = 0. _ _ ____ Y(1) = 0. VOLC.(O) = 0. VWF(O) 0 XBAR1 = 0. XBAR2 = 0. ___ H = FREER _ _ ___ _ _ ___ __ ___ BEGIN1 J = 0 K=O K2 = 0 K3 0 _ _ _ _ _________ WHENEVER I.G.1,XBAR1=MOWC/FVFRTE MOWW2 = UWW/6o*Y(I)P.*3 ___ _____ MOWAV = FWAVE * (Y(I) + FREER - YW) FHORF = FWAVE + UWW * Y(I)oP.2/2. WHENEVER I.G.2,XBAR2=MOWW1/VWF(I-1) BEGIN2 X(I) = X(I-1) + (M+N) * H __ ____ __ __ MOWW3 = UWW*Y(I)*E*X(I).P.2/6. VWF(I) = (Y(I) + Y(I-1))*H*M*UWW/2.+VWF(I-1) VOLC(I) = (X(I) + X(I-1))/2. * H + VOLC(I-1) FVERTE = UWC * VOLC(I) MOWC=UWC*VOLC(I-1)*(M*H+XBAR1)+(M.P.2*H.P.3/3.+X(I-1)*H*(M*H+ 1X(I-1)/2.)+N*H.P.2/2.*(H*M+X(I-1)+N*H/3.))*UWC MOWW1=(H*M).P.2*UWW*(2.*Y(I-1)+Y(I))/6.+VWF(I-1)*(XBAR2+H*M) E-162

Example Problem No. 8 Continued -- Student Program for Part I TMOFUL = MOWC + MOWW1 + MOWW2 - MOWW3 + MOWAV FVERTF =VWF(I)+FVERTE -E*UWW*Y(I)*X(I)/2. XBARF = TMOFUL/FVERTF DIF = XBARF - 2.*X(I)/3. WHENEVER XBARF *G.(2*X(I)/3. +.01).AND.J.LE.20 N = N + DIF / H J = J+ 1 TRANSFER TO BEGIN2 END OF CONDITIONAL XBARE = MOWC/FVERTE DIFF = X(I)/3. - XBARE WHENEVER XBARE *L.(X(I)/3.-.ol).AND.K.LE.20 M = M + DIFF/H K = K + 1 TRANSFER TO BEGIN2 END OF CONDITIONAL TALPHA = FHORF/FVERTF PFD = (NP.2+1.)*FVERTF/X(I)*(l..+6.*(XBARF-X(I)/2.)/X(I) PEU = (M.P.2+1.)*FVERTE/X(I)*(1.+6.*(X(I)/2. - XBARE)/X(I)) WHENEVER PFD.G. SAFEP.AND.K2.LE.20 PRINT FORMAT STRES1,(PFD-SAFEP) N = 1.01 * N K2 = 1 + K2 TRANSFER TO BEGIN2 END OF CONDITIONAL WHENEVER PEU.G. SAFEP.AND.K3.LE.20 PRINT FORMAT STRES2, (PEU-SAFEP) M = 1*01 * M K3 = 1 + K3 TRANSFER TO BEGIN2 END OF CONDITIONAL VOLUME = VOLC(I)/27. PRINT FORMAT RESULTI,J,KK2,K3,X(.I),Y(I),XBARF,XBAREDIFF, lUI l,MN,TALPHAP,PhDPhU,VOLUME H = 10. = I + 1 Y(I) = Y(I-1)+H. WHENEVER K2.E.21, TRANSFER TO BEGI-N WHENEVER Y(I) *LE. YMAX, TRANSFER TO BEGIN1 TRANSFER TO BEGIN INTEGER I, J, K, K1, K2, K3 VECTOR VALUES DATA1 = $3F6.2, F8.0,3F4.29 F5.0,*$ VECTOR VALUES DATA2 = $2F6.2, 2F4.2*$ VECTOR VALUES DATA3 =$ 5H1UWC=F6.2, 7H SAFEF=F6.-2- 7H FREEB= 1F6.2, 3H E=F4.2, 7H SAFEP=F8.0,5H UWW=F5.2, 4H YW=F5.3, 2 1H FWAVE=F5.O0 / 6H X(O)=F6.2, 6H YMAX=F6.2 *$ VECTOR VALUES STRES2 = $12H PEU-SAFEP= E12.5*$ VECTOR VALUES STRES1 = $12H PFD-SAFEP= E12.5*$ VECTOR VALUES HEAD=$120H I J K K2 K3 X( I ) Y(I) 1 XBARF XBARE DIFF DIF M N TALPHA PFD 2 PEU VOLUME*$ VECTOR VALUES RESULT=$S 95I 3,9F7.2,2F10.0,F13.2*$ END OF PROGRAM E-163

Design and Economic Study for a Dam Project E: (\jcn|<tLn o n,^ o ~0f ~Xjo... ~..., o-,,:- ooam o n rW ZN. O* L * ** * * 0 0. -. 0 0 0 *. *010,,r —/o.-,o I 00 0 0 0 0 00 0 1 0 Oo " 0 0 00 0) I t 0 n \0 00 Sn 0 0 J lJ 000 1 4 4 - O\ 0\ 00.1 C 0 - - 0' 4 -- C-0 -O co o 000 1- o4 CO 4 In t n CO oCD - CO iO O -1N Co 4 oo C O C4ion nO ~l~~ 0 1 1-,,.l: lO 01 N |N N N N Nl I N N N Co 00 Co CO Ol C CO l~ll 00 0.0' 0.0 0~ 0~ 00 0 0l0'0 0000 S000 CO CO 0L 4 hr- 0 N 01 N1 N CO h- h'- O N CO h- Jt 40 h- O N N1 0 C CO 4 h 0 I IL o-4orc00 oo h-0h- -O4COLr coCO —N0xC0h-OO CO 0 t O( Cii r^-oN Q. N CO 0 h- r- 00 4 COD 4 r 4 N N C, 4 - 0 0 0 CO - C" \O -4 4 h-0 co -N CO CO n a- 4 h- 0 CO N C 0 00 CO 0 t H N Co 40 t- 00 Co\O M CO 4o h 00 Cr 0 N C — 4 4 r-4 -- - - rN N- N J N NN N lO ^n CN C O C CO J <- XCO NI -.Om 0 C N CO - X 0 00 f N N -N N N N o- 01 OO 00 0O 0000 OCL N - - trN \CO 4 0 -- l h-,h - h o I M r000000 000 co0 0 0 h h- oh ho r- hU..l < j~ r'..-/00 0000 000 00000 000 ~P:; I 4.o o~ ~10 t M t H ~ l0 S i, I 00 000 0 ON 1 0 00 0 00 0 0 0 0 o o / 3 0o / o O h OD 0 0 0o o oo r-io - 0 0 0 0 \( 00 0 1 0 lI 0 e e 0 ~ ~1 0 0 0 o o 0 o 0 0 0 0 0 o 0 0o I < L uooltoooc ooO~o ~Oroo1 oor O ot OoaN oo,; 1 31 V~o~/1o o/ o c<o c oo o o c oo o ol oOOl O O O ol H I'Ii ''1 '' 0 ra N 0 Co o0 / 0 o o -C 0 o 0 04 CO C h- 4 - 0 C:I 000004 C o -0o 000000o 00-4 NCO N4 000C - \ -0000 11 o o o o ooin oo r-^ l cn f lto l o o o l ooo oo oooo i oor1 in l ir o u I " lo O I I D * *1* 1 * /* * * * * *, * 0 0 00 / / 01, 0 r-1 0 1 r- 0 1. COco - I h- Nh (Dr, NiCO- O N N \ C o w N \ O 4 — C O ON -1 o It 0 0 o o 00 0 00oo 00 0 0 60 cc)~ ~ ~ ~ ~ O -d ' M I < % '<1, I I N NCI I N N N N -f 0 00. L - 000 4 Ch 4I4, 4 4 4 4 r- in 4 4 D N 044 CO C cO CO CO C C 0C < CO CO * CO C CO C 44 0 o h CO * * * N CO 4 * * 0 * O 0 N C 0 * 0 h I-) 1 C n U% U) in 1H J,0 r- 01 -4 00 -4 in O'. CH) t I C Or -4 In O NN N N N N 0 N N * *CO I I 0 000o 0 0 000 000 0 00o0 o o o 0 0 00000000 ~l0.-1. -. It i-... 1/. n -, o-. /, O\,o *.1. col LO ', o: o ",,o, - c 0-, Ci o 0 0', o ol,:, " o o ol e/co ol, — 1 IO C N O 40 - Lo CI o N (IC 4 h, \ i- Ol Oc N C -4 N Mi-, C O 0lrc --— 4-co4NNNNNNNoocoo ooNoNCOCO 0 CY X 4 ('\j M 1 n.r —:,- r —.- ao 0 -,. 4: L' Oo /.,? 0 o1 C C r-.- -:l,, r'x.I exI I.1 I, 1 - 1 N N N N 0', o(NJ o4/0,.i c, l l l l l l l l l l l l E-164o

Example Problem No. 8 Part 2, Volume in Dam: Problem: Using the cross-section of dam found in Part 1, and the given canyon dimensions, find the volume of concrete in the dam for heights of 100 feet to 300 feet, in 20-foot increments. Solution: The area of vertical cross-section as a function of dam height, obtained from the results of the previous program, is stored in the machine as a subscripted variable. In the instructor's solution, V0, V,.., V1 are the areas for dams of height -21, -1, 19, 39,..., 319 feet. (The negative heights are used for interpolation.) For convenience the area is expressed as thousands of cubic yards per foot length of dam. The base width B of the trapezoidal canyon and the slope M of the side walls are read as input data and the dam height H is set initially to 100 ft. The area at full height H is found by interpolation from the V's, and this times B gives the volume in the center portion. The wing is divided into 30 equally spaced sections, the area of each section is found by interpolation from the V's, and these are integrated using Simpson's Rule to find the volume in the wings. After each complete dam volume is computed the results are printed, H is incremented by 20 feet, and the process is repeated, continuing until H exceeds 300 feet. NOTATION FOR INSTRUCTOR'S PROGRAM B = Width of bottom of valley H = Height of dam M = Side slope of valley (horizontal/vertical) THETA = Fractional part of block height VOL = Area of section, in thousands of cubic yards per foot length of dam VOLL = Area for height Y VOLUME = Volume in dam in 1000 cubic yards Y = Height of dam section E- 165

Design and Economic Study for a Dam Project FLOW DIAGRAM FOR INSTRUCTOR'S PROGRAM STAT RTEAD REAb PR IN'T HA^ Ho.12 ~.o: L H - ~o t4 — ~,2o VoL(O),.. y6L07) 1B3, M, AACi) AA(z) HRXOUH AA) VOLUE B VOLLL VOLdVoLL.,, ______ THROU H ~A VLU= VOLU+ 4 AVOLL i-"<': (S '.2,)- Y= JH/30 ZZ "-" v^ \ r>29/ — v,2e VAA) VOLUI=VOLU 2+ VOLL -VOLUE= VOLUME +VOl.U*/MH/4S' — 1 8,, 1ii ZZ INTERPOLATION SUBROUTINE _________________<* _* z' -I (Y-1)/20 - 1 T ETA- (Y 1.)/2,0. +J. -Z C /AT VO L L.. * Note the use of the truncation feature of integer arithmetic in the program to accomplish this. E-166

Example Problem No. 8 INSTRUCTOR'S PROGRAM R C E 146 VOLUME IN A DAMO VO)L(0)...MEANo 1b00 CY/F-T STARTING RWITH -21,-1,19,...319. b-VALLEY BOTTOMi WIDTHM=SIDE sLOPE HOR P/VERT) DIMENSION VOL(20),AA(6) READ FORMAT IN,VOL(O)...VOL(17) VECTOR VALUES IN=$(10F7.4)*$ AA(1) READ FORMAT DIMB,M VECTOR VALUES DIM=$F6.0,F7.3*$ PRINT FORMAT DOPE,B,M,VOL(O)...VOL(17) VECTOR VALUES DOPE=$S5,3H B=F6.0,3H M=F7.3/5H VOL=F8.4,(1OF8. 14-)*$ INTE;F.FR I,J,K H=80. AA(?) H=H+20.. WHENEVER H.G.301.,TRANSFER TO AA(1) K=3 Y=H TPAtNl.cF TO ZZ AA(3) '/OLUME=-=-VOLL VOLlJ=VOLL 4 - TiliKUGH-i AA(4) FOR J=1,2,J.G.30 Y -J -^H/, O. 'rRA,.SFFR TO ZZ AA(4) V)LU=VOLLJ+4.*-VOLL K=5 THROUGH AA(5)tFOR J=2T,2J.G.29 Y=J*H/30. TRANFFER TO ZZ AA(5) VOLU=VOLU+2.*VOLL VOLUME=VOLLIME+VOLU*M-4H/45. PRINT FORMAT ANS,BM,H,VOLUMF VECTOR VAIUES ANS=$S20,3H B=F6.1,3H M=F7.3,3H H=F6.1, 116H VOLUMEF(100OCY) =F15.4*$ TRANqFER TO AA(2) 7Z I=(Y+ )/20+1 THETA=(Y+1.)/20.+1.-I VOLL=VOL(I)+THLTA —(VOL(+1)-VOL(I-1) )/2+THETA.P.2/2.*(VOL(I+ 11)+VOL(I-1)-2.*VOL(I)) TiRANSFER TO AA(K) E-Nn OF PROCRAM RESULT OF INSTRUCTOR'S PROGRAM R= o50, M=!.lnOOn VOL= -0.0230 -0.0011. 0.0214 t.0447 C..0720 0.1077 0.1543 0.2133 0.2856 0.3717 0.4721 0.5867 n.71.55 O.dr84 1.(0149 1.1849 1.3685 1.5656 Center portion 78.45 1 end6.575. = (00.0 )M= 1.00. = 1nrn.O VOIJME( 1000nCY)= 91.6041 -00. 0 =,) M= 1.(00 H1 12n0o VOLUME(I U1OCY) 128.8549 P,= nnO.0!';= 1.0r00 H= 1 LO.O VOL;ME (1000CY )= 175.4227:3= 50}0.0 ~'= 1.00)0 - = 160.0 VOLJi'jiE(100()CY)= 232.0965 3= 500.0 >,= 1.,00 H= ]8. = VOLtMiviE (100uCY) 299.6837 3 = 500.0 >i= ].00(; = 20(.0; VOLUME ( 1u00CY)=' 378.6962 = b00.(0 M= 1.Ou0 H= 220.0 VOLUJME ( UOOCY) = 469.7056 B= 500.0 M= 1.000() H= 24'..u VOLUJiIE( o00CY)= 573.2186 B= b 0.( M= 1.000 H= 260.0 VOLtJME(1U00CY)= 689.5407 ij= 5;0.0 M.= 1.000 H= 280.0 VOLUMIE(100OCY)= 819.1732 B= 500.0,';= 1.000 H= 300.0 VOLUME( luOCY)= 962.7036 ~.6 E-167

Design and Economic Study for a Dam Project STUDENT PROGRAM COMPUTATION OF THE VOLUME OF THE DAM DIMENSION A(50)9 AR(50) _ READ FORMAT IM, BMA(0)...A(17) VECTOR VALUES IM=$2F6.2/(6F102)*$ PRINT FORMAT TITLE, B,MA(0)..*A(17) VECTOR VALUES TITLE=$lHlS43,3HB =F6.2,S1593HM =F6.2/S15. 15HA(0)=Fl0*295HA(1)=Fl0*2,5HA('2)=F10.2,5HA(3)=F10*.27HA(4)= 1FlO.2,5HA(5)=FlO.2/S15.5HA(6)=F10.295HA(7)=F1O.2~5HA(8)=F10.2 1,5HA(9)=F10*26HA(10)=F10.2,6HA(11)=F10.2/S15t6HA(12)=F10o.2 SlHA(13 )Fl10.26HA( 14)-F10.26HA(15 )=F10.2,6HA(16)3F10.2,.-_________ 16HA( 17)=F10.2*$ AR (0 ) =O H=59. A 0 X=O-. DELX (H*M) /30. K= _ BETA X=X+DELX I= ( Y+1 )/20+1 THETA=(Y+l. )/20.-I+l. AR(K)=A(I)+{(THETA/2.)*(A(1+1)-A(I-1))+{((THETA.Pe2)/2-)*{A(I+1 ___ l)-2*A( I )+A(I-l)) ____ ___ WHENEVER H.G.319.,TRANSFER TO END WHENEVER YGe (H-.05 ) TRANSFFR TO All_ _____-_ K=K+l TRANSFER TO RFTA All V1=0O THROUGH A12, FOR J=l,2, J.G-(K-3) _ __A12 Vl=(DELX/3.)*(2.*AR(J+l)+4.*AR(J+2))+V1 V= (4**AR(l)+AR (30))*(DELX/3) _ ____.._.....__.___ _. VOL=AR(K)*B+2.*V PRINT FORMAT RF'ULT.HVOLVQI.K VECTOR VALUES RESULT=$540,3HH =F6.2,S10,5HVOL =F15.2,5H V _=F10.2.5H K=I3*$. ___.. H=H+20. _ITRANSFER TO AO ______..__.._ __ _ INTEGER IJ.K FND FND OF PROGRAM................... _ rA XI...... - A'/ i.4 A AA..), _C.a d I d I I A T 4: ( J 'I<. -.. VoL =. - 'r <l vc, t,.,t,,_ _- - ____ __A 4 '/ or (-2)/ } ( -t) A -tql -f ~ -.. A ~s. pc,) s f -!... c _u,*....,,p,/,;,,,.........-.-".. S 1. (Z f.....,.t / o., 1g/., r,....::.: ^...../ E-168

Example Problem No. 8 %O I- O * 0.-4 O co o-,,. oooooooooooooo r- 11 i t ii ii i- ii ii iN N N n in H o _-4 i n 4c, - 4 L oX7r- Io t4N < _ *oo co r- r-4 o o o 04- N 4t o0 < 000 0....*. 0.1 *r-4 C N 00 N r- % Ln M r- 0 Ln O N *0 -4 oco t o n o In L N %oC'I r'I~-N A Nc0 0 % NJ N *n hOn 'O, 4 zO I_ *O>>>~~~>>~ o1 _ -4 n G Ln M (N - cO t F o C( ^ o-'~ _. *.**. * * * * * * O < <~ N1 In 0% r 4 i 0% ( O N %u I Lzi * Moo 4 0'0 'O r-in M i n n M^ r4 1 CC) - [olH 4 %o i C\a I j ON 0 O~ -{ M ac r s< i n ( II 't rl- 41 CnI 't LA O'^^ O 00o a,-'4 I ~o _ o' I I >1 1 *<, i I I I ^ -_ < 11 1n 11 1 11 11 j 11 i i 11 11 11 1i 11 11 1 * o! Ot i ico-' 3 0 o J > o J oo it I t hia I0 I '.I 00 0 I L- -r-' * t t (IC " r * ' ' * % ** II I t 11 11 1 1 I 11 i ",-4 n 1 N I ] I C 1.1E 169

Design and Economic Study for a Dam Project Part 3, Flow duration curve Problem: Given a 20-year record of. mean weekly discharges, construct a flow duration curve showing the magnitude of river discharge vs. percentage of time that that discharge is exceeded. This curve is not needed for the economic study, but is of value in assessing the power possibilities of a river. Solution: Twenty points are to be established for the curve. The table of 1040 values of mean weekly discharge is read as input data, and values of discharge corresponding to the 20 desired curve points are set. For each discharge value, the mean weekly discharge table is searched to find how many entries exceed this value. When all searches are complete, a table is printed showing each discharge value, the percentage of time it is exceeded, and number of weeks it is exceeded in the 20-year period. NOTATION FOR INSTRUCTOR'S PROGRAM A = Selected discharge B = Number of weeks that flow exceeds selected discharge C = Ten times percent of time flow exceeds selected discharge QMAX = Maximum mean weekly discharge QMIN = Minimum mean weekly discharge Y = QMAX - QMIN FLOW DIAGRAM FOR INSTRUCTOR'S PROGRAM 7 Qcl)...! e,.>, 0[ Al. A,,.A..,A~ — Bz.,,o FO Zo /E1 E-170

Example Problem No. 8 INSTRUCTOR'S PROGRAM R C E 142 DURATION CURVE QMAX AND QMIN GIVEN DIMENSION A(20)#Q(1040)t B(20)9 C(20) NORMAL MODE IS INTEGER __. READ FORMAT DATA, Q(1 ) *Q(1040) VECTOR VALUES DATA =$I11l1016/(I5,1116)*$... _QMAX=21600 -_____________________________ QMIN=76<1 Y=QMAX-QM IN A( 1)=OMIN+98*Y/100 A (2) =QMIN+95*Y/100 THROUGH NEXTsFOR J=3olJsG.*9 NEXT A(J)=QMIN+12*Y/10-J*Y/10_ THROUGH FIVE#FOR J=10l1J*eGe15 FIVE A(J)=QMIN +(66-4*J)*Y/100 A ( 16 )QMIN+Y/25 A ( 1 7J)QM IN+Y /5 0 A( 18 )=QMIN+Y/100 _-_ __ _ A ( 19= —QMIN+Y/200O A (20)QMIN THROUGH BACKsFOR J=11J&G2*20 BACK BJ)=0O _ _ ___THROUGH FINAL~FOR I=1 1 I G 1040 ___ THROUGH FINAL'FOR J=l:1,J&G&20 FINAL WHENEVER Q(I)#G.A(J)o B(J)= B(J)+l THROUGH LAST. FOR K=11tl K.G.20 LAST C(K)=1000*B(K)/1040 PRINT FORMAT HEAD VECTOR VALUES HEAD=$1Hl1S20t24H FLOW GREATER THAN (CFS) 121H 10X PERCENT OF TIME,16H NUMBER OF WEEKS *$ THROUGH VLS~FOR J=1t1J*G.*20 - ~ ~ ~ ~ - — ~ ~.................... _ _................-. VLS PRINT FORMAT RESULTAA(J) C(J) B(J) VECTOR VALUES RESULT=$ I33 I27,I18*$ END OF PROGRAM RESULTS OF INSTRUCTOR'S PROGRAM._.FLOW...GREAT.E R__JTAN (CFS).iLQX._P.ERCENT OF T IMN__FN..UMBER._OF...E14EKS_. 21183 0 1 20558 n 1 19516 0 1........... 7432_ _ __ 1_ 2. 15348 4 5 13264 9 _ 10 11180 19 20 9096 43 45 7012 89 93 _6179 _ ____ __ 127 133 5345 172 179 4512 ____250 _ 260 3678 358 373 2844 508 529 2011 704 733 _. _ 5_-_-_.. _-594 _826_ 86 0....... 1177 933 971 969 _________ 974 _ _ 1013 865 990 1030 761 999 1039 E-171

Design and Economic Study for a Dam Project Part 4, Mass diagram study Problem: In order to regulate a river and maintain steady, predetermined discharges, it is necessary to store water during high inflows and to use it in periods of low inflow. The mass diagram conventionally used is a plot of accumulated inflow vs. time. The amount of storage needed to maintain a given rate of outflow can be determined graphically from the mass diagram, as shown below. | "" — accumulated inflow Ol- /^ urn-^'maxi um deficit = storage needed volume e inflow ~ Time of de maximum -end of deficit -Beginning deficit of deficit Time The problem here is the machine equivalent of this graphical process. Given a 20-year record of mean weekly inflows, and having a number of assumed rates of steady outflow, find the beginning and end of each deficit period, the maximum deficit during that period, and the time at which the maximum deficit occurs ( number of weeks after beginning of deficit ). Because there is an added demand for water for irrigation during the summer, the outflow is assumed to be half of the average rate during the six month winter period and 1.5 times the average rate during the six month summer period. Solution The 20-year record of mean weekly inflows is read as input data. The average inflow is computed, and six assumed values of average outflow are established. Starting with one average outflow rate, the inflow table is examined and compared with the rate of outflow for that week. As soon as the inflow falls below the outflow, a period of deficit begins. The total amount of deficit is computed for the succeeding weeks, and a record is kept of the maximum amount of the deficit and the time of its occurrence measured from the beginning of the deficit period. When the total accumulated deficit reaches zero, the end of the deficit period is reached. The machine then prints the beginning and end of the deficit period, its duration, and the maximum deficit encountered during that period. The inflow-outflow comparison is then continued until all deficits in the 20-year record are evaluated. It is possible that the end of the 20-year record will fall in a deficit period. Should this occur, the computation is continued from the start of the record, in effect treating the inflow as a periodic function with 20-year period. E-172

Example Problem No. 8 The foregoing process is repeated for all six established average outflow rates. NOTATION FOR INSTRUCTOR'S PROGRAM I = Subscript, number of weeks from beginning of record J = Subscript, for value of rate studied K = Value of I at beginning of deficit MM = Coefficient, 1 for winter, 3 for summer N = Number of weeks in record Q = Mean weekly flow into reservoir QMAX = Average mean weekly inflow to reservoir R = Accumulated inflow minus outflow, cfs-weeks RR = Maximum deficit in a given drawdown RRR = RR/100 S = Accumulated mean weekly flows U = Average outflow VOL = Acre feet of drawdown W = Number of weeks from beginning of year FLOW DIAGRAM FOR INSTRUCTOR'S PROGRAM U AHROUS / TROUT \ - S QA\... <i)' I>./ '- --- \ 3>5 / ~.4~:QM~~~E1 U3. St AA~ftA * Because the program is written in integer mode, all quotients are truncated to integers by the machine. E-173

Design and Economic Study for a Dam Project ~-<^r)>-RR= R -T 33 ^ wgw^l -w>52) -j EWt "~) ~ Z ^,v MOD) -: F~~ (J-( < 14 OR W>3?-^ >1 AND W<0-C *M~j T ' { MMsf --- =3 -- ^Aii F~~~~~ * e~~~~~~~~~* * Because tihe program is in integer mode, the quotients will be truncated to integers. E-174 (J>^(^7)-> /?C 0i-UH + R -RtKy Ri R Jz^) RR3) Rs R/IR1 -~ VOL. RRR*i38W?RI N~g T-H2-(2 (Z3)*(0~K) N b WJ A^ )(AA 1F

Example Problem No. 8 INSTRUCTOR'S PROGRAM RMASS DIAGRAM STUDIES TO DETERMINE STORAGE REQUIRED'FOR GIVEN RFIRM RATE AND TIME OF BEGINNTNG AND END OF DRAW DOWN DIMENSION Q(1040),AA(2),U(5),DD(5) AA.A READ FORMAT NN,N VECTOR VALUES NN=$15*$ READ FORMAT DATAQ(1)...Q(N) VECTOR VALUES DATA=$I11,10I6/(IS,11I6)*$ NORMAL MODE IS INTEGER S=O THROUGH NEX1, FOR I=1,1,I.G.N NEXT S=S+Q(I) THROUGH BACKs FOR J = 1,1,J.G.5 BACK U(J) = S/N - S*J/(10*N) OMAX=S/N U(0)=QMAX-50 PRINT FORMAT CAD,QMAXU(O),U(1),U(2),U(3),U(4),U(5) VECTOR VALUES CAD=$6H1QMAX=I5,6I5*$ J=6 AA(2) J=J-1 WHENEVER J.L.O,TRANSFER TO AAA I = 1 W=1 MM=1 AA( 1) R=Q( I )-U(J)*MM/2 -M = 1 WHENEVER R.G.O H=1 TRANSFER TO DDD END OF CONDITIONAL K =I RR = R Dl_ H=3 TRANSFER TO DDD DD(3) WHENEVER I.G.N,TRANSFER TO Fl D2 R=Q(I)-U(J)*MM/2 +R WHENEVER R.LE.RR RR = R TRANSFER TO D1 OR WHENEVER R.GE.O TRANSFER TO Z3 D3 RRR=RR/100 __VOL=RRR*-1388 PRINT FORMAT RESULTK,IJW,VOL VECTOR VALUES RESULT=$3H K=I5,3H I=I5,3H J=I1,13H ENDING WEEK 1=I5,18H VOLUME ACRE FEET=I12*$ H =2 ___.____ r___H TRANSFER TO DDD DD (2) TRANSFER TO AA(M) FND OF CONDITIONAL TRANSFER TO D1 Fl M = 2 - __ 1_ = 1 W=l TRANSFER TO D2 DD(1) WHENEVER I.G.NTRANSFER TOAA(2) TRANSFER TO AA(1) Z3 WHENEVER (I-K).L.24.AND.M.E.1,TRANSFER TO AA(1) _TRANSFER TO D3 DDD I=I+1 W__ =W+1 WHFNEVER W.G.52,W=1 WHENFVFR W.L.14.0R.W.G.39,M=1 WHENEVER W.G. 13.AND.W.L.40,MM=3 _.__IRASq_ ERR TO DO ( H L END OF PROGRAM E-175

Design and Economic Study for a Dam Project RESULTS OF INSTRUCTOR'S PROGRAM -QMAX= 3612- 3-5-623251 2890 2529 2167 1806 K= 180 I= 213 J=5 ENDING WEEK= 5 VOLUME ACRE FEET= 238736 K= 230 T= 260 J=5 ENDING WEEK= 52 VOLUME ACRE FEET= 220692 K= 335 I= 373 J=5 ENDING WEEK= 9 VOLUME ACRE FEET= 220692 K= 439 I= 469 J=5 ENDING WEEK= 1 VOLUME ACRE FEET= 170724 K= 489 I= 517 J=5 ENDING WEEK= 49 VOLUME ACRE FEET= 242900 -K= 648 I= 686 J=5 ENDING WEEK= 10 VOLUME ACRE FEET= 198484 K= 744 I= 781 J=5 ENDING WEEK= 1 VOLUME ACRE FEET= 151292 K= 908 T= 937 J=5 ENDING WEEK= 1 VOLUME ACRE FEET= 234572 K= 1013 I= 1 J=5 ENDING WEEK= 1 VOLUME ACRE FEET= 167948 K= 178 = 221 J=4 ENDING WEEK= 13 VOLUME ACRE FEET= 365044 K= 228 T= 262 J=4 ENDING WEEK= 2 VOLUME ACRE FEET= 384476 -_K= 283 I= 308 J=4 ENDING WEEK= 48 VOLUME ACRE FEET= 260944 K= 335 I= 374 J=4 ENDING WEEK= 10 VOLUME ACRE FEET= 352552 K= 381 I= 413 J=4 ENDING WEEK= 49 VOLUME ACRE FEET= 247064 K= 438 I= 470 J=4 ENDING WEEK= 2 VOLUME ACRE FEET= 313688 - —.-K= 488 1= 521 J=4 ENDING WEEK= 1 VOLUME ACRE FEET= 378924 K= 541 I= 571 J=4 ENDING WEEK= 51 VOLUME ACRE FEET= 219304... K= 643 I= 694 J=4 ENDING WEEK= 18 VOLUME ACRE FEET= 36365.6 K= 743 I= 787 J=4 ENDING WEEK= 7 VOLUME ACRE FEET= 342836 K= 905 T= 943 J=4 ENDING WEEK= 7 VOLUME ACRE FEET= 362268 K= 958 I= 987 J=4 ENDING WEEK= 51 VOLUME ACRE FEET= 259556....... K.-_013JLT= _4-_J=AENDING WEEK= 4 VOLUME ACRE FEET= 2283152 K= 16 I= 51 J=3 ENDING WEEK= 51 VOLUME ACRE FEET= 285928 K= 178 I= 265 J=3 ENDING K= 1= 5 VOLUME ACRE FEET= 563528 K= 282 I= 310 J=3 ENDING WEEK= 50 VOLUME ACRE FEET= 392804 K= 334 1= 377 J=3 ENDING WEEK= 13 VOLUME ACRE FEET= 509396 K= 379 1= 418 J=3 ENDING WEEK= 2 VOLUME ACRE FEET= 424728 K= 437___ = 471 J=3 ENDING WEEK= 3 VOLUME ACRE FL2T= 466368 K= 487.1= 521 J=3 ENDING WEEK= 1 VOLUME ACRE FEET= 530216..... K=.540. I= 576 J=3 ENDING WEEK= 4 VOLUME ACRE FEET= 366432 K= 642 1= 792 J=3 ENDING WEEK= 12 VOLUME ACRE FEET= 609332- =$ K= 794 1= 830 J=3 ENDING WEEK= 50 VOLUME ACRE FEET= 190156 K= 861 I= 890 J=3 ENDING WEEK= 6 VOLUME ACRE FEET= 174888 K= 904 1= 945 J=3 ENDING WEEK= 9 VOLUME ACRE FEET= 508008 K= 957 1= 989 J=3 ENDING WEEK= 1 VOLUME ACRE FEET= 396968 _K=_ 1011 I= _ 8 J=3 _ENDING WEEK= 8 VOLUME ACRE FEET= 410848 K= 15 1= 57 J=2 ENDING WEEK=' 5 VOLUME ACRE FEET= 469144 K= 170 1= 273 J=2 ENDING WEEK= 13 VOLUME ACRE FEET= 1010464 K= 279 1= 312 J=2 ENDING WEEK= 52 VOLUME ACRE FEET= 539932..K= 333..=.427.J=2 ENDING WEEK= 11 VOLUME ACRE FEET= 785608 K= 434 1= 473 J=2 ENDING WEEK= 5 VOLUME ACRE FEET= 634316 K= 486 1= 523 J=2 ENDING WEEK= 3 VOLUME ACRE FEET= 689836 K= 539 I= 583 J=2 ENDING WEEK= 11 VOLUME ACRE FEET= 521888 K= 605 1= 629 J=2 ENDING WEEK= 5 VOLUME ACRE FEET= 194320 K= 640 1= 842 J=2 ENDING WEEK= 10 VOLUME ACRE FEET= 1311660 -K= 850 I= 892 J=2 ENDING WEEK= 8 VOLUME ACRE FEET= 308136 K= 903 1= 953 J=2 ENDING WEEK= 17 VOLUME ACRE FEET= 667628 K= 957 I= 990 J=2 ENDING W'EEK= 2 VOLUME ACRE FEET= 539932 _____ K= 1010 1= 10 J=2 ENDING WEEK= 10 VOLUME ACRE FEET 544096 -K= 14 1= 65 J=l ENDING WEEK= 13 VOLUME ACRE FEET= 669016 K= 170 I= 318 J=l ENDING WEEK= 6 VOLUME ACRE FEET= 1489324 K= 333 1= 481 J=l ENDINGWEEK= 13 VOLUME ACRE FEET= 1189516 K= 486 1= 525 J=l ENDING WEEK= 5 VOLUME ACRE FEET= 855008 K= 534 I= 630 J=l ENDING WEEK= 6 VOLUME ACRE FEET= 696776 K= 639 1=.997 J=l ENDING' WEEK=..9 VOLUME ACRE FErET= 2037584 -K= 1010 1= 13 J=l ENDING WEEK= 13 VOLUME ACRE FEET= 695388 K= 14 I= 96 J=0 ENDING WEEK= 44 VOLUME ACRE FEET= 850844 K= 127_..I=..154 3J= ENDING WFEEK= 50 VOLUME ACRE FEET= 474696 K= 170 1= 634 J=O ENDING WEEK= 10 \OLUME ACRE FEET= 1901560.K=. 638 1= 154 J=0 ENDING WEEK= 50 VOLUME ACRE FEET= 2850952 _______ _ 07 A79 1960 040760 145 S-8 31k4 T8URS4 9 04 PM 403 04 AMI V.L.STREETER X08-N 002 003 003 2 000 ELAPSFn TIMES IN MINUTES $ 13. TOTAL 1.4 EXECUTE 1.. 1CO.M1PILE E-176

Example Problem No. 8 STUDENT PROGRAM RMASS DIAGRAM STUDIES. WEEKLY DISCHARGE RECORDS FOR 20 YEARS TAKEN R FROM DOLAND. PAGES 42.43. SYMBOLS USED* TOTWKS- TOTAL NO. OF WEEKS. R SIGMAQ-ACCUMULATED DISCHARGE -MDS- MASS DIAGRAM SLOPE, AVO-AVERA6E R FLOW FOR 20 YEARS* USRATE- USE RATE* DEP- RESERVOIR DEPLETION. R MAXDEP- MAX, DEPLETION IN ONE INTERVAL, RESCAP- RESERVOIR CAPACITY R IN ONE INTERVAL. RESVOL- RESERVOIR VOLUME FOR ONE USE RATE* DIMENSION Q(1050), SIGMAQ(1050)9 DEP(500), USRATE(20) READ FORMAT DATA1 N READ FORMAT DATA2 Q0(1).**Q(N) VECTOR VALUES DATA1S$I5*S VECTOR VALUES DATA2z$ S55 1116/(I5, 11I6)*S NORMAL MODE IS INTEGER SIGMAQ(O)0O THROUGH REVERS. FOR I 1* 1 I G 1040 REVERS SIGMAQ( I ) SIGMAO(I-1 )+Q(It ) AVQ=SIGMAQ(1040)/1040 PRINT FORMAT RESULT, AVQ VECTOR VALUES RESULT=S S20, 1OH AV. FLOWZI5*-S J=0 RETURN J=J+1 USRATE (J ) w1600+200*J WHENEVER USRATE(J) *.G. AVQO TRANSFER TO END X=O MAXDEP0O REPEAT I=I+1 WHENEVER I eG 1040 * TRANSFER TO TYPE USRT=USRATE(J) /2 Y=I/52 WHENEVER (I-52*Y-13).GE*O *AND.(I-52*Y-40) *L.O. 1USRT=3*USRATE (J)/2 WHENEVER Q(I) *GE.USRT, TRANSFER TO REPEAT Mu( DEP(M)=O BACK M=M+l WHENEVER (I+M).G. 1040 * TRANSFER TO TYPE USRT=USRATE(J) /2 X=(M+I )/52 WHENEVER (M+I-52*X-13).GE. 0.AND. (M+I-52*X-40).*L 0 1 USRTS3*USRATE(J)/2 DEP(M)DEP(M-1 )+USRT-Q(M+I) WHENEVER DEP(M) *Go MAXDEP MAXDEP=DEP (M) OR WHENEVER DEP(M) ~LE. 0 I=I+M TRANSFER TO REPEAT END OF CONDITIONAL TRANSFER TO BACK TYPE RESVOL MAXDEP*14 PRINT FORMAT RSULTv USRATE(J),REVOL --- VECTOR VALUES RSULT=SS20, 1OH USE RATE-14, S5 '19H RES VOL IN 1 AC. FT.1I$8*S TRANSFER TO RETURN END END OF PROGRAM RESULTS OF STUDENT'S PROGRAM AV. FLOW= 3612 u —E-RATEO=1 ---— O RES VOL IN AC.FT. Z42-O60 USE RATE=2000 RES VOL IN AC.FT= 313460 - CrSE-RAT^^TZ~nD-" --- —.R-E 5-V0L N'-R-C — 3966 USE RATE=2400 RES VOL IN AC FT. 490980 USb KAIE=2600 REKS VOL IN AC.FT. 822766 USE RATE=2800 RES VOL IN AC.FT.=1213926 - USER-ATEO=300OO ---.- REtS —VOL —TN-AC.FT.- 169306 - USE RATE=3200 RES VOL IN AC.FT.= 2037546 -SERATE=3 4O0- RES- VOL- I N AC *. 56946 E-177

Design and Economic St udy for a Dam Project Part 5, Flood routing Problem Find the amount of reservoir storage that must be set aside for flood control for dam heights of 100, 2 120, 140,..., 300 feet. The reservoir area in acres is 20 Z + (2/9) Z, where Z is the elevation above the bottom of the canyon in feet. The flood hydrograph starts at 4, 000 c. f. s., increases linearly for two days to 60, 000 c. f. s., and then decreases linearly to 4, 000 c. f. s. in six more days. Discharge through the outlet works and spillway must be limited to 40, 000 c. f. s. Solution The spillway was designed without the use of the computer. Discharge characteristics for the spillway and outlet works are as follows: If the water level Z is less than the spillway crest ZO, Q = 7,000 c.f. s. out If Z is equal to or greater than ZO, Q-ot = 7,000 oV(Z/ZO) + 630 (z _ zO)15 out The fluctuation of the water surface is governed by the differential equation Q. - Q in out A where Z is the water surface elevation. Qi and Q t are the rates of inflow and discharge, A is the reservoir area (a function of Z), t is time measured from the start of the flood, and a dot over a variable denotes the derivative of that variable with respect to time. The spillway crest elevation ZO and an initial water level ZOO are read as input data, and the governing differential equation is solved by a Runge-Kutta third order process, as follows: Let h be an interval of time, small compared with the times of fluctuation of inflow and discharge, let Zl be the water level at time t, and let AZ be the increase in water level from time t to time t + h. Z is a function of both Z and time, since Q and A are both determined by Z and Q. is a function of time. The out in formulas for the numerical process are* DZl = h Z(Z1, t) * 1 1 DZ2 = h Z(Z + DZ1, t + h) DZ3 = h Z(Zl + - DZ2, t + - h) AZ = (DZ1 + 3 DZ3) 4 4 The error involved is of the order of h. The fluctuation of water level as time progresses is computed by repeated use of these formulas. The The inflow, discharge, water level, reservoir area at water surface elevation, and time are printed every 20th time interval. When the water level reaches its maximum the final results are printed, along with the reservoir volume between initial and maximum water levels. If the maximum discharge is 40,000 c. f. s., * This is only one of many practical formulations of the Runge-Kutta process. See, for example, Hildebrand, "Introduction to Numerical Analysis," pp. 236-238. E-178

Exiample Problem No. 8 a lower value of ZOO, the initial water level, is tried. Modification of ZOO is accomplished by reading a new data card. NOTATION FOR INSTRUCTOR'S PROGRAM C = Coefficient of Z in reservoir area formula C = Coefficient of Z in reservoir area formula 2 H = Time interval T = Time from start of flood, hours Z = Elev. of reservoir Z1 = Elev. of reservoir at start of time interval ZO = Elev. of spillway crest ZOO = Initial water surface elevation ZOLD = Elev. at time T-H ZOLDER = Elev. at time T - 2H FLOW DIAGRAM FOR INSTRUCTOR'S PROGRAM ---- =ZOO/ AA1)*D Z. D= T —T-. 1, - Z b= Z ^AA J22='P T-T.T+ 7- at + 2 2/3 E-17 E-179

Design and Economic Study for a Dam Project '(i)-ZOLD>2QLDER AsALGV C. U -AL DRl7 IAAC), OLDIE A"L.Z&P A(Jb,, Fi T 1E' F Z CT<4g- QIN tOoo +//7T T2/6 7?/Al J 7000 - 333.3 * T F T F AA-o) r A E- RES0C2 (~)- Pz 0. 082 714 0 (OlH-Q00T)/ARES

Example Problem No. 8 INSTRUCTOR'S PROGRAM RC.E. 146 FLOOD ROUTING READ FORMAT IN,H,C1,C2. AA(10) READ FORMAT INZO00,Z VECTOR VALUES IN=$5F14.4*$ INTEGER KM DIMENSION AA(10) PRINT FORMAT OUTZOO,H,ZOC1,C2 VECTOR VALUES OUT=$5HOZOO=F15.2,3H H=F8*3,4H Z0=F51*2, 14H Cl=F15*2,4H C2=F15.5*$ PRINT FORMAT HEAD VECTOR VALUES HEAD=$S20,12H TIME(HOURS),15H ELEVATION W.S.,15 1H DISCHARGE,14H FLOW IN (CFS),S553H K,15H AREA RESERVOI 1R,12H FORMER ELEV *$ T=0. Z=ZOO ZlZO00 ZOLD=ZOO ZOLDER=ZOO M=1 K=O TRANSFER TO ZZ AA(1) DZ1=P___ T=T+H/3. Z=Z1+DZ1/3* M=2 TRANSFER TO ZZ AA(2) DZ2=P T=TT+H/3 Z=Z1+2.*DZ2/3. M=3 TRANSFER TO ZZ AA(3) DZ3=P T=T+H/3. ZOLDER=ZOLD ZOLD=Z1 Zl=Zl+DZl/4.+3.*DZ3/4. Z=Z1 K=K+1 M4 TRANSFER TO ZZ AA(4) WHENEVER ZOLD.G.ZOLDER.AND.ZOLD.GE.Z1 V=Cl*(ZOLD.P.2-ZOO.P.2)/2.+C2*(ZOLD.P.3-ZOOP.3)/3_ _ PRINT FORMAT VOL~V VECTOR VALUES VOL-$S20,19H VOLUME, ACRE FEET= E14.4*$ M:10 TRANSFER TO PUB OR WHENEVER K.E. 20 K=O M=l TRANSFER TO PUB END OF CONDITIONAL TRANSFER TO AA(1) PUB PRINT FORMAT ANST,ZQOUTQINKARESZOLD VECTOR VALUES ANS=$F28.2,F12.2,F15.OF14.0,I14,F15iO0F12.2*$ TRANSFER TO AA(M) ZZ WHENEVER T.Le48,QIN=4000.+1167.*T WHENEVER T.G.216, TRANSFER TO AA(1O) WHENEVER T.GE.48,QIN=76000-333o3*T WHENEVER Z.L.ZOQOUT=7000. WHENFVER Z.GE7ZO.QOUT=7000e*( Z/7Q )*P-5f763054-*-(Z7-7ZO).oP\._45 — ARES=Ci*Z+C2*Z.P.2 P=.0827*H*(QIN-QOUT)/ARES TRANSFER TO AA(M) END OF PROGRAM E-181

Design and Economic Study for a Dam Project 1>> Lw N in a, N N r-tr- Oi4n r-4 CN- r.4 Mn j ~N N Nr-Nr^-rNc A- I O0I() N. 0 0 J O0t n n-r-n LAo M N t < C 0 0 (O toN 40 0 0 N4o N4,-N t- cO: i lJ *1 0 * * ** *I 0 * 0 * W * * * * 0 * * * I 4I0 4) r4 t P % O O n %0 r IW 0r 0 ao 0 %0 a 0 N 0fAo NA LA Z Z1- 4 4 r! 0 1 (4t^iror r'.4 n 4 1t Lnt L Ln Ln LA L L M L -0 0 % % a 1o 11_r - sL-L L L -.....0. 0o^rN0 N4NM4 M r-4 0 rc co o N r- o oo 0 wN N o ^omNr-ON0oso n nIt r -4 > o ON 0% c n 0%Q o 0 O uOci 0% N N > - o NMcn r- 0 o o 0 o N -4 - N A r - M t -0 r0 0o atLI,,-0 M 1-oO N r r w )- 0 %NOO C O 4 aD O r - n L n Ln L % 0 %Oe D f-r -f 0 0c 000 0 o 0 00 M M 0 O 0 0 O0%0% 0 0 0 0 0 0 0 0 0 I I I - r- r-4r-r-4 r4 — 4 r- r4 I CI. N a1I N M NCM N NCI ooooooo o o o3 L)U| LL M 4 n % | N M M 4 o n n l n 0 I 1-y 00 0N 4 0 I000 N N I I I 4 0 0 o o,IN 01 C 0 ) O0 4N -O N -I N LA 0 C 004 N 0 N 0% HU 1 *I3e000000 —r-(r- r0'A 000 0o 0 00 o r-o*r- r-0 0 o o 0 0 - l C C al 0Z4 o~ 01.0.000000 0000 ooe 0 0000 ooooooooooooooo o I < LI0-I 0N M n M 0 4 W r - ~ V - N o 0 M 0 M 0 M r0 N. - U) 0 0 -0 0 i r-~0~0 074 4 %.O r-MCrOnN 0 0 0o 00cof - N C) b-.00%oooooo r - cn -4 r, o (Mo~ N CI0 0.. 0.0 I 000.000 000I o —I,0I 0 0-, - --, - I- I II I 0 - 0I o L. z. - 4 4 -4 -4 4 - f I-4 L LI-4 II 1 r4 r4 14 e 1 i I I I-4 N' I0 N W W 1 ^ t/,O1) I I0 IV) I 00 * 0 0 0 0 0 0 0000 * * 0 * 0 00 00 0 0 0 0 0 0 * 0 0 * * W1.0N0040%0N 4 0 N co 4 0 \ D Z %O N M 4 O %O N w I 0 NDLA N w 4 ~ N M D r % I NI r C M M 4 4 IJ NO C- - - M 0% J OJ I 4 r M N M M4 4 U %1 F IF M 0% ( 0.0 o - I0-4 1I o r4 0I I-4 i I- > 1 I I I I I I I I- > 0 0 0 0 -4 E11-o0 M'o <n0io - oi n oo o E-182

Example Problem No. 8 STUDENT'S PROGRAM RFLOOD ROUTING FOR THE- PRELIMINARY DESIGN OF A STRAIGHT CONCRRETE GRAVITY DAM, C. E. 146, SPRING 1960 RC=DISCHARGE CUEF. L=LENGTH OF SPILLWAY CREST H=TIME INCR. RIN HRS. TM.AX=TIME OF FLOOD HYDROGRAPH IN HRS. QUSE=DISCHRARGE THROUGH OUTLETS IN CFS DATUM=ELEV. OF WATER SURFACE,FT RTPEAK =TIME TO PEAKFLOW IN HRS. A,~BD, ARE COEF. OF AREA EQ. DIMENSION U(3) AA READ FORMAT DATA,H,TMAXQUSE,Z,TPEAK,A,B,CREST VECTOR VALUES DATA=$8F9.3*$ PRINTFORMAT TITLEH,TMAX,QUSE Z,TPEAKA,B,CREST VECTOR VALUES TITLE=$7H1 H=F4.2,13H HNS TMAX=F5*2,13H H 1RS QUSE=F7.l,1OH CFS Z=F6.1,13H FT TPEAK=F5.1,9H HRS 1 A=F5.3,5H B=F6.37H CREST=F5.1*$ PRINT FORMAT BAHIR VECTOR VALUES BAHIR=$//S10,1OH TIME(HRS),54,12H INFLOW(CFS),S 16,7H Q(CFS),S7,15H DISCHARGE(CFS),16H AREA(ACRES),S5,15H 1 POOL ELEV.(FT),13H V ACRE-FT*$ INTEGER I,J TIME=O. T=Oo DATUM=Z i=0 Al ZZ=Z J=O BR J=J+1 Q=QUSE*(Z/CREST).P..5 DISCH=Q+33000.*((Z-CREST)/13.9)*P.1. - - ARES=A*Z.P.2+B*Z WHENEVER Z.L.CRESTDISCH=QUSE WHENEVER T.G. 1 PEAKQI N=-760U.-333.333*T WHENEVER T.LE.TPEAK,QIN=3500./3.*T+4000. WHENEVER J.GE.2,TRANSFER TO AB WHLENVELR l.b. iMiAX, IRAiSqLhE TO AA U(J)=H*(QIN-DISCH)/(12.1*ARES) T=TIME+H/3. Z=ZZ+U(J)/3. TRANSFER TO BB AB WHENEVER J.G.2, TRANSFER TO AC U(J)=H*(QIN-DISCH)/(12.1*ARES) T=TIME+H*2./3. Z=ZZ+2./3.*U(J) TRANSFER TO BB AC U(J)=H*(QIN-DISCH)/(12.1'-ARES) Z=ZZ+U(1)/4.+3.*U(3)/4. TIME=TIME+H I=I+1 WHENEVER I.L.12,TRANSFER TO Al V=A/3.*(Z.P.3-DATUMI,.P.3)+B/2.*(Z.P.2-DATUM.P.2) WHENEVER (Z-CREST).G. 14.,TRANSFER TO AA PRINT FORMAT RESULT,TIME,QIN,Q,DISCHARES,Z,V VECTOR VALUES RESULT=$7F17.3*$ I=O WHENEVER T.G.TMAX,TRANSFER TO AA TRANSFER TO Al CC END OF PROGRAM E-183

Design and Economic Study for a Dam Project 0 0 0o ' c 4 >-o-4 O 'n Co. < - a' N 4 a' C n O OD Con (' iJ 00 O O- 0 -1 't 0tcr 0 N r. 0 n r q MO - - 0 as m C n na' 0 XN ' a 04, Ln N -- 0 oro 0 o I' Zr- 0 O M n N M r- oo < n t 0n 0 n 0 00n 0 11 UL O'.e0 -4o o 0 'o 00 N 0 0) o '0o < 4 ' 4 O en ' mJ (C 3 00 t r- N n 4 F <: Z r ooX- enr NO ^Or t UN — 4 T% n 3 n n nLn I e > nM < — r-f n c n \ )n N\ U, M — 4 Oa o W - QN OON 4 O 4 Z LC N Z ' ~-t N r D N N — 4 DO NLL > n0 cMn 4 w0 N N CC(oON z rI 4 in ' ' N O n _ -- n c x nooMn \ r. Q a';-a'N4; r(\( r ( in ( ( c c-q o o -- a a' a' 0) - ^ r — -o '0 i 1 * > ' N * O N - 14 O O -t 0 N O Ch *N N It 1* M JE (O n ca' 4 0LL 0 0 0 0 * * 00- * * * * * * 0 0 0 * 00 1 > N o n fr- 40 N Lr ' r-4C o 4) LI ao a - 'rN _ ' t j- 0 N a C e n C c) N _- > I Li-0 W 0 1- r C O 0z -4 4 L z ao It 0 n - LON (7o I o N N N ON n 00 n a n 4w Lt.cm 0^ c 0 aC'-4i Mx r 4 N In 4 0 4 (O n- C- 4t a a ' N a a';n an ' N rj O o 000o r 4 - cq * r r- wLn NLn M 1 e 1 n m0 0 ' k L n0 n M n 0 0 n0 4 n 0n Oin an' 0 <0 0,n 00O N M 0 - 0 4 o N N cOrI',0 O 0) N D N I c r C'N -t z M J - 4 n LLJ 1 0n 00\0 00 '-o _ C- '0 M.1a0 ' \ 0 z O z Ln n In J J n M N Nt 1 Or- ONr' \0 I \ Fi ao < o'- Ir- r rrr- c W la W W 0 Mj Cn aa M 0 0 o co C 30 a' 0 0 oo C'- a' 0 oo - a >c - O Cm 4O OOo 0 0 o M r-4 0 n 'N jn tM n ZO NJcN nM <-(ON It -t < LL o o 0{ p o o o0 l-r 4 \ N rN w o Fa r' n 4 't M: aN a' o< x a' *N- N _ I_ 0 L 0L~~O'-o r O No -A Ln 0\ > Z n e\ N n O 0 O O CO bN J D ~jD O D oO Cn Mn n C - on dS) I a 4 -' o o o p o o I- o o t o cO M O -4 N '0 N n Il) 0 - N 4 CO 4 n 1( ' N N - n O I 0 <0 0 0 0 0 0 00 0 I O 4 N 0 0 0 0 \0 0 n 0 t 0 ~ 0~ 00 0a 00 0 I I0 0J0 0 0 0 0|N'0a' 0h NO 0-a I O O It o 4J n' N n 0) n 4 l tO a' ON M H Oo N N h -0 - I H U0- w 4 ra '0 ~ n ~O0 M Or D o DN 0 N n M N o 0 r n ) N a' 0 x n tvy I- ) O'-4 NIa a N N N N U LL t ~o o ooo M N ~ M ~r-t Z n t J W Z r- x 0 -L n ~ N t ~0 JO- t t 00 N) J D in -^4 r- n \C0 Mo o 0*4 N0 o L- oo\c0N0No 0 4n 0)M00 O nr-N 0 c n -4 n ) nh 0 rO -O 1O to o It \oo O tON CO O ( N O O n t n _- N L no O t O t o n O L 0 Co 0) 0 C C OO O * 0 0 0 0 00 0 0 0 ) ) 00 0 ) J 0 N 4 o n I N la a'lf\ co 0 0 C Nn '0 N ( o 4 0N ' 0 N CO 4 n -A 0 C\ 't A -' 0 a O rC r t 4 a a N N\ N '-n4 c N N N N N- -i -i — 0 0 l ' 0n n In n n a O40 N J 0 N 40' - Co 0: H O - n O4 - M r'0 0 0 n in Lnn r n Ln r > rrn- o oo m \N c7 oo 00 o - n- ' -4 — 4 N(-4o r N N N oCK _ X\0 S) Ulon ofn n LO UA Ln W O on In Ln {n Ln un Un L n in %0 * \0in D,D -O -,o z * I 3 * *. - * * * * * * * * * * * * * * * * *0 0 * * * * * * * * * * * *. * o n Ln srn In) n In cN on r) "n ' In Ln on n ) n L^ r dn n n n n cn onr f LO n nr - in n O CO C 00 0 ao oCo CO CO0 0 D c) O O o c c o D o co0 p 0o D o 0 o D D D o o o0:D o. z r- r-I oo n N ac\ aw z 4 N o oo z0 4 N 0 w z J N nDO z It N SC 0 D J N O g.:Ic)L LI O O O l o o o o o on o o o o o o o CD o o o 1O C:o o o o o o) o C) o oo \0 ^^ (j^ ^n nnnn i'- ^- d'nQnnn^ovrjj- i-~ - ~-( < ~ ~ ~ ~ ~ ~ ~~-8

Example Problem No. 8 Part 6, Economic Study Problem: Compute the cost per acre foot of irrigation water and the anticipated annual profit for dam heights from 100 feet to 300 feet in 20-foot increments, and for use rates (for power) of 1800 c.f. s. to 3600 c.f. s. in 200 c.f. s. increments. Unit costs, interest rates, tax rates, price of land, and other elements affecting the annual costs are available from earlier studies. The selling price of irrigation water is given. Solution: The height of the dam determines the concrete volume, spillway crest elevation, and maximum operating water level, which must leave enough reserve storage to meet the flood control requirements, These have all been determined from the results of earlier programs and are stored in the computer memory as subscripted variables, indexed according to dam height. The use rate determines the reservoir storage volume below maximum operating level that is needed to maintain outflow at that use rate and also the tailwater elevation. These have been determined from earlier studies and are stored in memory as subscripted variables, indexed according to use rate. The analysis described below is made for each height of dam, starting at 100 feet. The cost of the dam is computed as the cost of concrete plus cost of diversion plus cost of land purchased plus cost of spillway and outlet works, with a predetermined percentage added for contingencies. The cost of the 100-foot dam is designated as a flood control provision, since this amount is to be paid by a downstream city for flood protection. The total cost is the cost of the dam less the flood control provision, plus interest during the construction period. The annual cost A to amortize this total cost T in n years at interest rate i is 1 A = T (1 + i)n n The total annual cost is computed as the amortization cost plus operation, maintenance, and taxes. The volume of the reservoir from elevation 35 ft. to the maximum operating level is computed, this being the usable storage for maintaining steady discharge. This is then compared with the storage volumes needed to maintain steady discharge at the various use rates, which were stored in memory at the start of the program. If the usable storage is insufficient to maintain steady flow at the lowest u.z rate to be considered, the dam is inadequate for power and irrigation purposes and a comment to that effect is printed. If not, the comparison is continued to find which of the use rates to be considered is the greatest that can be maintained. The cost analysis described below is then made for the four la- -st maintainable values of use rate. The lowest operating level is first determined. The storage volume between lowest operating level and maximum operating level is equal to the storage volume needed to maintain steady discharge at the use rate, which was stored in memory initially. The lowest operating level is found by the interval halving method described earlier in this report. The head available for power is the lowest operating level less the tailwater elevation. The net flow available for power is the use rate less leakage and evaporation losses. The available power is proportional to the head times the available net flow, and the income from power is computed from this. The amount of E-185

Design and Economic Study for a Dam Project water available for irrigation is then computed, along with its cost and the profit anticipated from its sale at the established selling price. NOTATION FOR INSTRUCTOR'S PROGRAM ACOST = Annual Cost of servicing loan ANACFT = Annual acre feet of water for sale AREA = Area of land to be purchased, acres CONCRC = Cost of mass concrete, dollars per thousand cubic yards CONTNG = Contingencies, percent of COST COST = Construction and land cost, before provision for contingencies COSTAF = Cost of irrigation water, dollars per acre foot DIVERS = Cost of diversion of river EVAPQ = Evaporation c. f. s. EVAPRT = Evaporation rate, inches/yr FCPROV = Flood control payment HEAD = Average power head HT = Height of dam INCOMP = Income from power per year INT = Interest rate LEAK = Leakage through dam and from reservoir, cfs MAINT = % of cost for yearly maintenance and insurance N = Amortization period, years OPER = Annual cost of operating project PROFIT = Annual profit from project Q = Discharge, average rate QNET = Q - evaporation and leakage RESVOL = Volume of reservoir needed to maintain average rate SPOUT = Cost of spillway and outlet works for 100 ft dam TACOST = Total annual cost TAXI = Tax rate on cost, % TOTCST = Total cost of project less flood control provision TWELEV = Tail water elev. for Q = 1800, 2000..... 36000 c.f. s. VALAND = Cost of land, dollars oer acre VALPOW = Selling price of firm power, dollars per kwh VOLDAM = Thousands of cubic yards of concrete in dam VOLRES = Acre feet volume in reservoir from z = 35 ft to z = ZOO Z = Elev. for computation of land area ZMIN = Lowest operating elev. of reservoir Z0 = Elev. of spillway crest ZOO = Maximum allowable elevation before flood X = Selling price of irrigation water E-186

Example Problem Nb. 8 FLOW DIAGRAM FOR INSTRUCTOR'S PROGRAM AEA b PRINT ERA PRINT 7 - PA4RrI r AP R PAr RT1 PARTS1 4,L C V' A H Af f2 AIi. l FC P~iioRES < RES7OL- ) 72ES oLe A/ @ T sJ IR < AA(o/ Acosr cA L C CULATE KK1 K,) L *-=> T i 'r Ac) I E-187

Design and Economic Study for a Dam Project FLOW DIAGRAM RMN —. - LI --- —----- ICO ~ ---EVA PQ1 --- —-- __V ICoS -TA -F - CAAI 7 ot IVEfT/2 c/000 AMA. rF 5y B,PR6 F / 7' A cosT, CA L.CUL / ATE_ _ _ _ IM E 'EVA P,0.A AcFr INCOw _ 4AACFT,\ E-188 --- ~cos rA F, 4Re A T F

Example Problem No. 8 INSTRUCTOR'S PROGRAM RiCL 1i+6 LLuiuNiL oi, ur LuLOU UJAi r', J. AL)Ai HL GH(P VAi- lL b F KR 'ROlk 1u r u,v Ju F i di L Fv i vit\vAL 1-1..11=l~ AC) I -ANNiui RAL LOzl Ou cRivl I 1NG LOAN ANACF1 =ANNUAL AF. FOR SALtL CONCRC R-uzli OF I 'Ais tuN\iojElir / i u I ' /~ J C uoI A i-=>/A D VI tr CO'-o' i uF DIVLR I_\ON RI v LS I5lUoN.uCu i i"i G- I 1 Ji-Li C I.cL,'LRCEC i\. -LAPOQ= L vAPOKA i IiON CFo RE VAPRT — LVA II/YRF 1 t- CPliOV=Fl. OOD= I -u CUON 'rkOL PAYMFNi'i, * HEAD=AvE. POWERl HLA_ RO^iER HEAi,. i iA'C;' f= I > tCLiiE i-iROM( POWER. 1 i = INTERES 1 RAIE(PERCE. Ri\ i-/.UU ).LLAKR LL/.\'AUL L' a.iviAli! -P-LI(Li, O- U.)U I f)'OK1 YLARLY MAI \RN i tlNAi'CL Afl ii\l.. 'ANCL. N=i.jMibLRK O Ai PA iOF PA M OFF bOiNDL' Ui'L_ R Oi U-tLOj I ^r U 'LiA i 1.\u '*- uJG, ';, W, -'uU i =CU, i Ut - -i LL,,AY AN'LD RAND OU I Li I vu, i<.s ldu< Fi DAM~RE-o)vUL= VOL U-: RE-V aLci-D-LL '10 MAi RNTAIN AVER. iRATL J1zi,.~~i~..1 Q=u ISCHIARu-L FIROM iA55S DIA(GRAVM RolzvL)Y. iNEIt L LfLL EvAP ANIL L AKAGE. IACuDI= I'OIAL ANNOALCUbI $ R$BiOTCS1=I-'l IAL COS ii Or- P'iOJLCT.i TAX1= TAA IATE Ui COSIi,PLRhCEN*N Ri TWL'LEV=- fAL WATERL ELVEL FOR 1B00, uOoU 3600 CFS J- 1 i,2 10 RVALAND=$/ACER LAND~.VOLDAM=1 nOO CY CONCRLTE PROF I T=ANNUAL PF.J. __ RROF'Ir FROMi DAiM $.X=SLLLLING PRILL OF WAIElE $/AF~ ZU=EL. SPILLW RAY CRES1 *~zUU-i=AX. ELEv. 'BEFORL rLUOD. ZMliN=MiIN~ W.S. VALPOW= RbSLLL1NG HN R ICL ur IRM H)UWLK, $/KFiH VuLRi S=A F FROjM J3~. iOL u DIMtLNiiON VULL)AMt 1i) ZO( 11),Zuu( 11),LSbVUL(O), i WLLEV( u ) AA( 110) I I L GER IK 9, K KKK,1 K K Mil_ AAA;E'LAD i-uirnIAt 1, VOLuAAi ( 1 )..vULLAIi 11 ) L 1 )... 11) LU ( 1 '_ ) *~ * *, i., li ) I)i\L i. UL i i) *~ ~ ~*iLvUL i il) ) i t. LL Ll) i t ) I~ t IL _tv k i ) v'ciOR< VALULo iN= j) 1 b./llF6.2/iirto. Z/5 12.0 /F)1iZ.U/loF6.2*$,-Ji 1 A '_ -I r (R iv A i- P J O V U L Ai ) ~ ~ VO L DA Ml 1 1 ), Lu( 1 )* (11),Z U ( 1 1 ) ~. *ZLUU ( i ) R L'5VUL ( i ) *~. iRL VOL ( 1 ) 1I EtLLv 1 ). ~ [LWLLLV ( 10 ) VELi' L)OR VALUES POB= iHI19 I 1 F9 2/Su, 1i-r.Z/S2 U, 1F Y. 2/ 1 ( 20,10F10.2) *$ RLAD FOp(i MA-I I-NiN, COC R LC) I VERS, l''iINLvAPIRI,1INI LLEAK IqiMA1N T 1. NOPEIbtlPOO[T, AX I VALAND X VALP-uw, 1,C VLCTOR VALUESb iNNl:l=(:r-14+.)*-$ PRiNI' FuRHAI u0i, (LuiCiRtL,DIVL',S,COil NGivAPRIl,INI,LEAKMAIN 1, \1 N, iOPL \ 9 ' u 9 I AX 1, V LAi'L),) VALPu L i A 9 v'LL|Oli VALuL-t u uu 1i -s4 OM LuNCRi C <=oL u bH L) VLrl ( /-r u>orl L ONNGiF'4~ =lF.ilori L VAPixi-i-4.1)H lN1l-FpD.3boh LLAAK-t+ i.I/Hr MAiIN(=F4.1_____4__.L ji N-.-t Or-1 UP_ L K - u/ 1i1 Oui -r t oH i iAX i- F *i 1 V ALAn iU=F 3 u > Ji X 130,93r A=F4.Zbh VALPOw=rot.44H Cl=t-D.li+H C2=P64*$. [viM= 1 M=i AA(0) H; =60.+20.*1 /=H '[+4..___ AKLA=C 1 - L +LZ L. 2 _' U.) L=_ UA'i v( i } A C i' CO"X i. C i(lXC+1) I C'. A -A iA ALNI' t POl' l A * ( I /2uI + b } ) WHLNrVLR MM l 1.Citt MM=2 r- L'iU'v=LOC I*i.+"uiji 'x1Jb/ ~V. ) PRIN' FORMAFr FC( 'FCPROV:PARi-A v t-LI 0r VMLUL.. tA-LP LZ, -Ut I' -.LUV.UL.) LU-b|,.'.,' i - -:, i.i, - r- L D,. -- __ 117H LAND AREtA-A('t. =F 30_-iO~, EN[D OF CONDi) T IONAL vE?1'_( l A FOl'r- DiDvi' i Hi j)iH v r C i 0 R V A L ' L t-i D D ii H 4 Hi. 11 2 q o H ~2 6r M 't L i ~ ^ 2 ~ 1 0uH ]1 I U ( S 1,2, 9 H I A(, ',,6H - ' i ) 92-e % 'W LMIN I 2. 6rn HLAl) 12 i- H LVAiHLU 52s/HI INCuM ' '2,bH Ai"ACF I,o HiCuSTAF,H AREA 1 dH I'RjF I I i'_ I'O[ CS =(COb; ( i.+CuNING/luu. ) -FCPROuv ) + ( i +1. b* I'N ) ACuS'I' 1 i O C 'i' ( 1 + i )..I\*i' N / ( ( I. 1 I1 ).I. N-1 ) TACOSI =ACOST +OPER+COS'' ( 1 *+CONTNu/ 10u * ) *IA I NT /100.+TAX 1 ( COST E-189

Design and Economic Study for a Dam Project continued -- Instructor' s Program 1 -DIVERS )/100. Z=ZOO( I) \v(-) R -.C,=-' ( i.P,2-' h e,-p.2) /- _+_?.(^ (. P.3-~;,*-*P.3 ) /3.* P A__ THROUGH NEXT,FOR K= 1 1,K.G.10 WltEVt NE\ VOLR S. L P. ESVOL ( 1) PRINT FORMAT VLSTOTCSTACOSTiTACOST VECTO) \/Al UES V. =^S51,4kH INECo)NOMvI CAi PRO)JECT', iNO POWER OR IWATELR i uELL,9r' i'iCoji= Fiu.ubh ACUOi'= luv2,9H TACOST= Fl1 TRANSFER TO AA(4)EiNiD OF CONDI I i lONALNEXT WhElNEVER VOLkRE.L.RESVOL(K),TRANSFER TO AA(1) AA( 1 KK' K=K.-1 THROUGH bACK,FOR M=KK,-1,M.L.(KK-3).OR.ML.1 QC= 1S()tfl,+2fO(-*-(M-1 ) KKK=O AB=Z.SPLI T ZZ= ( AB+RB. )/2.' KKK=KKK+i './iF_'NFE vi\/Ek' KK._F-1lTPAN TiFER TO A ( 3 u -i. —+( Ci'-^ /.H P.2/Z.+C2-ZZ.P.3/3.-(Cl-z.P.2/Z.+C2*/.P.3,'3 ) ) /R wnENEVE:K Go.G.u., 1RANSFER TO AA(2) BB=7Z TRANSFER TO SPLIT AA(2) AN=/7 TRANSFER TO SPLIT AA(3) 3 7MI ZN =Z HEAU=(.6u+25*(34uu.-Q)/1buO. )*(L -1MIN)+ZMI N-TWELEV(M) E VA pQ=FVA iPK / 1 2^ ( C i*(H F A i)+'45. )+C2 2* (HF A -)-. ) P.2 ) /73u. QNE T=Q-EVAPQ-LEAK TI M( ()MP=VAI H(i W- JIu T -2f.>/ /4. H FAD*-6.*24. WHENEVER (QNlT /2 ) *L lOOO ANACFT=365-*( i.*QNET-iOOO.) Wri-FMVt K ( (JNr i /2. ).r-. i()UtlJ. AN ACF T =-7 30. ( iuNF T-1 OCu. ) COb Atr = t i AkLO) i -i Il'. iP; ) /AiNACFt T P.. _ j_ _ i I =x- 'ANA( - T+ I 'ivM, '- I AC 'IST BACK ir-'il'i,4-1 m ~, IA' T C i' A''OAC i zu(I),I;'iliN 9 H LAD, 1! t L\/ApfO I \( iUP.k T AI, " FTT,-" TA'- APEA PRAlFI T i VLCtOR VALUEO ANsi=$ i r4.ut70.,9Fo.uFil.UF11iUJFiouF7.u, 1i-,J F 9 - 2 ' i r1 ' ~..- F::, _., F ~,! ~, —* n ^'a AA(4) i-1+1 wNcV/L__ _k i.(-1.i-ii.<ANSFi-i TO( AAA TKAINSFER TO AA(O) P-END OF PRO('RAM E-190

Example Problem No. 8 It -n' O \0 00 0 0 0 O 0 10 Jo J,% n r~~~~~~~~~~~~~~ --- ~D -4 ~J -, *. a O0 * S ' * - - * 0 0 * C* * 0 nO 3 - t 4 ''4:~~~~~~~~~~~~~~~~~~~~~~~~~~~' sO CO C 0~ - 0 n- CNJ0** ** 00 0 0 0- 3 -0 -4-0 0 -^ 7^ ""-,(M O -o < < 0 0 0 0 L 0 0 0 0, MOa a I- oo rfl a- Uj o - o n n q- I M a -n *-7 - O a -f ^ " DO -4 4 0~ Ot4 I N i *<< -, \ \ to j;o< < n'0- -- 1 I * * 0 II ' I; t.J_.o., _<< < < ** < ****I0 OS **i~ o ^-4 2oLL ~ a. LU '3 v0 ^o ii. *"n 'n en '"'n '. -4-a- ( '- r- '- u. c"^ cy ^."^ '..i. ^ '7 * ^ L ^ H M n "M0 0, CQ O::C 0 00 0 \0r- *:\| C\ 0>> C^ t-1,-< r-_ 1.-.:~ H CU ^..T\* \ T 0 -.0 *4-~~~ ~ ~ ~ ~~ ~ ~ ~ ~ ~~~~~~~~~~~ ~~~~ 1-i —Il i-I _A r-< \-,-J,<-:-\J.-I \ - J-1- - -r1 U) 000~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ j- 0 0 c\) CIt LL. C\tx. v0 LL- tO -i0 JL. '*M. LL.-LDnooo-por '.o CMD c < < '- 0 K) ' Q333)') - - '' -N -*:* * FIh (- r~ -C-.-4 '< 1-.- 4 -1<- 4 r,4 - 44 - - 't-;M.C r<,> r- - r- r 0 -d 7 <l- o < < a<<-o ^ '-o </ ^o o <^ *n x> ^ -~ '-i o o sD <?* ^ in ^ o *T'.0- 3-1 0 — P ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~O ~~~~~~~~~~~~~~~~~~~.," 0. C1 ^- oan00 004' 0 NCL I'i-Li -l \. —I L 0 0 0 *00 0000 0000 0n0I00 00 \ IO L Li-.0 n -'4.0-3 ('C I' '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '~ ~ ~ ~ ~ ~~~~~I-. D DMtN 0 00 0 0 0 0 0 0 0 0 - \.D.'0 0 0 00. 0 O ~ ~ ~ ~ ~ ~ ~ ~ 4N' I:-f f C f Io Jo '-r^ ''M "\ 0 o * ^-< ~~ ~ ~ ~~~~~~~~~~~~~~~~~~~~~-0<-.- ' "0' CD \D 0 L I 00S0 cN 0 IN I- \:3,Q * 0. I.^.? * * q. r O o C0 -n!."-^ '"n CL 0- 4- '-n oL D IO 4 t rL if '-, 3 -c\i".._.".0 j M v: r m ris Os 0 0 1 A __T '*-:-< < * > '3 < *:0r(f.*^ - ^ ^ ' 0 *t '\ - '- *3 ^ - r ^ - 0D O4 0 *0 1 0 J _n, —IJ E-4~~~~ os a M a D > 11 o n 113< -'- ' ~^ < ~ " <-r j c*n " no '\ * D * N r -1 -4s j ~ > 0 > 0 ^ c ~ -0.. D < O ^o c0 -0 3, > 01 r"^ \- n0;-o J)i Tf\ JO <t *M -< < *\O<C,. LL It L _U L.L- 00 CIN UJ ON ' -4 -4 t i\ J f) *t ) - 4 I* A i; C.0 I - '70 CC*- r *0? _~~~~~~~~~~~~~~~~~~~g,,J.'T ~ C.. r^- X) 0 0 ) -LJ 3 jj <C *-3; <~~~~~~~~~~~~~~~0 O C) eZr- ri 3 - 11._1 t3 0 4' 0 U 3 — 0 3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~00 k ---o o ^- *ffi ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,.~.J.33 ll? 0 C 0 IO 7E t-n S) cT\ -4 — ' o. U) 0_ ""n 3 (M -~ II.- 11 > aI ~ ^ - - ^.j* J 0 *<f-*0 ~ O* -.0 * O^ ^ * z^ *3 o: * **n o 4 ^- -:- >:^ 2 > ^: '-t~ r-t J` -:-t CM t '.t:* ' trjv r-t r- It -t -t -It.' ^3 -< 0.3 0 ~~~~~~~~~~~ "M D \ FJ<" ^ ^0 "1'/ ' rsj_ -<.-< 0' r-0r( LO,-\ r-,-< r-^ C\( - Jl C\ C~~f:-\J ^- ^- 0 n 3^- l- ^ *~~~~> -,J(-, r^~~~~~~~~~~" n- 4I 'a n NJ 0 0.-\| 0 "3 0 *n:-LJ '3. fNJ |j~~~~~~~~~~~~~~~~~~~~~~~rN, Ld r^ Ij- ^ f^ ^. ' - 's~~~~~~~~~~~~~~ a 0 *~~~~~~~~~~~ ~~~~~~ < D (*t-. 0 O-, <t11 -I0C0 *.-t T\ 0 * >..-2 (- (-!II <00 L. 0 j~ * 3 3 n r \ r-l r-Z r-l **-:'O *; ).0 -vj <\ `NJ 0 00 O (7-10 <, < '3 3 << 4 t*t < 0^ 0- -!-0 *t3- *-o~~~~~~~~~~~~~~~J (-, n Lo -,, A -J J ) c c 'Y 0 0 (D (D 0 O.- J3 0,-(~~~~~~ ~~ ~~ D- -D D -— I - 0y 0 200 ^ ^ 5 ^ '5 * ~ N O*s ^- * /)n *":-q * *') *-0 o) ~.0 -o.-*J A*) n_0 0 ^0 _J 3 - CD^ Q-0 01.0 0 0 r 3 3 l n *n *n <' -f.)*U - *O - ".'.. '* c-0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, l-J ~-J 'N N~- - l. -kiJ. IL -"; L -1 0 L 0 -1 00 JJ 41:J. *J t ^ 0 a.! -^ ^ 4.* * 0Y C 0 c C cE C 'j;_ C 0 ^ C." 'n C)i 7^ rO C, Oi C- r C ( *I r/ C - <; C:' "- C*" C) C 0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~f (D~ *l <-< r- It^ r.\ - \ \J CM r-1 <tJ,\J.-M.-^ *v \*j 0~~~~~~~~~~~~~~~~~~~~~~~~~~~(J cjrjN ~,NC jc\,Jr rj L

Design and Economic Study for a Dam Project.;. 3 -\J~~~~ I- -T> '- 3 0 0 - *.,:> ~~~~ —4 I I I J I '^ ~;' ") 3 ^ \ ^:4 ):4) '>' *. 0 6 t5 * * J L *) * "S ' '-4.'* 0( \ 4) 0- * *t. ^ '.,-4 ~0 ~ ~ ~ ~ L,iJ > ): '- ' J A I1 I 4' _tO~~~~~~~~~~~~~~~~4 0 Z Cl)~~~ ~~~~~~~ '0 0 *- 0 **; t ) ^ - - ' f H ~ ~~~~~~~~~'; '4.*.4 - I ' * ' * * J - * ~~~ ~ -.4 U) 4 4 i, ~E- 1 f' ' - 4\.0 * J. C.? (~~~~~~- - 1 - 4' - 4. 4. j'1 >? " '4^ *- n * -~~~~~~~~~~~~' 4.' -4 ' ** - -! H r ^.) -,. j \.. -. i; 3 '4). -. ^1. - -^ ) -1 '"4 '4. - '" J J *. 4 4 — h^; **J.~~~~~~ ~ ~~ - -4 - **.4 4I.4J ** -J -1 *-? '- * * - * ' * *..* * -: * 56* * /y ' -1~~0 *.2). * * - >; - ) " g., * * J...] - 1.-1 J -1.J ^4)I4 (/3~~~~~ 19

Example Problem No. 8 STUDENT'S PROGRAM A'./,~ 'ii/, '.4 ';' A '/IAN I '-iX 06 8DN 0,.2.' -':-:..'c(8 2 ~*-, Cio PL E f iAD) 9 E CUT,I - I " 3 1 0! 1, l ON! R ( Z,...',.) ) ^ i- ' ( C ) i } ( V;* ) i \i ( 2 C ) V \/< \L,' ( Z '_ )! I i' i- (,") ) L? _ u i i ( 12 j) VR [ D (20)) R[I-AD 'FO- ' AT,, i- (; )..I -i ( 11 ) 9 i5 - i ( ) o ( l ) o '. V (, 1 - 9 1Z- jO(1) o Z (') ( 1 ) o T /' ( i ( L ) ).9 ( _; ) 0 e A L' ( 18. ) V i ( 1 ) *. 1 V R D ( 18 ) 9 I!, J r i' 9 T-, )x, -' C 0 - 9 L 1 i.... 9 Y ~ C L: i i ' 9i J f i..i 9 l l -.i -. -' L:.: i9 i i_ V A, U i"..! i'C <. 1'UNPIL,R F F"? i"/;/: l;','rR ()iP ' INT F i'. T i - ( 1 ) i( 1 ). i ( I ) e 1 ) ' ( i ). o. V 11 ) V.,i.li,' - -.. Ii,, -L- I: -~ VECTOR VALU.i S I.=i; 7F-. ';i '/I.CTORi VAL./,.L.: ' I ' L '_ —.i 9:',; ^ 1i- 9. COiiCi,1 C;. i. H 1i G, "F.// ].'9 F '9,2/S2/l,15,9F"l-. /..:/ 5 );.' F' i. '- /:? F.. 3.; /V:! ' o;2 / (: 5 7F * F <!'.'"O ) "-" C L L.): (, o2 '"' ( ) - ( 1/; ) '(,-, ( i.), -, ) / ) ' 1 2S-, P L ( l Gt) V ( i) V ' I.I C '.-. 1 T H-I I 1: ~. J H- _..._',.;i; F O I'. i = i ~ 1 0 i 1 *( 1 1 CSO= 1:,:( i ) C, 0-: C $;C> 1:3 C::.:'( i o + (,-.I-::._;o ) / 2,'. ' ) ______CDi:CDI 1-:,( l-(i-1'..... ) /2=. ' ')I(1t -,Pi —"I>=SPH (I ) _______CD=)-V( I ) P-:' 1^0-: 1;, '',"_ _i ' ',:. ~ u1 CL (.... - ( i ) (. / ) - ( ( i ):. ) ) "';\, L U IF I FI I. j;,!. 1::5 F7.; ( iI )Z iP:,= ( C L-C,- i-( S:D 'r. 0 -'i — CD. L I ) — ( C L i...1 ~- i-Ci.,.) 1 t.. -'- + i. ) _:, ]. 1(.)':) C 0;"..i T I i =. ]. 5 ':' P ~' C: - P ( P - ri 1 ) / ( ( i 0 / 1 i') (. '( 1 /( - ) i.., ) ) ) -P / ) i>,E>, i ':: + i')-;- ( T/-,:.~-I.. i H5 );..i- '..': i' i".; ) + " _ '' ''. '....' ~ V - V /-i' "P -- d -P'(;::- I:i.-t. ',2 ) - ("'o / 2 7. ) -; (,; 0.1), 3 -3 5, e 3 ). i'.:,'. 1' /:,',. o F e i" T A () / *1 i) ' ";-i=' - i-_i:l;/2 '.:,'," "' ~!. CL ' v'-' " ) ".;.:; -. T - ',i.. LI 'G /.. J.,_T ( I A]iPF' R Ii F.' 1\ [D i IU. r= o j:.: i i. v "'IEC TVOFOR VALUi' S.i',D j,',S:3 - -,l't',,,'j.~ ':' i[ ': 1 3 ' ',: n ' V. ''' j''',\J;'./.. " ',,',/.:^? e 1,'i "'.* ~ A J 0 P 'j - T R A't i'l.::;, 1 ';. T D i i,: L: ' ' -/919_A -) I.''-, i.... 'i-m i.i/:.T 1 i-; i —.t-;(.T T..'I:FF '' 12 i- C 'R ' F Y/L 1', ) 0I ' 1 L 0. ( ) i.. i-i L ' i,__ j j:'."-) iI)l-t I,' i__ __ -;V i:,- L ) ].i,:':';_ ].R. I F 3:.'..'" N. \/_...'::. '!:..*'" L O ',: ", '" (" ) o ':'4 I.. 1,;V. *." ' '.::.i...;..;. ( i.F- i ) ~ T. S! ) F i'-) 'FO A 1L I.i,, -I i ( J ) II /F9 i --- LU-I ' i:: T i; ( i''E 193 'I. C- '.i... -...:' 1"J,,.:'..'. / ''. J 12 i \ 1 _ji i 1 \s I ' /;.

Design and Economic Study for a Dam Project STUDENT'S PROGRAM Continued A10 ZMIN=ZMIN+ZOO/2..P*N TRANSFER TO BETA --— All HEAD=(.60+.25-*(USR( 18 ) -USR) /16CO.) ( Zu 0 -ZMIN )-NTWE L+ ZMIN ----- E VAPR=(EV A R / 12. )-( 20.- ( HEAD+TWE) + ( 2./9. )( (HEAD+T.jE) P2 1/(365e2.*) QNET=USR-EVAPR-LER AINCP=( (HE AD*\(USR-LER-EVAPO )-*\FP P)/11,8)* '-24. 365. -)-*000 — 1 PACRF=43560. —(AEXP-AIN'CP)/( (USR-PRR-LEP-EVAPP ) -24.365 *-3600. PRINT FORMiAT RESULToHtUSR5,ZU, AINCPPRAPAEX2,9002COrOT VLC ION R VALUL KS5L I =051IlI3 9 h ~l 0 *Hu5 951J00 ~ *i I 9510? rA 1 IS10O2HPRS1O,2HAPSIi4HA EXP 5,HPAC FS5,H042T// _____ 1S13, F5.1,S8 F8.2 S59F6 2 )>S6 FP10r2, S6F1C.2* 1S3PF81*S4 F9 *1,S3* F5.2 S3 F6*1*5 END CONTINUE INTEGER IKNoJ END OF PROGRA,\ _*DATA 10000 12000 14 0 16 1 2660 22000 ( 24000 26000 2_8000 0 30000 4u60 10400 412400 14400 16400 13400 20400 22400 24400 26400 28400 9160 1288R5 17542 23210_ 29968 37870 46971 57322 68954 b1917 96276 350 5500 ____ 11090_0 _13400 15800 22228 2500 272; 30 295 00 10 2 50000 2 VuC6212 22 5000 235C O 24500 255000 2650 2750 265 295000 3 0 5 C 0 315000 20 350 3 250 345 00 3503212 3237 3202 328 3312 (33 '3362 3337 5412 3 4 33 5 456 6 3531 3544 3556 3569 26U0 0U0 3 3- 37800000 3 4'350000049800000 bU UO~ 5 J 6 U 0 U UU ^. U '^ U 5U J 0 Z 0 144000000 164000000 184000000 2 040Juu 23000 255 0 0 2SO O 05T 01 398670003 7 4 U0 1 G UT: 0 i 1000 4219 1800 00 0000150 E-194

Example Problem No. 8 o oo * *. 00 o NLrin 00 0 o Oo 0% 00 0 0 oo0 r-ooo ooN * 0 S 0.0 0 0 0 0 0 - 0 * * ** * * 0 co s(' o o oe.n rno " f~) u00 n OM, )^ 00 o O0 N Ns0 51- O O* > D J; 00 lO J W LJ 010 < < < 004000OO 0NOO ( U D 0 o O O O o L OO. l~ o00 0o0oo0ocn ~1 000.* 0* 0000*0 * * * O L 0 C 0 0 O L CC) O 0 N tO n 0 OO 00 N Lono 0 0 0 0 0 ( o* o o O Z1Z Z o.~ O 0 o OOO 0 0 O z z z 0 *LO O O O O o 0 r- 0 00 On O On O * o 0 000 0 0.0 000 0 000 P4 0 a L- 10o0LA000 0la (neQ~ N N 4 oV 4V 0 LL W,., N I-I- t: [-4 OOOOOOtOOO OOONOOOOO 000 I- O -( 0 W O r-O r 000 Z I NC n O 4 00i 000 O 00000 0 _.,-, —,N-,. 0 00 e Ot 0 00 0 0 O r- r-.^~ ~ ~~~~~~w 0Nn 0 M OO l00 el O Z < r-Oor-o Or- O r-4 0 0 0 4N 0 0-4 000s 000Ctl 0 0 0 V OO cJ u 04 400 4 (to o ~ O < * 0 cO O t- O* 0 oo o o o 0 N -O - o 0 o o0 o ( 0 0 0 0 0 0 o 0,r-(-,,,r-,OC <0< < '-4^ C M <\ 00 > >0 o o 0 0 00 o 0 0 oo -4 N o 0 0 r- 1, oo.. oM % o o 4- o o o t o 4 o0 N 0000 0ooo~1o~ X 0 0I'0 o.co. o1 O - 0 0* * *00 I o-4 o... o o o r-0 0 0 0 I O 0 r- 4 0 0 o o N O 0 0 o1 09

Design and Economic Study for a Dam Project I I II 0% r-I 4 4 LA AD rn OD i Coo cC CN r-4 0 *. 0 I@ 0 i.* * * 0 * 0 0 * 0 Ln LA 4 -4 0 c0% j o r- o0 o0 L 4 (4'4 - r -l q: - 0 0 0 0 0 0 0 4- 0O- 0%- 00- CM- N i-4I-j- 0- 0 4- 00 - LA- 4- C- N rNLJ WCM Li Li -(4 L N W HJ N IN IN LJ N M J "-4 LLJ "-4 U MJ NW L CM LN NW N CM z z z z z z z z z 'O 0% 0 c Ln co MN t- t ON NM L O "-4 -4 ( N M (M (iN N N N C% M C N N n Ul. LL LLU.U... UL UllLA-LL L. U- A ~~~~ ~1 oL ~~J ~~~.) 4J ~~~~~) I~~~~) L) IJ~~~~ U Il U) U U < < < < ~~~~~~~~~~~~~~~~~~< < < < < <. 0. NOQ. CsiQ- 0. N N t-M r^ - r 0 ( -. P I,,- o -t L NO. O4Q. NOa. N l N *... *.. * * S 0 0 0 0 0 0 0 -( - ~4 - r~ ^< ^^o - 4 - 4 g4 LA A LA co 00 co 00 co co 0l 0% a% 0% 0% ro- r- r- CO 0 00 0O 00 0 0 0 0 0 O. 0%O. 0%o. Oo. NMO. NO0. NO0. NO.- N O- NO. 00CO- 00C. COD. CQ- 1o 00 XI (M-X N X N X ^x <~ 4x It x ^x It x L tnx x in X Ln in W W U.) W W W LLJ UJ W W N N N co co co Co co Co N~ N(NlNi '0 ~~~O '0~% 0% 0 % % 0 % 0 0 0 0 0 co COD CO 0% 0% 0% ON 0%~ 0% 0% 0% ON 0% CO O co N N N N 0 0 0 0 0 LA LA LA rl r- t rl- rl- rT- M4 M ~ M M 0% 0% 0% Co Co Co co co co 0% 0% ON 0% ON co O. "-lOa. -4Oa. a4. NO N. NO.- NO NO.%4 NO. MQ MrO CiO c1MO Q- Ma 0% 0 0% 0 co co co Co Co Co L A LA LA LA 0 0 0 N N ~~ ~~ ~~ ~~ ~~ ~~~N N1 N N1 N N N N *. 0 0~~~~~~~C 0 0 0 0 0 OD 0 co 0 0D C() () C % ' %O '~0 %O %O '0 '0 '0 '0D '0 '0 "- -' - 0 0 0 0 0 0 4 4 4I4 t 4 It 4 ' '0 '0 '0 '0 '0 r- r- r ~ ~ "0 LA LA LA Co CO Co Co co Co N N N 4. N O. N-OQ. NOQ. 4O. 4OQ. 4OM 4OQ. ItO. 4MO LAO.- LAO. LAOQ- inL LA (U 0 0% L 0 "-4 4 N 00 0o Co C/) C Con n r0~~~~~~~ 0% 0 0 Co 4s LA L - A L ' ' O. LAO. 0 - O.I- 'O0O. '0O. CO. LAO'N. "4O.L 4 0 LAO.- NO0. NO.- VO. C- "-4a U 0U 00 4U UM COU i' U 0 U LAU LAMU 'U NMU -4 U M M Co - r-'-4 r —. '0-i V'O cM IN "I V- -4-4 -4 Co CO 4 CO " r- 0 - < -4< "-4< N N< N<v N N<< N Nv< Nv< N < Nv N OO in n n o o ooo0 0 0 0 10 M 0 0 0 0 0 0 10 0 0 ~~ ~~0 0 0 0 0 0 0 0 * jzo zO zO O c 0 0Z 0 0Z 0 0Z 0 CZ 0 0Z 40 1401 Co 01 r4 C40 Cn A L AO LAO LAO LAO LAO CoO COO COO Co C NI " 04 '-.4N tn. -4 I N to 4N tn N V~ C4N V -4N U) -4 n "-4 N U) N tn N UO N O 0 0 I 0 0 0 0 0 0 0 0 0 -o a 0 010 0**0 0 0 0 0* 0 0 1 0 0 10 0 ol ~~~~~~~~~~~~ ~ 0 0D 01 0> Q. P-q. - CIL MQ cV 1- r'0* '0>- ' - iCo- Co 10 I(M Co- Co*~ Coi 0o 0o 0o 0^- 0 < -< r-4< I,<< 'CM< ~M< -M NM NM NM NM NM M (< - "- i o o o jo o lo o o o o o ooEo19

Example Problem No. 8 Computer time: Each student attempted to program the dam design (Part 1), the economic study (Part 6), and one other study. One student accomplished three successful programs, two had two successes, and the remaining one student had only one successful program. The number of runs per student for three attempted programs ranged from 26 to 48, with an average of 34. The machine time per student ranged from 50.2 minutes to 130.4 minutes, with an average of 93.2 minutes. The computer time for compiling and executing the final runs for all six of the instructor's programs was 16.5 minutes. This does not include any time for check runs or unsuccessful runs. E-197

Example Problem No. 9 ANALYSIS OF A QUADRILATERAL by Harold J. Welch C B A 8 D In triangulation, we use a quadrilateral more often than any other figure. If the line AB is measured or computed as a base line, and if all 8 angles are measured, the other 5 lines may be computed. The errors of measurement of the angles cause contradictions in the results. The magnitude of these differences may be taken as a measure of the accuracy of the original measurements. Write a program which will make this comparison. Solve triangles ABC and ACD to obtain BC, CD and AD. Then solve triangles ABD and BCD for the same purpose. Results should appear in a form somewhat as shown. BC CD AD DIAG AC xxxxx.xxx xxxxx.xxx xxxxx.xxx DIAG BD xxxxx.xxx xxxxx.xxx xxxxx.xxx DIFFERENCE x. xxx x. xxx x.xxx DIF/AV = 1/ xxxxxx xxxxxx xxxxxx (This last line could possibly contain very large numbers. Possibly E format should be used.) Prepare a test problem which will lie in approximately the range indicated above. Your instructor will include another problem when the program is compiled. Data Format will be given in lab lecture. The mathematics of the problem is so elementary that its solution was not discussed. All of the students except one used the Law of Sines to solve for the unknown distances. The lone dissenter set up a problem in analytic geometry, solving for the desired dimensions by the use of simultaneous linear equations. He chose to perform several other operations not included in the problem statement. This decision resulted in a program which was far too complex. At this writing, he has not submitted a workable program. The lecture material dwelled specifically on proposed methods of obtaining trigonometric sines for angles submitted in units of degrees, minutes, and secords. E-198

Analysis of a Quadrilateral It was suggested that one challenge lay in reading the values of 25 variables from data cards to memory in some looping arrangement. The format of the data cards was fixed for all students: Card one: Word one: 16 columns, floating point, 3 decimals. Four groups of three words: Word one: 5 columns, integer. Word two: 3 columns, integer. Word Three: 6 columns, floating point, 2 decimals. Card two: First 16 columns blank, followed by the same four groups of three words as card one. This uniformity of format provided a fixed location for the base length and for each of the eight angles, where degrees, minutes, and seconds were read as individual words. This enabled the instructor to prepare test data which could be added to the student' s data when checking the programs. The class was given a suggested format for printing results, but the exact details were not spelled out as for the data cards. Approximately two hours of lecture were devoted to programming and to this problem, in addition to the three two-hour lectures given by the Ford Foundation project. Four hours of lab periods were devoted to work sessions and informal small group discussions of specific programming techniques. The program was to be written in the MAD language for compilation and execution on the IBM 704 Computer. The only restrictions imposed were the data format, the numbering of the angles, the lettering of the corners of the figure, and the approximate magnitude of the data and results. The instructor' s solution was written for a slightly different purpose than were the student solutions. Accordingly, the program itself is in a different form. The same problem is solved and it is solved by use of the Law of Sines. The program calls for the same input data on the same format, but the two data cards for each quadrilateral must be preceded by an identification card of some kind which will be used to place an individual title with each solution. This card is reproduced exactly as written. For example, most solutions bear the words, "Instructor Check of Student Data as Submitted by ". In addition, the instructor's solution was prepared so as to demonstrate to the students, without benefit of any lecture time, some versatility in the approach to the computer. A sketch of the figure (not to scale) is supplied with each printed solution, in addition to a confirmation of all data used. This permitted the introduction of a computed, subscripted format notation. Three loop instructions were employed to advantage in a problem which one student solved with no loops. It was intended that in future classes these solutions could be compared, not for the criticism of student work, but to show how the same results are accomplished in different ways. In the case of a zero difference between two computed values for a given side, the precision value increases without limit. A very few of the students realized this and included a test which would prohibit division by zero. In the instructor's solution, all three differences are tested. If the distances are all perfect, it is assumed that the figure is artificial or adjusted, and a statement to that effect is printed. The results of each solution achieved by the students was compared with corresponding results as received from the instructor' s solution. Approximately one month was allowed from the time of assigning the problem until the final deadline. This permitted ample time to approach the computer for several runs. The instructor was available withE-199

Analysis of a Quadrilateral out previous appointment during most of this time. The students reported a total of 27 hours of personal help received. The class schedule did not permit any group discussion of the problem after the introductory material was presented. However, many of the students were interested enough to come into the office singly or in groups of two or three to ask questions and discuss the results of their efforts. Each participant received a brief comment on the results of his program and on the degree to which he had used engineering and mathematical principles in following the instructions. The largest source of errors was the writing of formats. The second trouble maker was the use (or misuse) of the Integer and Dimension statements. Parentheses and commas were also badly abused. The purpose of computer presentation in this course was to bring students to an acute awareness of computers, to dispel the fears of the cloak of mystery which hides computers from the public generally, and to make it easier for instructors of more advanced courses to call for programming at a higher level with less introduction. The general reaction of the students was very good, considering the lack of prior planning. At the beginning of the semester, MAD was untried at the Computing Center and the language was unknown to the instructor. The students were sent to the Ford Foundation project lecture series with no introduction because of a lack of liaison between instructors. When they reached the lectures, it was assumed they knew why they were there and exactly what they sought to learn. A few quotations are given as being fairly representative of student comment to the instructor: "I feel I have a fairly good understanding of the programming now." "It goes without saying that the work that was required of us was much than should have been expected, seeing as how this is a surveying course." "I am very happy to have this basic understanding of programming, but I am sure that it did not help me in any way with my study of surveying. " "The quadrilateral is very important in surveying. This analysis was very helpful in a surveying course, because without a complete knowledge of the problem it would be impossible for me to write a logical computer program." "It appears that surveying problems lend themselves well to a study of programming." "I believe that computer programming is basically a mathematics course and should be taught by the mathematics department." E-200

Example Problem No. 9 FLOW DIAGRAM,E A D oP'r Ar' | E,P CARPP -t~~~~~~P a Ps =AEd-Z/O1, - C, =^3 i Al =4:,5/,/0....ei +A P\' v5/,., ---', f-S. /.v - _- -3 0 0 1 t N 3

Analysis of a Quadrilateral INSTRUCTOR'S PROGRAM START RAD FORMAT HOLLFR 1 PRINT FORMAT TITLE 2 PRINTFORMAT HOLLER 3 READ FORMAT CARD, A...A(24) 4 THROUGH LOOP A, FOR N=1,1, N.G. 8 5 DG(N) = A(3*N-2) 6 M(N) = A(3*'N-1) 7 R(N) =.017453293*A(3*N-2)+.0029086821i-A(3*N-1)+.uOuUU484814 8 1 *A(3-*N) 9 K = VCOUNT (N) 9A LOOP A PRINTFORMAT DATA(K),NDG(N),M(N),A(3*N) 10 PRINT FORMAT BASF, A '11 R(9) = R(1) 12 THROUGH LOOP B, FOR N=1,1, N.G. 4 13 S(2*N-1) = SIN.(R(2*N)) 14 S(2*N) = SIN.(R(2*N+1)) 15 LOOP B S(N+8) =.SIN.(R(2*N)+R(2*N+1)) 16 D(1) = A*S(9)/S(3) 17 D(2) = A*S(8)/S(3) 18 D(3) = D(1)*S(7)/S(11) 19 D(4) = D(1)*S(4)/S(11) 20 D(5) = A*S(12)/S(6) 21 0(6) = D(5)*S(5)/S(10) 22 D(7) = D(5)*S(2)/S(0O) 23 0(8) = A*S(1)/S(6) 24 THROUGH LOOP C, FOR N=9,1, N.G. 11 25 D(N) =.ABS.(D(N-7)-D(N-3)) 26 WHENEVER D(N).Le 0.0005 27 D(N+3) = 0.0 28 OTHERWISE 29 D(N+3) = (D(N-7)+D(N-3))/(2.*D(N)) 30 LOOP C END OF CONDITIONAL 31 PRINT FORMAT RESULT, D(1)...D(14) 32 WHENEVER D(9).L. 0.0005.AND. D(10).L. 0.0005.AND. 33 1 D(ll).L. 0.0005, PRINT FORMAT REMARK 34 TRANSFFP TO START 35 INTEGER DG, M, N., K 36 DIMENSION A(24),S(12),DG(8),M(8),D(14),R(9) 37 VECTORVALUES TITLE=$lH1S6,27HANALYSIS OF A QUADRILATERAL *$ 38 VECTOR VALUES HOLL~R=$72H 39 1 *$ 40 VECTORVALUES CARD=$F16.3,4(F5.0,F3.(O,F6.2)/S16,4(F5.U,F3.,0F6 41 1.2) *$ 42 VECTORVALUES RESULT =$///1HO S30, 7HSIDE BC S8,7HSIDE CD 58, 43 1 7HSIDE AD /14HODIAGONAL AC = F10.3, 3F15.3/14HODIAGONAL BD = 44 2 F10.3,3F15.3/.1HO 513, 10HOIFFERENCE 3F15.3/24HOPRECISION = A 45 3V / DIFF 3F15.0/57HOTHE PRECISION SHOWN IS AN INDICATION OF 46 4 THE MATHEMATICAL/27H CONSISTENCY OF THE FIGURE. *$ 47 VECTOR VALUES REMARK = $60H0O** —*THIS QUADRILATERAL HAS BEEN C 48 10MPUTED, OR ADJUSTED. * / 61H INFINITE PRECISION IS INDICA 49 2TED BY ZEROS IN THE LOWER LINES. *$ 50 VECTORVALUES DATA(1)=$//1HOS41,15HOBSERVED ANGLES /S111,HC S1 51 17,1HD/S13,15(1H.),S14,1H( I1,1H)2I3,F6.2/32,2(Sl,2H.. ) — '$ 52 VECTORVALUESDATA(17)=$S13,5H.. 5 S5,5H6.. S14,1H(11,1H)2I3 53 1,F6.2/S6,2(S7,4H..)*$ 54 VECTORVALUES DATA(28)=$S13,5H. 4.S5,5H. 7.S14,1H(I1,1H)2I3, 55 2 F6.2/S13,1H. S4,1H.S3,1H.54,1H.*$ 56 VECTORVALUESDATA(40)=$ S13,1H.S5,3H..S5,1H.S14,1H(I1,1H) 57 1 2I3,F6.2/S7,3(S6,1H.)*$ 58 VECTORVALUESDATA(51)=$513,1H.S5,3H..S5,1H.S14,1H(I1,1H)2I3,F 59 1 6.2/s5139.-4H1S, H.' H 4,1H. 6-$ 60 VECTORVALUESDATA(63)=$S13,5H. 3.S5,5H. 8.S14,1H(I1,1H)2I3,F 61 I b.Z/.bS, {b4 -H. ) - - 6 VECTORVALUESDATA(73)=$S13,5H., 255,5H1 ~.S14,1H(I 1,H)2I3, 63 1 F6.2/S2,2(S11,2H.. )*$ 64 VECTORVALUESDATA(83)=$S13,iH.13(1H=),H.514,1H(I1,1H)2I3,F6.2 65 1 *$ 66 VECTORVALUES BASE =$S11,1HB F13.3,S4,1HA *$ 67 VLCTOR VALUES V COUNT (1) = 1,1/,28,40,bl,63,73,83 68 END OF PROGRAM 69 E-202

Example Problem No. 9 ANA'LVSIS OF A QUlADRILRTERFAL DETROIT QUAD N-i. 2: A P JUS TED 1 ':A3G6 OBE:SER.'ED ftiNGLES ~~~C E ~D _1' _..IT............. _,: 1::,1 5 3 1.8 36.97_ '.._ __.. 5,6..,:"2:, 49 12 328. 7. ~4 _. ~.,:3 4: 42.40 27.761....,: " 4":,.4 ' 34 48 1 6. 55 B 15956.470 P ___S I DE BC S _ SID E CD EID-_IDE P- D DIAG3fONiL AC = 27940.449 42241 7. 096,,1 9,372:..7721 -:. 7 5 5 3 DI AGONiAL BD *= 2= 8498 -). 758 __ 2241 6iS. 94313 19372. 748 _ 21 4.._ _ DI FFERNCE. 1 54 0.02'3- 0. 15 PRECISION = AV 0* IFF 145978. 823571. ___ 41791j8. THE PRECISION SHJOWN IS Fl IH CRT I OAT iF THE MATHE1MATICAL _ CONSISTTENCYU OF THE F I GURE. INSTRUCTOR CHECK OF STUDIT DT -' SU 4ITTED ' EDWRD. U..,.:._ A,, IEE:C S ECD0.;E I _ r.!.!t C -7 '0 ' ' -, 21'". F__'.6;. S _1 '. —.'.2:2.7 '6 44 3]. 0__. ~_________. 4._ __. '. 7.,C 4. 27,,9..30 A I..qL'.,.'4,-*;'I 1 17 4 50 -1. TE......... __........::__ 1 _::, F:,:._C'-5 ' 1 4 2 4 0 ~~~1* 1 * 3 ~ ___.. 2 __ 1,. 1 ~.'. ' 4. 41.,: B 2.. 380. SIDE BC. -. I E _. IDE AD DI RGONl4L C:..3, 516. 797. 3964. 984 29782. 1 28 351 0:-:. 8 3.:-, I:, DI GON l L BD =.38: 87. 465 30 965.01 2:29 '82. 1 62 351 08. 887: —:;' D I F FERENCE E. 0 9:.': 0. 03 3 0. 2 FREC IS I O - -''.1 I FF 1::::-08404:0.-',. " " -" '-96968.,;:,.3 4159. - THE FREC ISI O SHON I S '-,:Ni I DN I H:AT I O:in OF THE tNtTHE tl:i T I:ICqL CONSISTEtNC' OF THE FI GURE. E-203

Analysis of a Quadrilateral STUDENT'S PROGRAM START RERD FORM R1T I NFOl, B, 0 11 1, S 1, D2, M 2, '. D. 0.3 S t1.. 4 M4 S. D5, 1, S 5, D 6..1 7 S'- -,, D 7, M7, - S 7, D 8:, r,18, 83 PR IN T FORMRT TITLE, I E:Dl 1,S 1,D2, M2,2 S, *D3 M.3 3, D4 M4,4, _ 15 M5 55 D *'MiS 07 M7. 7,3,MS,33 I 5 1 TEG.ER D '1.il, S, M2, -, 07, D4, M0 5, SM5, 0G M, 7, M7 D8 CD=. 0 1 74532 931. C l-=. 0 02 '08-:321 00CS-=1. 00O 0 048481$368 R1 =01 *ID+M 1 +:1 CM+S 1::S R2 = D 2* CD + 2CM+ S2 CS_ R4=04*CD+M4-CM+S4*-S R5=D5*::CD+M51CM+S5*C -: RG=_ C*CD+M6 Cr 1 +. C,1 + S-'-= +.: s R7=D7*CD+M7*CM+S7.CS RS8=D8*CD+M8-*CM+S8S WHENEVER. -BSE'. ' R 1 +R 2 +R3 + 4+R5+R4+R,+G+R.7+R.8-3S. C. *D E. GE. FMi, TTRF!NSFE 1R TO BRD 1 RR= R E I: C 5 I t t.S.: F.' 2' +2:, I..:R: IlGC1=lRB*'-SIN. ~ R2+R3:. ISIN. CFR4:: C D 1 = D I R G R C.'- SI N. I:N F.' 1S I N l.:R 2 +R 3::' 0D1 =DI iGHC*SIH. F.:R -. —. I.:: 'R6+R7:.PRINT FORflMT ONCEEBC1,CD1,RD1 l I RGBD0B*E:S I N. CR 1 +R8::'. S IN. C:R7})1 BC2=DIAGBD*SIN. CRG.::'.- SIN. CR4+R5::' C O 2- -D I iR iS3 B S I tH. ' rR.3:..S I t.,.'. R 4 + R 5':, CD02=D IGBD* IN. CR 3::'. SI. -::.CR4+.R5:' R D2=I- GB D* IN.. CR2::':.. S I N.:: R1 + R 8: PRINT FO RMTAT Tl IjICEEBC2 2. D2, PD2 D I FFB.C=. BS. '::BC1 -BC2: DI FFCD= R. E: S. D1 -1:D2::' DIFFAD=. RBS. C:D1 -P-D2:: PR I T FORMtAT THIRD,DIFFEBC, I FFCD:DIFFAD ACC 1 = BC 1 +EB2::'. (:2. *D I FFEBC} 0CC2= 0CD 1+ CD2.-2. *D I FFCD} 3CC3= 1 +D1+ 'D2',:: 2. *DIFFRD': PRINT FORMIT FORTH, PCCIC1 2, A CC.:3H TRRNSFER TO ST'RT BeD PRINT FIRMlT FIFTH TRRNSFER TO STPRT V'ECTTOR V ALlUE S I NFO=F 1.3. 4: 5, 1.3 F'S. 2:.-.S1 6. 4: I53 '.3, F 6.2:' * VECTOR VlLUIES TITLE=123H1 SOLUTIONC OF P!OI!,fDRILRTERRL.-27H BY ' E OWIDFliRD MULCli H' CE 3/..5H HRB F1'.., 3 IS,,'. 2, I 5, IFF.. 2, I5,1 I 3,.2,. 215, I 3, F I S. 2..,21, 5, 1,F 2 I 5 51, 3,F -.2, 11 5, 1 3,. F.G. 2..-S2 0, 2HB S2-, 32 -:0 2,2HC:, S 20', 2H A1D* VECTOR V'HLIUES ONCE=$1 OHODIPG I r' F 1 6..3S, FSG,.3 F 1 F 1. 3i * VECTOR V' LUES T '.ll I ICE=E 1 OHO D I AG B D, F 1,.. -., F 1I.. 3. F 1 F1. 3 *.' V..ECTOR VP.LUIES THIRD= ~ 1 1 HOD IFFEREN CE,, '. F'.,3. SI 1 1 F...-. 1,,, F.. 1'$ V'ECTOR ','-LUELIT- FORTH=,1 2HOIDIF.P',.'E =1... E 1 E i 1 2 1 1.4*S VECTOR.VRL IES FIFTH=-.34HO3ERROR OF i:LOSURE FOR GiTVE SN RNGLES*.; END OF PROGRRM E-204

Example Problem No. 9 SOLUTION OF At QUAlDRILATERRL BY EDIWRD MULCHVY CE.3 AB =6829. 380.8 1- 2. 2 31 42.40i 5 G 44 3.: 8 'i 449 27 9. 30 1 17 4.50 67 4 22.40 52 1 1 23. 90 3 2 1.351 22.3. 00 BC CD A D DIRG RC 3096.4. 98323 - 2 9. 128,351 0., D I R G B D 30965. 012 29732. 12.3510. 847 DIFFERENC E 0. 029 0. 03.3. 2 1 DIF..F.,'PE =1.'. 1 0ii, E 07 O 0..8970,E 06 O. 1,, 7E 07, Small discrepancies in "precision" result from double computation to obtain one value of BC and AD. ANOTHER STUDENT'S PROGRAM RP'9LI.PROGiRRM FOR RNiRLY'SIS- OF P QUAlDRIILATERAL BEGIN REFiD FORMRFT DRTH, Hl 0...r( 4::,. ID: -;'4: D(1)... D(24) must be integers or THROUGl H ICO TT, FlORF i 1 t...8 HeK:, - D 3::3K-2z fixed point, but not mixed. M,:: K = - D,::.3 K-n 1: S = 3*_____________________________ _i.:,.:: A'R i K -:, =,::D s, ' 3-: K - 2: + D C(.3-1 3..'. + D::.:.3 *::... 01. C! 745 32.3 SCOTT F FTRIT FOR Pl T CHIHMIE ', K H '. ti K:....,.- 1HRIOUGIH LPH!,FOR N=l 1 1.N.G. - L P H F,:': * - 2: + D,::. + 1 ':. 0 + i..3 * 3 ':. 00 *. 01 745 325' 9-I C-, IP B* S I ris.:: HCA:' 2.:, + I-t;.3.:- *. I Ni. C1 A,:' 4.::, P 2 =CF',.":,-SI '.,'':H:.'..SIN. A C':' +. H ' B = A B*S I =. C A:. 1 - +::' I t::. * li I,:. +,:', C:, i C,C =,-: 1 D' * '- I N. C., ':, H: '. ' t. i';:I:S,:,' _.: K: = D Sr. =BC i3, C.AC SI. ' c A 4::.+ A- 5! 'Q 3 =:BD -; I. r,: D. ' - I. -I rC 1 }+ I + ',,:'~:.A.N=0 BEETA TM 'C..I = 10 n0lCIIE 30 T '1-HRO 1G H Gq lA, FO-R Nr-f,. 1, N. 1.. 3. F'. M ' 1:B, E. C ':: -,.'::, ' ____ i.HIHENEVER '.::::' '.L. '0.001 T R IASFER TO BEETA GF MM A T C' 1:: P +C F ',' ':: ':.-..... R, P R I NT FO. r r S!t EFR P F''::1::.. 3::',... ': -3:' R ( 1:.. R. 3; 1 T.' 1: '. TC:.3::, TRAHSFER TO BEGIN_ INTEGER H, K t,. _______ '...'EC1-I:IR '.YLUrS FHDNGE$I13. 1'; F'. 2}*r' F16. 3, 4(F5 0,F3 O, V'E I-.l —R ',.,'RL!_IES I':HAHtl SE ='I IS,'! 4,,-,.; E'.fi..... '1'ECTO!R LUE-S:l —'.iE' =sS.l.3H4B, S-: 110, 3H CO. S1 0. 3H R..-.- 'F6 2)S 16 4(F5. 0 1 1 -I H Ji'..:F1 -3.3'.I.."1OH DI IE A! F 1.3. F 1..' 1 1 'H D G I F Fr_ 3. E 1CE. ': E: _ 1 F 1i2.3,.. F1.3 l F' 1.-H,, E':-.'. 5.-......"2HF..4,.." 4 -,:.4.; 5 '-, '. E *-: " *.; E_____ EID OIF F'R.OGFR.'M F3.0,F_16.2) E-205

Example Problem No. 10 RESPONSE SPECTRUM FOR ELASTO-PLASTIC STRUCTURE by G.V. Berg C.E. 231 is essentially a course in linear and non-linear vibrations. Special attention is given to the problems of structural response to earthquake and blast. The classical methods of solution are not practicable in either of these problems, for in the earthquake problem the driving force is extremely irregular, and in the blast problem the structure is deformed beyond the elastic range. Response spectrum techniques have been applied advantageously to both problems, and one of the most important tasks in teaching C. E. 231 is to drive home the concepts involved in the response spectrum. The equation fundamental to all problems in C.E. 231 is the differential equation of motion m x+ c + qi(x) = f(t) in which m = mass c = damping coefficient q = restoring force f = driving force x = displacement t =time and dots denote differentiation with respect to time. This equation may represent a dynamic system of one degree of freedom, or it may represent one mode of a multidegree of freedom system. Three numerical methods for solving this equation are taken up in the classroom: (a) Constant acceleration method (Euler) n+1 n n (h2) n x = x + h x n+1 n n where h is a small interval of time, and the subscript n denotes the value of the variable at the end of the th n time interval. (b) Two-step linear acceleration method (Adams, Stormer) x = 2x -x + h.x n+l n n-1 n (c) Single step linear acceleration method (Numerov, Fox) xnl = x + hx (h2/) (2x + x+ ) x 1= x + (h/2) )x + x ) n+ n n n +1 E-206

These particular methods are chosen because they permit one to play upon the student's intuition in developing the procedures. The first method, a method too crude for most practical problems, is "exact" if the acceleration remains constant over the time interval, and the last two methods are "exact" if the acceleration remains linear over the intervals involved in the formulas. With some of the standard processes such as the Milne Predictor-corrector or the Runge-Kutta methods, the approach must be more abstract. An example used to develop the numerical procedures is that of finding the response of an undamped spring-and-mass system to a triangular force pulse. This is' solved manually in the classroom by all three numerical methods, and the results are compared with the exact solution to convey some idea of the growth of error in numerical integration. Exhibit 1 is the handout given to the students for this example. During execution of the classroom solution, the notion of construction of algorithms is kept in the forefront. To bring in the computer as a tool for solving dynamic problems, this example is programmed in the classroom for solution by the constant acceleration method. It is, of course, pointed out to the students that the method is chosen for its simplicity, and not for its practical merit. The procedure used for manual execution of the solution is analyzed and put in the form of a flow diagram, with the parameters of the system and the driving force being read as input data. Conversion from flow diagram to MAD program is also taken up in detail in the classroom. By this time the students have written and debugged the example for the Ford Foundation lecture series and are able to follow the program development without undue difficulty. The flow diagram and MAD program for this example are shown in Exhibits 2 and 3. The example program was executed for the same parameters that had been used in the manual solution, except that the time interval h was varied. In the manual solution a coarse interval (h =. 1 sec.) was used and the error grew rapidly. In the machine solution h was taken as.05,. 01,. 001, and. 0001 sec., to demonstrate convergence to the exact solution as the interval is shortened. The first problem assigned to the students (Exhibit 4) was of the same nature as the foregoing example, but the force pulse was changed to a quarter cosine wave and the system was elasto-plastic. The single step linear acceleration method was specified for the problem. The problem was first assigned for manual solution to insure complete understanding of the numerical process. The single step linear acceleration method is of the losed form; i.e., the displacement at the end of the time interval appears implicitly in the formula from which it is computed. This brings in the concept of an iteration, and necessitates exploring convergence conditions. It was shown in the classroom that the method converges if the time interval is less than 0. 39 times the natural period of the system. For structural problems of this type an interval of 1/10 of the period will normally yield acceptable accuracy. For the assigned problem ths students were told to use 1/20 of the period or 1/20 of the pulse duration, whichever was smaller. The flow diagram for this problem, shown in Exhibit 5, was developed in the classroom. Student programs are shown in Exhibit 6. Each student had the opportunity to submit his program to the instructor for review before putting it on the machine. Each program was taken to the machine only once, whether it ran successfully or not. E-207

Response Spectrum for Elasto-Plastic Structure The second computer problem was a follow-up of the first, but considerably broader in scope. The problem this time (Exhibit 7) was to take the dimensionless equation of motion for this problem, vary the parameters, and obtain a set of spectrum curves describing the maximum displacement in terms of the controlling parameters. The dimensionless equation of motion is where r = ratio of the restoring force to yield force = ratio of system displacement to yield displacement 6-= ratio of initial force to yield force 0 = profile function defining the shape of the force pulse d = ratio of pulse duration to period of system ''= ratio of time to period of system and dots denote differentiation with respect to V. In this problem, r = if 0 1 - 1 if ~ > 1 = cos (-r/Z2d) if 0 < T $ d,O = 0 if d The spectrum curves are plots of m vs d, for selected values of C-. Because the driving force decreases monotonically (characteristic of blast problems) the displacement will never exceed its first maximum. Hence the solution for one particular combination of parameters is obtained as soon as the velocity reaches zero. Also, if T exceeds d and at the same time c exceeds 1, the maximum displacement may be expressed as an explicit function of the displacement and velocity at that instant. A flow diagram for this problem (Exhibit 8) was outlined in class lectures, but the details were left to the students. The instructor's program is shown in Exhibit 9, and typical student programs in Exhibit 10. To nail down the concept of a spectrum and its use, the students were required to plot the spectrum curves and to use them in a later problem. On the first problem, which was submitted to the machine only once, two of the six student prorams were successful. On the second problem four of the seven programs finally produced valid results. The number of machine runs per program ranged from 2 to 5, with an average of 3. 7; and the machine time per program (total for all runs) ranged from 2. 8 minutes to 22. 1 minutes, with an average of 8.1 minutes. E-208

Example Problem No. 10 EXHIBITS 1 Class handout for numerical methods 2 Flow diagram for class example 3 Program for class example 4 First home problem, manual and machine versions 5 Flow diagram for first home problem 6 Student programs for first home problem7 Second home problem 8 Flow diagram for second home problem 9 Instructor's program for second home problem 10 Student programs for second home problem Numerical Integration - Examples Exhibit 1 w f() A A /^\ ^ w 193 kips -3 vat) vk = 20 kips/inch / I w 2. -1 M =-= 0.5 kip sec in #0 RF $o*\) = = 6.324 sec f(t) =40 (1-2t), 0 < <.5 R(x) = 20x ________ \ x^~ =1- f (t) -R(x) Constant Acceleration Method (Euler) 2 x x +hx + -h x x = x +hx n+l n n 2 n n+1 n n t h x x f R (f-R) x 0 0 0 40 0 40 80.1. 1.400 8. 00 32 8 24 48.2.1 1.440 12.80 24 28.8 -4.8 -9.6.3.1 2.672 11.84 16 53.44 -37.44 -74.88.4.1 3.482 4.35 8 69.64 -61.64 -123.28.5.1 3.301 -7.98 0 E-209

Response Spectrum for Elasto-Plastic Structure 2 n+l n n + 6 (2Xn +x a V* V 0h we x x+x Linear Acceleration Method (Numerov, Fox, Newmark) n+1 n 2 n n+I t h f R* (f-R*) x x R x 0 0 40 0 40 80 0 0 0. 1. 1 32 10 22 44.340 6.8 6.8 25.2 50.4.351 7.0 7.0 25.0 50.0.350 7.0 6.50.2.1 24 24 0 0 1. 167 23.3 23.4 +0.6 +1.2 1. 169 23.4 9.06.3.1 16 50 -34 -68. 0 1.966 39.3 40 -24 -48.0 1.999 40.0 6.72.4.1 8 45 -37 -74.0 2. 388 47.7 47.6 -39.6 -79.2 2.379 47.6 +0.36.5.1 0 45 -45.0 -90.0 2. 001 40.0 0 40.2 -40.2 -80.4 2.017 40.3 -7.62 Adams - Stormer Method x 2 -x +h x n+1 n n-1 n t h x f R (f-R) x 0 0 40 0 40 80 1.1.35* 32 7 25 50 _2.1 1.20 24 24 0 0.3.1 2.05 16 41 -25 -50.4.1 2.40 8 48 -40 -80 5.1 1.95 0 39 - -78 *Taken from previous solution. E-210

Example Problem No. 10 Comparison of Results t Const. Accel. Lin. Accel. Adarr-Stormer Exact 0 0 0 0 0.1.40.35.35.36.2 1.44 1.17 1.20 1.20.3 2.67 2.00 2.05 2.04.4 3.48 2.38 2.40 2,40.5 3.30 2.02 1.95 1.99 Exact Soln: x = 2 ( 1-2t - cos 6.324 t + 0.3163 sin 6.324 t) Flow diagram for computer solution of vibration problem by constant acceleration method, Spring and mass system, undamped, weight = W spring constant = k Initial peak triangle force pulse, initial force = p0 duration of pulse = t Time interval for numerical integration = h Carry out solution to time t max FLOW DIAGRAM.. -,- A 30E-RC fSh<r) E ~ RN > t T04 X- ~ E-211

Response Spectrum for Elasto-Plastic Structure MAD PROGRAM Exhibit 3 * COMPILE MAD, EXECUTE R R C. E. 231 PROBLEM R RESPONSE OF SPRING AND MASS SYSTEM R INITIAL PEAK TRIANGLE PULSE R INTEGER N,PRNT START READ FORMAT INPUT, WK,PO,TOH,TMAX,PRNT PRINT FORMAT HEAD, W,K,PO,TO,H,TMAX M = W/386. T = 0. X = 0. V = 0..N= -...- - _._. _....._._ _._ _...__.._._ _._._ _._._ _._.._ LOOP F = 0. WHENEVER T.L.TO,F=PO*(1,-T/TO)' R = K*X A = (F-R)/M WHENEVER N.E.PRNT*(N/PRNT),PRINT FORMAT OUTPUT,T,XV,AF,R N = N+l WHENEVER T.G.TMAXTRANSFER TO START X = ((A/2.)*H+V)*H+X V = A*H+V T = T+H TRANSFER TO LOOP VECTOR VAL-UES — - INP-UT-= -.-.$-6-FI —0.6~ -,I2 —$ - VECTORVALUES HEAD=$89HlRESPONSE OF LINEAR SYSTEM TO INITIAL P 1EAK TRIANGLE PULSE BY CONSTANT ACCELERATION METHOD//S2.4HW = 2F9.4,S3,4HK = F9.4,S895HPO = F9.4,S3,5HTO = F8.4,S8,4HH = F7. 35,S3,7HTMAX = F8.5//S13,lHTS1'9,1HXS19,1HVS1"9,1HAS19,1HFS19, 41HR*$ VECTOR VALUES OUTPUT —=-$-6F-2-O -$ END OF PROGRAM *DATA 193. 20. 40..5.05 1. 1 193. 20. 40..5.01 1. 5 193. 20. 40..5.001 1. 50 193. 20. 40..5.TO — 1.5-0-0 -E-212

Example Problem No. 10 |II~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC0 C CCCF0o ) F-0C. C co C' a - -C;C C) C) > 04 COC C-C C: O CoCo F-C C) o Rio, 10~F F- 0o co 04 C. -: Co. c- CoC Co 0:C.). CD 0 00 FO C-F- C cODo ~'-,-:0,40 Co" C O N IO — I C)4 LoC C4) C-, Co ) " -'4- -1',o"10 — ) C: CO: C o 0 C.); 0 1 ~., M4 f- C< "0100 r-: c co; r- ox I0C iC) C o 0 C.-. co Co I0 Co Co: ~ C0 o c' O i a) o 0 10oix i I,, cx O0 |0 i.. ~j xO Ox jh, 00.1 O~ 0:,0 c), Oc.) r-I C~j 0% C<),,.J cql;I-Co CoO 'o o') O ) -'-. c')o -4 C) 0D 4- Co ) F-iJ F-'O, CD C- C.- CoCj- F-1 C o4 \ Co C-!40 C-.Co.- 10 4,10-1CC10JCo Co o *.0 I * *.* * ) t M *. -.....! ~ 0 oM -(n I' C)Ll nM i i^ -- CO;N — I Co! a191..o o0 o o 00. o o 0 C) - C1o C- C- 4CO C-V- Co Co 4-1010 CoM MC Co F- 0 C-n 10 I 4CC- C) COF I C I C COO) I F- 0C I ~: w, InF Co IoC I in M. N N, I I I I I i i ^! i i i i i i! i i ~ i: i; i; i I'Oo|o]S^^S^^ S^ " ' i;^S!^^~^ ^ C)~~~~~~~~~~~~~~~~~~~~~~~~~~~~) C.) 0 0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ F-~ C)-C) C) CI0 00C F —);, -.4[ 0: D) 0; 0c.- - C) o:C) F- 0 CD C), C) 0 F Co 0o 4 )4 1.0)CCD C' C C) ICo o0 co0 0 0 O 0 0 C)C iC0(I O OC C) (D.0 0 0 0!-0 C) C C) 0 01C) C.) CD 0_, CD! 0 0 0 0CC C) 010 c) ~~~~~~~0,0 0; O,C) C):00 C) C)l 10 0!0 c') I ) 0 C) C oIooolOoooooods ooo.lo^Soi|oioo '1 |^ 2S^^ I^ (Di C)C)CC)~C)C):CC)~C)C)C )0C (C)D0 0 0 O:0C) 01 C))) C)O'O' 0 00(.C) 0 0 00 0 ~~ C) 0 c 01 C- ) I0;c)) C)1:C-) c) C. 0 0 0C)C 0/ C-!C) C).00 Qi C) C) 00.0 0.) C-_ C1 C —01C, ) 1000 C) 0. oC eoooel ooo.o a ~g1 soooooo oo,^j c o c O 4 0Co() 0oI C ) 0C ): 0 0CC C) 0 C)0 I C) Co Co I(D 0 C) 0 '0o C )C C 4 0 ('00 C C),; 4 Co i C Co Co CoIC- F- o o 4o o o o0 O CoF-C 4 o oo o C, o, oo |1~I 1"~~~~~ o i t o~ i oI Io oI.. o C '|( I I I ( C1 I 0 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~~~~~~~~0 C) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 1 SII~~~~~~~~~~I N C..D C,. "-11 o o o o 1 CD — I co c^j -,:J LO I o CD 0 - ( (;\I:~~~~~~~~~~~~~~~~~ M r )"NO, c:~ i '! Dc)C-) F-) CO CI- o 10)L C) 0-' (\J~ C%),!Mcj —1-) U - C f), - (-,J 44) C —,LD a 1, -r - co! CC) Co ) (- Co ', co1 F o - 10.C Co L -LC0 Co z co~~~~ ~ ~ D: i i;r C)C D '-E'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0) 1L ".( 1 190 C o 0 0coC-1Co 10 CD o Co- Co C - z|oo C-M ' C0 o-o1 C' 10r CO Co Co Co CO C) C Co1 c - CO CO* C- C) CoF Co' 4 Co C?0410~~~~~10C-!C)C- OC- Co CCF-~~~~~~~~~ OC-CDC) (N F -JCoI0Ct - n CC) -OCC(). i-Ct -C-CCL L -— C (Th1F 'D |9 0oC) 0 CO Co14 Col~o Co C- 4C- C- 10 Co CO 01-) -zi- 0 Co CC' 19c ^ CO-o 1C - 10! C o F-'0 Co1!4 F- 10)0 1- C-a I- Co a'C) Li1 19 0-~~~~~~~C) c- 10 CO\C Mo~ 1,0 C't- F-t 0-C1oC -! - ICF C -C -C - -4C oC 0C 4 Co, I 6... *l. a *. -, * O.l i 0 0 I LIC-) cO C C Co 10 o0o 10 F-I CNi - Co 1C- CIF- F- C C Co Co Co\o Co I- C) COCo 10' t F- C C Co r-f 4' CO1 CZ') Co r C "J C -j \ C-1F C- c co: Co 191 C. CC r COoC1 iC) C) C-4 r ooc-or44IC) c CCo14 Co IfCo. C- LI) Co IO I I'C\, COC: ' M'", 2o~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LLJ": r-~ '''^g..l ~i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~i FFF I -- -F 1,1 Ii' 'F-F-I (D I -J~~~~h" 0 0 0 C. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0^ ^; ^ ~ ^ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Or-i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0c ~ Lq0:0 0 0 ' 0 0 010 D;0; 0:cc) i I 1\ IM 0~~~~~~~~~~~~~ (-)~o^~ 1)~ ~~~~~~~~ I.. oic) 0, C -4 F- Co C-10 Co C- C'i( c o 4 ) - O. - ' 0 Co C C C F- F-C))i r ---1 0' roC C- F- C, CC) C) C),.I010 <.4C-'0C-4Co04I".ONCO4FCC oC- L i C)C-4c) I — F-i rjCOF, - 'C C C 00 C.0 CO Co o Co Co C- - CO CO.CO i Co Co Co I" - 0 J C:-' i — C'. Z — ' CD "" "- ' " C) " - ' " " ~ cr o F- Co (\IF-C M'" C C I: LJ[ I C-) 01 C C C- Co (01 1 CO o oC)C M ON Co CI Co0 >C) c *~ * ~1. * *.1 * 01 0 *O'000 0...1 -IL( IC)I 1M111, (,\JoI 1 Il \l '(I. - \ o O I, oI ' CD0 tG \1 71 O nL, O0,GMC)C t 1 (7 < Co F-0 F-N \.D )(DC CO Coif 10" C- C 0FY OC 0 o4 C O C:;0zCi 0 o 41 0 -'1 4C)O <CC F 0 Co! 000 0-C Co~oC 0 CoL!- CoM 4Co4 Co 1010 F- 0 tCL ) 0 Co, CONC 10 190' C-,t C-F -JC- 4,D 4 Co Co) o -C 19 0010 10-Co CoF- F-1 0 Co Co 1010 '0-4 1-10 c)-F- (10 0; CC-Co C')C) C) C- 0 0 Co CCI Co tO 0CCo)C- Co CO CO Co F i 0:g L I" ",1-. - O'", 0~ ~1,.O, J-I I" I- ~ ~ 0 0 0 0 F- 0 F- C)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-!~',:J ~ C ' 0t!I'",Jr.I. l ~ F 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~10 Cd; Co IC Co I ~~C)o C)~~~~~~ I)C —, - CC ')I QC)OOOOOOC)OOC)0000000'CC)C) ~~~~~~~~~~~~~~~~~~~~~~~~~CC OC) t 00M Ik0000000 C)00000 L) - 0 C)0 I0000000000000 0000 MCI) O00)00000000000000C) 19; 0I[F —* 0O * * * * * 0 * * * 0 0 *.19 0 F- 0 C 0 0 0 C: \D L I(. 0 OC)OOOC)C)000000C)000000F-F- 0 ooooOOOOC)OOOOOOOOOOOF-~~~~~~~~~~~~~~~) N 0, M C)Cf 0C 'D- 0 ) ',C\ 0,11 0l IL C)l. Co aI Co U) F- LI) F-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~C )I ~i.~~~~~~~~~~( 0: -1 1 c\ \ \ -.r 0 C,'1( J ccl(, _ _ r(J J i I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~IC -_(DC 0i-4 -4 C\ N \)'(J C 0 ~~~~~~~~~~~~~~~~~~~~0: CD (D 0 C9 C)):; I.~ r0 L 0000 00 C)0 C. kO'- 003 0. C)0 C)~ P- t"D, r-i cI'~. C),J <J'-0 0.400 0 C~.. O_. ~ ~ ~ ~ ~ ~ ~ - C)N C On 0 L C))i ~" u-..'L' C-)J LO ~' LI)cO c1 Ch, LD~ -~ t-h O LO/,... LO in C) LO (D Lf. 0 LO CD n (D ~ _oO..1 ax CO f'- CD — r — I'- -.J C.-i~~ C) Cq tni'-, -- 04') O O C ~:L 0 0 0 L~'0'.0 0' L 0.d *,0; cO -. O -Jd C')., ~L~,- (D C). -4O",I"-f —d ' '"'OO'" qO.O,~Of —hOO, <.'OO',Dki~~C' ' ' ( LLJ ON~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, J.O.o 0,o 4 c'" i O -i~1CO '/C od""0, C LIC ~. " 4)c D'.''/~I ~: OO0%h '. " -t~.',4 )~0 E~~~~~~~~~~~~~~~~~~~ i4O.,-213x ti

Response Spectrum for Elasto-Plastic Structure O o 0. nr- L(.n' (n I e CO ' O'N Co CO CO,-4 -r-,O.,j- (IN CO (n O o CO ) CO eI ( \I 'si( r,- - 4(\J,-i - <4"- (N-Ci' (N- oO L<n co \.O 4:,0 C (NJ r — r — OCO O c 0 \ C Co r —4.-o, -, - -J- In, It o 0-,- C, o r-i C -1- N 0 ( O o \O D co,,o D 0C, I- N C-) f.CO,,- - M IC- O O n '- I'"- C") I 4', J e, o N ' n 0', O'.,t C O (MJ CeJON. C O o, Co ',0\ (-,.O CN: %0 (- C) IN \o -i \ (N o ' i.0,:- 0,O C(M ( J i' LS CO ON 0.O: CO e; < O; e ri-i, (NO CM"!T, O o i — N or- Ini-I- r-lo if)N CO C,) Co CO CO C c) In In O -0 -4 o -4- r- (\J r- (N r-NI (N-' t i -A CO; in i-n\ r-4 Lo|O C N 0CO N^ (\I Co C-4'C O N -M I — r(- CO ) o(r- r(- -i CO o CO 0 CO N CO C o o -o ON- O.)0 C O' CO Cn-CO (N-C i0 (NJ 0.( * 0 0 e ~ *e *~ ~ ~ 0 ~ o e 0 O o 0 o 0 0 * *e ' ~ ~ o o o 01 O,'-.i'- t CO, -0,0 CO,.0 CO CO',,0,-4 Cn,.O'1' — CO (N —,0 CO '0, —.4 r --.4- 4n Co,, L, C 0 "'M COC CO- '-4 N CO- 4-" CO " 0.\ i O. ' 0: '.: C Lo i i - Lin Ci4 4 44 CO N: q (NJ CO 4 4 4 CO: N C 4 i('I;TI " O l4r CO o- - i j o c M - ( M, ~~ ~ ~ ~~~ *: O, 'i:; * i 0~~~~~~~~~~~~ ' i!~~~~~~~~~~~~~O rio o e Io Ln (M co Ln C, 0',4 o o o. o o_ OoCoo:o, —i ' o ') \ o o, 0\'.,4: o4 o ci O cc O, O.: o O o O O C)o00ICOCO C LNoCONOCC)0000C) CDC) o-, C O CO.ooJ oooo o C.)oooo C) o o o o ci ' o o o: o o oo0 o! o o o Co o o ' 0 0 0 01 0D C, 0 0 0 C. 0 C) C, 0: 0 0 C) 0, 0 0, 0 I i:0 O O1 OO O O; O- 6-| ~ C)<-0 J 0000o 0 0o 0000 00 0O C)O C)0 0 C 0 0 0 C 0)j 0 0 0 0 0 000 C0000 0)00CC 0 0 0 C) 00 0 0 C.)0000,O-0- O0 0I D0 0 0 0000 00 C) C),C)Co0l c) CD ).oO)C)O)(D C)00 0O C),00C) C) 00C)1 0 000 0 0 0 0 00 C)C~~~0C-IC)C~~~C)C) C~~~00O000C~C) 0:0 0 oC C)0)00000 0Cl 0(0I00OC)O l <: Oooo~c C)O~iD O00C) 000;C)0 >C 000 X C 0 0 0 0 -C). 0 0 00 0 0 00 00 0 ' * 1 0 0 0 C Oi 0 0 0 0 0 0 0 0 <| j < LL >^\;0 <0 (M CO-.4- 0;v~~~~~~~~~0 CJ00 J-0 O' 0 0 4 0 iO 0: 10 0.0:: 0( 0<:v \'O<*0 0 00 hi j <j en en. C)|~ ~;ri<!! *:i - <j n e ~jj(!r<ri I" J c I *: I C C Q: C) 0 O j. '. *.: 0 0. -;:!; I i! C) (~C) O O, ~ ~ ~ ~ ~ O:C C'O L ~ i ~~i -IC C)l (N '.0-JOi-,:0N —4:Q.NC (N- N'- ~CK.1O N0- CO-i COY ~ -i'(.Nj J ~1C.~~C ~OC ~..'-== Lo,n'CO -c COC 'co - - Oj - - (,r c, o, o Co Ji,-i, —,: —.) C) COCO CO Co 0-i,C- - ( i.i ~3 -!; ' *; H ' 0;,I.:;. 0CD NIO i.- Cit)CO 4 O:-! -O C COJ( N'r _:-10 ON N O)1 C) CO-,C COr P - ON 0; ON-I) '( - C) CO ' CO N(C)(\- N L ICO C iC C) I It 0 O, ( \c' -; - * * ' I.. C CO-C C O C C r N 0 0 C0: 'o O C 0 O C; C O COC O Coe C.O i(n r- CO. C o c "I' a). ori o (\J; r-, -t <iC| r-: 4 r-i If) r 0! io;; r r- CO o -i!. N O (N C - ON iii II 0 CLC C\; 00 \,i r-CO C O- a U. c uQoo <j c O'i i ' I ' o 0' q) M, 0) (IC) IS 01 CD ~ 0, IC) - C\I' c) (\J I-, 0C) ' -`K0Li O\ i DC) 1 o O.!CO ON CO 0 N~~(NJ CO (NJ C~~iNJCO CO CO CO N N1CO, — COL-4 c',.J! O OCO 4i'4'(N-iCO L-iC CO CO,JNrq - r --- LN 4 LI - ' o C.O: -..'<j.- i r-o - - - C ) 0-i N CO CO C: 0 (N ( CO (N 0 C — C O o CO 00) iON C-o o. lN r-i C t= C -Jo r- e _.-I0 Ni '.0 o (N —, (0 (COi o COI coC j (N0 -1' N-0... 4 N i4 en CO 0U. <J 00 00 00 0 0 0 0 0 o *l * 0 o ~~ * *i * 0. * * ~; o 9L ~ 1 - *-i0 @0 * ~** 0o00 0 0. L0 o1. 01 $ C) C) Ioi-o'.r-iecii oN MI C C ) -eCO- in o - Co 0C'.oCco! oCCOO0- -II (o oNi-')n CrO o^) in-4I co <* ~~~~~I C)i~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~, * - C C) I I' ~ ~ I -I '- 0 ) i!!:! I I I! '.. 0. i. |.!! i,-: I, LU^| 0;.~~~~~~~ i * i: *I:;J 0 i. C:,,i: C C C -i -i. iC0 0C 0 -- C C'ii 0 i O O CO C iN- N 0 - 0(-~'N -i O o!I { j O! I.NM i d- O C) C 0)4COONCi,-iiNCOO'CONCO~h-C'(N- oD-40 LO e! oo 'ol-r-4-(* n-r CC OO-i 0- en:)i 0 CO! o COCO ~ o o - i; - l N CO - o O ' C- e in C C C- CLO N o C - (N -C N i - C (Nj 1o C O nl( C LNIoO' ( r N c,o CO c r LIr o (\ -O -ON o ',.o: o-(C — co - O - 0/) 0 0>- 1- 0n 0' 0i- en 0n 0. 0o o; 0o 0\1 0^ 0o 0J 4- 0~ 0 co >( 0 o en 0 0- s0 0i o en 0 04 0D 0 0^ 0n 0'- oo 0n 0- 0n 0 C-i o i C-)-:' J o!I!! i t:): * *: * 0~ ~~~~~~~~ ~ ~~~~~~~ ~ ~~~~..; O 0 C) < o-;/: o: 0 < <)-* * < <t-^ ' ',.; * *!! i'! ---': - i.~ i-,. ': J: I — i.,- ''n.'' ';: j '; * ~- I F-!V)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~f < o~ ~ ~ ~~~~.. o:! CC) Ci) Ii Cj ii))COOCOOCON))OOO((-(-. 0000OO —C a-OO(-4-CC 1-^.1 CNJ,, O ', (\J CO j CT, o \J > XJ Mn in o TO o e n o i <-J en c IC) c c r^- 't <i\ o o. o; -i a niO i-,; I o C <t n ) ',- co' 0C!,0.n: <,- LO e\ LO! 0"I.'; h- a' ' Qo o 0o (NJ r-. ":- i1 a 0) cIt o N, J.C, Uc'j o~'< o: If" Ix n Goe-, <'.o -.o c ne " ON- \ x^ C. -. 0 1o ft (NO) C) r- (NJ (MJ o^< C 1\~~ j'. r- en CO G~o Nr-i j-D It 0,J o if", r-, ol,<. 0 r- r- e1". c r — ^o o~ j n '.o o r — 0 o r- U),O 0 j o n I c r ie,: ~-i' n ~-i n (M 'o a Lr) - 4 LIo M i J.' o-, n',,-, o.:N-. o e, C\J C.0 n,:n,-in.! \o:,,,- o, o o oo en oC <t t- I^,n.., -,I'N > 0 0 00 *- *oo | Q M 0 0 9 0 0 0 0 00 0 000 0 0 000! 0 Ii~~~~~~~~~~~~~I I-! 'C),0; LL:: C' CCC re' o o o' i M < 4-'<:'ii '*'' N^ 0 0 0 0 ~ 0 ) C 0 % -T' O.'1 0^~ C) 0 W C) 0 C. GN (C) ON LO 010^ 0,O 0C (\J WI (,c0 0 ON 0 O C.) CT -i 00 00 (,\J; r — r^~ r —i ls0 CD,-... 0 0 C 0 0 0 0, —0. O D 0! 0, (a 0i 0 I — I —: t i:' '~~~~~~~~OC.) — ()( — IIrl Do) - i) - o \ o n q) r:,O L!a) -i4 )\' I''oI L o C o in o in CP LO o O r- o'~ Ui o^ <f O J U) o In o.n 0 Ln In -i c o < — N 6 o. <- r- <tN or,, o.N t~l Q 0 01 \.n Wi 01 IM (M en -I O"n en M?* ON' mi CCn (C) L(\ r"- O " 0< 0'- ~ o 0 \ o Id —1 C-, CM 'M e. e. Os O! L.\ i Po: (,J r.- co r- - c. o- O (; M''' C):C (X' C '- ~ O N 4x 0'" C) 00 (C) 0 CJ I' M1 O- C) 02 "-.,- M f/ C ' (N O" I~~ t. ',4)." 0'C~:,, M L~ C\ r-4,, 0', ON (: C.' -- C' - ( \"I N"-[- '' C\ \J" " kO 0%f '- ' (\' C~J"" J aC\ ) C\ r O CF' C) C)O r (\J,-' (",' N (\J J"- A 'O k'~ "'!l C)'0.')4 - (\J ", 'r —I 00 0 0 0 0 0 0 0 000 0 0 0 0 0 0 0 0 0 0 0 C- Cll 0. c~-0-i C'..' O '.O t'~ C-' I -C)",. ---0 21O 04 ', OC, t \ O" O4 C) 0: " O '. O C ON 0. O C O C)" r-Cql",O (D C:, (.' C)" 0 '- C) ~" -`\ O<' ON., ON ON ON (,' Or\ ON (TNON O"'C', \ C) O C) 1" O,,4: ON C'\ O\ 04GN C\ON " ON kON ~ CO OJ GIN C', O', "-'C.) (-h C h) Lr.0 (%C)I %-Z- O —,IQ O,. O t )In C) L' C)......N. GNd O z O z- '- Zj-a -J~~ ~ ~~~~~~~~~~", rl0 O a O,... f — Od O". Oq O ~-, O O O.',- O,' O O,, I-..4 - O. Ji 0 (' ~'e 00* n-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i C)L 1 00O OLC O OOO. 0,0,0,0%%0% %%0,!' C~OO O OOOO ' " '. 0", O,' '0,O,0"0 ', f1CL- ' C)L"".OL. ("lOI. /.'0%,~ 0 ",.~ 0 ~0" '",Ot"~C" [" O ~(]' ~(. "~ ~0/E0%",:J '2 ",4'O

Example Problem No. 10 117-dSy*=. / sec Problem No 9 eh,: 1f c. Prbc ss j on y r \ /rvcta/ ih d c'e s rc-, j* Exhibit 4 ( manual ) Problem No. 9, due March 11 Find the maximum displacement of the following system numerically, using the linear acceleration method. f Weight = 5, 000 lbs. //. W've Driving force \ 0.25' sec Restoring force (elasto-plastic) R Initial velocity = 0. Initial displacement = 0. Xy 1.oo;n X E-Z15

Response Spectrum for Elasto-Spastic Structure Exhibit 4 (machine) Problem No. 10. Write a MAD program for solving Problem 9 on the computer. Submit the complete card deck, including identification cards, specification cards, instructions, and data, ready to run, not later than the lecture hour March 25. If you wish to submit the card deck by March 21, I will edit it and return it for correction on March 23. It may stand a better chance of getting through the machine that way. You may work in pairs if you wish, and full credit will be given. Let me know by March 18 which persons plan to work together. Blank cards may be purchased at the computing center. Suggestions for solving the problem 1. Due to the nature of the driving force and restoring force in this problem, the displacement will reach its all-time maximum the first time the velocity goes to zero. (This is characteristic of blast problems.) Thus a simple test is available for determining when we have the solution. 2. The square root and cosine functions are built-in functions in MAD, and "absolute value" is one of the operations of the language. The instruction FORCE = COS. (PHI) would cause the machine to evaluate the cosine of PHI and assign this value to the variable FORCE. PERIOD = SQRT. (A/B) would cause the machine to evaluate A/B, take its square root, and assign the result to the variable PERIOD. X =.ABS. (C-D) would cause the machine to evaluate C-D, and assign its magnitude to the variable X. 3. Let the machine select its own interval of integration, say 1/20 of the period of the system or 1/20 of the duration of the pulse, whichever is less. 4. Have the machine read the controlling parameters from a data card. Have it print the input data and tabulate values of time, displacement, velocity, acceleration, driving force, andresistance force. 5. Save the program when you are done. It will probably be used again for a later problem, perhaps with some modification. E-216

Example Problem No. 10 Exhibit 5 ONE OF MANY POSSIBLE FLOW DIAGRAMS FOR PROB. 10 This is only a rough outline. You will have to fill in many of the details. Remember that there are many ways to program the problem. W'A"U- EA |,t., A l T I1w --- t,-i [ I = -A e < X= LATX - hv A h 0 LA STA -TTRYA =A) A x- LA+T X 4 h.V ' - (2.-LSTA 'TEYA)

Response Spectrum for Elasto-Plastic Structure MAD PROGRAM Exhibit 6 RAFI HARIRI XO1HN 1 002 002 I /2 000 * ('UMP-IL MAD.9 EXECUIl E - ( R) C. E. 231 PROBLEM STARJT vREAD FORM'AF INPUT'W XYQYPOUTO PRINT FORMAT HEADW.XY,QYPO,TO M = W.'/ 386. T=O. _________ V=0* _ ___Unsaccessful Compilation 3/2:/60 R=0. A=PO/M K=250. ' — F1:e ~41 4 15. HO=2.*PHI*SQRT. (W/386.*K) CjAMMA PRINI FORMAI OUTPUI, Ti X, V, A, Ft R H=T/20. WHENEVER H.G'.HUO H=HO T=T+H WHENELVR V.LE.O.AND*.TLG.O TIRANSFLR TU STARIK LASTA=A -- RYA=A --- LASTX=X BE I A- X- A STX+H*V+( H*H/6-*-Z-LAS IT A+ I RYA ) F=PO.*COS. (2.*PHI*T) WHENEVER T.;G.*TO.F=0.-O R=QY*X W H E N E VER —X4"-G- X Y R YA= (E-R)/M - -- -WH VE.A.-TRYA -A).L. i -6.) RANSfER IO All TRYA=A I.ANSF-L.R U BElA AII V=V+H*(LASTA+A)/2. TRANSFER T 0 GAMMA... —'-'- ''' -' '' VECTOR VALUES INPUT=$5F10.4*$ VCITOK VALUES HEAD=$S2,4HW = F9.4,S5t5HXY = F94+,55,5HUY = F9 -1.4,S595HPO = F9.4,S5,5HTO = F9.4//S13,1HTS1991HS19tlHVS1991H 1AS19 iiFS 'I, i9 id*$ VECTOR VALUES OUTPUT=$6F15.5*$ END) OF PROGRAM * DATA ' 5 2500000 1000050000 00 2500 E-218

Example Problem No. 10 Exhibit 6 (continued) MAD PROGRAM M.S.THOMAS X01MN 1 002 002 001 2 000 * COMPILE MAU,' 'EXECUTE, UUM — START READ FORMAT INPUT, W,H,TOFOXORONMAX TTC 1 P R I N T...FO-R MA'T —T I-TL E — W i-HT-O,-FOX RO U - C 2 ' M = W / 386. TTC 3 -A - [ - — _ _..... O-' -.......................................... V=O TTC 5 x=OQ -T-C 6 -R=O TTC 7 T —=O7-......................................................... - TIC 8L - THROUGH LOOP, FOR N=0, 1, V.L. 0.0.OR. N.G. NMAX TTC 9 WHENEVE R —" ---.T O.. T C 1.T I [ - F = FO * COS.(x.28318*T*(.5/TO) ); 0 IH EWIS 5 I T Cl1 F=O0 TTC13 END OF CONDTT-ONAL -- TTC14 NEXTA = ( F-R)/M _TTC15 NEXTX= —X+(H-*V) -+( ( H. P-.2)-*( 2. — *A + NEXTA) )/6. TTG16 WHENEVER NEXTX.L. XO. TTC17 U = RU*NEXIX/XU OTHERWISE TTC19 -' RO..................................-...................... TTC20 END OF CONDITIONAL TTC21 -WHENEVER.ABS. (R-Q).G..o00I,-TR-AN-SFER -TO —LOOP ' TC22.. V=V + ( H*(A+NEXTA))/2. TTC23 PRINT UORMAI RELSULT, [T,F,R,AV,X TTC24 T=T+H TTC25 -_ --- —-_..__- -— A^NE XTA...........T.TC26 X=NEXTX. TTC27 LOOR --- —= --- —-- = —.Q - --- - -_ —.- TTC28 TRANSFER TO START VLCTIOR VALUL5 INPUT=$ 6F10.4, 110 *$ TTC29 INTEGER NNMAX _ TTC30.-. --- — ---—... —...-VECTOR VALUES T I TLE=$ lHl, SITO- 27H- LINEARACCIELERiATION METHOT TC3O0 1D // 4H W = FlO.4, S4, 3HH = F10.4, S4, 4HTO = F10.4 // - ----- 2. -Z5H- FO= F10.4, 54, 4HXO= F10.4, 4,'4H-ROHR'O — V4 — 1V/ — TTC32 39H4 T, Sll, 1HF~ S11, 1HR, Sll 1HA, S1', 1HV, Sll5 TTC33 ~ - --------- 41HX *$ T TC34 VECTOR VALUES RESULT =$ 6F12.4 *$ TTC35.. — -END-.- OF PROGRAM.... ---- -. TTC36 * DATA 50. 500 -.. 201 25 500. 1. 250. 1000 Ran OK 3/25 but gave wrong aniwers. Equation for F incorrect. E-219

Response Spectrum for Elasto-Plastic Structure Exhibit 7 Problem No. 12 (Computer Problem No. 2) Due April 22 Construct a set of displacement spectrum curves for an elasto-plastic system responding to a quarter cosine wave pulse. For the equation 2-2 ~ + r = 0T( d-) where r = ~, 0 <, ~ 1 r = 1, > 1 and = os -1r, 0 $ T d 2d the spectrum should show plots of max vs d the spectrum should show plots of ~max vs d for selected values of 0-. Both max and d should be on logarithmic scales, d ranging from. 1 to 10 and ~ max ranging from. 1 to 100. Plot curves for 0- =.5, 1, 2, 5, 10. Programming suggestions: (1) Have the machine read values of <R and d as input data. Use enough values of d to plot the curves conveniently, spacing them about equidistant along the d scale. (2) The integration can be terminated as soon as e becomes zero or negative. If both the end of the pulse and the plastic range are reached before g reaches zero, ' max can be evaluated explicitly from conditions at that time. This will reduce machine time. (3) If ( goes beyond the range of the chart by a substantial amount (it may do so when a- and d are both large) the integration may be discontinued, since the result will be too large to plot. Reference: See "Structural Design for Dynamic Loads", by Norris et al, pp. 143 and 144, for comparable spectrum plots. E-220

Example Problem No. 10 FL/W LALSAAM eRe CoMrwnee Peo~,t 4Ala. 2 (>o zgszt,/A CLAm- LOcruel) srAer T A/ 7 i

Response Spectrum for Elasto-Plastic Structure Exhibit 9 MAD PROGRAM G V BERG XU2-N 004 004 000 * COMPILE MAD, EXECUTE, DUMP R RESPONSE SPECTRUM, ELASTO-PLASTIC SYSTEM, R EPSLN = 1.E-7 READ FORMAT IN, NP, ND, BIGX READ FORMAT INPUT, D(1)...D(ND) READ FORMAT INPUT, P(1)...P(NP) VECTOR VALUES IN = $2I5,F10.0*$ VECTOR VALUES INPUT = $12F6.2*$ DIMENSION P(48), D(12) INTEGER NP, ND, I, J, K PRINT FORMAT HEAD, D(1).*.D(ND) R THROUGH DELTA, FOR I=l,l, I.G.NP THROUGH ALPHA, FOR J=11l, J.G.ND H = D(J)/20. WHENEVER H.G..02, H=.02 X = 0. V = 0. OLDD2X = 0. D2X = 0. R INTERNAL FUNCTION (FORCE, TIME, DISPL) ENTRY TO ACC. RESIST = 1. WHENEVER DISPL.L.1., RESIST = DISPL ACCEL = (F.(FORCETIME)-RESIST)*39.478418.FUNCTION RETURN ACCEL__ END OF FUNCTION R ___ A2 = ACC.(P(I)J0.,0.) THROUGH BETA, FOR T=H,H,V.LE.0..AND.T.G.H A = A2 DlX = H*V K = 0 R GAMMA D2X = (A+A+A2)*H*H/6. WHENEVER K.GE.2C PRINT FORMAT DIVERG, T,X,V VECTOR VALUES DIVERG=$19HOITERATION DIVERGES,3F10.6*$ EXECUTE SYSTEM. OR WHENEVER.ABS.(D2X-OLDD2X).G.EPSLN.OR.K.E. _ _ OLDD2X = D2X A2 = ACC.(P(I),T/D(J),X+D1X+D2X) K = K+1 TRANSFER TO GAMMA END OF CONDITIONAL R X = X+D1X+D2X V = \/+.5*H*(A+A) WHENEVER T.G.D(J).AND.X.G.1. XMAX(J) = X+.5*V*V/39.478418._ TMAX(J) = T+V/39.478418 TRANSFFR TO Al PHA OR WHENEVER X.G.BIGX -TRANSFER TO K T P. END OF CONDITIONAL E-222

Example Problem No. 10 MAD PROGRAM (continued) BETA PCONTINUE- -- DIMENSION XMAX(12),TMAX(12) XMAX(J) = X TMAX(J) = T-H ALPHA CONTINUE SKIP PRINT FORMAT ANSlP(I) XMAX(1)...XMAX(J-1) DELTA PRINT FORMAT ANS2,TMAX(1)...TMAX(J-l) VECTOR VALUES ANSI = $1HO,F5.2,2H XF11.3,11F9.3*$ VECTOR VALUES ANS2 = $S7,1HTF11.3,11F9.3*$ VECTOR VALUES HEAD = $1H1S43,32HELASTO-PLASTIC RESPONSE SPECT 1RUtM/8HOPO/QMAXS44,15HDURATION/PERTOD/1HOS9,12F9.3*$ END OF PROGRAM * COMPII E MADQ R QUARTER COSINE WAVE PULSE ___________________________________R B_________Shape of forge pulse defined EXTERNAL FUNCTION (FORCETIME) FNTRY TO.. in an external fiction to permit WHENEVER TIME.L.I. LOAD = FORCE*COS.(1.5707963*TIME) changing this for future runs OR WHENEVER TIME.GE.l. It AD = 0. -without modifying main progr.amEND OF CONDITIONAL FIUNCTION RETURN I QAD END OF FUNCTION *DATA 12 12 300..05.1.2.4.7 1. 2. 4, 7. 10. 20. 40. 2.25.5.75 1. 1.25 1.5 2. 3. 4. 6. 8. 10. 3 E-223

Response Spectrum for Elasto-Plastic Structure I o I'D C' o m cC 0 N O C O0 0' N |b c < t m ' crA oix O' Ir '- 0 t rv (g <t - enL | c-> ccj c } (> Co _ -- * 0.0 of C ') C l I 4 o oc C; oa0 x t S O 0C C < oC C - 0 C. J C. 0r O C ON OCr,C (\0 C C\ S C in ON ( a 0r- 0'r (N 3C -(\ CJ ('\I a, 4-3 j L l. 0 0 C 0c CD CC oi *C! (N C a C0 C-C 4I, I'D0 4 Q) _ - c <.I c rzP - <l o r (X, o. a_,.-Z 4 -1 0 GO CC- 1 -. I c c * o o *: e- c o-g( C d c m Lf 3. 2 ICC C^cr c t t r, r cG fjJ. a q GO. (N - c-, o cC - 0C C -CC C ' q c 0 0 ~!L d cr o on a l o ax rr, c\ as q O _o r- all D -0 \"C0 c(c N y (Nt 0 0; C A 4 | L C Go i a GC C( | cf 0 GO a NC C(\j -CC 4 (|N - i C i a,< G LL. 't ( ( 0 - C') C C \ CPO C. -cc — ' -! U! o 0 4 0 00 0 0 0 0 C r~ o < - C C-) C)C. C cO c <\ c C: (N 0 C -.3 C, ON C a, C C CC (N 0 (N o 00 GO r- C-o GO~ c C) i cr- LT. ocl ) r- r 0 0 0 0 0<i 10 0-^ 0r 0 Ln if, c- C oC C 0 OCC\ C L, -C C - C cc 0 0 4 i ) C — cc. C LI' C0, cC C -0 CC CC\N 0- C'1 \.C -1 (Nf GO\ 4- Cy.- C - C C ( -) oI 4 4 0 4 0 0 4 4 a 0 4 4 0 0 4 0 C 0 C. n- c <f l-' X- f<7 \C CP. in Os < o. o c' (No-C C- 0. C, 4^ J r- O) OCI 0-O 0\JC^ L C 0^'- O'r- i-lr- 0'CM 0 C 0 C T ': " A a -.1\ cr -t - 01 (M J C 'l C< C f- C 0 \JE -224 C f ~l r-L- **0 e T rir

Example Problem No. 10 Exhibit 9 RESULTS!m^ ' r 7*"^ "if'-~~~.'"'.'.y^T- $./r ~~ --- — ~.^ - ^~''"~"~'"''rT~|"~i~ ~~~~ ~ ~~~~~~..;:_- -[" ir " ---/D _;-/r _ ___. _. = = _::=:__:__::.... '/3... 5 7 a 2 3 4 5 7: 9 RESPONSE SPECTRUM ELASTO-PLASTIC SYSTEM QUARTER COS. WAVE PULSE v / e -',, z1, 5 j 7 8 9 1 3 4 ew b 7 EA 9 / 2 3 ~ 5 6 7 8~ d~~~ RE PO S ~ P C R M E A T - L S I Y T M Q A T R C~, W V U S:~~~~~~~~E2

Response Spectrum for Elasto-Plastic Structure Exhibit 10 G. RAGNAR INGIMARSSON X01IN 001 004 010 1 000 R.ING. *COMPILE MAD,EXECUTEDUMP R PROGRAM BY G. R. INGIMARSSON C. E. 231 DIMENSION D(100),SIGMA(20),MAXXI(100) START READ FORMAT CARD1,ND,NSIGMA READ FORMAT CARD2,D(1)...D(ND),SIGMA(1)...SIGMA(NSIGMA) PRINT FORMAT CARD1,ND,NSIGMA PRINT FORMAT CARD2,D(1)...D(ND),SIGMA(1)...SIGMA(NSIGMA) LIMXI=120. PHI=3.14 E=1.E-4 THROUGH ALFAFOR I=1,1,I.G.NSIGMA XI=O PRINT FORMAT TITLE,SIGMA(I) THROUGH BETA,FORJ=1,1,J.G.ND.OR.XI.G.LIMXI INTEGER ND,NSIGMA,I,J,COUNT1,COUNT2 COUNT 1=0 COUNT2=O XI=O. VXI=0. TA=O. AXI=4.*PHI*PHI*SIGMA(I) H=0.02 WHENEVER D(J).L.1.,H=G.02*D(.J) LOOP2 WHENEVER VXI.LE.O..AND.TA.G.0.,TRANSFER TO BETA WHENEVER TA.GE.D(J).AND.XI.GE.1.,TRANSFER TO EVAL TA=TA+H LASTA=AXI COUNT1=COUNT1+1 LASTX=XI LOOP1 TRYA=AXI XI=LASTX+H*VXI+H*H*(2.*LASTA+TRYA)/6. WHENEVER XI.LE.1. COUNT2=COUNT2+1 R=XI OTHERWISE END OF CONDITIONAL WHENEVER TA.LE.D(J) FI=COS.(PHI/2.*TA/D(J)) OTHERWISE FI=0. END OF CONDITIONAL WHENEVER COUNT1.G.500.OR.COUNT2.G.1000 PRINT FORMAT XXCOUNT1,COUNT2 TRANSFER TO BETA END OF CONDITIONAL _ AXI=4.*PHI*PHI*(SIGMA(I)*FI-R) WHENEVER.ABS.(TRYA-AXI).G.ETRANSFER TO LOOP1 VXI=VXI+H*(LASTA+AXI)/2. TRANSFER TO LOOP2 EVAL XI=XI+VXI*VXI/(8.*PHI*PHI) TA=TA+VXI/(4.*PHI.P.2.) VECTOR VALUES XX=$I4,I4*$ BETA PRINT FORMAT OUTPUT,XID(J) ALFA CONTINUE VECTOR VALUES OUTPUT=$(1HOS48,F8.4,9HWHEN D = F8.4)*$ VECTOR VALUES TITLE=$1H1,S40,34HMAXIMUM VALUES FOR XI WHEN SI 1GMA = F8.4$ ____ VECTOR VALUES CARD1=$2I3*$ VECTOR VALUES CARD2=59(F8.4)*$ END OF PROGRAM *DATA 17 5 1000 1500 2000 2800 3500 4500 6000 800 10000 15000 20000 25000 35000 45000 60000 80000 10000 5000 10000 20000 50000 100000 E-226

Example Problem No. 10 RESULTS Ingimars son MAXIMUM VALUES FOR XI WHEN SIGMA = 0.5000 0.1977WHEN D = 0.1000 0.2924WHEN D = 0.1500 0.3821WHEN D = 0.2000 0.5118WHEN D = 0.2800 0.6076WHEN D = 0.3500 0.7107WHEN D = 0.4500 0*8082WHEN D = 0.6000 0.8795WHEN D = 0.8000 0.9178WHEN D = 1.0000 0.9597WHEN D = 1.5000 0.9772WHEN D = 2.0000 0.9854WHEN D = 2.5000 0.9925WHEN D = 3.5000 0.9955WHEN D = 4.5000 0.9975WHEN D = 6.0000 0.9947WHEN D = 8.0000 0.9952WHEN = 10.0000 E-227

Response Spectrum for Elasto-Plastic Structure Another Student Program M.S. THOMAS XO3MN 1 002 OU3 001 2 000 _ * COMPILE MADEXECUTE START READ FORMAT SIZE,ND,NSIG READ FORMAT INPUT, D(1)...D(ND),SIG(1)...SIG(NSIG) PRINT FORMAT DATA,ND,NSIG,D(1).. D(ND) PRINT FORMAT DAT, SIG(1)...SIG(NSIG) DIMENSION D(11),SIG(5),XMAX(500,XDIM),XDIM(2). XDIM(2)=ND OVER THROUGH ONE,FOR I=1,1,I.G.NSIG.f___ No computed output THROUGH ONE,FOR J=11,J.G.ND X=O. _ V=C. T=0 A=39.478*SIG(I) WHENEVER D(J).L.1. H=.02*D(J) OTHERWISE\ H=.02 \ END OF CONDITIONAL_ TIME T=T+H LASTA=A LASTX=X TRIAL TRYA=A_ __ X=LASTX+H*V+(H.P.2)*(2.*LASTA+TRYA)/6. 1 - WHENEVER (X.GE.O.).AND. (X.LE.1.) / R=X -— l OTHERWISE R=1.0 END OF CONDITIONAL_ ___ A=39.478*(SIG(I)*COS.(1.5708*T/D(J))-R) WHENEVER.ABS.(TRYA-A).G. 0.05,TRANSFER TO TRIAL V=V+H*(LASTA+A)/2. WHENEVER (V.LE..).AND.(T.G.O.) TRANSFER TO HIGH OTHERWISE ___ ___ TRANSFER TO TIME / END OF CONDITIONAL_ ___ HIGH XMAX(I,J)=X ONE WHENEVER XMAX(IJ).G.10C0.*0 TRANSFER TO OVER PRINT FORMAT OUTPUT,SIG(1)... IG(NSIG THROUGH PRNT,FOR J=1,1,J.G.ND________ THROUGH PRNT,FOR I=l,i,I.G.NSIG PRNT PRINT FORMAT ANSWER, XMAX(1,J)...XMAX(NSIG,J) __ TRANSFER TO START INTEGER ND,NSIGI,J VECTOR VALUES XDIM = 2,1 VECTOR VALUES ANSWER =$ 1H4 S19,5F15.2*$ VECTCR VALUES SIZE =$ 213*$ VECTOR VALUES INPUT =$12F6.3*$ VECTOR VALUES OUTPUT =$1H4 S15,22H MAXIMUM DISPLACEMENTS//S10 1,6H SIG = S5,5F15.2*$ VECTOR VALUES DAT=$1H4 S15,4H SIG/(S10,8F10.4)*$ VECTOR VALUES DATA =$1H1S1;,5H DATA//S15,4H ND=I3S15,6H NSIG= _ 1I3//2H D/(S10,8F10.4)*$ END OF PROGRAM __ _ ____ ___ _ __ * DATA l1 5 0.1 0.15 0.3 0.5 0.7 1.0 1.5 3.0 5.0 7.0 10..5 1.0 2.0 5.0 10.0 [ A __ __ A__ ___ _ -. —..N...J.{_) = F'_ id = -1 - 1.1 0.0(U) '.)UU * 1 U.0 U* J-J l;)'. u * 3 0 0 ju >' ).- * i ~ 1 * '<J)' * * i 3 U __________ _ __ _3.OOOu * 0umu i * 0n.in.*l *; -_......_. _ 3,000u,U-,......i e.;<.-,',L'! I.;JN i' '.Ii, i i:\'! Y L),_)LA hi<hji.i, [/I I PE[ RAT O ', i"-''<L)-Gi'\ l E-228

Example Problem No. 11 ANALYSIS OF A CLASS C AMPLIFIER by R.K. Brown High power radio-frequency amplifiers employ triode vacuum tubes and have plate currents that flow in short pulses. If the plate current flows for less than one-half cycle the amplifier is a class-C amplifier. This type of amplifier is commonly used in broadcast stations, television, transmitters, and other places where high power and high efficiency radio-frequency amplifiers are needed. The load circuit is tuned and responds only to one frequency (or rather to a narrow band of frequencies) at its resonance. Essentially a class-C amplifier tube acts as a high speed switch which turns on and off the current flowing through a tuned circuit load. Because of the nature of this "tank circuit" load the voltages developed will be almost perfect sine waves in spite of the fact that the current flowing into the load are short pulses that are rich in harmonics. The designer is interested in the radio-frequency power delivered to the tank circuit load, the direct-current power that is obtained from the source, and the plate dissipation which is the most important loss in the circuit. The sketch below shows a typical class-C radio-frequency amplifier. __11'\ ~/, "PULSES OF PLATE CURRENT Ir X e,[ T TANK CIRCUIT A —,- eb T e h OUTPUT RF EXCITATION ) VOLTAGE EGMGRID BIAS S U PPL EBB SUPPLY - PLATE DC SUPPLY SOURCE Simplified circuit of a radio-frequency class-C amplifier The voltages and currents in a class-C amplifier are sketched and labeled in the diagram below: EBB = DC PLATE SUPPLY 6I /j6 PLATE CURRENT, VOLTAGE Ecc = DC GRID BIAS VOLTAGE go ""I'^Y^^^ "" ^^ """" < EGM x INSTANTANEOUS GRID VOLTAGE E-229

Analysis of a Class C Amplifier The plate current is a repeated pulse that can be represented by a Fourier series i = I + I cos C)Ot + I cos 2 C)t + I cos 3Yt. b b plm p2m p3m The value of I is the DC or average value of the current pulse, I is the amplitude of the fundamental b pim component of the current pulse, and the product ibeb (instantaneous plate current multiplied by instantaneous plate voltage) is the instantaneous plate dissipation of the tube. The series representation for ib contains b only cosine terms because of the symmetry of the pulse and the choice of the origin on the time scale. Given the currents and voltages shown above we can calculate the following quantities: DC plate current Ib = I 2b i d ((t) power input from the DC plate supply = EBB x Ib Fundamental component of plate current = I = -— i, cos C t d (Wt) pim w Jb -1r Radio-frequency power delivered to the plate tank circuit = P t P = E x I /2 t pm plm 1 x average plate dissipation = Pd = ----- x ib d( t). -Tr The designer of the circuit is also interested in the impedance of the tank circuit at its resonant frequency Rt, where R = E /I t pm plm In general the instantaneous values of plate current can be obtained from a set of constant current characteristics for the particular vacuum tube employed. The sketch below shows a typical set of constant current characteristics for a triode. 0 - PATH OF OPERATION I| ~ PLATE VOLTAGE ', E-230

Example Problem No. 11 Because of the fact that both plate and grid voltages consist of the sum of a direct voltage and a sinusoidal voltage, the path of operation of a class-C amplifier always turns out to be a straight line on the constantcurrent characteristics when the load is tuned to resonate at the fundamental frequency. The plate voltage can be expressed by the equation eb = E - E cos e) t b bb pm and the grid voltage e = E + E cos g) t c cc gm Once the direct voltages E and E are given and the amplitudes of the radio-frequency voltages E bb cc pm and E are known, the various values of the plate current can be found from the tube characteristics. gm The problem at hand is rather interesting from the computer viewpoint in that all of the integrals involved concern the area under curves which are expressed by a series of data points. Simpson's rule can be used to evaluate these areas, and since the process needs to be repeated a number of times it was decided that a subroutine could be set up to simplify the problem. A computer subroutine was useful also because it could be given to the students as a little package and pave the way and make up for the general lack of computer experience in the class. The students had all worked two class-C amplifier problems by hand before they were asked to program the computer problem. One of these, problem 51 in the problem set, is an idealized situation where the equation for the current pulse is actually known and the integrals are easily evaluated. Problem 51, as it appears in the problem set, is copied below. 51. The pulse of plate current in a class-C amplifier can be represented by the equation i - 1.0 + 1.414 cos GOt -vT/4< WOt < vT/4 b b = ~ Tr/4< COt < (7wr)/4. etc. The DC supply voltage Ebb is 1000 volts, and the amplitude of the RF voltage across the tank circuit is 800 volts. Calculate the plate circuit efficiency of this amplifier, the power input from the DC supply, and the power delivered to the tank circuit. (Note: This problem is an example of the idealized analysis known as Wagener's method.) The second problem on class-C amplifiers employs a type 880 vacuum tube, and was referred to in class as "the 880 " problem. The 880 problem: A type 880 triode is used as a class-C amplifier under the following conditions: E = 10, 000 volts bb eb min = minimum instantaneous plate voltage = 1200 volts e max = maximum instantaneous positive grid voltage = 600 volts c E = -800 volts cc E-231

Analysis of a Class C Amplifier Calculate the DC plate current Ib, the fundamental component of -plate current I, the power delivered to the plate tank circuit P, and the plate dissipation. The constant current characteristics for the 880 tube were supplied to the student. Since the path of operation is a straight line on these characteristics, two points are sufficient to determine the line. One point is established by the DC conditions, ie., E = 10, 000 and E = -800. Another point which is simple to bb cc obtain is eb min = 1200 and e max = 600. The amplitude of the rf plate voltage is E = 10, 000 -1200= b c *PM 8800 volts and the amplitude of the rf grid voltage is 600 + 800 = 1400 volts. Knowing the path of operation and the grid and plate voltages, the values of current can be obtained. The peak value of plate current is approximately 21 amperes under the conditions specified. 880 AVERAGE CONSTANT-CURRENT CHARACTERISTICS p -. E-f:12.6 VOLTS A.C. PA I0. Ill I fil.- I. ~. _ _ _ I. rIrTT ITTrCA rTANTIACTU CO r TrIT. I C. S.h w. t h o i u.....er conditi specii in te 88 p.I _ _ __T rlaid It w xXew 1 1 1. i.. i SI~~~~N lllll rllill IMIIIJI~f

Example Problem No. 11 A mimeographed hand-out was given to the students with the description of the problem. In addition about one-half hour of class time was taken to describe the problem in rather general terms and to explain the overall format for the subroutine and the data. For example: * COMPILE MAD, EXECUTE DIMENSION Y ( 100 ), etc. ( main program) END OF PROGRAM *COMPILE MAD EXTERNAL FUNCTION INTEGER N, J (subroutine) END OF FUNCTION *DATA (data for problem 51) (data for 880 problem) The problem was assigned approximately one month before the end of the semester and the course continued with its other activities, ie., assignment of other homework etc. The students were asked to punch out their own cards, have the cards printed out, and then submit the print-out to the instructor for checking. The student then corrected errors indicated and submitted his problem to the computer. EE- 121 Prepare a MAD program to compute the following quantities for a class-C amplifier (1) the fundamental component of plate current IP1, (2) the DC plate current IB, (3) the plate dissipation PD, and (4) the radiofrequency power delivered to the plate tank circuit PT. The input data will consist of the following: (1) an identification number IDENT to designate the particular set of input data, (2) the DC plate voltage EBB, (3) the amplitude of radio-frequency voltage across the plate tank circuit EPM, (4) the number of data points of plate current N (N must be odd), and (5) the values of plate current Y(1), Y(2),.... Y(N). These values of Y are taken from equally spaced intervals from 0 to wr/2;even type symmetry about the origin is assumed (see sketch). / 'qY(4) / I RY(5) __________ /___________, ________ Y(7)\ Y(8)^Y(9) E-233 Z

Analysis of a Class C Amplifier In preparing the problem print out the input data immediately after it has been read into the computer. Prepare suitable headings for the answers. Test your program with several sets of data. One set of data can be taken from problem 51. Compare the answer with known results for IB and IP1. Next use data prepared for the 880 problem. Choose a different value for N in the two cases. Subroutine for finding the area under curves defined by N data points X(1)... X(N) where N must be an odd number. This subroutine employ's Simpson's rule and assumes that the curve is an even function with respect to the origin. *COMPILE MAD EXTERNAL FUNCTION (N, X) INTEGER N, J ENTRY TO AREA. PI = 3.1416 H = PI/ (2* (N-l)) Si = 0. S2 = 0. THROUGH ALPHA, FOR J = 2, 2, J.E, (N-1) S1 = Si + X(J) ALPHA S2 = S2 + X(J+1) FUNCTION RETURN 2,.*H* (X(1) +4. * (Sl+X (N-i)) + 2.* S2 + X (N) )/3. END OF FUNCTION The list of dummy variables in the declaration statement (ie. EXTERNAL FUNCTION ) may contain only nonsubscripted variable names or function names. To call in this subroutine in the main program we refer to AREA. (,_). For example, if we wish to print the area under a curve consisting of N data points having values Z (1), Z (2),... Z (N) and then divide this area by v the command might be PRINT FORMAT ANSWER, AREA. (N, Z)/PI PI = 3. 1416 VECTOR VALUES ANSWER = $ *$ INTEGER N A flow chart of the instri'ctor's solution is shown on the following page. It is evident that the subroutine is referred to three times and saves a great deal of effort in writing the program. Also the instructor's flow diagram is more complicated than necessary since only one through statement in the main program is needed and the calculation of both W(J) and Z(J) can be computed by the use of this one statement. In fact, Mr. Ron Zeilinger, one of the graduate students in the class taking Math. 173 this semester, used a more efficient program and takes care of all computation in the main program in only five steps E-234

Example Problem No. 11 This is certainly an indication of the efficiency of the MAD language. Zeilinger's program and the printout of results are attached to this report as an example of a good solution to the problem presented. Zeilinger chose to modify the subroutine slightly from the one contained in the problem statement, and he had the entire problem through the computer in about one week after it was assigned in class. Copies of the program and print-out for D. i. Wood are also attached to this report. Mr. Wood is taking Math. 73 this semester. These examples and the instructor's solution follow the same general pattern. It is always interesting in teaching to find a student who interprets a problem differently and seeks a non-conventional solution. Mr. J. S. Foote did this on the problem assigned in EE-121. He has assumed that the equation for the plate current pulse can always be written by an equation having the form i = A + B cos CdJt where i is restricted to positive values. The value i is defined as zero for all values of Jt where the b b above equation would yield a negative value. See sketch below. *\ A \ / By specifying the peak value of the plate t-rrent and the total angl' —of plate current flow it is thus possible to write an approximate equation for the plate current pulse. This method is known in the literature as Wagener's method, and it yields results that are correct within about 5% for most tubes. Mr. Foote has specified the constants A and B and then has asked the computer to calculate the currents at various times from the equation. Once the current values are available his program proceeds in the same way as the conventional programs to compute average value, fundamental component, etc., using the subroutine to integrate. A flow diagram for this solution is attached and the detailed program as well as one set of answers are shown. Mr. Foote has had no previous computer experience. E-235

Analysis of a Class C Amplifier Flow Diagram for Instructor' s Solution /'TRO'v~\ ' T PR) & 2REEA.(.y.)/z:oA.,,, >)< s__ 7 "c-,, \ J:' / FR — ~ 1r2 E,- x ) * ) W') Pr, YU / 1E -236 r a, T PI., -~J

Example Problem No. 11 INSTRUCTOR'S PROGRAM MAIN PROGRAM PRINT FORMAT TITLE DIMENSION Y(100), Z(100), W(100) START READ FORMAT CARD, IDENT, N, EPM, EBB READ FORMAT YDATA, Y(l) *. * Y(N) PRINT FORMAT INPUT, IDENT, N, EPM, EBB, Y(1)..-Y(N) PI = 3.1416 INTEGER N, J THROUGH BETA, FOR J=1,1,J*G*N BETA Z(J) = Y(J)*COS.((PI*(J-1))/(2*(N-1))) IP1 = AREA.(NZ)/PI IB = AREA.(N,Y)/(2.*PI) THROUGH GAMMA, FOR j=1,1,J.G.N GAMMA W(J)=Y(J)*(EBB-EPM*COS.(PI*(J-1)/(2.*(N-1)))) PD=AREA.(NW)/(2.*PI) PT=(EPM*IP1)/2. RT=EPM/IP1 PRINT FORMAT ANSWER,IBIP1,PDPTRT TRANSFER TO START VECTOR VALUES TITLE = $116H1 CLASS-C AMPLIFIER ANALYSIS BASED 1 UPON CURRENT PULSE DEFINED BY N DATA POINTS. ELECTRICAL ENGI 2NEERING 121 R K BROWN *$ VECTOR VALUES CARD =$215, 2F10.2*$_ VECTOR VALUES YDATA = $7F10.3*$ VECTOR VALUES INPUT = $11H INPUT DATA/9H IDENT = I4,5H N = 1 I5, 7H EPM = F10.2, 7H EBB = F10.2/(lOFlO3)*$ VECTOR VALUES ANSWER=$9H ANSWERS,S5, 6H IB = F10.3, 17H IP1 = F10.3, 6H PD = F103, 6H PT = F10.3, 6H RT = F103*$ END OF PROGRAM SUBROUTINE FOR COMPUTING AREA EXTERNAL FUNCTION (NX) INTEGER N, J ENTRY TO AREA. PI = 3.1416 H = PI/(2*(N-1)) --- --- S1 = 0, S2 = 0. THROUGH ALPHA, FOR J=2,2,JoE.(N-1) S1 = S1 + X(J) ALPHA S2 = S2 + X(J+1) FUNCTION RETURN 2.*H*(X(1)+"'.*( S+X (N(-1 ) )+2.2+X C +N))/3-.. END OF FUNCTION E-237

Analysis of a Class C Amplifier 0 co 0~ Zo - 0 0 0 < c 0 LA 0 LJ o * * LL 0> 0 4 Z 00 0 '0 LA 0( 0N rD <~! ~ 4 o - co 0- 0 N H < 0N 0 0 0 - 0 - 9 co 0 0 0 0 O_ o N 0-4 r- 0 * Q O O O O 0 0 00 }_ w CO.0 CJ -0 0) 0 c Lo Z 00 0 0 0 * 0 O0 0 O O f o LA f0 z. NN 4 0, c'" O O CLO 00 O 0 OH < O O 0 0 N hr-4 LA -L ct C Z 00l 0 I- 4 hc 4 0 4 c o 00 r- 0 0 W b O 9 11 9 0 O J 00 " / GO _ H o-s co- co 0 0 ~U ~LL OOO.4 0 ' O O 0O 0 If 00%0 i 000 0 0I 000 I) Cn 0 I 0 IIc 0 II 0D 00 O Q1 0 0 G1 O 0 0 (00 0 00Q. 0 0. 10 * 10 *o *10 - w wU LU LU 0 1 0 0.-4 00 0Z s09 OD 00 D 0C0C0CII 00 II 0CO It 00 00 Ur 0 4-4 00 c- i 0 C C-) z i zy\ o \ 11 iz r o oj O '0~00 E20 0 0 0 U 0'* O- 4-4 00 00 0 E-238

Example Problem No. 11 STUDENT PROGRAM Ron Zeilinger PRINT FORMAT TITLE VECTOR VAIUF[JES TITLF = IH1.. 55 34HFF-12-i rLASS-C AMPLIFIER 1 PROnRAM*$ DIMENSION Y(90), C(9Q0) P(Q0) INTEGER N,KIDENT AGAIN READ FORMAT INPUT, IDENT; No EBB. EPM VECTOR VALUES INPUT = $215, 2F'10.0*$ REA") FORMAT \/AI IIF-S Y(1 )-e.y(N) VECTOR VALUES VALUES = $7F10.3*$ PRINT FORMAT DATA, IDENT; EBBR EPM, N, Y1)l-.Y(N) VECTOR VALUES DATA = $1H4, S5, 12HPROBLEM' NO., I1, b9H A C 1.LASS-C AMPLIFIER HAS A DC PLATE SUPPLY VO LTAGE EBb = F6-O, 27H VOLTS,/1H, S5, 33HAND A RF VOLTAGE AMPLITUDE EPM =,F6.0, /343H VOLTc ACROSS THE PL ATE TANK CIRTC.IT. THE./1H., 5. 40HI 4NSTANTANEOUS PLATE CURRENT IS GIVEN BY, 12, 40H VALUES AT EO 5UALLY SPACED I NTERVALS OVER/ 1 H - S5, 36HA QUARTER CYCLE E (VA 6LUES IN AMPERES)//(1H, S5, 9F10*3)*$ THROUGH LOOP, FOR K=1,1,K.G.N APD _ C( K.K) = -Y (K1.}*COS ( P I* (K -1 ) / ( 2 - (N-1) ) 1 ) LOOP P(K<) = Y(K)*(EBB-EPM*COS. (PI*(K-1)'/(2*(N-1)))) _ PRINT FORMAT ANSWER- AREA*(NNY)/PI[ 2_-/PI*AREA-(N.C)- EBB/PI __ _1AREA.(NTY ) AREA (NP)/PI, EPM/PI*AREA. (N1C) V E C T F RR VAt I ES ANSWER I H!0 SA E L A -T"EC R F T —N TB =7, 1F63, 5H AMP./1H, Slli 44HFUNDAMENTAL HARMONIC OF PLATE CURR - 2ENT IPM =* F-,,3. 5H AM'P../i1H e sc,2. 3M)bPUWER INPJlT FRO()M PI ATE 3 SUPPLY PB =9 F7.1, 6H WATTS/1H, S329 Z3HPLATE DISSIPATION 4 PD =s. F7.1sU 6H WATTAS/H F 55O 5OHRP PQWtER DELlVtkt") '_-LTH,- P 5LATE TANK CIRCUIT RT =, F7.1, 6H WATTS*$ W TRANSFER TO AGAIN END OF PROGRAM All computation done in 5 stepa EXTERNAL FUNCTION (NX) TNTFrFR N. J ENTRY TO AREA.,S1 = O..... S2 = 0. THRODLLGH.ALPHA: FOR =2 2 = JG, (N-l) Sl1 = Sl+X(J),WHEFNFVFR JG. (N-21* TRAN.sFFR TO RFTA ALPHA S2 = S2+X(J+1) BETA FUNCTION RETURN 1.5708*(X(1)+4.*SI+2.*S;2+X(N!)/((Nl-1)*3J. END OF FUNCTION E-239

Analysis of a Class C Amplifier STUDENT SOLUTION Ron Zeilinger FF-121 C i AS-C AJMPLIF IER PROGRjRAM PRORI FM NO. 1 A CLASS-C AMPLIFTFR HAS A DC PLATF SUPP Y VOLTAGE FRR = 1000. VOlT. TS. AND A RF VOLTAGE AMPLITUDE EPM = 800. VOLTS PCROSS THE PLATE TANK CIRCUIT. THE __INSTANTANEOUS PLATE CURRENT TS GIVEN BY 19 VALUES AT FOUALLY SPACFD INTERVALS OVFR A QUARTER CYCLE, (VALUES IN AMPERES) 0.414 0.410 0.393 0.368 0.330 0.282 0.225 0. 160 0.083 -o0.000 -.no000 -ooo0 -o.oo) -0.000 -. 00o -.000non -.noo -0.000 -0.000 DC PLATE CURRENT Ib = U.068 AMP.....___. FUNDAMENTAL HARMONIC _F PLATE CURRENT IPM = U.128 AMP. / Z values from POWER INPUT FROM PLATE SUPPLY PB = 68,1 WATTS --- G. PLATF DITSI.TPATTON PD = 16.8 WATTS hand worked RF POWER DELIVERED TO THE PLATE TANK CIRCUIT RT = 51.3 WATTS ---.Z problem PROBLEM NO. 2 A CLASS-C AMPLIFIER HAS A DC PLATE SUPPLY VOLTAGE EBB = 10000. VOLTS,._-.AND A RF VOLIAGE AMPiLTIUD.F FPM = 8800. VOl TS ACROSS THE PLATE-TANK CIRCUITT THE INSTANTANEOUS PLATE CURRENT IS GIVEN BY 13 VALUES AT EQUALLY SPACED INTERVALS OVER A QDIARTFR CYCI F, (VALIIF. TN AMPFRFS 21000 210500 19.5.0__ 17.300 S.15.bO 1150( 8.000 5.0_0 2.200 0.500 0.000 0 000 0.00 0 DC PLATE CURRENT It = 4.592 AMP* FU_ NDAMENTAI HARMONTC OF PI ATE CJRRFNT TPM = i. 1 R AMP. POWER INPUT FROM PLATE SUPPLY PB =45916.7 WATTS 4 ^ ____-P-L-A-T-E-D-[LSIIPATION PD =10020.3 WATTS -__ -- I0 IKJ RF POWER DELIVERED TO THE PLATE TANK CIRCUIT RT =35896.3 WATTS -....;'.. E-240

Example Problem No. 11 STUDENT PROGRAM _____ RK..D E 'ii '7'".'""___________T 2 '!....i"'1 2 _____2 ' "" ' " " '"': ' " " '_________: C! PIL.E M',':: D:, E:-: EC..: U T2E ________ __:__P R I. T F F.':"A q' '..' P,..: I j. 7 I.T::IDE i- *,, '.?,:.'. 3:,j I T "T?, i.: '.! 7 1::.. -. I-:' 4:' - -:: D,.] J: -,:, E,7: O - -:'.S ' P::' ]:.,:"' " i. -- I.";,.'.:,:;, _____F I n P D G.... _... _ _.. _ ~....................1.1.....?: _::: _i"._' —; F E F.'R T O '. T i:-''. F'T'.._..,._...... _... _..........__..._.._ _..__..._.._................ ~~~~~~~~- 4

Analysis of a Class C Amplifier STUDENTooR5SULTS I. - ~ ~ ~ ~ ~ wo cf~~~~~~~~~~~~~~~~~~~~~~~~~~~C.-. 'I..'I.., _. C7 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~~~~~r,. c;.C I.c.. I.., 2'~~~~~~,L. 2. IfL -.t7.Z* '-;-;.iP" Ii __~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I c Lu Lo:' * r-J -j r.ec-i..'- *^!=' ** CO L J r b-,,,,'^ -n * z: *,_R*,Z C~~~~~~~~~~~. LJ i-1-. PL,..^ 1.1-. Li: -r rrd 11'-'- '*-a '"'"'~~ — r 15 J; '-T ~~~~~ ~ ~~ ~ ~~ ~ ~ ~ ~~~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.....:"j:i".R, Lii,yi r.;1;...h..... c lj";**~~~ ~ ~ ~ ~~~~~~~~~ ~ ~~~~~~~~~~~~~~~~~~~-'"*; 1''LI I"'." 1-4 Li~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Z; '... if u: gL: ~; -?~ ~T I I-) I ---q~~~~~~~~~~~~~~~~~~~~~~~~~~ll 0:) '.-0. ^ d^ i r^ i -::il ^ ~ 5. r' 1:0 I 1-4 ~ ~ ~ ~ ~ ~ ~ ~~~I L L,..-.I -. I *,J. i...,.1......1 L':.. '-"*;.-~~~ ~ ~ ~ ~~~~ ~ ~~~~~~~~~~~,..-3....., 2?-. LiJ -J _.I f~r,,IiA....t4- Li L L E-Z L 2 7E r'-j. —* l~~~~~~~~~~~~~~~~~~~~iF- n'^r-'d *~~~~~~~~~~~~~~~~~~::" ~""1^-' ' i_-[~~~~~~~~~~~~~J ~L '-*' -.,-,'"**; U: -...I " -:- 1-1-~II.:]*1::. 0"** "l!* J O....J, AI..;..: 0.....J!**.::ij -*- r ~J~~~~~~~~~~~~~U I" - i "'"; ^-,""'~, —, L.-r-.Cri CO '"'"- L-, *-* ''-'**-" c::.;;:;- ii,- ^.".::::? Ar *-..-.,.1~ ^ ^2: ^ I ^^ ^ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~. " - ti:] -;c; ci r,, i~~~~~""3 ^ ^h **'**'* '-~~~~~~~~~~~~~~~~,, I ";r..!.-.I -J~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'Z Ld [..I U C- J 0 - Q:.. u | ^^i L;..J. I T~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.f' r"71 CT 0 *.-*: I —CD -, l,.l*;: u I*****1.. -Ja: C.-C 4 i L-A Dr' J.J i?~~~~~~~~~~~~L I..L~~~~~~~~~~~~~~~~~~~~~~ -J 0"' CC J:;, -..; o. r-"- a...j- CM: —;. uA-, O... ~~~~~~~~~~~~~~~~~~~~~~~~~~~Ifi. E LL,:-:."4* C::.Z: Z:: L.L.L.: -r- ~~~~~~~ ~ ~~~ ~ ~~~ ~~~~~~~~,",t -.,-,~:. '~...^.. I- in " co ii *..on0 LL - J.-, 1 o._,.1~~, B:. lu N ]j;..: =" i * f.1 UrL- - lL-lI1 C — **.1-.' - CY: _J -J Vi L.LS-U. f u i T-~ 1.....1 _.ji...i, r *i 1~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!. EL.-. 1 -. i- 1,L 1..i O-.'-.1 j~ r:LIJ **if 0 LL.J ^ =::*1-1.'~'1 '-,::,, -- ^ Lu~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I — V1 C I:D~~~~~~!,,,,~~ ~ ~~~ ~ ~~-242-. ~"-..LL - - -

Example Problem No. 11 Flow Chart for J. S. Foote's solution /t rR6U^ \ A, 6, rD, t4, 8I- '.;/ R Tall,—. = --- A1 ~/.CALCULFOAT E — - _.W -oTR IPM = RG^c( rB-^KA.T FOR)/2Z,, f E S. ( N.X))/2r = 2P=(X( EP-43 ) + 42 1t $2 =!2 +RREA.V 7(A/x2)== 2 (x(i)44(fX(AV+,2x^ -243 J7

Analysis of a Class C Amplifier STUDENT PROGRAM J. S. Foote * COMPILE MAD, EXECUTE START READ FORMAT DATA, ID, N,' A, B, EPM, EBB 1 VECTOR VALUES DATA=$2I3,2F6.3,2F6.O*$ 2 PRINT FORMAT ALPHA, ID, N, A, B, EPM, EBB 3 VECTOR VALUES ALPHA=$7H1EE-121/35H CLASS C AMPLIFIER PROBLEM 4 1 NUMBER I3/24H NUMBER OF DATA POINTS = I3/34H CURRENT ASSUMED 5 2 TO BE A SINE WAVE/27H EQUATION.OF CURRENT I(B) = F6.3,1H+ 6 3F6.3.7HCOS(WT)/6H EPM =F6.0/6H EBR =F6.0*$ 6 EX* DIMENSION I(100), C(100), D(100) 7 SW1=0 ' 8 PRINT FORMAT TITLE 9 VECTOR VALUES TITLE=$32HOINSTANTANEOUS VALUES OF CURRENT/ 10 116HO N I(B) *$ 11 THROUGH ONE, FOR J=11,J.G*N 12 WKENEVER SW1.E.1, TRANSFER TO TWO 13 I(J)=A+B*COS.((J-1)*PI/(2*(N-1))) 14 WtIENEVER I(J).L.O, TRANSFER TO THREE 15 TFANSFER TO ONE 16 THREE S1.1=1 17 TWO I I(J)=:O 18 ONE PRINT FORMAT BETAt J, I(J) 19 VECTOR VALUES BETA=$I6, Fl,3*$ 20 THROUGH FOUR, FOR J=1,1,J.G.N 21 C(J)=I(J)*COS.((J -l.)*PI/(2-*(N-1))) 22 FOUR D(J)=I(J)*(EBB-EPM*COS ( (J-i)*PI/(2*(N-1)))) 23 IPM=AREA. (NC)/PI 24 IB=AREA. (N,I)/(2*PI) 25 PD=AREAo(N,D)/(2*PI) 26 PT=(EPM*IPM)/2 27 PRINT FORMAT ANS, IPM, IB, PD, PT 28 VECTOR VALUES ANS=$15HOFUND. COMP. OFS6,5HD. C.S9,5HPLATE$5,7 29 1HRF TANK/50H PLATE CURRENT PLATE CURRENT DISSIPATION POWE 30 2R//F12.5,F14.5,F15.5,F11..5*$ 31 VECTOR VALUES PI = 3.14159 32 INTEGER N, J 33 TRANSFER TO START 34 END OF PROGRAM 35 * COMPILE MAD EXTERNAL FUNCTION (NX) 1 INTEGER N, J. 2.. ENTRY TO AREA. 4 H=3.14159 / (2*(N-1):)*."3., Sl=O. 6 S2=0. 7 THROUGH ALPHA, FOR J=2,2,J*E.(N-1) 8 S1=S1+X(J) 9 ALPHA S2=S2+X(J+1) 10 FUNCTION RETURN 2.*H*( X(1)+4.*(Sl+X(N-1))+2 *S2+X(N))/3, 11 END OF FUNCTION 12 * DATA 1 9 -1 1414 800 1000 1 2 33 -1 1414 800 1000 2 3 15 -649 21 8800 10000 3 E-244

Example Problem No. 11 STUDENT SOLUTION BY J3S. FOOTE ',"i UI tE'r E F.: 1 F Di! 1- t FT COi I 1N T -. -..: i U F. R = T ' i i I i E i - t-l r L-: -' t,. I-, E U i T 0 I" F CL.RRENT I:B. -) i.Q 0 +, 4 I 4 t. '-..: 7 EPM =,! i:30 i EB - 100 0.I:1 0. 41 3. 7 I..3 3 3 i1. 0 147 1 2 * 0. 213. 'i 3 i,! -i,i i- E.!3 0. 1'-. '* i,5 j. 0t.03 1 7t O. 0 0Ii i i9 0 000 23: O. 0.i00 2,.. - I-_ E. E 31j;_ C _ti -0 00 i.:..._ LF..i.i.i.,. t i:ii i.- i, 2! F i I.j.:; 3 RE. I F I I0_I SUP3ROUT3IE USED IN THFL PROGRAM..- -3 iI j. 1 ',_. ii, H, i..j r I.,1,., S 1 - 0. T H Li i H.. i-i i.. l. 2:. j '-':- iI. E,, O. 'i ":,,, _,1 i

Example Problem No. 12 TEMPERATURE AND COMPOSITION PROFILES IN A CATALYTIC BED CHEMICAL REACTOR* by K. F. Gordon Problem Statement. Normal butane is dehydrogenated by passing it through a catalyst bed contained in vertical tubes 2. 5 in. in internal diameter and 12 feet long. The depth of the catalyst bed is 11 feet. The catalyst particles are 1/8" x 1/8" cylinders arranged with 38 per cent void volume in the bed which has a bulk density of 52 lbs. per cu. ft. The gaseous hourly space velocity in the catalyst is1400 measured at standard conditions of 600F and 29. 5 in. Hg. Space velocity = cu ft gas at std conditions hrs X cuft empty catalyst bed The butane enters the reactor at an inlet temperature of 1075~F and pressure of 20 lbs. per sq. in. gauge. 1. Calculate the average product distribution in the fluid stream as a function of longitudinal position, assuming uniform flow distribution and adiabatic conditions. 2. If the catalyst tubes are surrounded by circulating flue gas which maintains the tube walls at 1100 F, what will be the temperature and product distribution as a function of length? Data: Effective thermal conductivity of the bed = 0. 9 BTU (hr)(sq. ft. )( F/ft.) Reaction Rates. (1) C4H 10 C4H8 + H2 r= C1 P - KLE I 1 1 0P KEQ ] 1 + P K1+( + 3) K2 where r1 = rate of reaction, gmin. moles of butane/(gram of catalyst)(hr. ) C1 = rate constant KEQ= gas phase equilibrium constant, atm. K1 = adsorption equilibrium constant of butane, 1/atm. * Hand methods for solving this problem are treated in "Chemical Engineering Kinetics" Chapters 8-11 by J. M. Smith, McGraw-Hill, 1956 (Required Text for the course) and "Chemical Process Principles," Chapters 19-21 by 0. A. Hougen and K. M. Watson, John Wiley, 1947. E-246

K2 = effective adsorption equilibrium constant of hydrogen and butenes and Pi are partial pressures, where i=l means butane, i=2 means butene, i=3 means hydrogen and i=4 means dealkylation products. ~logc, _= - 36,000 + 8. 1532 -o10 4.575T~ K log0K1 - 18,073 - 5. 0273 ~1 ~ 4. 575T~K lo K - 20,09 - 5.0273 lg10K2 4. 575T~K log10KEQ = - 28,800 + 6.7532 4. 575T~K (2) C4Ho ~ 0.1 C4H8 + 0. 1 H2 + 1.8 (dealkylation products) r2= C;pP (3) C4H8 ' 0O.1 H2 + 1.8 (dealkylation products) r3 =C3P2 r = gmn moles of butane/(gm. catalyst)(hr. ) where C2 and C3 are velocity constants for reactions 2 and 3. log C2 = log C3 = - 73,900 + 16.43 2 3 4. 575T~K For the first calculation on the computer pressure drop may be neglected. In part 1 a computer flowsheet is to be handed in before using the computer. For part 2 only a handwritten program is required. Outline and Flowsheet of Instructor's Solution to Part 1. After students who were already familiar with the text material covering the problem had handed in their own flowsheets, an instructor's outline and flowsheet were distributed as a basis for discussion. The basic approach: a. Divide the tube length Z into equal longitudinal elements, A Z b. Assume conditions at the beginning of a longitudinal element are constant over the whole element. c. Assumption in b permits the computation of the rate of reaction over the element which yields the moles reacted per mole of feed and the enthalpy of reaction per mole of feed. d. These in turn permit computation of the composition and temperature changes respectively to give the condition at the beginning of the next element. The class fully understood that more accurate approaches could be considered. For example, before advancing to the next element, one could repeat the calculations in step c using as the element temperature the average of inlet and outlet temperatures thus refining the approximations within this element. A more E-247

Temperature and Composition Profiles obvious control of accuracy is the size of the element,.d Z. Decreasing 4Z naturally increases the accuracy of the results. Values used for the enthalpy data were those arrived at by the class from standard tables. Outline Presented to the Class. General Procedure: INITIAL CONDITIONS AND DATA INCREMENTS FROM ENTRANCE OF REACTOR TO EXIT TEMPERATURE, Ti-1 KINETIC AND EQUILIBRIUM CONSTANTS, C, K MOLES OF EACH COMPONENT PRESENT PER MOLE OF FEED, N PARTIAL PRESSURES, p RATES OF REACTION, R AMOUNT OF REACTION PER MOLE OF FEED, X TEMPERATURE, Ti PRINT Subscript Notation: i, longitudinal index, i=0 at reactor inlet FXi _ T0 Til Ri Ti -1 2 3 i-1 i j, component identification, j=l,2, 3,4 1 = BUTANE 2 = BUTENE 3 = HYDROGEN 4 = DEALKY k, reactions, k=l,2, 3 Algebraic equation for Nj, i- 1 (moles of component j per mole of feed entering element i) to illustrate use of double subscripts. Special Case: Note: N4, 0 = 0 j=4 N4 11 = N4,0 + 1.8X2 1 + 1.8X3 1 A4, = 0 A42 = 1.8 General Case: A4,3 = 1.8 3 Nji-l Nj, 0 + j Ajk Xk,i-l where Aj,k are stoichiometric coefficients E-248

Example Problem No. 12 Operating Equations. (1) Z = Zi 1 + AZ where Z is distance along axis of the reactor tube 3 (2) N -lNj o + A AjkXkiJ' ' k=l ' ' 4 (3) P i = tNi 1,/ N where jIis the total pressure (6) EQ = 10 to the power ( 2880 7532 (7) KCii- = 10 to the power ( 181575 4. 575T (7) K1 i- = 10 to the power ( 2,7 5.0273) (8) K i 1 =0 to the power \45 - 5. 0273 (9) R C = li-(P1,i-1p2,i-l P3,i-l/KEQi-) l +P li-l K - + (P2,i-l + P3,il)(Kzi-l/2Y (10) R2= i C2,i-1 P1,i.i(11) R3 i = Czi-1 P2^,i(12) Xk.i Xk,il + YlRkpArea Z/F (13) Ti = Ti - 1 Z I RkpAreaAZ AHk FC P k=l 3 (14) or Ti = Ti.1 - Z (X, - XkYi)* AHk - Cp k=l where p = catalyst bulk density Area = cross sectional area of reactor tube F = feed rate C = average heat capacity of stream, assumed independent of composition H= enthalpy of reaction Yl = moles butane in feed per mole of feed E-249

Temperature and Composition Profiles Details on Instructor's Solution. a. Kinetic and Equilibrium Constants All constants C1, C2, C3, KEQ, K1 and K2 are given explicitly as functions of temperature OK in equations 5 through 8 respectively. For calculations at each element, i, Ti_ is taken as the value Ti computed for the preceding element, i.e., T = Ti_1 -Ti. For the first element T is set equal to To = 1075~F or 853~K. Values for the kinetic and equilibrium constants are computed for each element but not printed by the program. b. Nj's, the moles of each component j present per mole of feed The total change in any component j, in an element is approximated as the product of the stoichiometric factor Aj k. the moles of j changed per mole of reaction and Xki-l the cumulative moles of reaction or amount of reaction. Summing this product over all reactions k leads to the set of equations 2 in the outline. 3 Nji-l = N 0 + Ajk Xki-l where N. 0 are given inlet values and Nji_- are the moles per mole of feed for a given component j entering element i. c. Partial pressures of each component, pj. These are calculated with equation 3 in the outline. The partial pressure of a component j entering element i is Pj iul' equal to the total moles of the component present divided by the total moles all multiplied by the total pressure. d. Rates of Reaction, R, 1 The rate of reaction k in element i, Rk, i, is a function of the rate and equilibrium constants which are in turn functions of temperature, and of the partial pressures in the previous element, i-1. As these values are recalculated for each increment, the positional subscripts, i, are actually not necessary and are not employed in the computer program. The rates, Rk, will have the units of lb. moles butane or butene reacted/(lb. catalyst)hr. e. Cumulative Amount of Reaction, Xk i The cumulative amount of reaction, k, that has taken place from the beginning of the reaction through element i is Xk,i moles per mole of feed. It is equal to the amount that has taken place from the beginning through element i-1 plus that in element i. The amount of reaction occurring in the element i is R times the amount of catalyst present, OAreaAZ, divided by the feed rate, F(moles per hour). Here e is the density of the catalyst in lb. per cubic foot of reactor, Area is the cross section of the reactor tube in square feet, and ~ Z is the length of an element in feet. See equation 12 of the outline. E-250

Example Problem No. 12 There will be three such equations as k assumes values 1, 2, or 3 for the three reactions. It is necessary to store in the computer only the last value of X, but the subscript i was actually utilized, f. Temperature at End of Element, i The temperature change due to a reaction K is the amount of reaction which took place RkPAreaAZ multiplied by the negative of the enthalpy of reaction -AHk, divided by the product of the feed rate F and its specific heat, Cp. Gaseous heat capacity is a function of both temperature and composition. In the instructor's solution, only temperature dependence of Cp was considered. For student solutions, constant Cp was considered satisfactory. Only a small change in the program is necessary to accomplish this refinement, however. As there are three reactions, there are three contributors to the change in temperature: AT= Ti Ti = - AreaZ R H FCp k= Subscript i is again not used in the actual program since only current values of Ti are stored. g. The Iterative Process The results that have been calculated in the preceding steps are such that the whole calculation can be repeated for the next element by increasing the subscript i by 1. Data. From Standard Tables of Thermodynamic Properties AHI = 63,000 BTU/lb. mole (student used 71,100) (39,500 cal/g. mole) AH2 = 41,400 BTU/lb. mole (23,000 cal/g.mole) AH3 = - 12,600 BTU/lb.mole From the Problem Statement N1 0 = 1 mole butane fed/mole feed N2^0 = 0 mole butene fed/mole feed N3, 0= 0 mole hydrogen fed/mole feed N4 o = 0 mole dealkylation products fed/mole feed Al 1 = -1 mole butane formed per mole reaction 1 Al 2 = -1 mole butane formed per mole reaction 2 A1, 3 0 mole butane formed per mole reaction 3 A, 1 = 1 mole butene formed per mole reaction 1 A2 2 = 0. 1 mole butene formed per mole reaction 2 A2, = -1.0 mole butene formed per mole reaction 3 E-251

Temperature and Composition Profiles Data., continued — A3, = 1.0 mole hydrogen formed per mole reaction 1 A3, 1 1 mole hydrogen formed per mole reaction 2 A3 2 0. 1 mole hydrogen formed per mole reaction 2 *3, 3 =i 0. 1 mole hydrogen formed per mole reaction 3 A4 = 0. 0 mole dealkylation products formed per mole reaction 1 4, 1 1. 8 mole dealkylation products formed per mole reaction A = 1. 8 mole dealkylation products formed per mole reaction 2 4,2 A4,3 = *1.8 mole dealkylation products formed per mole reaction 3 0= moles butane formed at beginning of reaction Xt = 0 moles butane formed at beginning of reaction 2, 0 X3,0 = 0 moles butane formed at beginning of reaction TO = 853~K (1075~F) 7iT = 2. 3470 atmos. (14. — ) ( 14. 7220\ F = 1. 390 lb.moles feed = 1 42 X 0 X ) r..2 520 359 4 Area = 0. 03405 ft. = AZ = 0. 2500 (or any other convenient length) From References Ci = 91.9 BTU oIL 51 BTU lb. mole Feed~K lb. mole Feed~F or uC = 2. 25 + 0. 0454 T~R - 8.83 * 10-6 * (T~R)2 as actually used in the instructor's program. Input Parameters (Data) for Instructor's Program. TO> I, (Nj 0) for j=1, 2, 3,4, space velocity,, I. D. of tube,length, AZ, AH, AH2, AH3 Output Parameters. Z, Tit Pli-l P2,i-l' P3, i-l' P4,i-1 Special Nomenclature for Instructor's MAD Program. MAD Symbol Meaning PI IT P P YZ Initial value of N SVEL Space velocity RHOBED ID Internal diameter of tube CON1 ~ Area/F Other symbols are obvious E-252

Example Problem No. 12 Instructor' s Flowsheet.L,J. co,,ET _A > COMP L) MAD, EXEC UTE, DUMP= 1RATE(3 C,A(11,DIM(T )s 1LENGTH, DELTAZ, DELH 1, DELH2 6DELH3 AREA = 3.14159* ID/12.).P.2/4. FEED = SVEL*AREA*LENGTH/379. CON1 = RHOBED*AREA/FEED/YZI1) PZ = P1/1470 THROUGH FND6, FROR CJ=UAJ.G.4 DENOD6N X -(Jsm N2) = 0N+, THROUGH ENDFOR I=,Z.GE.LENGTH Z = Z + DELTAZ 1).P.2 FTK ( T( I- 1 + +60. ) *5./9. C1= REXPO(E2.D*A(A-360/(575*TK)+8. X1532) KI= EXP.(27303*( 18073/(4.575ATK)-5.0273)) 'PRINT FOMA Z L KEQ= EXP. (2.T ~ * (-28800/ F (4. 575TK)A L6. A7532) 9 S UMN = 0 THROUGH ENDT, FOR J=CALCUL,J.G.4TIONS 1R(JATEI-1) = YZ() THROUGH END2, FOR IK=1,J,KG.K END2 NI-1) = NDELTAZJI-1) + A(JK)*X(KI1)DELH2 AREA = 3:14159*(ID/12*).P.2/4. FEED = SVEL*AREA*LENGTH/379. CON1 = RHOBED*AREA/ FEED/YZ() PI = PI/14.7 Z = 0 THROUGH END63 FOR J=l11,J.G.4 END6 X(J,0) = 0 THROUGH END12FOR I=11Zl,.GE.LENGTH Z = Z + DELTAZ

Temperature and Composition Profiles Instructor's MAD Program - Continued -- END3 SUMN = SUMN + N(J,I-l) THROUGH END4.FOR J=11,iJ.G.4 END4 P(J,I-1) = N(J,I-1)/SUMN*PI RATE(1) = Cl*(P(1,I-1)-P (2,I-1) P (3,I-1)/KEQ)/(1.+P(1 I-1) *K1 1+(P(2,I-1)+P(3,I-1))*K2*0.5).P.2 RATE(2) = C2*P(2,I-1) RATE(3) = C2*P(3,I-1) THROUGH END5, FOR K=1,1,K.G.3 END5 X(K,I) = X(K,I-1) + CON1*RATE(K) *DELTAZ T(I) = T( I-1)-YZ(1)/CPGAS*( (X(1,I)-X(1,I-1) )*DELH1 + 1(X(2,I)-X(2,I-1))*DELH2 +(X(3,I)-X(3,I-l))*DELH3) END1 PRINT FORMAT OUTPUT, ZT(I),P(19I-1),P(2,I-1),P(3,I-1),P(4,I11) TRANSFER TO READ VECTOR VALUES DIM = 2,290,289,2,0,3 VECTOR VALUES A = -1.e-1.,0.,1.*.1,-1.,1.,.1,.1,0.,1.8,1.8 VECTOR VALUES DATA = $8F10.4*$ VECTOR VALUES TITLE = $ 1Hl 15H Z 15H T 1 15H P(BUTANE) 15H P(BUTENE) 15H P(HY 2DROGEN) 15HP(DEALKYLATION) /1HOF10.2,F17.4,2F15*7, F 114.7, F16.7*$ VECTOR VALUES OUTPUT = $1H F10.2,F17.4,2F15.7,F14.7,F16.7*$ END OF PROGRAM *DATA 1075. 34.7 1.0 1400. 52.0 2.5 11.0 0.25 63000. 41400. -12600. 1075. 34.7 1.0 1400. 52.0 2.5 11.0 0.10 63000. 41400. -12600. Instructor's Results, AZ = 0. 25 ft. 7 T P(BUTANE) P(BUTENE) P(tHYDROGEN) P(DEALKYLATION) 0.00 1075.0000 2.3605442 0.0000000 0.0000000 0.0000000 0.25 1054.3915 2.3605442 0.0000000 0.0000000 0.0000000 0.50 1041.7360 2.2828749 0.0388347 0.0388347 0.0000000 0.75 1032.5223 2.2366825 0.0618169 0.0618702 0.0001746 1.00 1.025.2821 2.2037465 0.0781615 0.0782726 0.0003636 1.25 1019.3310 2.1782655 0.0907847 0.0909507 0.0005433 1.50 1014.2901 2.1575797 0.1010190 0.1012359 0.0007096 1.75 1009.9268 2.1402373 0.1095900 0.1098539 0.0008630 2.00 1006.0876 2.1253572 0.1169376 0.1172448 0.0010047 2.25 1002.6658 2.1123636 0.1233484 0.1236959 0.0011363 2.50 999.5841 2.1008600 0.1290201 0.1294051 0.0012590 2.75 996.7847 2.0905618 0.1340942 0.1345144 0.0013738 3.00 994.2235 2.0812576 0.1386758 0.1391290 0.0014819 3.25 991.8657 2.0727864 0.1428448 0.1433292 0.0015838 3.50 989.6835 2.0650228 0.1466635 0.1471775 0.C016805 3.75 987.6547 2.0578673 0.1501812 0.1507233 C.0017723 4.00 985.7606 2.0512397 0.1534379 0.1540068 0.0018599 4.25 983.9859 2.0450742 0.1564660 0.1570605 0.0019435 4.50 982.3177 2.0393165 0.1592925 0.1599116 0.0020237 4.75 980.7451 2.0339210 0.1619400 0.1625826 0.0021006 5.00 979.2587 2.0288494 0.1644274 0.1650927 0.0021747 5.25 977.8505 2.0240687 0.1667712 0.1674583 0.0022460 5.50 976.5133 2.0195510 0.1689850 0.1696933 0.0023149 5.75 975.2411 2.0152718 0.1710812 0.1718098 0.0023815 6.00 974.0285 2.0112099 0.1730700 0.1738184 0.0024459 6.25 972.8708 2.0073467 0.1749608 0.1757283 0.0025084 6.50 971.7637 2.0036659 0.1767615 0.1775476 0.0025691 6.75 970.7034 2.0001531 0.1784794 0.1792836 0.0026281 7.00 969.6867 1.9967954 0.1801208 0.1809425 0.0026855 7.25 968.7105 1.9935813 0.1816913 0.1825302 0.0027414 E-254

Example Problem No. 12 Instructor's Results, Continued — 7.50 967.7721 1.9905005 0.1831961 0.1840517 0.0027959 7.75 966.8690 1.9875438 0.1846398 0.1855116 0.0028491 8.00 965.9990 1.9847029 0.1860263 0.1869140 0.0029010 8.25 965.1600 1.9819702 0.1873595 0.1882628 0.0029517 8.50 964.3502 1.9793388 0.1886428 0.1895613 0.0030014 8.75 963.5679 1.9768025 0.1898792 0.1908126 0.0030499 9.00 962.8115 1.9743556 0.1910716 0.1920195 0.0030975 9.25 962.0796 1.9719928 0.1922225 0.1931847 0.0031442 9.50 961.3709 1.9697094 0.1933343 0.1943105 0.0031899 9.75 960.6841 1.9675011 0.1944092 0.1953992 0.0032348 10.00 960.0182 1.9653636 0.1954492 0.1964526 0.0032788 10.25 959.3721 1.9632932 0.1964561 0.1974728 0.0033221 10.50 958.7447 1.9612866 0.1974316 0.1984614 0.0033646 10.75 958.1353 1.9593404 0.1983774 0.1994200 0.0034064 11.00 957.5430 1.9574517 0.1992949 0.2003501 0.0034476 Instructor's Results, AZ = 0. 1 ft. Z T P(BUTANE) P(BUTENE) P(HYDROGEN) P(DEALKYLATION) 0.00 1075.0000 2.3605442 0.0000000 0.0000000 0.0000000 0.10 1066.7566 2.3605442 0.0000000 0.0000000 0.0000000 0.20 1059.9462 2.3291667 0.0156887 0.0156887 0.0000000 0.30 1054.1528 2.3036100 0.0284404 0.0284529 0.0000410 0.40 1049.1192 2.2821267 0.0391425 0.0391735 0.0001015 0.50 1044.6750 2.2636506 0.0483349 0.0483873 0.0001715 0.60 1040.7012 2.2474827 0.0563704 0.0564455 0.0002456 0.70 1037.1115 2.2331403 0.0634924 0.0635905 0.0003210 0.80 1033.8412 2.2202760 0.0698755 0.0699966 0.0003962 0.90 1030.8408 2.2086316 0.0756493 0.0757931 0.0004703 1.00 1028.0711 2.1980104 0.0609126 0.0810786 0.0005427 1.10 1025.5010 2.1882587 0.0857424 0,0859299 0.0006132 1.20 1023.1052 2.1792548 0.0901996 0.0904080 0,0006817 1.30 1020.8629 2.1709003 0.0943334 0.0945622 0.0007482 1.40 1018.7566 2.1631145 0.0981842 0.0984327 0.0008127 1.50 1016.7719 2.1558308 0.1017852 0.1020529 0.0008752 1,60 1014.8963 2.1489933 0.1051644 0.1054506 0.0009359 1.70 1013.1192 2.1425548 0.1083452 0.1086494 0.0009947 1.80 1011.4314 2.1364751 0.1113478 0.1116695 0.0010518 1.90 1009.8251 2.1307196 0.1141894 0.1145281 0.0011072 2.00 1008.2932 2.12525827 0.1168849 0.1172400 0C.0011610 2.10 1006.8297 2.1200650 0.11194473 0,1198184 j0.0012134 2,20 1005.4291 2.1151173 0.1218880 0,1222747 0C0012643 2.30 1004.08066 2.1103947 0.1242169( 0.1246188 0.0013139 2.40 1002.7981 2.1058796 0.1264429 0.1268595 0.0013622 2.50 1001.5596 2.1015562 0.1285738 0.1290049 _ 0.*0014093 9.60 961.8410 1.9701139 0.1930297 0.1940540 0.0033465 9.70 961.5601 1.9692271 0.1934615 0.1944.912 0.0033644 9.80 961.2827 1.9683518 0.1938875 0.1949227 0.0033822 9.90 961.0087 1.9674877 0.1943080 0.1953487 0.0033999 10.00 960.7380 1.9666346 0. 1 Y7231...0.195 7691 '.0034174 10.10 960.4706 1.9657923 0.1951329 0.1961842 0.0034348 10.20 960.2064 1.9649605 0.1955375 0.1965941 0.0034521 10.30 959.9453 19.641390 0.1959370 0.1969989 0.0034693 10.40 959.6873 1.9633277 0.1963315 0.1973987 0.0034863 10.50 959.4324 1.9625263 0.1967212 1.1977935 0.0035032 10.60 959.1804 1.9617346 0*.1971C60- 0.1' 81835. 0.0()C3520)1 10.70 958.9313 1.9609524 0.1974862 0.1985688 _ O.035368 10.80 958.6850 1.9601796 0.1978618 0.1989495 0.0035534 10.90 958.4415 1.95941583. 1982329 0.1993256 t.0035699 11.00 958.2008 1.9586610 0.1985996 0.1996973 0.....035862 11.10 957.9628 1.9579151 O.1989619 0.2000647 0.0036025 E-255

Temperature and Composition Profiles Flowsheet for Rigg's Solution TIT h RESQ VA? I-Atel S,TA Rigg assumes sume Iconstant -t MAD Program of Robert Rigg (Student) START READ FORMAT DATA, DELH,D ELH2,DELH3,T,B,R,S,D,DELZ,RHO,ZMAX, 'PI,RAD PRINT FORMAT TITLE, DELH1,DELH2,DELH3,T,B,RS,D,DELZRHO, 1ZMAX,PI,RAD A=3. 14159*RAD.P.2./144. THROUGH ALPHA, FOR LTll,L.GE.12 Z=O THROUGH BETA, FOR ZO.,DELZZ.GELZMAX TMOL=B+S+R+D PD=PI*D/TMOL PB=PI*B/TMOL PR=PI*R/TMOL PSP I*S/TMOL PRS=(PR+PS)/2. Cl=10..P. (-36000./4.575/T+8.1532) EKBslO..P. (18073./4+575/T-5-.0273) EKRS=lO.P. 20092./4.575/T-5,0273) __________ R3=C2*_PR________________ CP225+.0454O*.8-8THROUGH ALPHA.P FOR L P*(T*.2. __ SS+RHO*A*Rl*DELZ+O. lRHO''A*R2*DELZ+O. i*RHO*A*R3*DELZ BETA DD+8THROUGRHO BETA FOR2*DELZ+18RHO*A*R3*DE LZ ALPHA PRIN*T ORMAT RESULT, L, T, BD R/ 5, D INTEGER L VECTOR VALUES DATA = $SF14.6/5F14.6/3F14.6*$ VECTOR VALUES TITLE = $9H4DELH1 = F14.6,9H DELH2 = F14.6/ 19H DELH3 F14.65H T = F14.6,5H B = F14.6,5H R = F14.6/ 15H S = FD14.5H D = F146Z+ 8H DELZ = F14.,7H RHO * F14.*6/ ____ ___ __ 18H ZMAX = F14.6,6H PI = F14.6,7H RAD = F14.6*$ VECTOR VALUES RESULT = $5H4L = I4,5H T = F14*6, 116H MOLES BUTANE = F14.6,16H MOLES BUTENE = F14.6/ 118H MOLES HYDROGEN = F14.6,...... __ _ 131H MOLES DEALKYLATION PRODUCTS = F14.6*$ TRANSFER TO START END OF PROGRAM E-256

Example Problem No. 12 Rigg's Results DELHI = 39500.000000 DELH2 = 23000.000000 DELH3 = -7000.000000 T = 853.000000 B = 674.000000 R = 0.000000 S = 0.000000 D = 0,000000 DELZ = 0.100000 RHO = 23608.000000 ZMAX = 0.900000 PI = 2.360000 RAD = 1.250000 L = 1 T 825.017693 MOLES BUTANE = 648.200546 MOLES BUTENE = 23.251770 MOLES HYDROGEN = 23.296535 MOLES DEALKYLATION PRODUCTS = 5.087365 L = 2 T 813.947678 MOLES BUTANE = 637.931831 MOLES BUTENE = 32.650311 MOLES HYDROGEN = 32.738332 MOLES DEALKYLATION PRODUCTS = 6.820014 L = 3 T = 807.126755 MOLES BUTANE = 631.579811 MOLES BUTENE = 38.483049 MOLES HYDROGEN = 38.604261 MOLES DEALKYLATION PRODUCTS = 7.852657 L = 10 T = 787.437103 MOLES BUTANE = 613.093597 MOLES BUTENE = 55.425321 MOLES HYDROGEN = 55.677946 MOLES DEALKYLATION PRODUCTS = 10.917664 L = 11 T = 785.997833 MOLES BUTANE = 611.730011 MOLES BUTENE = 56.664612 MOLES HYDROGEN = 56.929846 MOLES DEALKYLATION PRODUCTS = 11.164101 Temperature Profile ',~~~~~~-0t ~~~tt257fi

Temperature and Composition Profiles Rigg's Results - Continued — 4y / S'3707 4 3.0 <; Q 9~~~~~~. 0 ~ CS ^ o o % + s) _ oJ ~~~~~~~~~~~~~~~..........-,.,..,,. s --------— 3 J - E-258 ------ -- - ---— 4 0 0 iW W }|| ---------- W 4....g WN 1.1111111X - - - - - - - - - -r~ r:II T~: ~r 2II: T I~ rr r LIL[ ------------ ~ ~ ~ ~ ~ ~ ~ r rrT r DrTT1 r rTT l:::r rL J ll~IIlI a ~ ~r l rT1lllffr Ir lllll mi rlilllllllr ku~rllrlllTI 4~~~~~~~- - - - - - - - - - -11i.44 H wl Tl1111In 1I~~TTl ~lT~+..............1 H.... H... lllll~ iiiil lllllllll -- — E~H -------— Tr ----.-t —.:3H R R f 11IrlTI ~Trl E T r 111lT I11 -------— i t t X X..............IllllllllllllE~~ i wff X| || |l ll l_ _i T - - - - - - - -- -|- - -|- || || i 11M11 111llL:tH1eIILLllIIlLIIILLIII~lIIIIIlllLL 4 ~ ~ ~ ~,,,,, 1,,,,, II, I1.,,,, I I I 7 I --— II.I --- IIL 11 1111.II --------- ----— lIIL llllll rl f r TlrT ~l~ ~~ fl]Illrlr~ arrllL r~i ~lrl 0~~~~~lll nS EEg!1gl~liIillllllllllllllllllllllll~ -- -- ----- ----------— T~ TII~ ll~ l II -l T I; f~~ ~T Trt #HfTT HI O_ 1t. gS -------- ~ V -f t:_4 -- -— _.- 44. SW 4 - -- -—.g4 W +E Ef --- - - } HFF-XlX: ff m X X X X ) S S X~~~~~~~~~~~~~~0 iS XS St 2 2X m~~~~~~~~~ 4 Wt g W W: X W S E~~~~~~~~~~~~~~~~~~%1 &R/t X.Tl3~t 7 ~ f~fHXtiiil-iiiiilW

Example Problem No. 13 METALLOGRAPHIC DETERMINATION OF SIZE DISTRIBUTION OF NODULES by M. J. Sinnott This was a problem in quantitative metallography involving the distribution in two dimensions of circles produced on a random plane of section passed through space occupied by a random dispersion of spheres. The mathematics of this type of analysis has been previously worked out, but the technique involves methods of successive mutiplications and differencing that is very laborious, time consuming, and subject to many manipulative errors. By programming the equations the analysis can be reduced to simply feeding a single data card to the computer with the program and the indicated 55 multiplications and 65 additions to be performed to give the required spatial distribution. The following equations are used to evaluate the number of particles of diameter X per unit volume, N(X), from counts of numbers of diameter X per unit area, A(X). N(1) = 2. 294 A(1)/2R N(2) = (2.435 A(2) - 0.913 A(1))/2R N(3) = (2. 582 A(3) - 0. 960 A(2) - 0. 325 A(1))/2R N(4) = (2. 773 A(4) - 1.016 A(3) - 0. 329 A(2) - 0. 156 A(1))/2R N(5) = (3. 015 A(5) - 1. 082 A(4) - 0. 346 A(3) - 0.144 A(2) - 0. 085 A(1))/2R N(6) = (3. 333 A(6) - 1. 161 A(5) - 0. 365 A(4) - 0 150 A(3) - 0. 087 A(2) - 0. 067 A(1))/2R N(7) = (3.780 A(7) - 1.260 A(6) - 0. 386 A(5) - 0.155 A(4) - 0.088 A(3) -0. 067 A(2) - 0.058 A(1))/2R N(8) = (4.472 A(8) - 1.383 A(7) - 0.407 A(6) -0. 159 A(5) -0. 088 A(4) -0. 064 A(3) -0. 055 A(2) -0. 049 A(1))/2R N(9) = (5. 773 A(9) -1. 530 A(8) -0. 429 A(7) -0. 154 A(6) -0. 081 A(5) -0. 057 A(4) -0. 047 A(3) -0. 041 A(2) -0. 036 A(1))/2R N(10)= (10. 0 A(10) -1. 547 A(9) -0. 357 A(8) -0. 114 A(7) -0. 052 A(6) -0. 033 A(5) -0. 026 A(4) -0. 022 A(3) -0. 019 A(2) -0. 017 A(1))/2R N(TOTAL) = N(10) + N(9) + N(8) + N(7) + N(6) + N(5) + N(4) + N(3) + N(2) + N(1) R = Size of largest circle in planar section A(l),.,A(10) = Number of circles observed in planar section of size fraction 1 through 10. N(l)...N(10) = Number of spheres per unit volume of size fraction 1 through 10. E-259

Metallographic Determination of Size Distribution of Nodules Solution. The students were given values of the number of nodules per unit area, A(N), so the problem was merely one of having the computer carry out the explicit calculation of the number of particles per unit volume. The instructor's solution shows the data employed in the problem. Block Diagram Instructor's Solution for Size Distribution Problem CALCULATC t AT J S I Nl LTT0. Ti1- 0OI. 00 t 0I00 *COr~M'PILE M9>D.l EI:ECU... TE'1ETRLLOGRAPHIC DETERI'IINRTION OF SI..ZE DISTRIBUTION OF ODULE DIENSION R C10 0:,, HC1 t1 0'. START REPRO FORNPT DATAO:, RC-.. fC '-., RNMX VECTOR VAlLUES DiTrlO=$10F5.0, F10.9*F _ PRINT FORMRT DATAPi, AC1:.... AC1 0) RMlX VECTOR 'APLUIES DATAi1 =- 1HO, S38, 44H ACN:t EQURLS NUMBER OF NO 1 ULES PER UNIT AREA.-.,"-S42,.3SH RMIX EQUALS LARGEST RAOIUS IN F! 2ELD.// S8, 4HIC1.:, 1,, 4HAC2:), S., 4HA C3-). SS 4HRC4), SEb, 34H"C5., S6 4HC'::S:, S, 4HR.A7,, S6. 4HAC3)., f-., 4H.C9), S....., 4- 5'H-l(O:',.",' S5 FS. '- S4, F-6.0, 4S. =G.;0 S4, F, S.0 -5, 4. F.O, S4. F `.0.. -4, F'.O, S4, F6.0 4, F'-.04,. 55, F6.O........, " S5., F iO.........N.:2:. ', 2.! 4 3,. 1:, '::: 2.: RM '.3: - =. ':.:2 -?n C4:2 -. 31 - 1 P i-2. 0 * R 1lR A', t..:-" C*:. 4 C -2 P. 7 t. * '.. 3- R2 -. -1 * 1:.': ' W.1... Nt::-:. 2 *.q - 1 1 * - - -O. 3 4::.3 - 1 7 *. 2 -, -O 08: 1 j 1) "__ 4.:2. l*Ft R MP:-:,' _____ _ -. A N'..33 *:- i. C Ci f - C-. 37: 4 )-. 1. I:- -O, 03 -1- q C: 2-) -. 05 N C7 C3. 73....7-11. 2. 40 C5-. 1,4 0 09 __________ -.'cj," 1 ) ).i.;. C.,'- '4 -7 *; 1 '.,7'":, 0. 4?*P 6.iO 0.,!.. ':- -0 1 8 '-:__________ - c: - i... 0i5 A C 3)2-O. 0:2 --,4-i'2 1- '4 ttC:2.O*RP1IAI:, 0___= 5. 71 51,* * 3-_:,- " 3 '"Q. 41 *1 ]: 7: -0. 1*, -j. OS'.:.. 5.:', -C*l<'.,ft.5. 0 3-':.3-0' 01 *,: 2:, -. 01 *! (::, i,::a- 2,.. 1. _ 2.0 R M. _::, N1 f..... - 1 i... 7:. i 5 C:__.'.',4 -; 0 C5 #4 0. 2* I H I* A r.-'4t.',:-t:0 1 *::) -'.D:':, 2.0*R-9 ' i T 0 T iA L N:1 ) + iN C 2 _: + N C: 3:1 + N:,41 + ftr ) +, r1:, + N C' 7: + N:. ' 9 ) + -t ' + 4 C..' 1 '-) PPRINT 'FlORiAT R E ULL a. ECTOR '.,'ILUES RIES UL =1 1 HO -,38, 34'H NUMB PER OF:',_.R. N 7IT VOLUMI',E//;S40, 31H ':;, E LU: tiUMEBER OF IZE:R-. " / 8..S4HN 1 I 'G, Hi. ), - 'E., 4HN2. (4), S!. 4-HN'5), '6.,.4HN':.,S,-.:: '-, 4HE7H'N4HJ:::EH S6C 4HN"9:.' SG,. 5HN 1 0:*' PI R T F R t i T R E'SL i T, i.... Ni 1., iC i_ 1, _ __ VEC O R 'Si L -"'-.. T `:,:; H, 4,5, FG., S4, 4c-.-, - '___ __ _2 S4, F6.,:S4, E,.O: 'S4:. F. - '4., F6.0 S4,:i4:. F4 '.-4 -.0,3 — ' 55, FE.. ';fD 4, PR I."T FO.Rl::=-T FtESUL i:, NTT"L., _____tL * E C T 0 F.... ---Tfi?i L LI - HR'-i f:i - l...33.?, 54HNTOTL EU.L- TiOT.;iL N-Ut'Ni-' 9ER ETF F SPHERES p T.:. U!i.'.T:,iOLUM.E.-.55=. -.- F _ _____lt3.'. TRPHSFER TOt: STT --- —.... --- —----- _ ENiD OF;PROGP..' E-260

Example Problem No. 13 I CL~~~~~~~~~~~~I C I: f I I~~~~~~~~~~~~~~~~~~~~~~WL i-lw~~~~~~~~~~~~~~~~~~~~~~~~~~i4_ 4..4 4~~~ U...~ ~ ~ I ' Lul LOi I- 'I** -. - I 1~~~~~~~~l" Ij 0) If- L~~ ~ ~~~~ ~~~~~~~~~~~~~~~Ii CC i L ii L 1: Cfl I ~~~ ~ ~~~ ~~~~~~~~~~~~~~~~~~~~Li' U Li jLd~ '4-4 Iii liii~: I: I F V 02~~~~~~~~~~~~~~~~~~~~~~~~~~L-C" LU 4-.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~E LU~~~~~~~~L I U.-' crI LIi I 4-)~~~~~~~~~- J_ 1-4~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~j -:;fr 4-.D 02 C K 7 CL LO VIi;4 Lu cr C k:: _J~~~~~~~~~~~~~r j N E-261~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7

Example Problem No. 14 NUCLEATION AND GROWTH OF SOLID PHASES by M. J. Sinnott Part A. This problem was concerned with the kinetics of phase transformations. On the assumptions that (a) the number of nuclei forming per minute on transformation is a constant, N, No. /cm 3, (b) the nuclei forming are spherical in shape, and (c) the linear growth rate, G, cm/sec, is a constant, one can derive an expression for the fraction of material transformed, f(t), as a function of time, t, that has the following form: f(t) = 1 - exp(- ITNG3t4/3) The first problem was to evaluate either f(t) for values of t, or t for values of f(t) for given experimentally determined values of N and G. Part B. This problem was simply an improvement on the solution of the above problem. The function describing f(t) is actually only the first term of a series of terms which has the following form: f(t) = 1 - exp(-B-B2/70-B3/70 x 11 X45... ) B = 41rG3Nt4/12 The students were asked to evaluate this function for the same values of N and G used in the first problem and to compare the solutions. Part C. This was a still further improvement on the first problem in that the requirements that N and G be constant were relaxed and a linear time dependency for N and G was substituted. G and N were stated to increase or decrease from stated values at the start of the transformation to stated values when transformation was 99% complete. The function then takes on the form: f(t) = 1 - exp(-lTNoGo3(t4/3 + (9a + b)t5/15 + (lla + 4b)t6a/30 + (16a + 9b)t7a2/210 + a3b14/48)) G = G0(l +at) N = NO(l + bt) E-262

Solution. The most direct method of solution was employed by simply inserting a sequence of values of t and calculating directly and explicitly the fraction of material transformed, f(t). The less direct procedure would have been to specify a series of values of f(t) and to solve implicitly for t by some trial technique. The instructor's flow diagrams, programs, and results for the three parts follow. EAD ~iN 7- o 00i FOr Instructor's Solution for Nucleation Problem - Part A lM J S I NNOTT T 1 b -i 002 002 0Of- -" 1i 1 -0 *C:U-,'PILE MUR, E ECU1TE-E THIS TIS NU -CLETI ON-Gf RO.i!TH PR' O LEI ', N',UMiBER,OE: SITFRH-.T READ FORMl'RT DHTA,!i, G, DEL PRINT FORMAT TITLE, N, G, DEL '.ECTORF '.VLUES DRTF = FF10, I F10.9, F1 t0.0*: VECTOR '.L,'LUES TITLEZ11H.1,1,FlO.,S10 F!,,FSOt 1 F10.O*.'. TH ROIUGH LOOP F FOR.J. 1 1... O. FR.RCT GE. 1. 0000 TIME = DEL-J FRRCT = 1.I I-:: E.'F'..3. 14 -1*N*. P..3* T I ME. P. 4., - 3. 0: LOOP PRINT FORfl'r1T OLiTPUT, TIME. FR!_-CT_ '.'ECTOR 'V'LUES OUTPUT- 1 'r, S0- O, F 1 0. 1, F'! 0. E 5 END OF PROGRFIFM Instructor's Program for Nucleation Problem - Part A E-263

Nucleation and Growth of Solid Phases Instructor's Results for Nucleation Problem - Part A:7~. _ t _J 000. __ _, O. U.. -' ' -'i g ' 1 2. j-s.1_1 0. 0 0 0 I: i. 300.. 00:. 4.5 00'S 9 1_a' s_,._J__ 4s:0T iJ. 71 0. 2 -" - - s_ ' J. U:.,, - i4'" ':.5_! _:C _. 10 0:i 114 i0 2 4 -_,._,%' 10. *. 958 1 38_,2 i_ i 1 _ _ _ _ 9 _ ',_ S0. i 4 06 __ 1 68il ii. -Si:, 99 ',-s! ii I 1.! 3 L: ', i. '-.-9 7 ' _440..- 2 _i.. T i O.99 99 3l,-i 1i: rO. O. 77.5 _.'1 85 9.' Block Diagram Instructor's Solution for Nucleation Problem - Part B P-, I ' a- C Fg/ RAc.- EC 7 X B-Byl/70 "-B HS)) C E-264

Example Problem No. 14 Instructor's Program for Nucleation Problem - Part B r1 J SI TT ' TT - 002 02 i 1 '. *COMPILE MlD., EXECUTE I't' T T r:fLETi-" fl'" R.lT P'ROBLE.' T E L STRT RE D F ORMliT IDRTA, M 1 GG DEL PRIHT FOR'MRT TITLE, i:. DE1-L VE-CTOR O.. ", F10.0 IECTOR i I TFLI T T, H - I It'; 1 _ ' _s 1 1 - 1 s Ii * TI, ri i.i -._i..... I 1 -, 1.THROUGH'LOO"" F0% J't'1 H,.J.PR F ' JG, "1.O:nD r I TIME. DE.L-_*.J "-,3.: -'.1!'4T1 41,G —. P.. rTI. P -:.. 1 ' -;: 2. 0 FR C:: T - 1. -.....:7.: 1.::'.. 45.1::: LCiOP' PR IhT FORMIA'RT LiLTMTI T ITF'ITT ''i' F,.. TRRNSFER TO ' T R.-EC:TOR '.- F qLiE', ".-i:, 0:.: 1. i". 5.-f.... END OF P ROGRRM Instructor's Results for Nucleation Problem -Part B!-,-l i,, _li. 1 1 '2. 1.? 0 1.0 2 4 0.i!- 0 l 4. 0 47 3.i_ _. __i _ -.I01744 4-0. -,. I,f —..,. u.0..5 '.- 0. I^.!1 1?'14 1 -- _:.... 1.. _1 C. 7 0..:, 1 2i j 0. - 2E0 4 i 2 020. 0 *39 -, +, __J -. ': D t,- 3.4. > *-r *.'' '-" -3 _ ---....... _..... ___ i\~~~~~~~~~i 4 '4 0.. ' 9 i 7 3.... ': i..-.:-. -. -...........-.-.-._-. -...... 1 5 0, 0., i. Li-::3"4.. i ':' t i...... i,,9 5........ t.o1 -, I. i.1..... O. ':: 99 9':! 1 4 I IO. -I l '. 1. C ' C! 0 II I0?,. ':Si. 003 7 ':: E1I '....... 005 1_ -.:; -. 0-. 0:'2926 C:,*...300. 0.20. 529,.3 G ~".,. 3 i-:! 1330 6, 42 0.: O3 i:, 3;: 0, 971! 14 43. ', '.,.41 _ _ ------—. —.;....... '.. -, t. 3. 3 7.3 C! -.", '!-':., 9993'!_'.: 73::::40. i. 0.999 r9!" ")__ _ __ 900.__1.!OO O _!'- _ 0.5000!. ~;'__.:! 0"l _!-:.999,::.i f!,. _6. 50 00.! 0 ':) 00 4 99 9 3.!.. ',. E-265

Nucleation and Growth of Solid Phases Block Diagram Instructor's Solution for Nucleation Problem - Part C /I Rou H \ READ PRINT - = p Or, 6,Iwo, 1, AVO., FOR T bELT A coCo B ELr, bLTI.Eo, — DE FI Io.qq DELTI s Program for Nucleation Problem - Part C Pi S1fl TH RE IT *D1T i NO.47 '-. -W, I.T ( 14- T. H 1 1 tT CiJFLT! ihs N i 00 GEL iTPt 13T F I F.T L H i-,,. -., ~TvH 'F.....) ~I.i~rlit~ir~i iRI cA/cF AL f31 cT -'i,'-'E PTL ~~ <~l'~-,~o,,C,,,,,. - "i)- -- F.~ I —q A,,N:' cr,- T T:: ' - - -- - - --- - -: Ilt -i, I -nstructor's Program for Nucleation Problem - Part C ~.,...;:.:......._ _::.2. _. HJ NE.... 1........... lfI- 1E.,l r- T ' FL'E '' Ti'-'i 'START: RERD ~FORP.1-T 1- R D, i.N, N i' G..E DE L.F DOE L.T ' i,1 -— liN -P. RI l"' T F 0 R'i F T DI. T G ': E L T, DEL '1 i * T I i' FO'L, I.; T H- F.: 5 U G 0 E F r:- ': i. " G E - r -, ':J,li-1!:;...-.............. T=-JeDELT _____-2___ St'riHO-'-' 1 +E TIT - ' ' _, -- 15 F I::....," I 'i -.i- T ',f_:: _i - _ + 1, 1 _. F '1: ~E,.';, 1 T. _,' _: i 4 1 + 6':'. 2 0.-!, -:G! ':,i, P.: t!- ' 7' -.'- n i-E''' n;' -.F',- ' "-.-.i '! 3 +: ': '.:"i.I.. ' n 5! -'i 1' i ':.- 3 1 1 *:,__~'. T_ P E'-'H -- '' -''- TT F', '-.' - - i"-II n,2' '3G E'i iJ-. t - 4 - ''-.....- F_.....__F.. ' I..i.: T EI H_ E." F — E,.E R i.1,T.1ET. T,.:_ __-.,H EN E.EF T.ET.i T F,, T i.._i, — N E' ---— T F 0 R i1 l T U T. G." --—. --- —----- 'T,- THROUG3i FOi _H. _ ____. ' __ TC i-..'E-266T!,:: 1 1 ~ Pi '1 -I- 4. ~BE; 1:, - PT 1 F'.E...' ': ij -i1.. 2A F 1.: +-i 1 -i- i '.:- i::.T '. F'. "7..'" *j 'i ' + P.3 2.B1 -T '. F,'." —4.". — TF~E'E-.....R:T P F -- T. UT 2.A ~- ' ' T i.' i"'i T -; ' i-: ----i I -'i TE:G'ER~. 7.' J-. --

Example Problem No. 14 Instructor's Results for Nucleation Problem - Part C /Ng O.E 05 AV'~o.E 04 4, O.E —04 O 1. E-05- 0. - /,.F?4::i. 1. O 0 0-. 0 c 0 01 0. 00.I 3 2 I"0.i i" Ci 00!ii. I0000.. 4 5 00 —i 0 0000 1 1 c0000ci'_. 00000_ci c0.00003 4000I O00. 05000 _-ii0.i22 5 0 0, 0 I__. 0 09 1 - OU. Uuu F! rii 00 i. fciu 0 F' 0 2C. 6 O. 0 0 Fj {ii'3 O F.. ~.. O! ' 0 i F O. 0'" 0, 10000.0000 0.0003 0.0 i 0.0350 0. 0004611 1000 0. 00000 _. I 00003 f 00. 00 iD I i 0 2 II. 0:'7. C I 2 5 0. 0 1 01i 1 0i000. 00cN0 0. 0I 0 0I. i 00 O. 002 i o 0 -000 - 0. I ' 5 ', 1 100 00. 0 0 000 0 -...' 0!... OiOO 3 I -. '. 00.0 1' ii 0. 0 7500 0-"?.:03- 8 10000.00000 Ii I 0. 14 I. 0 00C 0 0 1i 2 ti, 00: 2 9.'i13 6i i 2 ~ i iU 1 00 00 00 O. O. c0i -0 0 0. Ci 0i O i. - 0 0 ' i.01i25. 6 0' 2 i- 3 1 0000. 0000 0. 0..00003 00, 011110. 0 '5000.. 3 6 7 9 1 0 00. 00 0 L i 0 00003 O4' 0 0 00 0 O. - I i" CI. C. i:i7Ci!-C 0 1 1 1 7.3 I II lTl~J-1tl- o I __ i _l tli 0 0 ' 20. 00000C. 0 _-0 76 9. 03'4 6J2 I N O. 1I5..57 I 10000. 0O000 1 0.00003 i 280.0.00i0 O07. 00830.0 14 _ ^ 0. 19707 - I Li. OOOLiiif 4 i 0. O i 0032 30. 000.00C7. O ' 0. 21 0 70 1000000 00. Q0 0.00003_ 3280000 00Cf.00625 _____7.007 2. 31233 ID i Ii 0 0 0, ' "i I i-i7 O 0 i03 03 i0 i0 0. iIi: 0.. 023 4 0. 2 1 'I17 10000. 0. 0 ID C C-I.3 -- 2 l iii0 ' I iiL OC'0. j. D' --- -'C.L. - 1 i i 2i 3 N 10000.OOQOQ32i V. 0.00003 1 0"''", '-, 0.0560.02500 ~ 0.45107 I-U. ut 1 iL.O - 03 80. 000000. 005 0I - i" i 4 iii. f: 8 0. f0 7 I-I 1"i0000.0000,0 0003-000_ 0. 599:.. 10000 I. OOOO 0. i000i 1 2 0.00000I i..- 0021 f 3 '::- 0 2. 5 C0i 31......i....~., ' " F, ~ i * i i i - 10 '3 0. 'i i i252i:: i, 2 i507 1.0 0. iii5 f'9 0 797 1OOOO. OiOo Li. o o 4. u:oo o o-:. "0 0 5 0, o o. o o 25 0,. 5 9 1 6. 5 1I0000, 00000.00003 540.00000 0. 0 001 6 7 09 519 9 0. 00 1 0000 O. nil._324 4 i0. 0 i-i 0 0 0 0. 5 4. 0000. 82'4:02 100_ O.00000 D 0 ' 0 C. ' 0 3.:600.00000!E _ —. 00333:i0'0 0.015 0 0 —" _ 70.990 rDOOO.00000 0.,0 0 00.3 6 5220.00000 0. 0 0 - 3 - 8 C". 3 1_. 0 323:.0.94 8 3 1 0rJ-. 0 iin0 O.0 "F3 40. 0 00 0. I 0 3. 7 0030.0 1:- 7 O. 9571 1- - i0 0 0.!0 0. 0 0 03 6 5 00. 0 0 00 0 3i!i. I 0 03 00136 O I. 8,8 ' 6 i 0 0 00.!00294_0 "'10.0'1324 1. 520.00000 _ i 1-26.70586_ _____ 0.0.01552 0. 00'2, 0.000 124 000 0 1. 00 03 00. 000 0. 00ri 317 0. 01,:, 7 — 0.05000 Lti C '4i 0 0 40 09 0 0. Gf 32460 0 0 0 0. 0" 0 3. '12.: 7-6. cc:,0 00 1II 0. '0 f', 'J0!I1,!0 I. 0 0 0 0 3 2 3 4 — 09 0 0 0 0"1 _-I. "- 0 3 1 2::. II. 0000826 ____03___ 0. C.0 0.0 0. 1 0 UUOO. LIUCI0 00. 0 0 0 0.0..1 34 20.00000 2 3 0. 00. t9 0.,,0 2 '0.029400 0 0. 0Di 03 2 4, i 20. 000001. 6 O 4 70 0. 0.20 0.0 0'?.::'1: ' FLi_. 1_-0 0 25 9+ ___ 0.01324: 4 O 40. -000i.0 0 3.i 3 4.5 2_-: " - i0. 00 fi 1 O. Q03 8 1 - - 40 O. 00 i 3i2S6'4 08. 0 ' O_ —'1.00 4. 1 17 I. 000021 0.00002 C"'. 0 29 4 0. ID 1 3 2 4 r. " t " '. 1_10 0 0 0 0 4. 1' 7 061 -. 0 0 0 001 6.! 902 __F 0.00294i. 0.01 32 4 ' l 260.00"000. 5.4441.O 101 0.02600 -i_ 0"10 29'.'J4. 1.'12'4' i _ '::i 300.0 0 0 l4970.l '-I: 5 882.0! 0. 0 00 2 O. 0 ',.'00234 ~~~~~QC.1y\~324 ~- 320.0 0 2" 0 000 0. 10 -94 t i1_0.,".00294::-' _ l..U.:: t-:, 34.000t0 0 5499.99994.'::, 0.000_-` 1 ' 8!_t0. 1- O ] ]00 L~ --- - — i^7-Ci~i'2 9"4~' - -0"70-^3'2^l* 360. '00 0 U- 10 5 7':, ':: i. 7, 0 5 0 0 C. 00002 0. t 1 4 1 8 C______, 0.0 U. 032"4 46 230..0 0 00 70.3 23:5:,0. 000 0 2 _ C 0.-,:' 89 it_"~.-O-O ^0.,,Z ~'J '::1. L'l.01i]'.-3-2448.~ i], O. i~l 0 i-i0000 f~i D. FJ 0 735 C' C 0 '., i.94 "0 13 f '0 20 C. 24 1 2.00 cf.':8. 35284 0. 00-000. 76000 - ' n C I.2. -. 4 - O! 3 2 r 2 '4 i 0.0 0 0 0'0 '41:'1.2,.74. 7 ID ci 0.000032 0. 7: 91 0. 0029' _';:[ _ "0.01 4 ___ i'620.00 0 _ 5_205. 88209_4 _ I",_0. 0C.0 3 I `0I 2. 985 7 4 f~l. 0 I:.002940 Fi.013 f~ i.]: 2 4640 l.0 0-t I"'J C! 0 0 0 94:", 1 70.,-'5. 8. 01i. 0 0 03. 9 0:. 0. 00294 0.01.324.5 60. 0 0 0 000 9!"- 5 '2. 0 f_ _0_0 _.99.19 2, I_ Di 00 294 i _-. 01 3.~2 4 -. i 10 L-I 90 C.9 8 I: ' ', ' 0 0 0. C'.:.1"9 52

Example Problem No. 15 COMPRESSIBILITY FACTORS OF GASES FROM THE BEATTIE-BRIDGEMAN EQUATION OF STATE by Herman Merte Background. Equations of state were introduced into the course in conjunction with the study of general thermodynamics relations. Prior to the assignment of the computer problem, the students were asked to hand compute and compare the specific volume of nitrogen for a given pressure and temperature using several different equations of state, including the Beattie-Bridgeman. The purpose was to demonstrate the complexity of obtaining just one simple property, to say nothing of other derived properties and their derivatives. The computer problem was then assigned to demonstrate the use of a new tool for the solution of problems which might otherwise be laborious or unfeasible. The Beattie-Bridgeman Equation: PV2 =RT[V + Bo(l b -[1 - -A (1- a ) where p = pressure V = Specific volume T = Absolute temperature R = Gas constant A0, B0, ab,c are the so called Beattie-Bridgeman coefficients This equation may be rearranged in the form f(V) = 0 as follows: -RbB0c - (aAO - RbBoT - RBC V -(+RBoT - A - R c )V2 - RTV3 + PV4 = 0 TZ It may also be written in the form P = g(V) as follows: p = <V-4 + XV-3 + V'2 + RTV-1 where, = RBoT -AO - Rc/T2: = aAo - RbBoT - RB0c/T 2 (= RbB0c/T2 E-268

Problem Statement. Write a general program for the IBM 704 computer in the MAD language to calculate the compressibility factor of a gas using the Beattie-Bridgeman Equation of State with pressures and temperatures as inputs. Use Newton's Method to solve the pressure explicit form of the Beattie-Bridgeman Equation. An example of Newton's Method is given in the appendix of the abridged description of the MAD language. Set the program up so as to operate on a fixed temperature while pressure is incremented. To test the program, calculate compressibility factors for nitrogen gas at temperatures of -97~F and -222~F with pressures from i00 to 1000 lbf/in2 in increments of 100 lbf/in. Use 20 as the maximum number of iterations permissible. Due Date: The complete program on punched cards is to be submitted by May 16, 1960. Also submit in report form a folder containing the flow diagram and any preliminary calculations necessary to setting up the program. If desired, a maximum of two people may collaborate on a program but a separate set of cards and reports are required. Indicate the name of the person worked with. Instructor's Solution. A flowsheet of the instructor's solution is given below: The procedure is as follows: 1. Read in and print out the name and Beattie-Bridgeman (B-B) coefficients of the gas (Nitrogen in the particular example). Also read in the critical properties, PC' TC and VC for the gas. 2. Read in and print. out the parameters which specify the range of computation. These are T = Temperature PZ= Initial pressure /A P= Increment in pressure PH= Upper limit in pressure JMAX = Maximum number of iterations in Newton's Method MMAX= Maximum number of compressibility factors per temperature = Tolerance on relative change in specific volume between iterations 3. Compute the virial coefficients,6, and sin the B-B equation, which are functions of temperature only. Note: MAD symbols used in the program are D, E and G for 6,, and ~ respectively. 4. Compute reduced temperature, TR = T/Tc E-269

Compressibility Factors of Gases 5. Set a count M to zero. M is the pressure count, i. e., the number of computations completed per temperature. 6. Establish an iteration loop to increment pressure, P, from Pz in increments of AP until P> PH, or until M > M^MAX. 7. Compute an initial approximation to the specific volumn, Vi, as Vi = RT/P (ideal gas law) 8. Compute V by Newton's Method using the following algorithm: Vi+l =Vn - gg(V)Vi+i = ZRTVi4 + 3 @Vi3 + 41Vi2 + 5~Vi - PVi5 RTVi3 + 2Vi,2 + 34Vi + 4 S where subscript i is the ith iteration. 9. Compute PRI VR, and Z the reduced pressure, reduced volume and compressibility factor PR = P/PC, VR = V/Vc and Z = PV/RT. Note: Through an oversight, the instructor actually defined Z in his program as RT/PV, the inverse of Zo 10. Increase the pressure count,M, by 1. 11. Print results for the Mth pressure, T, P, V, TR. PR, VR, Z and J where J is the iteration count used in the Newton's Method determination of V. 12. When the loop set up in step 6 is satisfied transfer to the step 2 and read in additional parameters. It is noted that for TR = 1. 046 the values of V calculated for pressures greater than the critical by this procedure become meaningless. In this region the slope dP/dV becomes very flat, and another form of the equation in the Newton's Method may provide better convergence. E-270

Example Problem No. 15 Instructor's Flowsheet CR AD GAs, A1 5 A k |PRIWT O8 lAfl? b,c,RDPt tt ERS: to N\ PTE P/R o V TVWF(V)T _ Instructor's MAD Program *E - i, E E. T E - T 9- 2,- i 0 '0,, 0I'7 2 A *,C iq1' F'!LTE I',.,'D Er-'.. E>C I..E T E1 TF;-F: 1 E R, D FM O F< i T I H FT.- i R r.. j.. C. R: PC:: T,.: IPRINT FO',M T T IT L.E -. Z.iE.?,TC. i:-_L?'H i -. RE,',D FOR fi','IP, T DiT i. T: PZE'.:: DELF: PHi tHi'. J Hlq',1-.','., t f'ii.-"" ESF' 1 PrF.: I.-..T FORi'dlT DDTR2 T F -ZE.: F'I GH^:"i L P i i':., n N, F P-!.::.-','-':==; t..T,._.T.. T..o E -.q:+,q - F.:. - E-::-i: ' - +' T-iR C-.+. Bi -Z...:' rT. F'.:'.':, Instructor's MAD Program.: C *'. i-F EP. TE F, 2 i - T..T ' '-' C T R GH T3 -. 3 3 ', o i,,I F i;,_ F??,,H. ',-.'. G ' i. i l. i'ii-? = '-i-T.-." T - PR.i T.." T.?' " ":-.i I", '. ' A?E * F CF -...... - -' '. -. T '-1 1i-,'-,. - P '..'.........:':: - T _...... P'3 t-.!,,,:-," F' 2 + 3i E i -'-i 4 ~ i j.:. v, j:. -.r i IJ -0| Lti iGte l — 1;.1i F.- i J:*: i, 1'717 7. i j;,,U i' * a i i ' ' i 1 C!,,:.1 1 i _ B i ' t F".: --- ——; ^,, —."-. -',, -,.. PRINTlL FORI'MAT RDSULT LI T P Ti:-:- - R: - F " Customary definition for z is P '" I~ ~RT 7',: _, r T.., i... Instructor uses the inverse. E F '-."i. T- ' T 'i = 'i'! ' - _____i_ VEC R:J L. i..i 'i:i.,. T L.. E:: ':: - C 0 H P R E - -I.I... L I T " F! C T. R S C i L C U L. iR T!:iE F: i'i T I TH B-T *-ii'.::i E; i, ', " F ST=T.H F! i;..-. "_. P...___-.... E: i..;,. r., i.....".; '....:~ i:'i j,. j,.,, F! -,,,.:i: -,?;: i F * s..? *' C: "i" L-.. i:.-i --!?..: - ' i,. 'i *- '; Ci.i,:' '.. '!. J r..:,, i - i:i::,,,

Compres sibility Factors of Gases )4~ 0 J LJi I I 1 CL I. 4 LUC..ILiE"''.j C'.'.4E'1'EC)Eir-.1 7.c.:E N TE I ETE::II:.4 C4TEE: C.4 C Li. i- Li.* '> T T T ' i: 47.....h''.I'" C L' ~- '..-..: Ld!D~~~~~~~~~'* " i" M E" (4' C(7 '' rniC' I" S r'..'i''' ''El'. IEEE''U-) E.L-) r ' r4.c ":n C1'.r%.j'4- - -4.4J~~~~~~~~~~~ - o~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~C[C Cr Li 6 ci:, In (:5 I~~~~~~~~~~~~~~~~~~ E.'. E.' Ej. Er'~ C".' E, '.i E. 41..0 > TECT 4 EE TETE ET.- E..E E.' E..E..i").IE.,*..**. Li Li r(77 ' CI I I ~ ~ II I I D:) I IL ~ ~ ~ i L. iiLJL. I (.. L L LEJ LCO L i.IC" U.. -:,~ ri.:.4 U..! C.-, Lii -C, p C, Lii- LU % LU A LI.1.14 Y) L U LE) LU Li....4...' '.t '.' ". '.c.'.-. (..T." '." 7.,.. ' 4 '. 1' E 'i!. " 4 4 cf., 4., (.7.1 IE EECI...,. T I EEECE.. 2 cE: E: E ~:c: 4 I Ld~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- 4:i'4i4C~ II' i.-'c.(.C4.1:"C.''u-.".tc-I:X"E E EE ("4- E p411'."("'il 'CE '7 "-1" (.4 C:: 44 41' (~4 (4 E~~E 4; '.44-("'. I E EE L' L:C'..4't ("4 (7 iE7'.I'.4"L'.4r(r T....L7 ~~~~- ('2iii~~~~~~~~~~~~~~~~~~~~t. ~~~~~~~~~4 ~ ~ U - C )I- D C~ - 7. L L-1 11..J L Li................. IT CIi Ii:1(7 IIi, Cl' I J u UA4 LU I t! JLI 1Lii11. I L d::IL UJ LL1U - - A U j. - -. -. d ).J U J U I'LA L_.L C' T. "-272r. —,;,,2r

Example Problem No. 15 Lii UI r~~:i r~~: r' r r~~~~:, ri r~~~: r~~: r~~~ -- ~~-. '-"H-** -.-.:*~~~~N -4i:.4f 4 `14 I141111i`1 I I.~~~~~~~~~~~~~~~~~~~~~~~7:: - I Li:1 O', ~... I. 1.i r J 4J. 0 U. H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!..IJ. 4-b CJ D......r.r4 ~y 4.."i.,-.-.. 4. 4)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I. co 0) 4-. Vi: Li"I Li: U-: Lf-t Lfif-, Ifi U: L'T' 1 02 *I.-",.-.1-".~~~~~~~~~~~~~~~ — INI`1 '1 — ii %41.i '-J I I I4 f.4 0-4 IN (4 ii j i, i" 1.. 11'111.JJ ff Lii LII -iJ DJ~ Uhs. ii Liit Lii LiJ. HA. I.) 111 LLIi LiJ, -iII''11f -.:011..L ljj jI '-I J. I J CCLI::4 CI: Li": >4 1.: 1:4 iii~~C,.f Lij - 1- r, LiJ 4. '' i il.4. I-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~E D..D C4C" U.. — (.,' -fI 'I',- -.- '- C iDiC.r'.. I- iLi",'ir i ii0Li'-, i7,LOLi"~i', Ii iiiiLi i i. - ii -!U)Li —Lii Li-,UIUI LU7 V"I D7ii Lu -i II LU 1U, fI iJ 1. i 7 'I j I- 1 I: ' cEC- 73 D 1 I 1

Example Problem No. 16 EXPANSION OF GAS IN A TANK by Richard E. Balzhiser The Problem N-butane is stored in a tank at 367 psia and 328~F. Calculate the final temperature of the gas remaining in the tank if it is suddenly opened to the atmosphere. Consider the tank as the system and compare the temperature obtained using this analysis with that obtained when the gas remaining in the tank is taken as a reversible expanding system. In both cases assume negligible heat transfer. Data P = 550.7 psi T = 765. 3~F c c CO = 5.8 + 0.033 T T in oR C~ in Btu p p lb moTR where C~ is the heat capacity at 0 pressure. p Assume the following equation of state is suitable for n-butane PT = 1 - 0. 4( r Symbols Used iH = initial enthalpy/unit mass, Btu/lb mole H1 = final enthalpy/unit mass, Btu/lb mole P0 = initial pressure in tank, psia P1 = final pressure in tank, psia VT = tank volume, ft3 ml = lb moles of gas in tank at end mO = lb moles of gas in tank initially Am = change of mass of gas in tank 6m =ut small mass of gas flowing out of tank S = entropy/unit mass, Btu/lb mole - ~R V = volume/unit mass, ft /lb mole - ~R T = temperature, ~R R = gas constant, 1. 987 Btu/lb mole - ~R or 10.73 ft - psia/lb mole - ~R T = reduced temperature, T/Tc P = reduced pressure, P/Pc E-274 rE27

EXPANSION OF GAS IN A TANK Solution Closed System Analysis For the gas remaining in the tank as the system, the expansion is taken to be reversible and adiabatic. as as v c ^ NS_= - = P dP + dT = T dP+ dT But from the equation of state, OVA R.4 Tc R,_ R c_ a8 TTP P p 2 c ~SoS =S - dP + + 0. d + + 033)dT Tm P. 04 R T or 5, 8 In.- + 0~ 033 (T - T ) = R In -- + p T (P P For P = 367 psia, T1 = 7880~R and P2 = 14. 7 psia TP 5. 8 ln - + 0.033 (T - 788) = - 6.48 -.49 = 36. 97 A trial and error solution for T2 gives a final value of 6150R. Open System Analysis Writing the first law of thermodynamics for the tank as a system - 6m H = Ulml - UomO out-out -- 1 -0 0 Since H t changes as the process proceeds, it is necessary to consider small increments of dis-out charge and evaluate conditions at the end of each discharge. A small mass of gas flowing out, -6m out, changes the mass in the tank by Am. Also U = H - PV. Therefore, Am Ho = (H1 - PLV1) ml - (H - Po ) m0 where H of discharging stream = H over interval for small Am) Since m1 = m0 - Am and V - = Vll = m _ o. E-275

EXPANSION OF GAS IN A TANK the following reduction can be effected; (P1 - P0) Btu H =H+ =Ho~ V_ (0. 185) -1 -0 m T ( 5) lb mole where 0. 185 is the conversion factor, Btu - in /ft - lbf The change of enthalpy with pressure and temperature can also be evaluated as: (aH\ (8H\ dH_ a = dP + dT P 8H \ 8VX 0.8 RT - P T (aT = C dT P P1 0.8 RT2 T P - c dP + C dT P T 0 0 (0. 185)(0. 8) RT2 Integrating, H! = H + 5. 8(T1 - TO) +.0165 (T1 - T ) (P P0) c 0 The equation of state may be solved for pressure to r e late the three unknowns, P, T, and m. RT P [1 VTPcT + 0.4T2R A combination of equations now yields the following function of T1: (0. 185)PcV TRT2 0. 185P VT F(T1) = _T___ ---- - 5.8 (T - T - 0. 0165 (T1 - T) ml m + 0.4RT2) (0. 8)(0. 185)R2 T1T (0. 185)(0. 8)RT2 P +cTPVT cT 0 (T P V T T P T ( cl T 1+ 0. 4T0RT ) Solution of the above equation yields T1 at the end of each incremental discharge. At the beginning of any increment To, P and m0 were all known, and m1 was calculated by specifying a. 5 mole discharge according to the following equation: m1 = m0 -.5 E-276

Example Problem No. 16 The resulting cubic equation for T1 was then solved on the computer using Newtonts Method. The program consisted of a double loop; the external loop incremented the number of moles in the tank while the internal loop varied the tank temperature after each one half mole discharge. The flow diagram for the procedure and the final program follow. The computer was asked to print out temperature, pressure and the number of moles at the end of each increment. The final set of conditions generated on the computer showed a temperature of 6170R, in close agreement with the result of the closed system analysis. Solutions by two students are presented after the flow diagram. One such student approach utilized the original temperature as an initial assumption. He then proceeded to decrease assumed values of T by 1~R per trial until a sign change was observed in the functional relationship involving T1. T1 was then increased in increments of. 01~R until the sign again reversed. This value correct to within. 01~R was then used as the final value for that increment. Mass increments of. 5 percent of the original tank mass produced temperature changes of. 24oR initially and of 7~F during the latter stages. Thus a check within. 01~R would seem satisfactory. The final value of 620~R approximated the value of 615~R predicted by the "close system" analysis. A second student solution is shown. Several simplifying assumptions eliminated second and third degree terms and permitted a direct solution for T1 at the end of each increment. The second term in the heat capacity expression and p were both neglected. Here again the number of moles present in the a 8P tank was incremented with the increments equal to 1 percent of the original contents of the tank. His final temperature of 616~R checked the value of 615~R exceptionally well thus justifying his simplifications in this particular problem. INSTRUCTOR'S FLOW DIAGRAM READ W )ATA PRINT T0 '' T I T_?,<P t TI'-,BT,i^rriri |WK.^.^.M> |l~ft-re _.~^\ I \ P.(<PA / DFUNCT=1 T Pt-T\ -) / &AMA Comtute ACopoat. RTP p -RIN FONCT,T & -LAt wi AS An- uoN CQA F (T) &FO)NCT _ D__T) = I-..03, L, o*'.K-RT (QCo,)(z-(S)T.MRPc _ ),RVPC'T, O~T F ~\, P.TTO AVTT.TPv +O.+f,RTj (vT1Pe0-.4T 'iVRTiJ E-277

Expansion of Gas in a Tank TNST-RUCTOR'S MAD PROGRAM RICHARD EirL2H I EF T l -H _____________ 2_C__ I - tz - I'll~ H *COrMP ILE MAD, lECIN! H 013''" J! "'T,~U' 1 PERK:' FoY1~~~~~T T~ '7-:4., P ir P FE F>KITANI F'- H __ U P R I MT FOfiT T T T, T' 4 O, rioF _, TP: F-C, F> KiTK2, P- HO I tiTEG3E H- O, I T_.10RCT*F>+ (TOO-.P404 T!" P. CP* TO iF' 1 1 _ U FFi Ct T 1;'-I F!-J C~iI T = 1 1-r H R 1 31TH 1iii1 R -,!4, T 'I T!- INT '!1 NCT C P: E IS r C '.NT nDFl 1-H NCT' 1 V1 I- T I 'N D C.!qB -OR. - ~I+H. G. ti 1 ID ~ Fiu4T: fr. I i:*.T I`T*T- 4- R~t-T, - FT. +. -1!1-i-I. 1 R T~ ':'-'' T I- I - + 4 *-F 1 i ~!T Z 5 R - - -a - — Ti C- +.+-a-11 TO) PO V -'3 - FI I T 0 D F' —I!'-4 C T 5. 7. - + I P, I l I +. *T.,. 2 P' I-.' T C! 2. * 4 * t~ 4 -li~ 1 ~ ~wT C:. P... G P rI M 1. I +~ 1 21 T 1. P.* FPC/ C -C T I IT/1.1 IT 41 Tf FIR1NT Fi ttinT RE..-. J LT Ti 1I t-i 1 TO=Tl l.TI TiRT 3:12 E 0 R."-,L — 1 2rH Or -P E zFri r'!:u I T /.5F 1 I 5 '1 i*- S 1Hi D fli F ul0ThINSTRUCTOR'S RESULTS T- F.-i:.:llrW '.tt~i 5 S-!i 3E FrIOhl T! T P m "I~~~i"11.5~~~~Ilf ~ ~ ~ i" -`3 0 0 3 7 0: 1`1! 0 7-~~~~~~3:~~ ii,, 1F -R O 1 -. - r - -' 1 ii I Iii.. 4. 1+ I IfL T, P T 7T~f~~: 4i2'77 4 -7 -7 8 1 7 7 4 33Hf 7 5 4 7 5 i 77 77.743i7 7- ii~~~~99 II~~~ I~i 787.485 7 7'a- - 7 -- *4 I 7 7:3 5. G 4 i G 4.3 ZS ~I~~~~~~~~~~~~~~~~~. 1 7 ~~~~~~i ~~ ~~; 513 i::l:~~-3 10 5I 70400 -1 ij: j~~~~~~~~~~~~ - M 1; 7-774

Example Problem No. 16 INSTRUCTOR'S RESULTS (continuied) T P M T1 1P I_ T1 P1 1 T 1 19 V ~~~~~~~~~~~~~~~~~~~' - 74 ~~~~~~~~~~~~~~~~~~~~~~''1 1 ''1~~~~~~~~~~~~', — 9. i j.~~~~ '7-' ' ='Il 44,''1____ '7 7-!.4 1.1 -7:', 2. 5 I D 0F 1 11 1."19 t! 7__ 7 ____ ___ _ _2 2 '411 j 73__5____ 1' II' '''! 441 1 1 0.3 __ 1 ''' 7' 1 'i5 1 2: 8 7G8 IS4G34 r~~~~~~~~~ 81131 T 7 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~n~~~~~~~ ~ 7M - 94 517 84 2 0I 4-f. 1 D11 C r:"q'~44.-1 7.4 r 1 1 ~ 1 1 ' 7G;'~~~~~ ~ ~ ~~~~~~~~~~~.41.1 444 44 I'- I H I -I i 41 247,1'l1I I '7 ~~~~''F1'1 i '7' 94 ' A I " ___ 79.111244' Z"4491.4 2~f C" '73.1 11 4 l'' 71=1' -~~4 1 17:. 1-4 4 L Il 7 7 '4'' ___ 4141 1%853 41144 1"7'7 171 ''73 2I' 44S f lr35 4~'4 ''*~' 7*~ '1 71(9' 7. 4_ H14t 1 ~ i~f 7-'1 *4 ~ 444 4" 3 3i: 5 1b~O~ 41: 4', i44 f 4.44=4. 4111 1 4 19 11 71 A'J-,1 I-.4i4"..44 4.-~~~~~~~~~~~~~~~~~~~~~~~~~30." 3 0.-' 134_:)O_ 767.70392:2' I '17L ''1114414729.4 15 1 I9.9-749 711 '0. 757.' G' '1 3'77 C 7 2! "-'-" 2I3 11 )0 797 G. 2 73%1 2iB44 9 7 15 4,7 79 'II 7G ~rG. 53448 5' 3 - 4 7 5f 2 '2 5. S C 4 1 '0 14 lIZ,441 41,4-I'll 4~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7!1- f- 7.G 1. * 1 1 544 C)244: - '44 1". 41 14'11D'I721C 4 1 05i 1 4 iI'-, '799 r-i;:H:,:9 - 11 1 75 2 2 IOl1f ' '" ' O C C i '' 11 1 '74='" ~'1I1'"'1 I'~r 5~5 2 1=.' ___ I'll ''1114 1 1'-l1',7 J '76'- 9933742 I I I '7 1'' D' 0. 0 1 1'91 2 1111 H '79""': G301'5'7'111 31:, ':j7::54=" 4 'i '~:24.: 3 5-_7:438 1 J. '7'-14 91177 '.3 2144 7 — 4 11 1 '' 'J1 J 7911 144115~r 437-;'2 1t. "19 -4'74-lr-4 '1" flfl~'''1: 19: ~i - 1, ' `3 0 C. c!z 7 '- 4. 5'! _l __ _- _3 Z 2. _,.3,n... "I 1=1 7911 ''714" 1''t 7 1 1~7 illl ii 71 2 2 5 '4 94 1 4 j 741 4 1 1 1 4 4 4. 114 742 HH'I''I I. 4 4, 1 1 44 'II G_- 3%.6 lD is1 I-I I 43 4 7 ' GG4G11. C _ ' 37. '2'7 7 %G"' -4:- 7.4.4~ C 756~~''l ''153 '21 451 1 1 111'; 755.''7'74f 21' '.8t375:I' '3.F=1450~111,'743 '77'C 31 -6,2. 5519 0. iG, 3 7 71 8 7 1 j 3 V G`2 G 1 X. 5! 444,1 'Il' 44 1 4 Hi '; 1' 44;: 4.11;_ j44 1 11 1.441 *4* 444 41 ~~~~~~~~ -~~ 41441' 4 111 '"'~~1 IF 74- 4. 1 42 47 1.7 79 2 71 14 '111S 1 HI -~'5.3 "~ri 2711 47"1'1 79. 1'17'; 1 9771=" 1 1 5 7.444 1! 5:= J 71.1. 141 G 11 '''-' 14 '11 iI 4 '4 5' 1 1 411 '1 'II 1310`4ll 714lI 11 1II F.5 '9 '' 1 *~: *:'1C 74 4-11111.2'4.C7', I~~~~~~~~~~~~~~~~~:7 Ci,,,i C-I 0 1 2 " 7 4(1 ' 911"11'1.1'9' 7J11 3:~~~.:..33'~~~~~~.37 1..~~~~~ 1 -. 4.. ~ ~~~~~~...~..403 ' ID4*.!(1 -;2 71. -143 D. C CI 7.27 58C.i 3 -E-223791

Expansion of Gas in a Tank STUDENT'S FORTRAN PROGRAM BERNARD Jo SCHORLE T05-N 005 005 2 000 * COMPILE FORTRAN#PRINT SAPEXECUTEDUMP C BERNARD J. SCHORLE. CM211A 32M369 99 DIMENSION W(400),T(400),P(400),V(400)tH(400) 01 READ INPUT TAPE 7t2#(`W(1)tT(1)#P(1)) 02 FORMAT (3F12.3) 03 WRITE OUTPUT TAPE 6#4,(W(1),T(1)#P(1)) 04 FORMAT (1H 1F15.3#2F12.3) 05.C=17.225 06 D=5.8 07 E=060165 08 F_1697,2 09 FR=10731 10 G=5.4006 11 5=4582.9 12 1=1 15 VlI)_sC/W( I) 16*H(I)=D*T(I)+E*T(I)*T(I) F*P(I)/T(I 17 W( I.+1)W(I)-0.005 18 V(I+1)=C/W(I+1) 19 T(I+1)=T(I) 20 P( I+1)=R*T( I+1)*T( I+1)/(V( I+1)*TlJ$44 ~ 21.H('I+1)=D*T( I+l)+E*T(I+1i*(I+l)<F^(I1)/T(I1+1 22 A=W(I+1 )*(H(I+)-H(I) )-W(I+1W(T+1)P V( I+1)/G (I)*P(I)*V^(I)/G 23 IF(A) 30,40,24 24 T(I+1)=T( I+1)-O.100 25 GO TO 20 30 Td(I-tl)=T(I+1)+0010 31 P( I+1)=R*T( I+1)*T( I+1)/(V( I+1)*TdjJJL!S~_L_ 32 H(I+)=D*T( l1)+E*Td+l)*T(I-l) P )/Td 33 A=W(I+1)*(H(I.+4)-H(I) )-W(I+1)* 1)/G+W(I)*P(I)*V(I)/G 34 IF (A) 30,40~AA 40 1=1+1 41 WRITE OUTPUT TAPE 6v42q(ItW(I)vT(I)9P(I)) 42 FORMAT (.H1393F12&3) 26 0.875 781#490 328*225 43 B=P(Ih-14..696 44 IF (B) 46,46,45 27 0.870 781.210 326.634 28 0.865 780.930 325,041 45 GO TO 17 29 0.860 780.650 323,446 46 GO TO 1 30 0o855 780.360 321.843 END ( 1, 1 0 ~ t 1 0 ~ ) 31 0.850 780.070 320.238 RESULTS 32 0.845 779.780 318.631 Mole 33 0.840 779.490 317.021 Fraction TemP~R Pressure 34 0o835 779.200 315.409 Remz~aining Temp 0R Pressure 35 0.830 778.899 313.790 Remaining 1.000 788.000 367.000 36 0,825 778.599 312.169 2 0.995 787.760 365.488 37 0.820 778.299 310.5-45 3 0.990 787.520 363.973 38 0.815 777.999 308i919 4 0.985 787.270 362.450 39 0.810 777s699 307.290 5 0.980 787.020 360.925 40 0,805 777.389 305.655 6 0.975 786,770 359.397 41 0.800 777.079 304.017 7 0.970 786e520 357s868 42 0.795 776.769 302.377 8 0.965 786.270 356.336 43 0.790 776.459 300.735 9 0.960 786.020 354.802 44 0,785 776.149 299.090 10 0.955 785.770 353.265 45 0.780 775.829 297.438 11 0.950 785.510 351.721 46 0.775 775.509 295.784 12 0.945 785.250 350.175 47 0.770 775.189 294.128 13 0.940 784.990 348.626 48 0.765 774.869 292.469 14 0.935 784.730 347.075 49 0.760 774.539 290.804 15 0&930 784.470 345.522 50 0.755 774.209 289.136 16 0.925 784.210 343,967 51 0.750 773.879 287.466 17 0.920 783.950 342.409 52 0.745 773.549 285.793 18 0.915 783.680 340.844 53 0.740 773.219 284.118 19 0.910 783.410 339.277 54 0.735 772.879 282.437 20 0.905 783*140 337.707 55 0.730 772.539 280.753 21 0.900 782.870 336.135 56 0.725 772.199 279.067 22 0.895.. 782.600 334,561 57 0.720 771,859 277.378 23 0.890 782.330 332e984 58 0.715 771.509 275.683 24 0.885 782,050 331,400. 59 0,710 771.159 273.986 25 0.880 781.770 329.814 60 0.705 770,809 272,286 E-280

Example Problem No. 16 STUDENT'S RESULTS (continued) MoleMo Frtone Termpe rature Pressure MoIe Fraction Tmperature PressureFraction T.emperatuxe Pressure Remaining 61 0.700 770*449 270*579 Remaining 62 0*695 770.089 268*871 63 0.690 769*729 267.160 64 0.685 769.369 265.446 65 0*680 768.999 263.727 66 0.675 768.629 2626005131 0350 735.237 142.294 67 0*670 768.259 260.280 132 0.345 734.497 140.330 68 0.665 767,879 258.550 133 0340 733.747 138362 69 0^660 767*498 256.817 134 0,335 732,987 136.391 70 O0655 767.118 255,081 135 0.330 732*217 134.416 71 0.650 766.738 253.344 136 0 325 731.427 132.437 72 0.645 766,348 251.600 137 0,320 730.627 130&454 73 0*640 765.958 2489854 138 0.315 729.817 128.468 745 O635 765.568 246105 139 0.310 728.997 126.479 75 0630 765168 246350 100.305 728.157 124.486 76 0.625 764.768 244.594 77 0*620 764.368 242.834 141 0.295 726.437 120.488 789 0610 763,48 239.002 143 0.290 725*557 118.484 79 0*610 76354* 8 237.30 144 0.285 724.657 116.477 80 0.605 763.138 23753 145 0*280 723.747 114.466 81 0.600 762.718 235 6146 0275 722.817 112.452 82 00.95 762.298 2339783 147 0270 721.867 110.434 83 0*590 761.868 2321l94 148 0.265 720897 108.412 84 0*585 761.438 230019 8 149 0.260 719.917 106.388 85 0^580 761^008 228.619 150 0*255 7186917 104*360 86 0*575 760568 22682 10.250 717.897 102.330 87 0.570 760^128 225029 ^152 0.245 716.847 100.294 88 0*65 759.678 223227 1532 0*245 7165.8 7 98.25694 89 0.560 7596228 221.422 1543 0.240 71467 96.25 90 0.555 758.778 219.616 154 0.235 7135&87 94.217 91 0.550 758.318 217.804 155 0*230 7123*57 92.172 92 0.545 757.858 215.989 156 0*225 7126437 920 24 157 0,220 719,917 190072 93 0.540 757.388 214.170 158 0.21 710.07 88.01 94 0.535 756.918 212.347 150215 671077 88 19 195 0.4530 7564387 210.520 159 0 2 10 708.857 854963 95 0,625 7565 48 208690 160 0.205 707.607 83.903 197 0*520 7554958 20a6905 161 0.200 706*327 81*841 11978 0.520 755^468 206^.5 162 0.195 705^017 790777 98 0^515 754^78 205^018 163 0.190 703.667 77.709 99 0.510 754.478 203.1767 164 0185 7022777775.638 100 0.505 753.978 201.631 165 0.180 700.857 73.66 101 0.500 7153468 199.482 186 0.175 699.387 71.490 102 0,495 752.958 1978630 167 0.170 697877 679412 103 0.490 752.438 195.7731670.170 697.877 69.412 104 0.485 751 918 193.914 168 0.165 696.327 67.333 105 0480 751.388 192.050 169 0.160 694.727 65.251 106 0.475 750.858 190.184 170 0.155 693.077 63.167 107 0.470 750.318 188.313 171 0.150 691.367 61.081 108 0,465 749.778 186,440 172 0.145 689.597 58.994 109 0&460 749.228 184.562 173 0.140 687.767 56.904 110 0.455 7489668 182.679 174 0l135 685.867 54.814 115 0,450 748,108 180794 175 0. 130 683.897 52.722 112 0.445 747.537 178.905 176 0,125 681.847 50.629 113 0440 746.957 177.011 177 120 679.707 48.534 114 0.435 746.377 175.115 5178 0.115 677.477 46.440 115 0430 745.787 173.214 179 0.110 675.147 44.345 116 0&425 745,187 171.309 180 0.105 672.707 42,250 117 0.6420 744.587 169.402 181 0.100 670.147 40.155 118 0,415 743,977 167.491182 0095 667.457 38.062 119 0,410 743.357 165.575 183 0.6090 664.617 35,969 120 0.405 742727 163.655184 0.085 661.607 33.877 121 0,400 742.087 161.731 185 0.080 658.407 31.7087 122 0395 741.447 159.805186 0075 654997 29.700 123 0*390 740.797 1570875 187 0*070 651,347 27,615 124 0.385 740.137 155941 188 0.&065 647,417 25.535 125 0.380 739.467 154003189 0060 643.167 23.459 126 0.375 738.787 152.061 190 0.055 638.527 21,389 127 0370 738.097 150115 1910.050 633.42719.325 128 0.365 737.397 148.165 192 0.045 1627.767 17.270 129 0.360 736.687 0.040 621,87 7 693615.225 130 0,355 735.967 144.2551940.035 614.13713191

Expansion of Gas in a Tank 0 -- 41 C,;.-0 o '..'-i( c:.ii '. G', 0:, c 1- o c- cc -j, 0r 1 O- r — lC! co L', O,7,.O ~ rc' ~. Q: r — C-'4 r-,.'4 n ~O, — ~-.4 r-, r..",4,T. C:: '...7-''..1- c;' 'i7 - 0 cc:, " r-., r- '-..I..':, C n 7-',;', r,-3 *- I c0co- c.i.. ri. rco cc c oi i cc0 co r cc r r-r-r- r-rr-4 - - 4 — f- f —. - r — r — - -- 1- -- - r --- ' --- r — r'..-+ r (,-, 17 1C^1 * 0:';*"**. r~-i,**"*,,*"**. >*"-. {"*: ***-*i.*"**0 i0*,,-~; "*l**",*-*,,-,1,,*l$*%.,*"*,,, CD 1 -, —,.*l I *"% P_ + + 4' ++++++++++ o 4 -; i4i i 1~ St C-N Ti 1 Q 0 I 4 C -. + 4..: ^, ccr HI Q. ( — (' -.-:iri ii' L*'i........ Ct*-* r. rK.-. - - II —4 - Iri. '.L.^:'- H ctocj ^*^ ':r —:t **u: ""!4..-7~:i4:+:" ii- L + + + + + ++ 4 + + + + '' 4 + + + + M~11 CT.^-~- '^ - 11 a' S ^ ^ **r- 3: '" 1- - 4 - P - - - 1 - 1- - F (,)-.o 44I, 1r i —.(: IIilir.0,.I -_-,..-.. 17i IL. r r-;,-, " - 1C, O 1.., '. " " c: C W *",. u u 'L.". —? ^; (^ H. 7 r: r-^ r. **..**!::'- r:;"' l:-,C-.iI t:"' '- ' —* + 4I-i, X f! 5 -.i *T cri4 T CiC Cl CC Vn 0::< "o m r-x ' 'z,**-**.*"*. '-' c 'C) F-i I-~~ ~ ",.,.~ P.: ~ L ~ -fi'" ' CO rL.....,: /-, ** '.D.>. r, r —If -,- C:, c'-,: — rS o **-. / ~~~-.~~~, ~ ~ ~ ~G. + +. + + + 4-.... + + O - + '.. Cc. C-. ' ' (:.^ CK: a: ~~< (- 2: -rn o (i * n a'., ':i/ o ' 4 '..C, - Z: Z C; I-, -- *f) C — -- -— iC- in.1 --- Xr: '.: a"'*' ~ ~ ~ ~ ~C,.;., a0.m',.) 0. I'-~: - ". *4 4 r'"- '. r C-. I,:.,';.- IE-282e~~~C '.. r-~ ' t,: 0 O '.. r' -!! II Ii!! H- II iI 11! 1! I! i f I I H!!1 I! I I ~ r,-.,,.-'., cI,I,,, " Z'.,,% i," ",, '",,'-,,'i",, '"' r'~,"".,,"'.,,'-.-* c. im r. a.. QL.. 0.. o.. 0.. CL c- D'.. 0.. CL D_. rl

Example Problem No. 16 r — r:-4 'v- rec '2I ~- r-.ti ax reic C- r-,- - ii- — 71 In2' i7' r7- e (2) -.i r- -1- %D LI) cr- -i iLr( 7 -i: c,!:. c1-, cc- - r — r- '2.-.1- c c -ic'k -~ -N_ ' 2:~ n7)4 c r ~ 2 *i-t ci' - - -i- r — cc, ~ c.r,:2-, cc, in- r — '2-4j C: Cf i'1; C~ 7-'' in -.1- r-e):C -4 '27.. -A '2-4 'C; C;-cc. tr' -— i- '>-i. C:' cc -.. -' c-r — i4f: C c — qr-.n r4: C-. 4 cc r-...:'(- c'cj c ' r- 2I PO f:i'-4 '2-4 '2-4 C'-A C-I. 0 - -- ' — '- 'O 'u'. (2-'7 2i 2-C;C r- r — '-Ci.2' i -— 1 -i-t r-):5 If It ii i H i i if If 11 1 1 ItHit i ii I i I f Hi 1 tIf II it i II If I H I f II it i i +4+ ++ +4++++++++++4A- ++++ + +4+++ 4++ 4+ +4 4++.4 ~. -. -- '2-4 ':::' -:' '::' 'C' C' CC' (2' '2:' C.-4 -' r — o 41-4 [ ---I -I —,. — --- -.- I —I- -t r~- -.1- '2' r4-:' -i- r — c '- PQ- I cr.. ci n'i L C- in -..c r: — ' -C '2 -C r — -.42' (7g I 27 -, r LfV in' i V in (C:'I:n. r —... r-**- r — 1,CC C1c' I2-,.I- ' 1 —i 1"! I HD H I f I II H Ii I! it I' HI' I f ii I Hi II II ii HI H IJ, HIi II II i! i ii H ii 1 z~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~e- l:ee. -,!e- - - U, 4 T T T.-4. - 7-. - 7 T T T T T -7 -T -7-T.T. - `-. -.. O -472'>4 --- I.' C7-4 C'2' '246 ---4 1-C V - 1- P-CC- -- - 7-I 'C' 1-4 1 -47~ C-i 1-4 I" C7 — CCI11 - -i -:> 0 P4 E-12 + ++.+ + ++ + ++ +.+ + + +4+ 4 + +-14- ++ + ++ + + + + 44 '22' CZ- 0- '- a(C-I ' C-I 0- f-i- C.)' '22'. CC-2 CO F- C-'42 C..; ''' F_-:~ 0 Ci)72 ---C7aC' C'i C7,, 4.;. rC. - - '.c'C'CC -I-c'.4 2,'- 1 n-SIf!r:i- V-i- r- r-i.-j '~I -.4L 'CO-Ci- C-t in-i-F! ri' (Y I. I I~~~~~~~~I(.'r7 I -4 IN. P'4 -4 I -4 -4 D -4 4. i- 4-4 -4, -.4 l. —' CO -. r- -.4 -4 9 —4 4r4 i.t r-4- 4-4 -.4 CLC~LCL C..CL2..CL.C.L......~1....L..L.L......L '.X 4. 4'.'. r.'4'C.~-1 ItC.4' CC,''i4.,.'i/''7 r- r '.4 n o - %4ri-t(',- -r~ xLi ri-, i:,-,i r-q~ -283 I"

Example Problem No. 17 ITO'S METHOD FOR INDEXING POWDER PATTERNS by Gerald L. Liedl Background The determination of the structure of an unknown polycrystalline material, i. e., the lattice and types and arrangement of the atoms in the lattice, arises frequently in studies involving crystalline material. The first step in solving for the structure is to determine the Bravais Lattice of the material. For the lattices exhibiting high symmetry, e. g., cubic and hexagonal lattices, the problem is not too difficult and is readily handled with a desk calculator. In the general case, this problem is extremely time consuming and involves trial and error methods. A procedure by Ito* gives a logical method to index an x-ray powder pattern which is then used as a basis for calculating the normally reported Bravais Lattice of the material. The Problem This problem would be presented in the form of an unknown material either in powder form or solid block. The student is then asked to determine the Bravais Lattice of the specimen. Additional information may be given concerning the material such as an unknown product of some process which is not working correctly and this particular material is suspected to have some influence on the process. The approach to the solution of this problem is left to the student who may either use some method given in the course or search the literature for any other method available. Theory Known to the Student A powder diffraction picture consists of a number of lines, each representing diffraction by planes with interplanar spacing dhlh2h3, where hlhlh3 are the indices of the diffracting planes. In the reciprocal lattice, each set of planes with indices hlh~h3 is represented by a point lying at a distance 0hh from a common origin and on the normal to the planes hlh2h3 from the origin. The distance 0-h1h~h is defined by 0h hh -l/d.hh h 1 23 1 23~ Thus each set of planes h1hjh3 is represented in reciprocal space by a vector from the origin, of magnitude 0- h~h3 and direction of the normal to the planes. The magnitude G-hlhh of any reciprocal lattice vector is related to the indices hlh~h3 by 2 2 2 2 2 hh = hb + h b2+h2b2+Zh hb bCo2 1~2h3 1 1 2 2 3 3 1 2 1 2 co 3(2 + 2hhb b cos p1 + 2hhb cos 2 3. 2 3 3h 3 b ob3 P2. * L. V. Azaroff and M. 3. Buergei", The Powder Method in X-ray Crystallography, McGraw-Hill Book Co., Inc., New York, 1958. p. 106. E-284

Ito's Method for Indexing Powder Patterns Here bl, bh, and b3 designate the magnitudes and P1t 32' and 3 the interaxial angles of the reciprocal cell. If one can, using equation (2), index all the lines by selecting values of b, b 3, b 1 P p2 and P, the resulting cell is primitive although not necessarily reduced. The reduced cell can then be found, and from it the Bravais cell can be determined. The Method This section describes the method of the computer program for utilizing Itots method for patterns when the structure of the input parameters for the program are the number of lines(which must be less than 50); the (indirectly) observed values of o-hlhah3 for each line, listed in order of increasing values; the maximum tolerable error between observed and calculated values of ahjh2h3; and the maximum number of orders for lines with a single non-zero index. This description follows the sequence of the flowsheet given below. The essence of Ito's method is to use a primitive cell to index the lines of the powder photograph utilizing relation (2). The strategy of the method is based on the fact that the smaller the three non-coplanar vectors selected as the sides of the cell in reciprocal space, the more likely it will be that the cell so defined will be primitive. To index the cell, the lines are first listed in order of increasing value of o-h h2h3. Then the first line is designated as the 100 reflection. All the lines of type h100 are then indexed utilizing the relation, h00 hb 2 (3) 1h00 = hlbl The next step is to designate the unindexed line with the smallest value of Ghjh2h3 as the 010 reflection and to index the lines of the type Oh 0 using 2 22 TOh O = h * (4) Oh20 2 2 It is now possible to index all lines corresponding to planes of the form h h 0. For these planes, (2) has the simpler form lh20 = hlbl + hb +Zhhbbz cos 3 The special case where p3 = 900 is recognized by the presence of lines for which hl0 h b + h2b (6) h1h 20 1 1 22' If the angle p33 is not 90~, then interplanar spacings of planes of the types h h 0 and h h 0 are different. Furthermore, the values of o,2 and o- will be greater and less than h 2b2 + h2b2 by an amount ~hjh20 and jhh2t 1 1 2 2 equal to J 2h1h2b1b 2 cos P3 J. This characteristic is exploited by finding lines from one pair of the two types, calculating cos P33. and then indexing the remainder of lines from planes of the general type h h 0. It is possible that no lines of the form h h20 will be found based on the reflections designated 100 and 010 respectively. If this occurs, all indexing of the form Oh2O is erased, the next consecutive unindexed line is designated as 010, and the procedure from this point is repeated. If, after the eleventh line is designated 010, no lines can be indexed hlh2O, all indexing is erased, the second line is designated 100, and E-285

Ito's Method for Indexing Powder Patterns the procedure from this point is repeated. * After indexing lines as h1h20, the next step consists in designating the unindexed line with the smallest value of 0-hlh2h3 as the 001 reflection and indexing the lines of type 00Oh3 using, a2 =h2b2. (7) OOh 3 63 ' Then lines from planes of the type h1Oh3 and Oh2h3 and values for p2 and p1 are found in a manner completely analogous to that stated above for finding 3 and indexing the lines from the h1h20 planes. After all the lattice parameters are found, lines from planes of the general type h h2h3 are indexed using equation (2). If all the lines have been indexed by this time, then the problem is solved. If not then, it is likely that the cell defined by the six parameters determined is nonprimitive** The indexing of the structure with a nonprimitive cell might arise because one or more of the reflections indexed 100, 010, or 001 may have been a 200, 020, or 002 respectively, based on a primitive cell. This result could occur if a line or lines corresponding to the first order reflection(s) were missed. This possibility is explored by first reindexing all lines after redesignating as 200 the reflection previously designated 100. Then if unindexed lines remain, the line indexed 010 is redesignated 020 and reindexing begun at this point. Finally the line designated 001 is renamed 002 if unindexed lines still remain. At this point or after all lines are indexed, the results are printed. These consist of the indices assigned to each line and the calculated values of 0hjh2h3 based on these indices. In conclusion, a few comments should be made on the limitations of the program. The most stringent 2 requirement of the method is that the measured values of G-hjh2h3 be within the tolerance specified. It is the -.2 experience of the author that the use of a tolerance of less than + 0. 0010 (a. u.) is too strict and more than + 0. 0015 (a. u.) 2 too relaxed. Therefore, careful attention must be given to' minimize errors in experimental techniques used to prepare and analyze the powder pattern. As indicated from the description of the method, successful execution of the program is not precluded by missing lines. Only if both 100 and 200, 010 and 020, or 001 and 002 lines are missing for each possible primitive cell with reasonable dimensions, should indexing fail due to failure to detect weak lines. Critique Two other alternatives exist in using this problem as a teaching aid. One is to let the student program a method for detecting the higher symmetry lattices before using a previously programmed Ito's Method. The second is to have the student program the calculation of the space lattice and the subsequent transformations to obtain the Bravais cell. Both of their alternatives would take less time in programming. It would not be advisable in my estimation to give this problem to a student if a program oriented language similar to MAD was not available to the student. * Editorts Note: The use of the number eleven here is arbitrary, but seems reasonable based on geometric considerations. ** Editorts Note: Other factors might cause the presence of unindexed lines. For example, a second crystalline phase may have been present in the sample. E-286

Example Problem No. 17 uL\inte- Firs+* unin dexed Oh.O Lnes.s,.,mi,?, J t ___j L L Lin Po (Xi I_~fl~t?( ~I1eO.l T -oF Ana Saas ind I -3 - 1 0- 9n0 t '5" C v e i>1 IFa 0 EI TPR I IT (NtASIfQWt4MT ePRIN,,InA.K o.M tyr n l N a Line " E-2 Index oi^ E y-28oh7 lnes EXT |coiwitN*^ —~^P^~NJ \ 7 PRINT (^)

Ito's Method for Indexing Powder Patterns FLOW CHART FOR ITO'S METHOD (Continued) t O;esar.JLovqib S %t o O(;3 nces o6l icT —^ ~.met,& Vo. lufs.,.t o,~ v.a-~S, e T - 1% 7410r= ^r r ^ -" v i"1 kkQ '9 |bt* b&~+ i t, ItnvoQtno h *C>tiP., -C.. t s.M _ J,___________L ___ L__L________i__i lI-_____________.__) _ __ _. C P L...E P C i.. T.E C TE. * C,__,1F'__-!? L.= ' —:'. i'j,! rF.P r r.-, F "- C H 0: J 3 ' i -...-',::-: ' T Ei k T.:r,; _'?i::, 'T R " i!. M; I. r r E r: '! i" C F?r:: C -: r-. j L '-.i - s F: js T -? " I- E':5: TWO ',,:!,' ' { ' i::J F. I s F R D E::,! 1 si...',i:! E i:s.': F:';. >::.;:' s s: i 3:,..': T i. Ls I i* i s s s s Usis.s. i. K.I:. i s....... i.. i. Ls. ii:_ ' i: i t::!.'_i-,_t; _::_ -- '" - _::r i_ T ROUG i'- i F r.-:1 j" E.' 7 s',: -;: I.'I _ " is___ T iR,. i! r: T -. i -: E'1 -, ib~l I 'ii.!,-.ii _ E ^"1-.....- v '; ' T H R ',.i_ r 0_.-, F___ F______: i r.....:. i i- ___ 0i i"Gi 1 E 1 i'.:,:: i: I i::1 ]: '7 5 H i G H "! i- i i. F!!' 1. - i i ~ 5R. j. G 1 7 t H itt i 1:2 T*r ~ il::.. ORDE O:, 2:, '... -,..,:: i: '1 H i i"!:.". T.:.... H i LPit iMD OF i-3 TI Y PL -3 19 T H;i: TfR i!;- H!::i5 L 5H P2:i i. F:' l-i 1 i:: i. i. G.n!"3.!_! ittii2 t r H E: '.' E R.. S::. - 0:.: I.,, E ':;: ',::2 C,.',:::,2- F: CE..,2::':::: i.. 3.:,:: t i i. t';1 50:: 'i5 3~- _,:: i.:I. -! 5 i"- E 3r ' i " i i:. C ' i i I.:, O.._..__,., E-28

Example Problem No. 17 MAD PROGRAM (Continued) 1. R L PFH A:P2 E I D CF C' r DI ' i;" '- i T L 2 5 ".lE;:-:'T TrHRO:UGH PLP'HPR3: F..:-0... 'R:::'.:, H-: D F ' H, 2-:2.: -!. 27:I., 1 ' - R ' ALPHP3 EN OF iD ' 3T. F________ THROUGH 4, IN. -2,.:2.~ THR!OUGH i:!LH4 FO R I. ': 1- - 1, i..!.,.HE"E, E RE PBS. S:I..2:,-R.', E..9 F. -C.5: 1 0 u 1+ OJI. 4-:Ci ':,-:3:- > + 0 43 LHE IE. EF C E F R TZ". R. - 4L T.1),,;: 'C 1 1 ' F r ". b'; I 7-:'Tii"iE:T4 THRFOUH LPLHS- FCOR Hii..i. H1.G. ':9 47 iTHROU H RLP'H5. F: H2P H2, G, Q. 49-:L R - H1 '. E P. P. B,:"i,: 2":, 49 TH.'."HROFGH hLFHLH5, F'OR I'".Z-H -1 I.LE. 1 =;.,r'::B -,:.I2 5 1 THROUGH RLFHRIS, FO.R L --! 1 1:,E ]. '..52 BB':,: 1 ":, -,:: 1 ':, + 1i_ ' 4-_4 ____::_RiNSFER: TO-J OET:+'-..... " r- inj M., i'-i '1'._~!'I.',, A P H A r3 E H L"i I " I i'i L. L P H A 5 C '"'i T I tE 57 H! - 1-3 F I U1 LR H,: I:.i 1" i " " i.1-.. I '* 6, ~ T,_I E'-'E":,::!::,. _ I. EPSP,I iE E E.. E I. 2 -: "L. EP PJ [_PF'H F-i 7' E"' O D;3 F L-: 0 i"-I DI,'r " i' i "i i'F F-L_ 7 04 '7 ' Zi'. E 3:: 13;R ':Z 4.':, 0 ',::i. 740

Ito's Method for Indexing Powder Patterns MAD PROGRAM (Continued).-i<T T'.i z.-. li r.. i r '! t I, PLPLii LI HE D I M8 E',:': T3 F T H'TRH RL F' P 9 F1R " "- 1 'K G. 0- " ' " ' '.: I ____1' ORD E R:. P. 2 M <:':: 9C TH O,'GH ILP F'- 9 '.1- _. G. 1- W HE E R R S. ii,' I.-.L. E 9 B c.3T, H - '. ',I RLP'H I fl 9 END 0F CI.. T ii L 9 THRO| GH RMR 1, FOR H! -,!,1. 9 9-' T FIR 0 iRO G, H L' R f11i"I, FOr. - 1, 1. 3 R,, -!,!. F.. t. ':) ":') ':) = ' -i:,: 1 i,:, '" F'. 2.2,:' +.R-! 1i, R-,::I ':, - 100001.H1 + H3!0.3J HE' I2 FR' 2.1is -l A '-! i' ', THFi'. 1EHD _F COih D i I T OHi i L 1 THROtUG H G.=Rh.MM2,~ FOR H 31. 3.G.... 1.3...... P 2 F R rnm'sEirn =1' i. ~-. _,, r".- 1'., I'LT:rH1 P 1H) HPF 2 H B T HF.' H T G im R 2.., FOR F: I - - 1 I L, '!. E: -S,: I,2: 'T.. 114 ______THOG GH F.O'i 1I' I 1 H G IR_,_ F.: '.,! 'EL.GE 1 5.i tHEr'E,.,ER.i:,.,.'.L. +E:.-2. -R, PS. F'i 1 6 C,_7:" *C —.:' + 1.'. iTRiF.'ISFER T- DELTi.5. -,_ 1 9 GR'1MR 3 E!"iD O F F_:OfDITD I: I 1. 2 0;TW,' I. T i H = E 12 DELTR5 THR:OUIGH GiR.1aI4, FO'. *H'i:-:! i H'. G. *! 22 C:THR.OLIUGH FR H 1 3,G. I _=H. 1 F'.:. '...:: 2T. t '. THR- H Fi 3A 4.l O G 1 3 ki H E" li.,,5..2,:!.L. _.: — i E3. R~ AL. F ", +1 22 SrI;7H, = 100IU I l' 2 1F 1 Hi I. 1 ' 'OR N:', E. 1,:r L E - i' 1 3 __3 _ R H C A E ' I ', 7. 1, 1 0. 1 s 0- E tI DS 0 F1; H 1 -Jr- I 30____ —3:TF-FE T I H.. 1: - H F 10 ' '1 ~ 'L. i F. ' IT 1Th; }-I R! I 1 GP I,F4 END OF: -I': lT,I F4T F 0[-iL 1.-.'. =H nE. R,:..G P. 13 6 3 -E:EH TO PRIM 138 T-HR 1 I R-1 lH U: "1Z,},- H' 1. 1 2 1!.. i. THFR I H T EFR03F.: M Fi TFM I ', S 13 j R i. H:,,. '! 1.' E i E F COH!IT I IL C D! E- 290 CHAM_5 U C_.3_'EHD 0OF COM CDIT IHP. L 1".; H E X T 4, C ':.' 4 } - 0 14.3:. THROi.GH GR, MMtS, FOR H2'1A1, H2.Gl. 9 14'i. THROUGH GRM!', S, F OR HE3 1,, 'H.G. 9!'45 T H R O' IU G3H G R M i',R F: R I=*1.'!, I G, N H OF,:' 4 N - 0 N A L 1 4j I-="..

Example Problem No. 17 MAD PROGRAM (Continued) Gii i'; EPIIID OF - Ci D I ui L!!.d H Ei"E.! E R C..4.9. ['-.J E. -, T i ':N S E. '" 0 ~ E'- F':: T!:i;!154 ET~-u I... C:59, 0!55 T:- '... tRGH i GM'Mi::!.F "F H2-, 1. i 2.G. LiL9F I5 T R G H M 6, F 0,, H. i__i__H2. F. 2. B E':2" 2 3, '.+ ' i. F'. 2-B.:':3":,_ _________________! 5 158 T.R:,,:I.: '..r.,E::,! r'-" 0 ---. 'i R -! G i'"i U ' H G iRt MMP i ' 7..,: Ri L:. 1 L - I.., -i..-, '_.- (:' E-! ^ 'i t5_____UHER ',:i ' '. 7SS F' ":! '" 'L-. r2 '" "-:.2...... -: H. L. E_: ~ G',': n " A - 1 i1 3 GR M-k I M ' -.-. ii ER...:: i., C,;:! 1 R 1' D EU~LTL R61-4 T H R U G _____._ LO _2_: 21 T NR 0 UGH RM I, i 8 'F......i. 3 1:5,~I..109::- R 'I7" _ - 2 3 B E 2T 9: 2: H. H 1 B:: ~*:::!, 1 R Ij E F.: 09 r E. ' 1 ^. '":: Z 9]: - 0il iiI! "! 4.iil lEi-M291 il.i..i.: i

Ito's Method for Indexing Powder Patterns MAD PROGRAM (continued) T FRii FER TO N E:."T1 213 i '.R!i.HE.'E 1. E. i. iD. E' 2: ' L.,:: 2. L,:. D,. E: C-:' 21 4 T'*HR' GH. Rb FO,, I 1 I THROIUGH ZE.'.', ': FOR i-" i,.G. ' 21SF T F' -i.!, ll,,.. E R:, "I' -} F.' ' _':;....G. -, i.: ''-. ______uJE,.! -, '. ' E F..,:. I.::C -,1 0t.! r-'.:-;-T'I i_-i 2: i._.. i 2!- 21 5i ' I1 1. -. ZER0 6f R I.K'L 4- 0 25,&:.".:, - B C._.3:......, i iL TRRSLFER. TO E':T.3 2 i TF 'M RTM I S'll 21 'R.-.:'.NSFER Ti3 FFRI' I22 T ' iF F DIT PR 12 ELT2 E FiD CF C:0 i I T I 0 'i - iiL '222 r- L T E:-, I T T T C H, D ET1 i iT F.. i.. 3 DE L T H E1, - S i: RT. A: B I::I1 C,:, R T,'-i.::.:' T. B 1::"2 3:C '' 2 B1 ',: ^:'.;,. P. j.:, i E T l R R T: -:: i: " ',. ':. B 1 ' -!::. 2 -" I.::,f T. R,.2.i -...... B,:,r. 7: 1,:: 1.:, 1 i,:::'r_, '"_..::..:: FP R I ". T' FO T H. B... B 2.. "2 P i ' T F 'orM'- R LL2 ': 1 ":..,:_, ' 2I. r-, r T.H i..'i Ti_. F',:. s.: J.Gi. ', - ~ T". 0 2.3.3B l s ji1 s T I i I T I I% IK. ' 0 TF R S FR,: - J::, = ' "::::::.Tr T 3. ir r. I E IR k L E *Si, i7,, l;. ' F; -,, 1 k i. 232: _A_ Ft.r. i ii~r it _gt_._ EOR LS p I2. I BEIG PO E l iIn rr irB3. r 'T I r! T' i r E 2 T sY;;r - l iii iii H L r LI,!] i rE R A L F C. I 1 1 0r I1 HII-,- i T HE F' I F -TE i LI E rETOR DflLH- M113-' 1H NOT p LIE 'T4 FIS 23 FlA ET F '' i H1 C I F I.. _ VET O'Rt M S F EF. TS ~ 45. T A.: 1TFI-iiG_,-.F, Ftl2........... S. - Ii E 1 D. ' i. i ' F:: _ i i.,. 24..., ~ -:, F:. _ ____'.ECTOfR ' V5 I I ES R~I; -:iiESULi 1i, O5 7 -. I.-,S i 5 r i '-S. S-:..:. i"' Di E i:':. 2.:. j D '",'. -iZ 1S;E,': I'F. ",,FLIE 1''. Z. 1!HI: S4 1 I'iE:: i, I_5 I I'"' 2 4.' _ "ri E ' E T ti;' F 1 -i.,:" ' -"; E -,. I7 ~~1:55~~~~~~~~ I2.. ~~~~~~~~~~~~~~,'I ~-' E'- - * i,.. U 1;F.FF I Hi [OP 1RAP___ tll _____________________.iF T E-292

Example Problem No. 17 * jC.,.-.4.. 0 0 0 0 '*>*) *"***!~~r' 0: i0 — i o?,* ' -- **- 7 0 0 0 0 r''"i r-'-~~ ~ ~~~~ ~~~. ' r, r.'**" r: F'O!'*" ''. ''i i:', i:: CJ.,~-J CD 0 0!***...:i, o.r. " CO C.O C.r. L i~~~~~~~~~....:i,I.:n, -:::I 2CD 093-......... Li'~~~~~~~~~~~~~~:'| Cg~~~~C i C"' r-'"; o~~r- ' r:' 0 ' 0 0 C:'~. 0 0 0ii*!0 0 ji;-! O [i'i li")* i j:.. LI:)~~~~~~~~~~~~~~~~~~~~~~~~I::1::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(. Clj-.. j 7-, j - iC,!!!:.,,::::;**! 1:::::! j!C".'. i I J::::::i...... j~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,-J J ':':~~~~~~~~~~~~~~~~........ C I"C[ i '~ J. r"F r-,", '::i:) L.-..'..... C::::- *- 1::"**:::: =i:::!:: jC:' i r " C i!C::* C 0::i '..;:* *::::) C:' '::;:' '::::' C ~~~~~~~~~~~~i."-'-. i::::' i~~~~~~i' — 0 C ' 0 '::;::* ':::::* ij-. i::::) r::i~~~~~~~;::::: C:' ':::** ':::::;!" ~...*; *.;: 1....I'.!: N 0 O i: —;*}:;** ''.:; *^:- J: "C: ' El 2: "J p'-. ~ ~ —.:::

Example Problem No. 18 DESIGN OF A MINIMUM COST AIR COOLED HEAT EXCHANGER by Brice Carnahan Problem Statement A natural gas compression station uses recirculated water to cool the engines and compressors. Because of a scarcity of secondary cooling water, air cooled heat exchange units are required for this service. The water leaves the cooling jackets at 160~F and is to be returned at 150*F. Ambient air temperature is 6 100'F. The total heat removal rate is 20 X 10 BTU's/hr. Finned tubes having the characteristics listed in Table I are recommended for this application and are commercially available in four different lengths, 16, 20, 24, and 30 feet. Construction practice is to use two-pass waterside exchangers with two rows of tubes per tube pass. Fans blow air vertically through the tube bank in a single pass. (See figure 1) Design the exchanger which yields the lowest annual cost based on the simplified economic analysis which follows. The total installed equipment cost can be estimated as the installed cost of exchanger and motor-fan assembly (See Table IV). The annual operating costs can be calculated as the sum of power, depreciation, and maintenance expenses. Power costs are $0. 006 per kwh, where total power required can be based on needs of the fan motors only. Use 7 and 1 percent of the installed equipment cost for the annual depreciation and maintenance charges respectively. The original equipment purchase removes the potential earning power of the invested money and the company estimates its annual losses at 20% of the original investment. It is desired to minimize the SUM of the annual operating expenses and these estimated losses in earnings. A fan efficiency of 65 percent and a mechanical efficiency of 95 percent can be used in the calculation. Engineering experience indicates that the minimum approach temperature difference between the incoming liquid and outgoing air streams should be no smaller than 15~F. Liquid side velocity should not be less than 3.0 or greater than 7.0 ft/sec, and inlet air velocity for the best exchanger will probably lie between 300 and 700 ft. per minute. Expressions for the re drop for the given tubing are shown in Table II. Fouling re listed in Table III. Expressions for determining exchanger and motor costs are given in Table IV. Physical properties of water and expressions for calculating the physical properties of the air as functions of temperature are shown in Table V. TABLE I Liner Material ADMIRALITY Fin Material ALUMINUM Internal liner diameter 0.902 in External liner diameter 1.000 in E-294

TABLE I (continued) Fin root diameter 1.080 in Outer fin diameter 2. 000 in Fin spacing 9.0 fins/in of tube length Mean fin thickness 0.0190 in Fin surface area 3. 622 sqft/ft of tube length Tube spacing 2. 1875 in center to center Tip clearance 0.1875 in Thermal conductivity of liner 58.0 BTU/(Hr-,F-Sqft/ft) Thermal conductivity of fins 118.0 BTU/(Hr- *F-Sqft/ft) *TABLE II Inside heat transfer coefficient: (Dittus - Boelter equation). hi = 0. 023 RD -(Re)0 (Pr) 0.3 Outside heat transfer coefficient: (Ward - Young equation). h 0.364kA(ReA).068 1/3 12 )1.45(&~ )0.3( D)0.1 = 34kA(ReA) (PrA) ( ' ' 12 Correction factor for outside heat transfer coefficient: (after Ward and Young) hb l +<C2 Vmax OC1 = 0.98 G?2 = 0. 00 Overall heat transfer coefficient for finned tubes: 1 Ri U = 1/ Lh + +Riri + Rmrw +RLrb + ro + r Correction factor for the log mean temperature difference for multi-pass exchangers: =1.0-0.0 T1 TA2 -Al =1.0 0.001 (T - 100) AT Ti1 T-,,J Pressure drop per row of finned tubes: aP =cC3 a1x07 Vma 324.5 4 1. 51 TABLE III Fouling factor for fin surface 0. 00000 (hr-~F-sqft)/BTU Fouling factor for inside liner surf. 0. 00100 " Fin resistance factor 0. 00066 " Bond resistance factor 0. 00025 " * See list of symbols (Tables VI and VII) for meaning and units E-295

Design of a Minimum Cost Air Cooled Heat Exchanger Cost of exchanger (installed) in dollars: CEX = 10000 + 5AB Cost of motor-fan assembly (installed) in dollars: HP4 100: CM ' 320 + 35.8 HP HP > 100: CM" 3900 + o6.2(HP - 100) TABLE V Water properties: Viscosity 0.924 lb/(ft-hr) Density 62.4 lb/cuft Specific Heat 1.0 BTU/(lb-F) Thermal Conductivity 0.425 BTU/(hr-'F-sqft/ft) Air Properties: Viscosity: 0.0413 [(TAP + 460)/492J 0.768 Density: pA [E29/359) K492/(TA + 460)) PJ Specific Heat: cpA (1/29) [6.27 (2.09 )(TAp460)(5/9) -0.459x10 ((TAp+460)(5/9))2] Thermal Conductivity: k 0.0121 + 0.00002 T A AP PASS 1 T L, 1 PASS 2 TL 2 I TWO TUBE ROWS PER PASS I FAN FIGURE I SCHEMATIC VIEW: AIR COOLED HEAT EXCHANGER E-296

Example Problem No. 18 Solution: Optimization studies in equipment design work frequently require extensive parameter variation and repetitive calculation, and are expecially well suited to computer solution. However, in order to justify the extensive programming and checkout time required for a complex problem, it is usually advisable to make such programs as general as possible without unduly obscuring the logic basic to solution of the problem at hand. In the present case, the solution is generalized to the extent that most of the parameters given numerical values in the problem statement are read as input data; this gives the program considerable flexibility in handling problems which have a character similar to the one given. Because of the complexity of the program logic, the discussion of the solution is divided into three segments, a) initialization, b) exchanger design, and c) testing and parameter variation. These general headings are subdivided into several logical sequences which follow the flow diagram and program listing quite closely. a) Initialization: 1) All items in the list of input parameters (Table VI) are read from data cards. 2) Several quantities used in later computation are calculated from the input data. The quantities and relationships used are as follows (all units are indicated in the variable assignment lists, Tables VI and VII.) a) The heat transfer resistance factor for the bimetallic wall composed of the fin root section and liner thicknesses: ~. _ (D.-r DL) + (L.- DO) n ~ 1Z 1 IKt bl The log mean wall diameter: p-, — DO.~ D*= In V(Xr/D;) c) The ratio of outside fin area to inside liner area: AS T([r./,I(z) d) The ratio of outside fin area to mean wall area:.D AS i - 'i (D,,M/IhZ) e) The ratio of outside fin area to outside liner area: KIL= IT (D./IZ) f) Inside cross-sectionalarea of liner: g) Ratio of the maximum air velocity through the finned sections to the air velocity at the face of the exchanger. VMAX. [Do +S. V. D+ s * - - NI -, (Do- D,) h) Physical properties of the air stream at the estimated average air temperature in the exchanger. Viscosity: * \j \ A - 0.0415 [(T4 /49 Thermal Conductivity: KA - 0.0121 -.- O. OOoOZ I Specific Heat: [. (129) [6*27 -.O T.E) -.59C06 ((TAp760)(5/9))2] E-297

Design of a Minimum Cost Air Cooled Heat Exchanger Density: fA - (29/35 9) [492 /(TAP+ 460)] P i) Density of air at the inlet (ambient) temperature: f 9/A559) [ 92. / (7AA- 460)] P All the input parameters and the quantities calculated above are then printed out with appropriate labels. 3) One data card is read which contains the following: a) NCASE, the number of data cards to be read in step 4 and processed with the input parameters read in step 1. b) AT.in, the minimum permitted approach temperature difference between the inlet liquid and outlet air streams. c) NERROR, a Boolean variable which, if true, signals a dump of the contents of all core storage locations after NCASE data sets have been processed. (Used during program checkout only.) b) Exchanger Design 4) One of the NCASE data cards is then read. Each card contains an air velocity Vf, the minimum and maximum permitted liquid velocity VL min and VL and a printing control variable (see steps 8 and 10) called NPRINT which may take on values 0, 1, or 4 only. 5) The nominal liquid velocity V L, is initialized to V and the tube length L is set to 16 ft., the L Lmin. shortest commercially available size. 6) From the input parameters, the quantities calculated in step 2, the air velocity read in step 4, and the assumed liquid velocity and tube length, the overall dimensions of the proposed exchanger and flow rates for the liquid and air streams can be calculated as follows: a) Liquid Flow Rate: Q L PL )(TL, -TL, 2)(60)(. 13368) L L L, i L,2 b) Crossectional area required for liquid flow: 0. 13368F-T ACT = 60V c) Non-integral number of tubes required per pass: N ACT t A C d) Integral number of tubes required per tube row: N = [ +I "rounded up to nearest integer e) Integral number of tubes required per tube pass: Nt = nNR f) Actual cross-sectional area available for liquid flow: AT = NA CT tC g) Width of the exchanger tube bundle: w =n[D7- -] E-298

Example Problem No. 18 h) Face (inlet air) crossectional area: A = WL i) Total outside fin surface area: So = NtN LA t P S j) Total outside liner surface area: AB =So/RL k) Actual liquid velocity: I I VL = VN /N L L t t 1) Total air volume throughput: FL = AfVf 7) All heat transfer coefficients and the airside pressure drop can then be calculated as follows: a) Prandtl numbers for liquid and air: L.CL L'4 = tA CreA P ^ - KL KA b) Reynolds numbers for liquid and air: ^eL [ X1}L [3600] R [m r ' J11Ta][ c) Inside convection heat transfer coefficient: 0.023= Pr O [ko'/[- L pr,] d) Uncorrected outside convection heat transfer coefficient: o0 3 ^ -0.3^ Rn ['^[ ^ 112] 1'.4 [] *1 41^ e) Correction factor for the ou side heat transfer coefficient: 6f _ L + Z \VMAX f) Corrected outside heat transfer coefficient: g) Overall heat transfer coefficient based on outside fin surface area: U0[ - + - + r ^MW +?Lrb+ o + F] h) Airside pressure drop per tube row: 6 PR = X to10 YVM, C+ i) Total airside pressure drop through exchanger: A g = P N/R Np 8) The exit air temperature can then be calculated as follows: "z - IAI+ 0o FA?A A The temperature difference between the entering liquid and leaving air streams, AT is then calculated as T -T and compared with the permitted minimum value, AT. If this difference is less than AT i Lti A, 2 mi min the proposed exchanger can not function. In this case, if NPRINT= 4, all details of the design up to this point are printed out along with a comment indicating the reason for failure, "too small an approach temperature difference". If NPRINT = 1, only the liquid and air velocities and tube length are printed out along with the comment. If NPRINT = 0, no information about the attempted design is printed. In all cases where AT is smaller than AT., program control is transferred to a special testing segment beginning at statement label END (see step 13). If AT is greater than or equal to AT., computation proceeds at the next step without any printout. m in E- 2.99

Design of a Minimum Cost Air Cooled Heat Exchanger 9) The log mean temperature difference and required surface area for heat transfer are calculated next. For multipass exchangers the correction factor for the log mean temperature difference calculated fronA terminal temperature conditions is a rather complex function of two parameters, (TL -T L,)/(T - L', Lo At, 1, TL, 1), and R = (TA 2' TA,/(TL 1- TL 2) (see below), However, in the present case, the first parameter is known from the input data, and the correction factor becomes a fairly simple function of R only. The user must supply a small external function (subroutine) called TDCORR. which can be called by the main program with argument R. The program expects the correction factor 0T to be returned. 1.09 %,- TAi-7i 0.6 9, -T 0 o.z.4- 0. 6 0.8 1.0 [T2 — T- L TL,.,] FIGURE II LOG MEAN TEMPERATURE DIFFERENCE CORRECTION FACTOR a) Uncorrected log mean temperature difference: A-T = (T~., - T, -M, z -LoA) In [(TL,,-ThZ)/(T^, -T' T,)J b) Subroutine TDCORR. is called to produceoA '* c) Corrected log mean temperature difference: aTe= AT, A d) Surface area required for heat transfer: A - a_ At LJ=ATP, 10) If the surface area required for heat transfer (step 9d) is larger than the surface area actually available from exchanger dimensions (step 6i), the proposed exchanger cannot function. In this case, if NPRINT = 4, all details of the design up to this point are printed out along with a comment indicating the reason for failure, "inadequate surface area available". If NPRINT a 1, only the liquid and air velocities and tube length are printed along with the comment. If NPRINT = 0, no information about the attempted design is printed. In all cases where A is greater than A, program control is transferred to a special testing segRQ o ment beginning at statement label END (see step 13). If A exceeds or equals A, the program proceeds to o RQ the next step without any printout. 11) If both the approach temperature difference (step 8) and surface area (step 10) requirements are met, the exchanger will function, although in most cases will be overdesigned (in a'properly" designed' exchanger these two areas should be equal). At this point the power requirements, motor horsepower, and all cost calculations (initial investment, annual depreciation, operating costs, etc.) are made. a) Horsepower requirements: Hf P FA Pr /[, 5S 6 m] b) Initial cost of motor-fan assembly: If HP is less than or equal to 100. C = 320 + 35.8 HP If HP is greater than 100. C0 — 390 + 61.2(HP-ioo) E-300

Example Problem No. 18 c) Initial exchanger cost: CEx = Ioooo + 5 As d) Total installed equipment cost: CeQ CEX + CK A e) Annual power costs: Cp = (0.74-57)(565)(24) Rp f) Annual maintenance costs: C. = ^MCEc /ioo g) Annual depreciation costs: CDP = PDCeQ/ioo h) Total annual operating costs: COP = C.P + CAw, + C p i) Annual loss in earning power of money used for initial investment: CL - LCF/loo j) The total of annual earnings lost and operating costs of the equipment: Cr = CoP, + CL 12) The cost figure which is to be minimized, CT, is compared with the smallest previously encountered C saved in location LOWEST. (Note that for the first exchanger designed this is a superflous operation,, In fact the C_ for the first exchanger automatically becomes the first value of LOWEST). If C for the current exchanger is smaller than the previously encountered low, it replaces LOWEST, and V L Vf, and L for the new "best" exchanger are saved in locations BLIQV, BAIRV, and BTUBL respectively. After this short cost analysis segment, all details of the successful design, including exchanger economics, are printed out. Program control then passes to a special testing segment starting with statement label OUT (see step 14). c) Special Testing Segmeits: One of two special testing segments is entered after every design attempt. Following a successful design, step 14 is used (statement label OUT); after an unsuccessful attempt, step 13 (statement label END) is used. Both segments test the status of three Boolean variables DA, DADA, and FOUND to determine the relationship of the current VL, to the liquid velocity which will yield a "properly" designed exchanger (i.e. one which matches as nearly as possible the area required for heat transfer to that available from the as - sumed velocities and tube length). In general, when DA is true the difference between the current and correct liquid velocity is less than 0. 1 ft/sec.; when DADA is true, this difference is less than 0.05 ft/sec; when FOUND is true, the difference is less than 0.04 ft/sec. The final convergence value differs from the correct value by less than 0.01 ft/sec. In addition some special testing is done as indicated below. 13) In some cases for the given air velocity, the initial liquid velocity VL is already too large to L mm permit a functioning exchanger of 16,20, 24, or even 30 ft. tubes. In these cases the length is incremented to the next permitted size without altering the liquid velocity at all, and program control returns to step 6. If no successful design is completed, even for the longest permitted tube length, the given range of liquid velocities and the given air velocity are incompatible, and no further design attempts are made with these parameters, Step 15 is executed next. If this portion of the program is entered under any circumstances other than those indicated in the previous paragraph, a successful design attempt must have preceded the current failure, i.e. step 14 must have been entered at least once. In this case the three Boolean variables are tested and modified, and the liquid velocity is altered as follows: E-301

Design of a Minimum Cost Air Cooled Heat Exchanger Status on Entry Status on Exit DA DADA FOUND Change in Assumed Liquid Velocity DA DADA FOUND Fs F F reduce by 0. 1 ft. /sec. and T F F save current VL in VS T F F reduce by 0.05 ft. /sec. F T F F T F reduce by 0.04 ft./sec. F F T F F T no change F F T In all cases except the last, the program returns to step 6. In the last case, the solution has been found and control passes to step 16. 14) This portion of the program is entered only when the current design attempt has produced a functioning exchanger. The truth status of the three Boolean variables determines what action is to be taken. Status on Entry Status on Exit DA DADA FOUND Change in Assumed Liquid Velocity DA DADA FOUND F F F no change F F F T F F increase by 0.05 ft./sec. F T F F T F increase by 0.01 ft./sec. F F T F F T increase by 0.01 ft./sec. F F T In all cases except the first, the program returns to step 6. In the first case, control passes next to step 16. 15) This segment beginning with statement label QDONE, is entered only after a "properly" designed exchanger has been found. It reinitializes the liquid velocity to Vo (see step 13), and resets the Boolean S variable FOUND to false status. If the current tube length L is 16, 20, or 24 ft., L is incremented to the next larger permitted size (20,24 or 30 ft. )and the program returns to step 6. If L is 30 foot on entering this segment, all possible "properly" designed exchangers for the given air velocity have been found already. In this case, a test is made to see if all NCASE data sets have been read at step 4. If not, the next instructions executed are at step 4. Otherwise the program transfers to step 17. 16) This segment is entered only after a successful pass has been made with the Boolean variables DA, DADA, and FOUND all in the false condition. The liquid velocity VL is increased by 0.2 ft. /sec. and then tested against the permitted maximum V to determine if it is within the range of liquid velocities L max specified by the user. If V is smaller than or equal to V, the program returns to step 6 for another L L max pass; if larger, no more design attempts are made with the given air velocity since all exchangers compatible with the restrictions on liquid range will already have been found. In this latter case, a test is made to see if all N6ASE data sets have been read at step 4. If not, the next instructions are executed at step 4. Otherwise the program goes on to step 17. 17) This segment is entered only after all NCASE data sets have been examined. At this time, LOWEST, BAIRV, BLIQV, and BTUBL contain the most pertinent information about the very best exchanger which has been designed by the program. This information is printed out with labels. NERROR is then tested. If true, a complete dump of the contents of all storage locations follows (used primarily for checking out the program). If NERROR is false, the program returns to step 1 where a whole new set of input parameters and another NCASE data sets can be processed. E-302

Example Problem No. 18 NOMENC LA TURE TABLE VI VARIARBI NAMFAS USED FOR INPUT PARAMETERS IN AIR COOLED EXCHANGER DESIGN PROGRAM BNDRES BOND RESISTANCE FACTOR FOR THE FINNED TUBE - (HR.-F-SQFT.)/BTU ~<1 CFAHO CONSTANT IN EQUATION FOR CORRECTION FACTOR TO OUTSIDE H.T.COEFF.:XZ CFBHO CONSTANT IN EQUATION FOR CORRECTION FACTOR TO OUTSIDE H.T.COEFF. i;4 CFEXP CONSTANT IN EQUATION FOR FINDING PRESSURE DROP iC3 CFPRES -CONSTANT IN EQUATION FOR FINDING PRESSURE DROP CL CPLIQ SPECIFIC HEAT OF LIQUID - BTU'(LB.-F) C-f FANEFF FAN EFFICIENCY FACTOR A/Vf FINPIN FINS PER INCH OF TUBE LENGTH 'f' FINRES RESISTANCE FACTOR FOR THE FIN - (HR)-F-SQFT.)/BTU 0!_ FINTHK:MEAN FIN THICKNESS - IN. to FOULFN FOULING FACTOR FOR THE FIN SURFACE - (HR.-F-SQFT.)/BTU Yr FOULIN FOULING FACTOR FOR THE INSIDE TUBE SURFACE -. (HR.-F-SQFT.)/BTU PO DEPPC PERCENT OF COSTEQ CHARGED TO ANNUAL DEPRECIATION Em DRVEFF MECHANICAL EFFICIENCY FACTOR Di IDTUB INTERNAL DIAMETER OF LINER - IN. 47;,, LIMIT MINIMUM APPROACH TEMPERATURE DIFFERENCE PERMITTED - F LIQNAM(l) LIQUID BCD ARRAY M^ MAINPC PERCENT OF COSTEQ CHARGED TO ANNUAL MAINTENANCE NCASE NUMBER OF DATA SETS TO BE PROCESSED WITH SETNO INPUT INTEGER NERROR A CONTROL CONSTANT WHICH SIGNALS CORE DUMP WHEN TRUE BOOLEAN Sz NOMTUB NOMINAL FIN HEIGHT - IN. NPASS NUMBER OF TUBE PASSES INTEGER NPRINT CONSTANT WHICH CONTROLS TYPE AND QUANTITY OF PRINTOUT INTEGER DO ODFIN OUTER DIAMETER OF FINS - IN. DL ODTUB OUTSIDE DIAMETER OF LINER TUBE - IN. fp: PATM BAROMETRIC PRESSURE - ATM. L PCLOST PERCENT OF COSTEQ LABELLED LOST EARNINGS Q OLOAD HEAT LOAD - BTU/HR. Re RATEPR POWER COSTS - DOLLARS PER KWH p RHOLIQ LIQUID DENSITY - LB./CU.FT. ROWPSS ROWS OF TUBES PER PASS INTEGER D-r RUTDI ROOT DIAMETER - IN. E-303

Design of a Minimum Cost Air Cooled Heat Exchanger Table VI (cont.) SETNO -A LABEL FOR THE SET OF INPUT PARAMETERS BCD As SPERFT SURFACE AREA (SQ.FT.)PER LINEAR FOOT OF TUBE TAI TAIRIN INLET AIR TEMPERATURE - F TA, P TAIRPR TEMPERATURE USED TO CALCULATE PHYSICAL PROPERTIES OF AIR - F K; TCFIN THERMAL CONDUCTIVITY OF FIN MATERIAL - BTU/(HR-F-SQFT/FT) KL TCLIQ THERMAL CONDUCTIVITY OF THE LIQUID - BTU/(HR.-F-SQFT/FT) K1 TCTUB THERMAL CONDUCTIVITY OF TUBE MATERIAL - BTU/(HR-F-SQFT/FT) r/. TLIQIN INLET TEMPERATURE OF THE LIQUID - F TLIQOT EXIT TEMPERATURE OF THE LIQUID - F S3 TIPSPC CLEARANCE BETWEEN TIPS OF ADJACENT TUBES - IN. 'TUBMAT(l) LINER MATERIAL BCD ARRAY TUBMAT(3) FIN MATERIAL BCD ARRAY 84. TUBSPC TUBE SPACING, CENTER TO CENTER - IN. Vf VFACE AIR VELOCITY AT EXCHANGER FACE - FT./MIN. f'L VISLIO VISCOSITY OF THE LIQUID - LB./(FT.-HR.) VLM-AX MAXIMUM PERMITTED LIQUID VELOCITY - FT./SEC. VLSM VLMIN MINUMUM PERMITTED LIQUID VELOCITY - FT./SEC. TABLE VII VARIAB-L NAMES USED IN AIR COOLED HEAT EXCHANGER DESIGN PROGRAM A6 ABARE TOTAL OUTSIDE AREA OF LINER fUBE - SQ.FT. AREQD REQUIRED SURFACE. AREA FOR QLOADLMTDAC.,UOVALL - SQFT. hi4 BAIRV FACE VELOCITY FOR THE BEST EXCHANGER - FT./MIN. 7. BLIQV LIQUID VELOCITY FOR THE 3EST EXCHANGER - FT./SEC. L BTUBL TUBE LENGTH FOR THE BEST EXCHANGER - FT. go. CF CORRECTION FACTOR TO OUTSIDE HEAT TRANSFER COEFFICIENT Ad CFLMTD CORRECTION FACTOR FOR LMTDUC FA CFMAIR TOTAL AIR RATE THROUGH EXCHANGER MEASURED AT TAIRIN-CFM CL CLOST LOST EARNING POW.ER OF INVESTED MONEY BASED ON PCLOST - DOLLARS CD COSTDP ANNUAL DEPRECIATION CHARGES - DOLLARS CEr COSTEQ INSTALLED EQUIPMENT COST - DOLLARS CEx COSTEX INSTALLED EXCHANGER COST MINUS MOTOR - DOLLARS Cat COSTM INSTALLED MOTOR COST - DOLLARS Cw COSTMN ANNUAL MAINTENANCE COSTS - DOLLARS Cop COSTOP ANNUAL OPERATING COSTS - DOLLARS E-304

Example Problem No. 18 Table VII (.ont.' C{p COSTPR ANNUAL POWER COSTS - DOLLARS CpA CPAIR SPECIFIC HEAT OF AIR - BTU/(LB.-F) ACT CSARAC ACTUAL TOTAL TUBESIDE CROSS-SECTIONAL AREA PER PASS-SQ.FT. Ac CSAREA CROSS-SECTIONAL INTERNAL AREA OF TUBE LINER - SQ.FT. ACT CSAREQ REQUIRED TOTAL TUBESIDE CROSS-SECTIONAL AREA PER PASS - SQ.FT. DA VARIABLE USED TO CONTROL CONVERGENCE INCREMENTS BOOLEAN DADA VARIABLE USED TO CONTROL CONVERGENCE INCREMENTS BOOLEAN APRZ DELPON PRESSURE DROP PER ROW OF TUBES - IN. H20 PDm DMEAN LOG MEAN OF INSIDE LINER DIAMETER AND FIN ROOT DIAMETER-IN. dA FACEA FACE AREA OF TUBE BANK - SQ.FT. FOUND VARIABLE USED TO CONTROL CONVERGENCE INCREMENTS BOOLEAN FL GPMLIQ LIQUID RATE - GPM i: HINSID INSIDE HEAT TRANSFER COEFFICIENT - BTU/(HR.-SQFT.-F) Fh HOUTAC CORRECTED OUTSIDE FILM COEFFICIENT - BTU/(HR.-SQFT.-F) h^ HOUTUC UNCORRECTED OUTSIDE FILM COEFFICIENT - BTU/(HR.-SQFT.-F) HP HP TOTAL HORSEPOWER REQUIREMENT TSm LMTDAC CORRECTED LOG MEAN TEMPERATURE DIFFERENCE - F ATm LMTDUC UNCORRECTED LOG MEAN TEMPERATURE DIFFERENCE - F LOWEST LOCATION FOR STORING THE LOWEST OPERATING COST ENCOUNTERED N A COUNTING VARIABLE INTEGER NIT A COUNTING VARIABLE INTEGER "VL NPRROW INTEGRAL NUMBER OF TUBES REQUIRED PER TUBE ROW INTEGER NT NTUBAC ACTUAL NUMBER OF TUBES PER PASS INTEGER N4 NTU3RQ NUMBER OF TUBES REQUIRED PER PASS FOR CSAREQ RL^ OAOIA RATIO - OUTSIDE FIN SURFACE AREA TO INSIDE LINER AREA OAOLA RATIO - OUTSIDE FIN SURFACE AREA TO OUTSIDE LINER SURFACE AREA RM OAOMA RATIO - OUTSIDE FIN SURFACE AREA TO MEAN WALL AREA AP PDROP TOTAL PRESSURE DROP ACROSS TUBE BANK - IN. H20 PI. PRAIR PRANDTL NUMBER FOR AIR P// PRLIO PRANDTL NUMBER FOR THE LIQUID /R R (TAIROT-TAIRIN)/(TLIQIN-TLIQDT) fe.4 REAIR REYNOLDS NUMBER FOR AIR AT MAXIMUM VELOCITY RELIQ REYNOLDS NUMBER FOR THE LIQUID?AMB RHOAMR AIR DFNSIT-Y AT TAIRIN - LB./CU.FT. P^p RHOAVG AIR DENSITY AT TAiRPR - La./CU.FT. E-305

Design of a Minimum Cost Air Cooled Heat Exchanger TABLE VII (CONT.) A. SURFAC ACTUAL OUTSIDE SURFACE AREA - SO.FT. TA 2 TAIROT EXIT AIR TEMPERATURE - F AT TAPP APPROACH TEMPERATURE, (TLIQIN-TAIROT) - F KA TCAIR THERMAL CONDUCTIVITY OF AIR - bTU/(HR.-F-SQFT/FT) aTi TLI.QOAV AVERAGE LIQUID TEMPERATURE - F CT TOTAL TOTAL OF ANNUAL OPERATING COSTS AND LOST EARNINGS'- DOLLARS L TUBEL TUBE LENGTH - FT. Uo UOVALL OVERALL HEAT TRANSFER COEFFICIENT BASED ON FIN SURFACE AREA V: VELLIQ ACTUAL LIQUID VELOCITY - FT./SEC. pa VISAIR VISCOSITY OF AIR AT TAIRPR - LB./(FT.-HR.) ViL VLIQN NOMINAL LIQUID VELOCITY - FT./SEC. VM4X VMAX MAXIMUM AIR VELOCITY THROUGH TUBE SECTIONS - FT./MIN. f4/t VMOVFC RATIO OF MAXIMUM TO FACE VELOCITY FOR AIR Vs VSAVE LOCATION FOR SAVING VLIQN DURING CONVERGENCE SEQUENCE "we WALRES ROOT WALL RESISTANCE FACTOR - (HR.-F-SOFT.)/BTU W 'WIDTH WIDTH OF THE TUBE BANK - FT. FLOW DIAGRAM:006 008 01 ^EAT(l) FREAD (2) Calculation of ID number, liquid tube dimensions, VMAX/VFACEa, re 2 paraliner material number of tube various heat trans-. rows and passes fer area ratios 020 026 027 028 FRINT(l) READ (3) EAD(4)Calculation of input physical liquid temp. in physical properties parameters. - prop s of _ - and out, air temp. of air at estimated - the liquid in, barometric average air pressure temperature ~34,_ 037__ 039 RINT (2) 5RAD(5) PRINT(3) 042 42 ______ ^ input constants in func'k input - (3\~- parameters _^ tions for evaluation _ parameters IMNEO - ST =105-( of pressure drop, from ) efficiencies, costs READ(5) * numbers above function boxes refer to statement card numbers shown in the MAD program listing E-306

Example Problem No. 18 FLOW DIAGRAM (CONT.) B42 043 6 EAD(6) E (RETURN) 0 lJCASE VFACE: VIN^I / S s ( LIMIT VTMXT NFTRIT ' NERRORF F "INADEQ ABARE_45, CMAI101 COS 320C + Calcuate GPQaCSARQ,NTUERQ C VIQN C VOLTN T NRR,NTUBACCSARACWIDTHVELIQ, _ \^r- TUEEL w 16. - _ NIT-NIT^ l RLl:Q, iQHIS:DVMAXDELPONI, ^^. ___________ J PD)ROP,CF,REAIR,PRAIR,HOUTUCHOUTAC, T/A UOVALL ( ) ABUEIs CAIR, |'( TAPP >TJXTT LIM ) -. mm3AC, AD {-| TAIROT, TAPP -3 D87 B7INT(9) B87- -— T C87 -1 ----. T"'AzPPROACH ND-^ - ^PRINT 4 0 I TM* DIFF0. —, ~- Calcult te { Alll | IDWEST eTOO SMALL" 098 098 A98 [TB98 PRINT(10) F^^~~~~~~B p "INADEQUATE (9 ARED < SUPFAC ~ — NPRINT =4 - (NPRINT = 0 -[ SUlRFACE - o29 101 { COSTM = 320. + HP, COSTEX P 100. 104 ----------— I" COSTM Im 3900o + F 6l^.2*(HP-Z100o) 106 B1__.... B.Lll Calculate AM OWEST - TOTAL COSTEQ, COSTPR, T BLIQV - VLIQN - 0"- {-COSTMN, COSTDP, TAL EST BAIRV a VFACE COSTOP, CIDST, BTUBL = TEBEL TOTAL -

Design of, a Minimum Cost Aix Cooled Heat Exchanger 070 082 FLOW DIAGRAM (cont.) 094 PRINT() NT()5 084 PRmNT(6) liquid and surface F IM fAC, F ( air para- areas, TAPP< IJAIT - AREQD AREQ > SURFAC 33 imeters, hLt approach coefficients temp. diff. T T 005 096 PRNT PR I NT N _ I "APEROACH "INADEQUATE.TEMP. DIFF '_ SURFACE TOO SMA9LL" APEA1" PRINT(7) 116 D cost T T NRO mT info-rma- ( DA 4-sD3 IV 3J.o A 016 tF ^oUT I DADAL... N < NASE = F1 FFOUM) ) PRINT(8) | F T16 _i6 n *C6 ation on 6 16 OB is the notthe best yU I E-QNQ -308exchanger " - --- -- ^ --- -- ERROR. (^) —(^ DA ^^^ -— (^NI T 120 ^ DADA J-<-^ ^ NIT = 2 TUBEL = 20. TUBEL 224, F~ F F ^ FOUND r^-\QDON~f CT&SN~a( TORA~' P *rT16 U16 V16 NIT 3 TUL 24. L 30.

Example Problem No. 18 FLOW DIAGRAM (CONT.) f~\:DA.DO B fB Ri 7 FOUNDl)-*- =fA lB V. N IQOFND ^ D~ADA ~ OB < r (FIND2 FOUND1 IB _HiNN) 317 1X17 DA OB 7 ( --- B 1^ (F3M3}-~-DADA U =2 -3' OTUBEL TUEL - 20. TUEEL =V20QNVIN 0.. G38 JF MAD PROGRAM BRICE CARNAHAN T09-N 002 100 *COMPILF MAD,EXECUTE,PUNCH OBJECT,PUNCH LIBRARY,DUMP TDCROOOO R RFUNCTION FOR EVALUATION OF LMTD CORRECTION FACTOR 000 R EXTERNAL FUNCTION (R) 001 ENTRY TO TDCORR, 002 FUNCTION RETURN 1. - O.01*R 003 END OF FUNCTION 004 R *COMPILF MAD, PUNCH OBJECT ACE60000 R RAIR COOLED EXCHANGER (ACE) DESIGN PROGRAM - AUGUST 9, 1960 000 R BOOLEAN DA, DADA, FOUND, NERROR AOO INTEGER NCASE,NPASSNPRROW,NTUBAC,ROWPSS, NIT,N,NPRINT 001 DIMENSION LIQNAM(2), TUBMAT(4) 002 READ(1) READ FORMAT INIT, SETNO,TUBMAT(1)***TUBMAT(4),LIQNAM(1), 006 1LIQNAM(2) 007 READ(2) READ FORMAT TUBING, NOMTUB,IDTUB,ODTUB,RUTDI,ODFIN,FINTHK, 008 1FINPIN,SPERFT,TUBSPC,TIPSPC,TCFIN,TCTUB,FOULFN,FOULIN,FINRES 009 2, BNDRES,ROWPSSNPASS 010 WALRES = (RUTDI-ODTUB)/(12.*TCFiN) +(ODTUB-IDTUB)/(12.*TCTUB) 011 VMOVFC = ( ODFIN+TIPSPC)/( ODFIN+TIPSPC-RUTDI-FINPIN*FINTHK* 013 1(ODFIN-RUTDI)) 014 DMEAN = (RUTDI-IDTUB)/ELOG.(RUTDI/IDTUB) 015 OAOIA = SPERFT /3.1416/(IDTU3/12.) 016 OAOMA = SPERFT /3.1416/(DMEFAN/]2.) 017 OAOLA = SPERFT /3.1416/(ODTUB/12.) 018 CSAREA = 3.1416/4.0*(IDTUB/12.).P.2 019 E-309

Design of a Minimum Cost Air Cooled Heat Exchanger PRINT(1) PRINT FORMAT TUBE,SETNO,LIQNAM(l),LIONAM(2),TUBMAT(1)...TUBMA 020 1T(4),NOMTUBIDTUB,ODTUBRUTDI,ODFIN,FINPIN,F'INTHK,SPERFT, 021 MAD PROGRAM 2TUBSPC 022 (CONT.) PRINT FORMAT TUBE1, TIPSPC,ROWPSS,NPASS,CSAREA,OAOIA,OAOMA, 023 * lOAOLA,VMOVFC,TCTUB 024 PRINT FORMAT TUBE2, TCFINFOULFN,FOULIN,FINRESBNDRESWALRES 025 READ(3) READ FORMAT LIQUID, CPLIQ,RHOLIQ,VISLIQ,TCLIQ 026 READ(4) READ FORMAT THERM, TLIQIN,TLIQOT,TAIRIN,TAIRPR,PATM,QLOAD 027 TLIQAV = (TLIQIN + TLIQOT)/2. 028 VISAIR =0.0413*((TAIRPR+460.)/492.).P.O.768 029 TCAIR = 0.0141 + (TAIRPR-100.)*O.00002 030 CPAIR = 1./29.*(6.27+2.09E-3*(TAIRPR+460.)*5./9. -0.459E-6 031 1*((TAIRPR+460.)*5./9.).P.2) A31 RHOAMB = (29./359.)*(492./ ( TAIRIN+46C.))*PATM 032 RHOAVG = (29./359.)*(492./(TAIRPR+460.))*PATM 033 PRINT(2). PRINT FORMAT PROP, LIGiNAM(1),LIQNAMI(2),CPLIQ,C:'AIR,TCLIQ, 034.1TCAIRVISLIQTLIQAV,VISAIRTAIRPR,RHOLIQTLIQAV,RHOAVG, 035 2TAIRPR, TLIQINTAIRIN,TLIQOT,PATM,QLOAD. 036 READ(5) READ FORMAT OTHER, C(FAHO,CFEHO,CFPRES,CFEXP,FANEFF,DRVEFF, 037 1MAINPC,DEPPC,PCLOST,RATEPR 038 PRINT(a) PRINT FORMAT EXTRA,CFAHOCFBHO,CFPRES,CFEXP,FANEFF,DRVEFF, 039 1RATEPR,1MAINPC,DEPPC 040 PRINT FORMAT EXTRA1,PCLOST 041 N = 0 042 LOWEST = 1.E35 A42 READ(6) READ FORMAT CASE, NCASELIMIT,NERROR B42 RETURN READ FORMAT DATA, VFACF, VLMIN, VLMAX, NPRINT 043 NIT = 0044 N = N + 1 045 VLIQN= VLMIN A45 TUREL = 16. B45 HTRAN NIT = NIT + 1 C45 GPMLIQ = QLOAD/(CPLIQ*60.,*RHOLIQ*O.13368)/(TLIQIN-TLIQOT) 046 CSARFQ = GPMLIQ*O.13368/60./VLIQN 047 NTUBRQ = CSAREQ/CSAREA 048 NPRROW = NTIJBRQ/ROWPSS + 0.99 049 NTUBAC = NPRROW*ROWPSS '050 CSARAC = NTUBAC*CSAREA 051 WIDTH = NPRROW*(ODFIN +TIPSPC)/12. 052 VELLIQ = VLIQN*NTUBRQ/NTUBAC 053 RELIQ = IDTUB*VELLI(Q*3600.*RHOLIQ/(12.*VISLIQ) 054 PRLIQ = VISLIQ*CPLIQ/TCLIQ 055 HINSID = TCLIQ*0.023*12.0/IDTUB*RELIQ.P.O.8*PRLIQ.P.0.3 056 VMAX = VFACE*VMOVFC 057 DELPON = CFPRES*l.E-7*VMAX.P.CFEXP 058 PDROP = DELPONROWPSS*NPASS 059 CF = CFAHO + CFPHO*VMAX 060 PRAIR = VISAIR*CPAIR/TCAIR 061 REAIR = 60.*VMAX*RHOAVG/VISAIR*RUTDI/12.0 062 HOUTUC=.364*TCAIR*REAIR.P.0.68*PRAIR.P.0.3333*(12./RUTDI).P.1.063 1.45*(FINTHK/12.)o.P.O).3-(ODFIN/12.).P.O.15 064 HOUTAC = HOUTUC*CF 065 UOVALL = 1./(1./HOUTAC + OAOIA*FOULIN + OAOIA/HINSID + 066 lOAOMA*^WALRES +OAOLA*RNDRES + FOULFN + FINRES) 067 FACEA = WIDTH*TUBEL 076 SURFAC = NTUBAC*NPASS*TUBEL *SPERFT 077 ABARE = SURFAC /OAOLA 078 CFMAIR = FACEA *VFACE 079 TAIROT = TAIRIN + QLOAD/(60.*CPAIR*CFMAIR *RHOAMB) 080 TAPP = TLIOIN - TAIROT 081 WHENEVER TAPP.GE.LIMIT, TRANSFER TO GO A87 WHENEVER NPRINT.E.4, TRANSFER TO PRINT(4) B87 WHENEVER NPRINT.F.u, TRANSFER TO END C87 PRINT(9) PRINT FORMAT NOS, SETNO,VLIQN,VFACE,TUBEL,T\APP D87 PRINT FORMAT NODELT, LIMIT E87 TRANSFER TO END F87 GO R = (TAIROT -TAIRIN)/(TLIQIN-TLIQOT) 088 CFLMTD = TDCORR.(R ) 089 LMTDUC = (TLITIN-TAIROT -TLIOOT+TAIRIN)/ELOG.((TLIQIN- 090 1TAIROT ) /(TLIQOT-TAIRIN)) 091 LMTDAC = CFLMTD *LMTDUC 092 AREOD = QLOAD/UOVALL/LMTDAC 093 E-310

Example Problem No. 18 MAD PROGRAM WHENEVER AREQD.LE.SURFAC, TRANSFER TO MORE 098 WHENEVER NPRINT.E.4, TRANSFER TO PRINT(4) A98 (CONT.) WHENEVER NPRINT..E.O, TRANSFER TO END B98 PRINT(10) PRINT FORMAT NOS, SETNOVLIQN,VFACETUBEL,TAPP C98 PRINT FORMAT NOSURF D98 TRANSFER TO END E98 MORE HP = CFMAIR *PDROP/(6356.*FANEFF*DRVEFF)*10000.:099 COSTEX = 10000. + 5.*ABARE -100 WHENEVER HP.LE.100. 101 COSTM = 320. + 35.8*HP 102 OR WHENEVER 1B 103 COSTM = 3900. + 64.2*(HP -100.) 104 END OF CONDITIONAL 105 COSTEQ = COSTEX + COSTM 106 COSTPR =.7457*365.*24.*RATEPR*HP 107 COSTMN = MAINPC*COSTEQ /100..108 COSTDP = DEPPC*COSTEQ /100. 109 COSTOP = COSTDP + COSTMN + COSTPR 110 CLOST= PCLOST*COSTEQ/100. A10 TOTAL = CLOST + COSTOP 111 WHENEVER TOTAL.L.LOWEST All LOWEST = TOTAL 11B BLIQV = VLIQN Cll BAIRV = VFACE Dll BTUBL = TUBEL Ell END OF CONDITIONAL. Fll PRINT(4) PRINT FORMAT LIQ, SETNOVLIQN,VFACE,GPMLIQ,CSAREQNTUBRQ, 070 1NPRROWNTUBACCSARACWIDTHVELLIQ 071 PRINT FORMAT LIQ1,RELIQREAIR,PRLIOQPRAIRHINSID,HOUTUC, 072 1CFHOUTACUOVALL 073 PRINT FORMAT LI02,DELPONPDROP A73 PRINT(5) PRINT FORMAT AIR, TUBEL,FACEA,SURFAC,ABARE 1082 1CFMAIR,TAIROT,TAPP 083 WHENEVER TAPP.L.LIMIT 084 PRINT FORMAT NODELT,LIMIT 085 TRANSFER TO END 086 END OF CONDITIONAL 087 PRINT(6) PRINT FORMAT LOGMN, LMTDUC,CFLMTD,LMTDAC,AREQD 094 WHENEVER AREQD.G.SURFAC 095 PRINT FORMAT NOSURF 096 TRANSFER TO END 097 END OF CONDITIONAL 098 PRINT(7) PRINTFORMATLAST,HP,DOLLAR,COSTEX,DOLLARCOSTM,DOLLAR, 113 1COSTEQ,DOLLAR,COSTMN,DOLLAR,COSTDP,DOLLARCOSTPR 114 2DOLLARCOSTOP,DOLLAR,CLOST,DOLLARTOTAL 115 OUT WHENEVER DA, TRANSFER TO FIND3 116 WHENEVER DADA, TRANSFER TO FIND4 A16 WHENEVER FOUND, TRANSFER TO FIND5 B16 VLIOQN= VLIQN+ 0.2 C16 TESTV WHENEVER VLIQN.LE. VLMAX, TRANSFER TO HTRAN D16 TESTN WHENEVER N.L. NCASE, TRANSFER TO RETURN E16 PRINT(R) PRINT FORMAT BEST, SETNO,BLIQV,BAIRV,BTUBLDOLLAR,LOWEST F16 WHENEVER NERROR, EXECUTE ERROR. G16 TRANSFER TO READ(1) H16 END WHENFVER DA, TRANSFER TO FIND1 I16 WHENEVER DADA, TRANSFER TO FIND2 J16 WHENEVER FOUND,.TRANSFER TO ODONE JJ6 NYET WHENEVER NIT.E. 1 K16 TUBEL = 20. L16 TRANSFER TO HTRAN M16 OR WHENEVER NIT.E. 2 N16 A WHENEVER TUBEL.E. 20. 016 TUBEL = 24. P16 TRANSFER TO HTRAN Q16 END OF CONDITIONAL A R16 TRANSFER TO CHANG1 $16 OR WHENEVER NIT.E. 3 T16 R WHENEVER TUBEL.E. 24. U16 TUBEL = 30. V16 TRANSFER TO HTRAN W16 END OF CONDITIONAL B X16 TRANSFER TO CHANG1 Y16 OR WHENEVER NIT.E, 4 Z16 E-311

Design of a Minimum Cost Air Cooled Heat Exchanger MAD PROGRAM WHENEVER TUBEL.E. 30., TRANSFER TO TESTN 117 TRANSFER TO CHANG1 817 (Continued) bTHERWISE C17 TRANSFER TO CHANG1 D17 END OF CONDITIONAL NYET.E17 CHANG1 DA = 18 F17 VSAVE = VLIQN G17 CHANG2 VLIQN= VLIQN- 0.1 H17 TRANSFER TO HTRAN I17 FIND1 DA = 03 J17 DADA = 18 K17 VLIQN= VLIQN- 0.05 L17 TRANSFER TO HTRAN M17 FIND2 DADA = 0B N17 FOUND = 1B 017 VLIQN= VLIQN- 0,04 P17 TRANSFER TO HTRAN Q17 FIND3 DA = OB R17 DADA = 1B S17 VLIQN= VLIQN+ 0.05 T17 TRANSFER TO HTRAN U17 FIND4 DADA = OB V17 FOUND =B W17 FIND5 VLIQN= VLIQN+ 0.01 X17 TRANSFER TO HTRAN Y17 QDONE FOUND = 0B Z17 WHENEVER TUBEL.E. 16. Z17 VLIQN= VSAVE - 0.2 118 TUBEL = 20. A18 TRANSFER TO HTRAN B18 OR WHENEVER TUBEL.E. 20. C18 VLIQN= VSAVE - 0.2 D18 TUBEL = 24. E18 TRANSFER TO HTRAN F18 OR WHENEVER TUBEL.E. 24. G18 VLIQN= VSAVE - 0.2 H18 TUBEL = 30. I18 TRANSFER TO HTRAN J28 OTHERWISE K18 TRANSFER TO TESTN L18 END OF CONDITIONAL QDONE M28 R THE NEXT STATEMENT GENERATES A DOLLAR SIGN VECTOR VALUES. DOLLAR = -$=$118 READ1 VECTOR VALUES INIT = $7C6*$ 120 READ2 VECTOR VALUES TUBING = $7F10.4/5F10.4/4F10.4,213*$ 121 READ3 VECTOR VALUES LIQUID = $4F10.4*$ 122 READ4 VECTOR VALUES THERM = $5F10.4,E10.4*$ 123 READ5 VECTOR VALUES OTHER = $6F10.4/4F10.4*$ 124 READ6 VECTOR VALUES CASE = $I5,F10.4,I5.*$ 125 RDRTN VECTOR VALUES DATA = $3F10.4,I5*$ 126 PRINT1 VECTOR VALUES TUBE = $ 53H1AIR COOLED EXCHANGER DESIGN FOR IN 127 1PUT PARAMETER SET C6, 21H TUBESIDE LIQUID IS 2C6///// 128 218H LINER MATERIAL - 2C6/18H FIN MATERIAL - 2C6//// 129 319H NOMINAL FIN HEIGHT S11,F10.4,4H IN./24H INTERNAL LINER DI 130 4AMETER S6,F10.4,4H IN./21H OUTER LINER DIAMETER S9,F10.4,4H I 131 5N./18H FIN ROOT DIAMETER S12,F10.4,4H IN./19H OUTER FIN DIAME 132 6TER S11,F1O.4,4H IN./12H FIN SPACING S18,F10.4,8H PER IN. / 133 719H MEAN FIN THICKNESS S11,F10.4,4H IN./21H OUTSIDE SURFACE A 134 8REA S9,F1O.4,22H SOFT. PER LINEAR' FOOT /33HOTUBE. SPACING - CE 135 9NTER TO CENTER S7,F10.4,4H IN. *$ 136 VECTOR VALUES TUBE1 = $ 35H TIP SPACING BETWEEN ADJACENT T 137 OUBES 55,F10.4,4H IN./29HONUMBER OF TUBE ROWS PER PASSS11I10/ 138 122H NUMBER OF TUBE PASSES S18,I10 / 139 142HOINSIDE CROSS-SECTIONAL AREA OF LINER TUBE S8,F10.4,6H SQF 140 2T. / 45H RATIO - OUTSIDE SURFACE TO INSIDE LINER AREA S5,F1O. 141 34/42H RATIO - OUTSIDE SURFACE TO MEAN WALL AREA S8,F1O.4/ 142 446H RATIO - OUTSIDE SURFACE TO OUTSIDE LINER AREA S4,F10.4/ 143 546H RATIO - MAXIMUM AIR VELOCITY TO FACE VELOCITY S4,F10.4 / 144.539HOTHERMAL CONDUCTIVITY OF LINER MATERIAL S11,F10.4,23H BTU/ 145 6(HR.-F-SQFT./FT.) *$ 146 VECTORVALUESTUBE2=$ 37H THERMAL CONDUCTIVITY OF FIN MATERIAL 147 7S13,F10.4, 23H BTU/(HR.-F-SQFT./FT.) /29HOFOULING FACTOR - F 148 8IN SURFACE S21,F10.7, 19H (HR.-F-SQFT.)/BTU /38H FOULING FAC 149 E-312

Example Problem No. 18 MAD PROGRAM ^9TOR - INSIDE LINER SURFACES12,F10.7,19H (HR.-F-SQFT.)/BTU / 150 (Continued) 015H FIN RESISTANCE S35,F10.7, 19H (HR.-F-SQFT.)/BTU /16H BON 151 1D RESISTANCE S34,F10.7,19H (HR.-F-SQFT.)/BTU / 16H WALL RESIS 152. 2TANCE S34,F10.7,19H (HR.-F-SOFT.)/BTU //////*$ 153 PRINT2 VECTOR VALUES PROP = $ S54,2C6,S18, 3HAIR// 28H SPECIFIC HEAT 154 1 - BTU/(LB.-F) S22,F10.4, S20,F10.4/45H THERMAL CONDUCTIVITY 155 2 - BTU/(HR.-F-SQFT./FT.) 55,F10.4, S20,F10.4/26H VISCOSITY 156 3- LB./(FT.-HR.) S24,F10.4,3H AT F6.1,2H F, S9,.F10.4,3H AT 157 4F6.1,2H F/21H DENSITY - LB./CU.FT. S29,F10.4,3H AT F6.1, 158 52H F, F19.4, 3H AT F6.1,5H F // 159 6//27H INLET TEMPERATURE - DEG. F S24,F6.1,S24,F6.1/ 26H EXIT 160 7 TEMPERATURE - DEG. F S25,F6.1,S24,6H —.- / 20H BAROMETRI 161 8C PRESSURE S64, F6.4, 5H ATM. ////16H TOTAL H3AT LOAD S34, 162 9F10.O,14H BTU PER HOUR *$ 163 PRINT3 VECTOR VALUES EXTRA = $ 82HlEQUATION FOR DETERMINING CORRECT 164 lION FACTOR FOR OUTSIDE HEAT TRANSFER COEFFICIENT /// 165 2 S10, 5HCF = F10.4,2H+(.F10.4,6H)*VMAX ////// 166 331H PRESSURE DROP PER ROW OF TUBES /// S10,7HDP/N = F10.4, 167 415H*(10**7)*VMAX** F10.4 //////25H FAN. EFFICIENCY - 168 5F5.1, 8H PERCENT / 25H MECHANICAL EFFICIENCY - F5.1,8H PERC 169 5ENT. //////11H POWER COST 169 6F20.3,16H DOLLARS PER KWH//////19H ANNUAL MAINTENANCES6,F6.3, 170 7 37H PERCENT OF INSTALLED EQUIPMENT COSTS /20H ANNUAL DEPRE 171 8CIATION S5,F6.3,37H PERCENT OF INSTALLED. EQUIPMENT COSTS*$ 172 VECTOR VALUES EXTRA1 = $ 173 921H LOST EARNING POWER S4, F6.3,37H PERCENT OF INSTALLED E 174 OQUIPMENT COSTS /1H1 *$ 175 PRINT4 VECTOR VALUES'LIQ = $21H1INPUT PARAMETER SET C6, // 176 128H NOMINAL VELOCITY FOR LIQUID S22,F10.4,13H FT. PER SEC./ 177 222H FACE VELOCITY FOR AIR 528,F10.4,13H FT. PER MIN.//28H VO 178 3LUME FLOW RATE FOR LIQUID 522,F10.4917H GALLONS PER MIN.// 179 441H REQUIRED CROSS-SECTIONAL AREA FOR LIQUID S9,-F1.0.4,6H SQF 180 5T. /25H NUMBER OF TUBES REQUIRED S25, F10.4// 31H ACTUAL NUM 181 6BER OF TUBES PER ROW S19,I5/ 38H ACTUAL TOTAL NUMBER OF TUB 182 7ES PER PASSS12, I5/39H ACTUAL CROSS-SECTIONAL AREA FOR LIQUID 183 8 S11,F10.4, 6H SQFT./21H WIDTH OF TUBE BUNDLE 529,F10.494H F 184 9T./ 23H ACTUAL LIQUID VELOCITY S27,F10.4, 13H FT. PER SEC.*$ 185 VECTOR VALUES LIQ1. = $ 186 027HOREYNOLDS NUMBER FOR LIQUID S18, F15.4/24H REYNOLDS NUMBER 187 1 FOR AIR S21, F15.4/26H PRANDTL NUMBER FOR LIQUID S24, F10. 188 24/ 23H PRANDTL NUMBER FOR AIR S27, F10.4//24H INSIDE FILM CO 189 3EFFICIENT S26,F10.4, 18H BTU/(HR.-F-SQFT.)/37H OUTSIDE FILM 190 4COEFFICIENT UNCORRECTED, S13,F10.4, 18H BTU/(HR.-F-SQFT.) /191 542H CORRECTION FACTOR FOR OUTSIDE COEFFICIENT,S8,F10.4/ 192 635H OUTSIDE FILM COEFFICIENT CORRECTED S15PF10.4, 18H BTU/(H 193 7R.-F-SQFT.) /34H OVERALL HEAT TRANSFER COEFFICIENT S16,F10.4. 194 '8, 18H BTU/(HR.-F-SQFT.) 24H BASED ON OUTSIDE AREA *$195 VECTOR VALUES LI02 = $28HOPRESSURE DROP PER TUBE ROW S22, A95 1F10.4,13H IN. OF WATER /38H TOTAL PRESSURE DROP ACROSS EXCHA 395 2NGER S12, F10.4,13H IN. OF WATER *$ (95 PRINT5 VECTOR VALUES AIR = $12HOTUFE LENGTH S38,F10.4,4H FT./24H FAC 196 1E AREA FOR INLET AIR S26,F10.4,6H SQFT./18H TOTAL FIN SURFAC 197 2E S22,F20.4,6H SQFT./28H TOTAL OUTSIDE LINER SURFACE S12, 198 3F20.4,6H SQFT.//15H TOTAL AIR RATE S25,F20.4,4H CFM//21H EXI 199 4T AIR TEMPERATURE S29, F10.4, 2H F /40H MINIMUM APPROACH TEM 200 5PERATURF DIFFERENCE S10,F10.4, 2H F*$ 201 PRINT6 VECTOR VALUES LOGMN = $ 44H LOG MEAN TEMPERATURE DIFFERENCE-U 202 1NCORRECTED S6,F10.4,2H F/27H CORRECTION FACTOR FOR LMTD S23 203 2,F10.4/4.2H LOG MEAN TEMPERATURE DIFFERENCE-CORRECTED S8,F10. 204 34,2H F//36H TOTAL OUTSIDE SURFACE AREA REQUIREC S4,F20.4, 205 46H SOFT.*$ 206 PRINT7 VECTOR VALUES LAST = $ 25HOHORSE POWER OF FAN MOTOR S25;F10.4 207 1,3H HP //30H COST OF EXCHANGER (INSTALLED) S17,C1,F10.2/ 208 226H COST OF MOTOR (INSTALLED) S21,C1,F10.2/36H TOTAL COST OF 209 3 EQUIPMENT (INSTALLED) S11,C1,F10.2 //25H ANNUAL MAINTENANCE 210 4 COSTS S22,C1,F10.2/26H ANNUAL DEPRECIATION COSTS S21,C1, 211 5F10.2/ 19H ANNUAL POWER COSTS S28,C1,F10.2 /29H TOTAL ANNU 212 6AL OPERATING COSTS S18,C1,F1().2//. 27H ANNUAL LOST EARNINGS 213 6 S20,C1, A13I 7F10.2//40H TOTAL OF LOSSES AND OPERATING EXPENSES S7,C1,214 8F10.2, 8H PER YR. *$ 215 VECTOR VALUES NODELT = $ 1HO/62HOAPPROACH TEMPERATURE DIFFER 216 1ENCE IS SMALLER THAN THE PERMITTED F6.1,10H DEGREES F*$217 E-313

Design of a Minimum Cost Air Cooled Heat Exchanger MAD PROGRAM VECTOR VALUES NOSURF = $ 1HO/72HOREQUIRED TOTAL SURFACE AREABCACE2.18 (Concluded) 1 IS LARGER THAN THE AVAILABLE SURFACE AREA *$ BCACE219 PRINT8 VECTOR VALUES BEST =.$76H1THE BEST EXCHANGFR BASED ON ANNUAL BCACE229 1OPERATING COSTS FOR INPUT PARAMETER SET C6/ 51H HAS THE FOBCACE230 2LLOWING DIMENSIONS AND FLUID VELOCITIES. /// 28H NOMINAL VELOBCACE231 3CITY FOR LIQUID 522,F10.4, 13H FT. PER SEC. / 22H FACE VELOBCACE232 4CITY FOR AIR S28,F10.4,13H FT. PER MIN. /13H TUBE LENGTH BCACE233 5S37, F10.4, 4H FT. //52H0 THE ANNUAL OPERATING COSTS FOR THISBCACE234 6 EXCHANGER ARE Cl, F10.2, 2H. *$ BCACE235 PRINTO VECTOR VALUES NOS = $21H4INPUT PARAMETER SET C6,// 28H NOMBCACE224 1INAL VELOCITY FOR LIQUID 'S22,F10.4,13H FT. PER SEC. /22H FACBCACE225 2E VELOCITY FOR AIR S28,F10.4,13H FT. PER MIN. /13H TUBE LENGTBCACE226 3H S37, F10.4, 4H FT./40H MINIMUM APPROACH TEMPERATURE DIFFEBCACE227 4RENCE S10,F10.4, 2H F*$ BCACE228 END OF PROGRAM BCACE229 THE FOLLOWING IS A TYPICAL DATA SET *D.ATA TWO. ADMIRALTY ALUMINUM WATER READ1 0.5 0.902 1.0 1.08 2.0 0.019 9.0 READ2 1 3.622 2.1875 0.1875 118. 58. READ2 2 0.0 0.001 0.00066 0.00025 2 2 READ2 3 1.0 62.4 0.924 0.425 READ3 160. 150. 100, 125* 1.0 20.E06 READ4 0.98 0.00 24.5 1.51 65. 95. READ5 1 1,' 7. 20. 0.006. READ5 2 8 15.0 READ6 300. 3.0 7.0 4 350. 3.0 7.0 4 400. 3.0 7.0 4 450. 3.0 7.0 1 500. 3.0 7.0 550. 3.0 7.0 600..3.0 7.0 700. 3.0 7.0 MACHINE PRINTOUT OF THE INPUT PARAMETERS A I R CO LE: E.:CH G"-; 13 I P T P,! P03*;,2; T.i, 0. 73_ LI i.:::::' i T. L I _F __. t'..1...,.. -....'. T'.... AF I HNER M ATER I AL -. I N.", _F I F1DTE~i ID - LUM 43331M __________,_,___._. _...... ____.__ t1 ITI h!D'LA L F I Hi HE i!] I_1T. F. I H PR D I Di F T FiIT -iF:i i E -i E FIN EiGTi DM:,', i-i N. TW,,. ".! FJTElFR LINER TH iMEtER ___________1: 0000 T_ _ _ _ ____ ____,___-_ TFN R P.ETR T N U T'ER F. FIETE F 2 ";2' 0 k!,,, T FJi FI I,L F ' S: IN G -.-..hlE'.;!' F-,,'' IN T H E T I-: ': H I F_ E j?) i 9 0 ' i'"i, T- tJ T ' '_T F.: F F L I I E' EN.'' -! — " F- L. ' i: n ' i - 'F l-TIP _F-_ BEE I T__________ _ i 1.:: E 1 _____________ NFI U 'i E R O F " UrBE RI:, P..:. R * -... ' E 't -;: I, i E, M 'E, F. L r- T I El "" r;~ r ~ RT I- r: r0.'-OFTSIE SURCE T OUTS I ER R —.. ____. _ RF.T TiO M'- DMI::T-;IMUEM<;:FACE T i'-. I-.. - M U. ~.E.i..i...3. -. -. E-314

Example Problem No. 18 PARAMETER OUTPUT (CONT.) THE[1. L CONDUCT I`. T- OF CIE rIM F F IPL 58.0000 - TU 1 H R. -F- QFT. FT. F.:L Mi R T L " i-,.............E U-.... -H OFT.,T HE~ ~~~~ ' IiCT! R,, T: L! U ~,~_ T T Il I L 5 e:~:,- 0 -:I TI t: A... CH: U '.~.. F H EIRL C O HD U C:rT I, 'I T- OF FAIH M D T E RI Cii:',1 0 0 -: T U C R.-R, - F-S.FT..F T.::U F ULI I HG F:C -R - r F F A". T'.:. I.. IF. A CEH.Ot 'J-iPA; 0.,:I.HR,, -F ---..QFT..,BT.'"ET FOILIHG FFICT O R ' — SI!DE '.IER S.URF-E 0-H.010- F'SQFT. E:BTU FI RE:I3ST"C:E 0. 000GOO ("HR. -.F-SQFT. ".-"BTUi B0 1HD RESISTNCE 0. C0 0 0' HR -F -S 'FT. BTU i.RFLL RESIST'F!-CE O..____________.0 O -.00 17.3 CHRF.:- F-S.: Q FT.":>BTU ____ ALRI0I_____________________ 7._ lRTE R J- r; P.- I T -i'...1~~ ~~~~~~~~~~~ ~~~~~ ~~~~~ ~~~~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?I~,. S F'E C::FIlC: I F E!:r T - E T U....,. L E: - F _____'i 0 j000 O____.23S_4 F 55 THEFL "::'-DUiC:T '.[. 1 T'" -. BT.. '-F-::F'..FT. 250 0 01 4 _.' T 'S C 0 SZ T''-: " L B...1" F ', - H *;;:.::: '!:J..:24.,T 155.0. F -,'4?2 RT 125.0 F D E",jS:: T'..' - L:....:U.FT, ':, 2. i. 0 0 T I 55.0 F 0..7 R T 1 2 5. 0 F T E;~~~~~4 T L[ M J 0 ~ ~ FiT:3 I'D -*- 0 ILET f'TiEFRe TLiRE - P E 1 0. C 1 00. _::IT TEPER3TURFE --!EG. F' 't1 50. 0 T: F:i E T L:O:O20 00000:'! F: FU PER HOUR EGUPTI* i FO DETERMINING CORRECTIOH FICT0R FOR OUT IE HEET TR:FER COEFFFI C:I ENT "PA::::LIS:R: DROP::F PEER RCI.! OF-E ____ ____ ___D- -". '__,_,.'" &50 &::::, 0.' M:**_...________________________________ F.1:E::'i;:I:R... F E.: F: T I C E: I ' -"-; — ~ "pn ^ ' ", - -~.""' '.D7^...r....'' ''.:-' 'nf-i....!%::.::: q:" ';: S! q ' BR _ ' _ J': " i W H,r-:.'_!_r'.T_'__-_- f N O~;E C:_.'" —...- '..S..............':_:'.). E _,-:....... Nl~^^ Y Nli4I1INL DERvFFFC:nIFOH______7.::;: r:::!:E RC'::'NT..F v: TPLE EQUIPME_________________ STS_______________________________ 10 S: E: I F ' E T 2..D,::.0 F' E HT: T I-::;:: 0L C CP S T'.F~ T,....E-315 F' O i.,.i i:.~: F.': C: O S; ~ ~ ~ ~ ~ ~ ~~A'_T ~-R'Fi.m R' '-.{:),i. T!:?S:'-~:::.. F~~~~i H f ~ ~ ~ ~ T'. F:!ii..-~qii'-ii.::i~ ''' E- 7- r-..! r-j F E:, 1 E - 3 1 5

Design of a Minimum Cost Air Cooled Heat Exchanger TYPICAL MACHINE PRINTOUT OF EXCHANGER DESIGN RESULTS INPUT PRRPNE!TER SET "Wi.__-_____ NiIRL: ELCT v FO LI UI_; )5. 30. - E ': racE VELOCITY ~~~~FODR MI 5.00F.^R^; F'FLt C ~.'=: ',.,' FO LI0D --- C- i T'..'-.-F -!;.':-.- ^ ^ ^.!q '[ REQUIRES CROSS-SECTT IONL^ ^I^C T:i^ ---- ^hy~rF F... ( T''F 1, NUMBE O4_FJp fTUBE RE__E_____ _______________37.3 ______________ -I"T OF - TI B!N DLWF' fE T=.! U - - - -- 'RT:Lq L I"! it 1, EI',';.ii._!.t...........______._0F._E...... AC:Tz!jiL L F R T L JJ C7 T'Y Ufi!F;IFD [ I T J P~~~~~~~~~~~~ iT '.w-*F~~~~~ -.1 ~~ T Cij I T I TE NO D J U BE F O fIR' E -'"" " """ H4. 4 I!P RrlHD mjMBER FI R *iR F ''I4." -— IL --- —-"- — *" -_ U.....!T —, [E F ILM *COEFFCI7 'T T 02. 5 0 U"I:: F -. i.S 1. ~: Oi.'TS.E t_'IL.'C — C " LEN, ' B 7 T U ',E:3HRT. TF CS -.:;' TS IL C T R LC: 0 C:'E C T i O -.3! T '.;! -..'. H R i, F-,2F'.' " UT''RL HER;w" TrnpSFE CQ ^ Ylr-r -" -p;"''3 ^"^ U7:^: —*^F.. Tir LFI P-E f T P.t I D T H O? T E,-C. C. ':. E yr: 1 T. I T L Ti TU l '; E.: _. - - PIIMi F1 FEI~aH"TE ___________________ ___ __5.79 _____________________ LOGrITi' pT' M E aT R D'T FF'E OEU-OR E E... 3,.24. p'T C',FTRl1: F! ", TL'" E "OR 'P i F.__ __ _ 3 __7 T O T P4 P T 11.1 iH 'R' DE F L H.':uER ' F F i!: '.::EH OTOR! ~' -:, '."- *57!:: ': T! Li...,: ='[-:...F.. =. 'T: O T A"'DiF IL. C-i: _T- "::!: 'T..:! P7. E 4P ND P CI S NF E JUIRTf '^ij T ~~'~~~'^ 4 4 7 2*;" U T' L,:E ': I T E..,:: E. - S - S.. 2 T.: I'":,;:. i% tU PL L H E q. T F.!,:'":I r. E F.: C 0' S F F __..' C i E 2i7.7! T T~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~G 1'::3 =~... F,: -' D: I ':;~' -. F' UP F.yE CO-TS " '. LIr'.' 0' F'"" """ E" ";: 7' i., [4'22 92!.t,!22:7'S:?'. F:;.F:Ti::.::. T 0 L T H.OF L 0 S S -' — T= T ET.;-..:, R1: T C T: '. ";.-'.:.:.......:,. ~c.........,,................................~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~....... L i!; P0i...E F '0F F i!";"OTORS:.:.:;; -' (I.- "j~~~~~~~~~~~~~ r;! f:. T r Fr r-,1..-~F' r,:. r.I' 5TqLLED[':7.'~:"''?:

Example Problem No. 18 Discussion of Results: The machine printout of all the input parameters with appropriate labels and a typical output sheet for a successfully designed exchanger are shown on the preceding three pages. Eight data sets with air velocities of 300, 350, 400, 450, 500, 550, 600, and 700 ft/min were processed by the program using as input parameters the quantities specified in the problem statement. In Table IX, all the "properly designed" exchangers found by the program are listed along with some of the more important design parameters and cost items. Figure III is a plot of the total annual cost (the item to be minimized) as a function of air velocity with tube length as parameter. Table VIII shows a typical optimization sequence used by the computer in converging to "properly designed" exchangers. This particular sequence for an air velocity of 400 ft/rpin. produced three such exchangers having 20, 24, and 30 foot tubes. The minimum permitted liquid velocity of 3 ft/sec. was too great to permit an operable exchanger with 16 foot tubes. The program selected the 30 foot exchanger having an air velocity of 550 ft/min and a liquid velocity of 5. 31 ft/sec as the best exchanger which it designed. Because intermediate values of air velocity between 500 and 600 ft/min (except for 550 ft/min) were not used as input data, this is not necessarily the very best exchanger possible. However, because of the simplified economic analysis used in the program, the results should be viewed as only approximate anyway, and the designer would probably conclude that any of the exchangers lying inside the block on the figure II would be acceptable. In fact, the chief virtue of a program such as this is the definition of what might be called "the region of the probable optimum". The engineer can then make his final choice on the basis of the computer results, other factors not available to or considered by the machine program, and his own best judgment. TABLE IX BEST EXCHANGERS DESIGNED BY COMPUTER PROGRAM Exchanger with 30 ft. tubes: Air Vel. Liq. Vel. Overall Surf. Area Fan H. P. Eqpt. Cost. Total Cost ft. /min ft. /sec. Coeff. sq.ft. $ $/yr. 300 3.35 4.899 130391 23.8 58296 17256 350 3.78 5. 373 115614 31.1 53216 16119 400 4.19 5.814 104313 39.2 4942.3 15375 450 4.60 6.229 95186 48.1 46442 14889 500 4.96 6.618 88231 58.1 44286 14676 550 5.31 6.990 82146 68.7 42467 14583 600 5.69 7. 343 76931 80.0 40988 14613 700 6.34 8.000 69107 105.9 39251 15139 no optimization attempted for greater air velocities Exchangers with 24 ft. tubes: 300 no "best" exchanger for liquid velocities greater than 3.0 ft/sec 350 3.00 5.300 116483 31.3 53538 16218 400 3.33 5.736 105009 39.5 49683 15458 450 3.64 6.145 95968 48.5 46739 14987 500 3.94 6.5311 88666 58.4 44453 14734 550 4.23 6.896 82775 69.2 42705 14669 600 4.51 7.244 77539 80.7 41230 14706 700 5.04 7.894 69542 106.5 39451 15221 no optimization attempted for greater air velocities E- 317

Design of a Minimum Cost Air Cooled Heat Exchanger Exchangers with 20 ft. tubes: 300 no "best" exchanger for liquid velocities greater than 3.0 ft/sec 350 no "best" exchanger for liquid velocities greater than 3.0 ft/sec 400 no "best" exchanger for liquid velocities greater than 3.0 ft/sec 450 3.01 6.0655 96779 48.9 47047 15089 500 3.25 6.446 89535 58.9 44788 14850 550 3.49 6.807 83450 69.8 42977 14768 600 3.72 7.151 78235 81.4 41508 14812 700 4. 16 7.792 70121 107.4 39718 15330 no optimization attempted for greater air velocities Exchangers with 16 ft. tubes: no "best exchangers were found for liquid velocities greater than 3.0 ft/sec. with air velocities of 300, 350, 400, 450, 500, 550, and 600 ft. /min. 700 3.28 7.648 70933 108.7 40091 15484 no optimization attempted for greater air velocities The program selected the 30 ft. exchanger with air velocity of 550 ft. /min. and liquid velocity of 5. 31 ft. / sec. as the best exchanger which it designed. TABLE VIII Convergence Sequence for Air Velocity of 400 ft. /sec. and Input Parameter Set TWO Liquid Vel. Tube Length Surf. Area Reqd.Area Eqpt. Cost Power Cost Op. Cost Total Cost ft. /sec. ft. sq.ft. sq.ft. $ $/yr. $/yr. $/yr. 3.0 16 77655 no solution: Approach temperature difference(9.49 'F) less than 151F 3.0 20 97069 112708 no solution: Inadequate Surface Area Available 3.0 24 116483 98431 53985 1716 6035 16832 3.2 24 109181 102202 51248 1608 5708 15958 3.4 24 102922 106363 no solution: Inadequate Surface Area Available 3.3* 24 105704 104385 49944 1557 5553 15542 3.35 24 104313 105346 no solution: Inadequate Surface Area Available 3.31* 24 105704 104385 49944 1557 5553 15542 3.32 24 105356 104621 49814 1552 5537 15500 3.33** 24 105009 104859 49683 1547 5522 15458 3.34 24 104661 105101 no solution: Inadequate Surface Area Available 3.2 30 136476 90194 61480 2011 6929 19225 3.4 30 128653 92420 58547 1895 6579 18289 3.6 30 121264 95021 55777 1786 6249 17404 3.8 30 114744 97860 53333 1690 5957 16624 4.0 30 109094 100879 51215 1607 5704 15947 4.2 30 103878 104288 no solution: Inadequate Surface Area Available 4.1 30 106486 102497 50237 1569 5588 15635 4.15* 30 105182 103370 49749 1550 5529 15479 4.16* 30 105182 103370 49749 1550 5529 15479 4.17 30 104748 103670 49586 1543 5510 15427 4.18* 30 104313 103977 49423 1537 5491 15375 4.19** 30 104313 103977 49423 1537 5491 15375 4.20 30 103878 104288 no solution: Inadequate Surface Area Available ** "Properly designed" exchangers for the given air velocity and tube length. * Occasionally an increase in nominal liquid velocity of 0.01 is not sufficient to cause the removal of even one tube from the proposed exchanger, hence two consecutive attempts may result in identical cost figures. E-318

Design of a Minimum Cost Air Cooled Heat Exchanger 16.+ 16.2. | AIR COOLED HEAT EXCHANGERS DESIGNED BY COMPUTER PROGRAM <>1. o0 \\ AINPUT PARAMETER SET TWO x.s\ 16 FT. TUBES O I \\\. 20 FT. TUBES z OPTIMUM DESIGN Id.l ' I I 14M.6 ss^^^^^ -< — REGION 25o 0 3500 50 400o i5o 5co0 50 600 650 TOO 750 AIR VELOCITY - FT. / MIN. FIGURE III E-319

Example Problem No. 19 DETERMINATION OF THE TERMINAL SETTLING VELOCITY OF A SPHERICAL PARTICLE IN A FLUID by Harvey L. List Problem Write and test a program which computes the terminal settling of a velocity spherical particle, given the diameter and density of the particle and density and viscosity of the fluid in which the particle is settling. The program should be capable of repeating the computation for any number of sets of input data. You will use this program later in the course for sizing a vessel to separate solids from liquids. Input data for any single computation should consist of values for five parameters: D, diameter of the particle, cm g, local acceleration due to gravity, cm/sec p, fluid density, gms/cc p, true density of the particle, gms/cc p, viscosity of the fluid, gms/cm. sec Use any of the following sets of data to test your program D.0823.0823.1420 g 980.00 980.00 980. 00 p 1. 00 1.73 1.73 p 2.64 4.25 4.25 0.01 0.10 0.10 Theory with which student is expected to be acquainted There are three separate design equations, each valid for different ranges of particle Reynolds numbers. Law Range of Reynolds No., Equation R,-, in which valid Stokes R<2 u = gD (Ps - ) 181i 0.153 go 714 D1. 142 p.714 0. 153 g D (p -p)' Intermediate 2 <R <1000 u =.286.428 P f( g D (p -p) Newton l000'<R 200, 000 u 1. 74 s P where: u =velocity of particle relative to fluid cm. /sec. g =local acceleration due to gravity cm. /sec. D = diameter of particle cm. p = true density of particle gm. /cc p = density of fluid gm. /cc F = viscosity of fluid gm. /(cm. sec.) R = particle Reynolds number, Dup/4L, dimensionless E-320

Solution: The problem resolves itself into determining which of the three s.ettling laws is applicable and using this formula for calculating the settling velocity. Since the calculation of the Reynold's number prior to the velocity calculation involves a velocity term, the solution may be a form of trial and error provided an appropriate logical sequence of tests is provided. The program initially sets the velocity to zero. The Reynold' s number is then initially forced to zero and Stokes law of settling applies. Using Stokes law the velocity is calculated and a new Reynold's numb er is determined. If this Reynolds number still falls within the Stokes law region, the problem is done and results are printed. If the new Reynold's number is outside the Stokes law region, the appropriate law is used for a velocity calculation and the new Reynold's number rechecked. In this manner a sequence of tests is provided to guarantee a correct solution of the Reynolds number is less than 200000. If this value is exceeded, the computer prints a remark "Beyond Correlation". The block diagram is essentially self explanatory. Two computer programs and solutions are given. The first is in MAD for the IBM 704 and the second is in ACT1A for the LGP 30. FLOW DIAGRAM I R>Zooooo ) R<2;?"^R'o, 10>E-0ooo DATA EuOND PRINT 'i TITLE I i E-321 T T >^R)>Zooo

Terminal Settling Velocity of a Spherical Particle MAD PROGRAM E O H iRVE' '.' L. L I I-, T 09 - -. 00 2 02.00:2 H. L. -PRO L E M I lBER 3: R 1E I TE5R 3 I HL - ETL. TIG.'ELOC V I OF -sHEF: r CR L PR TiCLE; I F LU II N "1i C:~_ Li T U. O i,iL.'T' IF' G i. -f: P1L '- C ELE RUE'' -H.i '.,, " C'M S.fi,-,3,: E:F:. F', 2 l- l = _i, 5, T C. i F -; F R' - ICF L PR T IC E:j F M IF D NS IH T: ' F F I Lj _ D.J '! ' T. -LC P - T U '-, I T F L -E. I G- CHTi5.E r:.C,., -, i 'r:: i '" i t?'t F [_..I i i r 5.. i j5 E 3,, F:, i il _- i;,_ L 0' i 5.: i;'!" T i- F FR I.: 7 ' L.C L.E r E L.. T i!, E T, FL! i D t- M,." E i5 F R - F l i.: E'-i" L - i ii', R! E F: R I I I:f.,t i F.-' " E - i STA. T RE -D F I R T C A R;:D i-D ].. -. F':,,.s t -; ___1E':7. 1CT i R V',IjUE: - I":.R:[] -'1, n; F,-, 3 4 i -. 4. 2 _,.CE'CF OR L E T E 1 - i- ' t In? p UT iPLUi i.1 F9 4., 4 F9 2A I t F'- 4. Il'f NH FH L ' 0 00 F L R w^^i~~~.r^F^5,,' 11~~~,i =.; 5.! i________5____i Hi E y_ E-.... 2 E.:., 'ii,5i50i1 T R i FE R TO Rfi-:' F ___jO F'H E R. HE E R,1 i- * 5 i i i-5; N, H5 L- 5 FIR L i ti, i n t;,i_. 1 53P G.[, P F. 7, F' *-:... 1 i. 4..7P. 2.:P,! i 5..... Hi,5! ii i Hi E'.' R:. E 2: r r r-. 1.. '' - 0. '.E ".'.: T.C ':!t 5 ij. 5 i i S TRRii F ER TO BEF Ti ' 5H F. H E. E E.1, F, R i... -. E " n,.t. L i 23 1 - Fe-F- ri T i -?_._ -. -.4..'.............,:. 9,:.'. F:.... -- F::.:,:: -' i.-D D *.1 i*5, F,.! "... E 3 -,~E 5 R 3. i 0 r:~. ~.t r:::, r,. 2 i i? -: 7 F' F ' T. i F!::5 23: T R R:.' S F E R TO.-T E' E T i',.i 5 1 i - - O' F i i:; ' Lr! ' ' '; jD. -I S E F' I".F-.': E5. Li L T.-. 0-. '_R ',1 0:: ':i.:FER TO PT 31 R EN HD 0 F F i: 0GRi-.5i -i..':!'4 Ml:.;.2 COMPUTER RESULTS I P'i T i'. ' E.....-.... E'5_;'. iTL.- F: i.......1 -I- 1 - ~~... _ 0. _,. EULT F"r i. 1: l. r-. l:-i.... E... -. ":~... R E i L T '' 24.5 I. E-322

Example Problem No. 19 LGP 30 SOLUTION USING ACTIA PROGRAMMING LANGUAGE ALL. JPOBLER RUB~ER 1 TERMINAL SETTLING VELOCITY OF A PARTICLE IN A FLUID The Source Program dim' comp' 1664'" dim' cw' 19" index' J s8'O'' J'i '18; 'k' s81'rdhex'cw' J" iter'-j1'k',81," 3'flo'153'; '.153"' 3 flo' 714 t;,141 t 3'flo'1142'; '1.142"' 3'flo'286';'.286"' 3'flo'428'; '.428" 2 ' flo' 174';J' 1,74" O' flot2';'2. " O'flo'1000; ' 1000.' ' O'flo '2000'; '2000.' O'flo'100'; '100. O'flo'18'; '18. '" read'd" ' read'g' read' fI" read'p" read'v" sl'g'x'd'x'd'x'['p'-'f' ]'/' ['18.'x'v' ]';'u'use'slO'" 82'.155'x' ['g'power '.7l41: ]x' x 'd'po'lL1:42'-,'x'({, J'If'.power 143 3' 1/ [ / ' f'1 power'.286' ]'x [' v'power'.428' ] ]'; u' 'use's20" s3'1.74'x'lsqrt' ['g'x'd'x' ['p'-'f' ]'/'f']'; 'u" use's30" slO'd'xlu'x'f'/'v';'r' ' sll'when 'r'less'2. 'trn's40"' sl2'use's2"' s20'dtxtutxtft//v'; r 't s21'when'rtless'1000.'trn's50' s22'use's3' s30'd'x'u'x'f'/'v'; 'r' ' s31'when'r'less' E'2000.'x'100. ' 'trn's60 " s32' use ' s70" DATA s40'cr' 'aprnt'cw'O'' asr4ntl2 I t 2;I 1.0000325 transier to initial location of object program s43'aprntlcw'j'it 75f46vq' s50crt '7';'.1'J '10'; 'Ic' t 7J63avq' Id I fill~ 40667f5f46vq' s43 'aprnt 'cw' Jl "l44fvo4 ' iter' J'1'k's51 6225'vq 60J7266vq' 047'prt'u'u se 's 76' ' ~ 7JO22632vq' s6 0'cr' '7aprnt cwU" 3' \4'3fvq' s51' aprnt'cw' ' 4f2'2vq' s6521' use ' s42' 25f4'vq 463223fvq' o664flffvq' am34f2f22vq' 0J725ffvq' 224632vqt 8230000'-01' 9800000' 03' 1000000' 01' velocity Reynolds number 2640000'01', 4ZIZ2i9 1000000' -01',/ Results intermediate law velocity.1239396 02.1020023 03 E-323

Example Problem No. 20 PRESSURE DROP AND EXPANSION IN FIXED AND FLUIDIZED BEDS by Harvey L. List Problem Write and test a program which will compute pressure d-rop and expansion across a fixed bed of granular particles for a series of increasing fluid velocities. Designate the velocity at which initial expansion occurs, and then compute the expansion and pressure drop as the bed becomes fluidized at still higher velocities. The program should be capable of repeating the computation for any number of sets of input data. Input data for any single computation should consist of values for the following parameters using the specific test values shown: Test Values g = gravity constant, ft/sec2 32.17 L = fixed bed height, ft 5. 75. = void fraction in fixed bed, dimensionless 0. 383 3 Ps = true density of solid, lb/ft 230. 0 P = density of fluid, lb/ft 0. 0790 = viscosity of fluid, lb/ft sec 0. 0000360 D = particle diameter, ft 0. 00246 SF = particle shape factor: maximum value = 1 0. 9 for perfect spheres It is further recommended that the following control parameters be supplied as data: Suggested Values AU = increment of superficial fluid velocity in the fixed 0. 002 bed range, ft/sec AU = increment of superficial fluid velocity when in the 0. 050 fluidized bed range, ft/sec Uf max = maximum superficial fluid velocity in the fluidized bed region, 1. 0 ft / sec Ax = increment in relative expansion, dimensionless. 001 E = tolerance on difference between fluidized and fixed bed 5.0 pressure drop, b/ft2 Discussion Consider a vessel, filled with granular solid particles. The voidage in this fixed bed can usually be easily determined. Imagine now, that gas is being passed through the bed at ever increasing velocities. As the velocity increases the pressure drop through the bed will increase with essentially no change in void fraction. The point will finally be reached, where the pressure drop through the bed is equal to the E-324

weight of the particles. Any further increase in velocity will cause the particles to begin to be suspended in the gas stream and the bed will begin to expand. This point is known as initial bed expansion. As the velocity is still further increased the bed becomes fluidized, the voidage increases, but the pressure drop remains essentially constant. Theory a. Assumed on part of students. General understanding of principles of fluidized beds. b. Relationships to be given specifically for this assignment. 1. Particle Reynolds number R = Duf (SF). (1 -E) 2. Pressure drop across ideal fluidized bed AP = L (1 -)( s - ) 3. Ergun* equation for pressure drop across fixed beds. p = 150 L (1 -~) u + 6300 ( 1 - ) L L u12 P+ D - "AP (Ergun)" 3gO D2 D g 4. Void fraction in fluidized beds. E = 1 - E vf 1 + x 5. Velocity in fluidized beds at particle Reynold's numbers of 20 or less.') (. )3 (SF)2 D2 (AP) g u = = "u (lowR) " 180 (1 -_~) PL 6. Velocity in fluidized beds at particle Reynold's numbers 100 or greater. (2) ((Ef)3 (SF) D APg \1.9 u -.l..9L =: (high R)" 2.9 (1 p-~.9 L/ where in all equations above: u = superficial fluid velocity ft. /sec. 6f = void fraction in fluidized bed, dimensionless AP = pressure drop across bed, lb. /ft. x = relative expansion, fluidized to fixed bed, dimensionless (*) Ergun, Sabri, Chemical Engineering Progress, 48:227-236 (1952) (**) Leva, M. and Grummer, M., Chemical Engineering Progress, 43: 549-554, 633-638, 713 (1947) E-325

Pressure Drop and Expansion in Fixed and Fluidized Beds Solution In going from a fixed to a fluidized bed by successively increasing fluid velocity pressure drop increases until it is equal to the weight of the bed and then remains relatively constant at this value over a range of fluidization. Also, for the fixed bed region the fraction voids remain relatively constant until fluidization begins and then increases with increasing velocity. Therefore, the problem resolves itself into the following: 1. Calculate APf, the pressure drop in the fluidized bed according to relationship'2. 2. For a series of increasing velocities, calculate AP, the pressure drop in a fixed bed according to relationship 3 of Ergun. 3. If the fluid bed pressure drop is greater than the fixed bed, print out fixed bed results. 4. If the fluid bed pressure drop is equal to the fixed bed, print out results designating the velocity to be that at initial bed expansion. 5. When the fixed bed pressure drop is greater than the fluidized bed drop, set the correct pressure drop at the fluidized bed results for a series of increasing velocities until some final velocity is reached. At each selected velocity in the fluidized range the computation of the expansion is an iterative procedure. Either relationship 5 or 6 for the velocity, u, depends on the unknown void fraction, HE which in turn is derived from the unknown expansion, x. Furthermore it is necessary to assume a velocity in order to approximate the particle Reynolds number R to determine which of the two relationships 5 or 6 is applicable. The procedure for determining the expansion factor x is as follows: 1. Pick an initial value of x = 0 and compute the void fraction H = Ef (x) by relationship 4. 2. Compute Reynolds number at the selected velocity, Uf in the fluidized region with the relationship Du (SF) F (1 -Ef) 3. Select the appropriate velocity relationship 5 or 6 depending on R and compute a velocity, U, based on the value of ef computed in step 1. If U < Uf,increment x by Ax and repeat steps 1 through 3. 4. If U >Uf, the last value of x has been computed with satisfactory accuracy. Print results with or without the comment " doubtful accuracy ", making the latter comment of 20 <R<100 the region in which either relationship 5 or 6 is of doubtful applicability. E-326

Example Problem No. 20 FLOW DIAGRAM FF LrS AT 'ITL-E 'ESLTS J)ATA DATS i n ____b~~ PRINT-^PRINT ES —F E-327

Pressure Drop and Expansion in Fixed and Fluidized Beds MAD PROGRAM E I 0 H A R!,,E '-,. -T f l I-.'H.2. -.-., L' 0- 0 5 i3.. i.-.; EI H:v L. LI.. U n.... -:...: '. T L-I.. - I *..C. C * ', *'-i '. ^ I: ED,., _ T ',.!:.!?;5 ' P, *"i T ' T..... '5 1 t'.-:,,FT

Example Problem No. 20 INSTRUCTOR' S SOLUTION I PUT V! LUE ~3 2 a 1 2,! 70 35, 2. 0 0, O 0 n * t _. i, i L-,i,!. "0. 900..02. 0 1 * i. i;;!- 00..!. I n- ^D BED\ I I R 0,_! ' - j.. ~.-.. -... - i,!. i i i rU 1.0., ODD = 0. rF u 0r O 0 r00 F I rE 0 DE r F FIXt BED U- 00 n.,r:_ - i 0. '3- 5 1. '-. j t 00 FI i E D I I 1... L BE t._ *ij i1 = 5I!00 3.:t0 5 ^ i 'r: *, 00 ' P':!'!-: I:1L —I I: ' ' i,.: E. _!IE = 013 R, 019. i " ':3 1::i-;:.: ' O.: 1..1. F. I B, EDE,- I 0 "r:. 1 3 '-,: 0r 0 c I0.: 0;.::01, E: iE.0 E-329

Pressure Drop and Expansion in Fixed and Fluidized Beds INSTRUCTOR'S SOLUTION (continued) U. = 3. l. - n I.l f — c i0.i fr_.- - I:,I L.. I:I 0!. I FI:ED BE D3.! U = 0 0. - 21 i, 0 =< -- 0. -0!?._,' 24 P". 1_'.::i- Ct.'3!1 F I rED B, PE- -__ U- 0 024 R- -= i.1 P. 25 i 7 I:; __ _ _0 FIX s:.-.,ED BED;_ 2 Pr. 7:: - -. f 0.02 F= 0.221 P-r 379;C:- 0l. F Hi TI flL R, I E. r; I I ]3 F I: i-!E:- C -i-I, 043 2 R- 0,.2 F'-r 3, P -r, 1:X- 07.0Y! 0 F I 'D BED: BEE' IJ= 0.c.32 r 0. 447 Pr 0 0 27 - FIXED BIED BED _ll_. 0,.$l4 R = ] l 2 7 F: ': - 3 3 0. "- - H i =!_l, I -' J5 0G = 0!00_ I_________n__'_____'$__;_s '.J _ 1.:1,,! {. g +; ~- { -. I.D. _: sj '.'! 4 s I F I:':'ED BED!.: 01. 2"' R= --.301,:' 14.::_!::.!!.".' INITI. ALE BE D E_____X____P____P________'.;.'r El {' " ' I Z -',B"i EDi-EFI IF 0.098 P=.77.7 P - =,: E R * i 3 " P: - ': "::, t — 4.- *;j7: ''l. iH T n T', * i, F E-330

Example Problem No. 20 INSTRUCTOR'S SOLUTION (continued) F!.K - 0.. 1 4I. -'R- ' 1 7 F"?;' a'i ' '-.:: r ' i FLI_ ID!ZED B:ED UF - 0.2 F 1 3,; =. 1 i::: I 'i Li-iFI-~~~~~~~~~~~~FF. FL D1 I BE [. r Ij F- 0.- 2 " 8.. 5'.1 F.'. i'-4.,i '.0 i FLUIDIZED BED!L IF E- r r F ir: I 0 i.:98r 1 5/7 ^ On 001 i —. -. Y.. i~ p- ' * i i -. E_ i s L.. 1..... F LUIDI.ED:ED UF — - = 14. 7F 3: 1.!: I I DI I LZ B L - E. D FLUIJ I D IZED BEDLr IF 0F 54S^I54.,; 3 b?JT-S 1:: -^,012 FL:; '..T I I r " i iE: - _ __ FLU L, * _,~ _,- _, *-_:.....:... UF= 01 "59S P= 4 83 c,. T '- - *::::; O:: ' F S_.....3,...- 7.....:._ _ FLUIDIZED BEED ILF _. 1:98-:~:;; Ii'ER- _ -.F~'. 7 'i j-. 0:. s i 1:LIi!t I Z D 9r.:' r E: DE0 IL i. F-.. =!.;: i:...!, ';; _ ', '. F L I ] r;: I s F FLUIDI;.ZED BED I.F.:. 74.. R:.. ',,_:; 1 5. 7. 62 — FLUiIZ- D B:-D --- —FL.U[IDIZED B:ED 'r-,, I _,t.... T.;_,.:.,!1F -.: -...8:.. FL.UI E.. B DD.r I -__- -. B::' D _ I!?- =] t. '-.'" '' i;-_ - _:.:. - _,. 1 n', ~r.t8...r..-.. 24_....._.. ':......:!1 0...................75 -: t:ii:.1 1'7;_ -; ____ E-331

Example Problem No.2 1 REACTIONS OF A STATICALLY INDETERMINATE TRUSS by A. D. M. Lewis Introduction. At Purdue University, students in Civil Engineering 371, the required junior course in statically indeterminate structures, have completed mathematics through calculus and possibly are taking differential equations and have completed strength of materials and a course in structural mechanics. Civil Engineering 371 meets for three hours of recitation each week for three hours of credit. One of the assigned problems is the computation of the reactions of a truss which is statically indeterminate in regard to reactions. In the spring of 1960, students in the section of Civil Engineering 371 taught by the writer were given the option of using a Royal-McBee LGP-30 computer in the solution of this problem. Objective. The objective of the computer solution of this problem was to give interested students an opportunity to program and use a digital computer. The Problem. An example problem is shown in Fig. 1. The reaction at C can be determined from the following: *r E Sut dCi = AE AE RC =-' C1 where the summations include all the members of the truss. In the above equations, the following nomenclature is used: RC = reaction at C 0,C1 = deflection of the truss at C with the given load applied and support C removed fC2= deflection of the truss at C with support C-removed and a unit load applied at C S = axial load in a member with the given load applied and support C removed u = axial load in the member with support C removed and a unit load applied at C t = length of the member E-332

A = cross-sectional area of the member E = modulus of elasticity Suggested Solution. In the assigned problem the truss layout, dimensions, and loads are selected to make computation of the axial loads in the truss members especially easy; therefore the axial loads are assumed available as input for the computer program. A flow diagram for the solution of this problem is given in Fig. 2. A set of statements for the ACT IA Compiler for the LGP-30 (as modified by The University of Michigan), the corresponding statement list, the decimal printout of the machine language program, and the printout during the running of the problem in Fig. 1 are appended. Class Experience. Approximately 20 students in Civil Engineering 371 during the spring of 1960 were given the option of solving the indeterminate truss problem on the Royal-McBee LGP-30 computer using the 24.Z Eloating Point interpretative Routine. In order not to take time from the regular course work, the computer instruction was given outside of regular class hours. This consisted of one hour of lecture on programming and one hour of demonstration on the computer. Approximately one-half the class submitted solutions which had been done on the computer. A solution similar to Fig. 2 was suggested to the students, and several variations were submitted. The 24. 2 routine permitted some simplification of the data input because repetition of the modulus of elasticity for each member was not required. With this routine the transfer to the section of the program for computing the reaction can be accomplished in a very straight-forward manner by punching the transfer instruction at the end of the data tape. The test for a zero value of the modulus of elasticity or similar test is not needed to effect the transfer as with the ACT IA program. Neither the flow diagram in Fig. 2 nor the ACT IA program provide for the printing of ui/AE for each member. The suggestion was made to the students that these values be printed; so they would be available for a graphical solution by drawing a Williot-Mohr diagram. Students are expected to have four hours outside of class to devote to this problem, including the drawing of the Williot-Mohr diagram. The problem is assigned at least one month before the due date so time can be scheduled on the computer without difficulty. E-333

Reactions of a Statically Indeterminate Truss m n e f g h j k A b c d B A C --- —-------- -----------— * ---360k 4 panels at 40' = 160' Fig. 1 Is~\ 'Se' "' RE.AD / l f CoIrnp Compt,,,e PIt PINT ACT IA Statements for Computing Reactions Fig. 2 ACT IA Statements for Computing Reactions of Statically Indeterminate Truss dim' cop' 1664&" sO'0'; 'del" 0 '; 'del2" sl'read'st, s2'read'u," s3'readl'len" s4'read'a" s5'read'e'" s6'whente grtr 0 trn' s8 7 'use ' sl' " s8'u'x'len'/'a'/'e'; 'ulae" st'x'ulJae'; 'sulae I u'x'ulae '; 'u2ae sulae'+ dell'; 'dell u21ae'+'del2'; 'del2" s9'tabe'prnt ' sulae s810 'tab 'prnt 'u2lae use 'sl sll'dell'/'del2'; 'r" s12'cr'cr'prnt'dell" sl3.'tab 'prnt 'del2" s814'cr'cr'prnt'r" 815'use' s0 " ' E-334

Example Problem No. 21 Data and Results for Example Problem in Fig. 1.0000322 Member S - kips u-kips/kip A - in. A-sq in. E - ksi SuJ/AE-in. u2 /AE-in. /kip a 3600000'3' 66666671 4800000'3' 2000000'2' 3000000'5'.1920000 00.3555557 03 -b 3600000'5' 6666667" 4800000'53' 2000000'2t 3000000'5'.1920000 00.53555557 05 -c 1200000'3' 6666667" 4800000'5' 2000000'2' 3000000'5'.6400001 01-.53555557 03 -d 1200000'5' 6666667" 4800000'53' 20000002' 3000000'5'.6400001 01-.3555557 03 -e -4500000'3' -83555533333" 6000000'5' 3000000'2t 3000000'5'.2500002 00.4629632 03 -f 3600000'3' i 3600000' 3'60 2000000'2' 30000000'5'.0000000 00.0000000 00 g -1500000'3' 8333333555555" 6 000000'3 ' 000000'2' 3000000'5'.8333357- 01-.4629630 05 -h 0" " 35600000'35' 1000000'2' 3000000'5'.0000000 00.0000000 00 j 1500000'3' 8355333335" 6000000'53' 30000002 3000000'5'.833335537 01-.4629630 03 -k 0" 0" 3600000'3' 2000000'2' 3000000'5'.0000000 00.0000000 00 t -1500000'3' -8333333555555" 6000000'3' 3000000'2' 3000000'5'.833355554 01-.4629632 03 -m -2400000'53' -1333333'1' 4800000'35 1500000'2' 3000000'5'.3415335 00.1896297 02 -n -2400000'53' -13333335'1 4800000'5' 1500000'2' 300000'5'.3413335 00.1896297 02 --in. 602-in.,1528001 01.7066671 02 -Rc-kips.2162264 03 E-335

Example Problem No. 22 SOLUTION OF THE SECANT FORMULA FOR ECCENTRICALLY LOADED COLUMNS by A. D. M. Lewis Introduction. At Purdue University a required course for civil engineering students is Civil Engineering 478 - Steel Design. The students have had mathematics through calculus and possibly differential equations, strength of materials, structural mechanics, and indeterminate structures. In this course a basis is shown for column formulas such as the one used in the American Railway Engineering Association Specification for Steel Railway Bridges. In developing this basis, the secant formula for the maximum allowable load on an eccentrically loaded column is encountered. In the spring of 1960, students were given the option of using a Royal McBee LGP-30 computer for the solution of this problem. The Problem. The secant formula can be written as follows: P EFS A ec /L&IP^h \ 1 + jz sec k E in which P = allowable load on the column A = cross-sectional area of the column EFS = maximum allowable extreme fiber stress E = modulus of elasticity c = distance from neutral axis to the extreme fiber of the member r = radius of gyration of the cross-section of the member 0 = length of the column between points of lateral support The students are given a problem which requires the solution of this equation for P/A, the allowable average unit stress on the cross-section of the column. This is most readily done by computing P/A on the basis of an assumed value of the P/A in the secant term. The upper limit of P/A, for any value of,/r will be seen to be EFS/(1 + ec/rZ). This fact can be used to aid in the selection of the first assumed value of P/A. If the assumed value and the calculated values of P/A are equal, a solution of the equation has been determined. E-336

If the two are not equal, a basis exists for selecting a better assumed value for the next trial. Often this equation can be solved by using the computed P/A as the next assumed P/A; howevery for some values of kr and ec/r2, the values of P/A do not converge, Objective, The objective of the computer solution of the secant formula was to provide an opportunity for interested students in Civil Engineering 478 to obtain some experience with a digital computer. Suggested Solution. Two suggested flow diagrams for solving the secant formula are shown in Figs. 1 and 2. Fig. 1 is satisfactory for those cases for which it is convergent.* With the printing of intermediate values of P/A, divergence is immediately apparent. The test for accuracy can be made a part of the program or the operator can watch the output and make the decision. In Fig. 2 is a flow diagram which can be used for all cases. In this program an initial assumed value P/A1 is read either from the tape or from the keyboard. On the basis of the computed P/A, the operator enters his next guess through the keyboard. For simplicity the accuracy test is done by the operator. A set of ACT IA Compiler statements for the flow diagram in Fig. 2 are appended. Also included are the statement list, a decimal printout of the machine language program and the output during the solution of an example problem. Class Experience With This Problem. During the spring of 1960, approximately 16 students in Civil Engineering 478 were given the option of solving the secant formula on the Royal McBee LGP-30 computer using the 24. 2 Floating Point Interpretive Routine. In order not to take time from the regular course work, the computer instruction was given outside of regular class hours. This consisted of one hour of lecture on programming and one hour of demonstration on the computer. Approximately one-half the class submitted solutions which had been done on the computer. A solution similar to Fig. 1 was suggested to the students, and several variations were submitted. One ambitious student devised a program which tests for convergence of the solution shown in Fig. 1. If the solution does not converge, a transfer is made to a program in which the P/A in the secant term is computed from an assumed value of the P/A on the left side of the equation. If convergence does not occur in the first program, it will occur in the second. *Editor's Note: There is always one and only one solution in the interval 0 <P/A 4EFS/(l+ec/r2). One can use linear interpolation or interval halving between these limits to avoid a diverging iteration. E-337

Secant Formula for Eccentrically Loaded Columns Fi gure 1 (START) * T/rs tes P/tA i P/A cnrlP/AotI<hopToRTr * This test is under the control of the operator, Figure 2 ACT IA Compiler Statements dim'com '1664" O'flo'2'; '2." O'flo'l'; '1." sl'read'efs' 'read'e" s2'read'ec/r2' s3 'read'l/r " s4'read'p/al' s5'efs8/ ['1. '+'ec/r2'/'cos' [ 'sqrt' [ 'p/al'/'e' ] 'xtl/r'/'2.' ]' ]'; 'p/a" s6 'tab'prnt'p/a" s7'cr'use's4 ' DATA AND OUTPUT.0000322 EFS-ksi E-ksi ec/r 2 /r 3300()00 '02 '3000000 '05 '6250000 '00 '100000 '03 ' P/Al -ksi P/A-ksi 2000000'02'.1011297 02 1500000'02'.1358734 02 1400000'02'.1418533 02 1409000'02'.1413267 02 1411000'02'. 1412093 02 1411500'02'.1411800 02 1411600'02'.1411741 02 1411650'02'.1411712 02 1411690'02'.1411689 02 1411689'02'.1411689 02 ANSWER: P/A = 14. 11689 ksi E-338

Example Problem No. 23 TABLE OF ALLOWABLE COLUMN STRESSES by A. D. M. Lewis Introduction. The junior and senior civil engineering students at Purdue University who choose to use the computer are prepared for later problems by a one-hour lecture on programming and a one-hour demonstration of this problem on the Royal-McBee LGP-30. The problem is the preparation of a table of allowable column stresses for various i/r ratios based on the formula in the American Railway Engineering Association Specification for Steel Railway Bridges. This problem illustrates, in addition to arithmetic operations, repeated calculations, a branching instruction, and an unconditional transfer. The formula is used by the seniors in structural steel design. The juniors have had some experience with column formulas in strength of materials and can expect to use the formula in the future. Results can be checked with published tables. The Problem. The problem is to prepare a table listing the allowable column unit stresses, P/A, for a series of ^/r ratios beginning with an initial,/r, designated as J/r, and increasing by increments of 4rin to a final v/r value, Jrf. The relationship between P/A and t/r by the AREA formula is P '= 15- 1 (R/r) A 4000 where P A = allowable unit compressive stress in kips per sq. in. A /_- = ratio of length of column between points of lateral support to the radius of gyration of the r column cross-section Program Discussion. A flow diagram for the preparation of such a table is shown in Fig. 1. A set of statements for the ACT I^ Compiler for the LGP-30 (as modified by The University of Michigan), the statement list, a decimal printout of the machine language program, and the output for an example problem are included. For comparison, a print of the program tape for the 24. 2 Interpretive Routine used in the demonstration is shown. E-339

Table of Allowable Column Stresses Comparison of Methods of Using the LGP-30. There is no doubt that the use of a problem-oriented language such asACT IA-is very desirable in teaching undergraduate students to use a computer to solve problems. The practicality of doing this with the LGP-30 for more than a few students, even with a photo-electric tape reader, is seriously questioned. With only the mechanical tape reader available, the use of ACT IA appears completely impractical. Machine time for this example, written in ACT IA, is 1. 5 min. for execution plus 20 min. for compiling and reloading. In teaching undergraduate students, or any group for that matter, a large number of inexperienced individuals use the computer. Accidental destruction of parts of routines can be expected to cause serious loss of computation time. Accidental destruction of routines occurs occasionally with individuals who are experienced. Even with the advantage of being able to recognize the possibility that a routine ha s been destroyed, experienced people still lose time in attempting to use a damaged routine and in replacing it. With inexperienced individuals, the loss of time can be expected to be greater. Fully protected routines appear to be more practical, even if a photo-electric tape reader is available, and the only practical solution if the mechanical reader must be used. At present the 24. 2 Floating Point Interpretive Routine and accompanying input routine are the only known fully protected routines available for the LGP-30. With these routines the computer can be operated with no trouble because of destroyed routines. For simple problems programming with 24. 2 is no more complicated than programming with ACT IA. The 24. 2 routine contains a number of features such as block data input, step-by-step trace, fixed-point printout, and unconditional transfer from tape, which are not available with ACT IA. Execution time of a program for this problem in 24, 2 is 2 minutes, somewhat greater than for the ACT IA program. Figure 1 E-340

Example Problem No. 23 ACT IA Statements for Allowable Column Stress Table.0004000 ' dim'comp '1600 " O'flo'15'; '15. " O'flo '4000'; '4000. ' s2'read'lr' read'lrin 'read'lrf' s1'15. '-'lr'x'lr'/'4000.';'fc" s3 ' cr 'prnt 'lr' 'tab 'prnt 'fc " s4'lr'+'1rin'; 'lr" s5 'when'lr'grtr'lrf'trn's2" s6 'use 'sl' Data,/r /rin jrf 0 '1000000'02'1200000'03 ' ACT IA Output h/r P/A-ksi.0000000 00.1500000 02.1000000 02.1497501 02.2000000 02.1490000 02.3000001 02.1477500 02.4000001 02.1460000 02.5000001 02.1437500 02.60000oo01 02.1410000 02.7000002 02.1377500 02.8000002 02.1340001 02.9000002 02.1297500 02.1000000 03.1250001 02.1100000 03.1197500 02.1200000 03.1140000 02 Print cf Program and Data Tape for 24. 2 Routine Used for Demonstration;0004000 '/ooo0000000ooo r6300 'u0400 'i4100 'b4100 ' zOO08' dOOOO 'm4100 'd4108 'yOOo ' a4110 ' z008 'mOOOO 'b4100' a4102 'h4100' s4104 ' s4112 't4003 'u4002'.0004000' ' '10' '120 ' o '4000 15' '1'+01- f' E-341

Example Problem No. 24 THE ROOT LOCUS OF A TRANSFER FUNCTION by Demos Eitzer I. The Problem In the analysis of feedback control systems the problem of the root locus is presented. The root locus is the locus of the poles of a closed loop control system as the gain (or some other parameter of the system) is varied. In general, the circuit configuration is such that the closed loop transfer function of the system is: F (s) 1 +KG (s) where s is the standard Laplace transform operator (complex variable), G (s) is the open loop transfer function, and K is a positive real constant. It is apparent that the poles of this function dictate the free response of the system and therefore give complete information as to the stability of the system. (It ought to be noted that the poles of G (s) are also poles of F (s). These poles, however, are always in the left half of the complex plane and their location does not vary with K.) The poles of the system are found by solving the equation: KG (s) = -1 This implies that: G (s) = -1/K (1) The root locus problem is then to find the locus of all points in a given region of the complex plane that satisfy the equation (1). II. Method of Solution The open loop transfer function of the system, G (s), can be written in the following form: a m m-1 a s +Ma -l +,.. + a0 G (s) = -= - = 1/K b s +b b +.. + b0 n n-1 ~ where K> 0 and the ats and b's are real. If a value of s = 0 + j-') is assumed then the following can be calculated. RN = real part of the numerator IN = imaginary part of the numerator RD = real part of the demoninator ID = imaginary part of the demoninator The general form of each of these expressions is as follows: m RN = Z a. |s | J cos (j arctan,/C0) j=o J E-342

and m IN = a |Is | sin (j arctan, /IT) j=.0 The general expressions for RD and ID take on similar forms. Having calculated these expressions, the real part of G (s) can then be written as: Re (s) = RN x RD - IN x ID Re G (s) = 2 -2 RD + ID For a point to be on the root locus, this quantity must be negative. This means that: RN x RD - INxID < 0 (2) The second required condition is that the imaginary part of G(s) vanish at the point in question. This means that: RD x IN- RNxID = F = o (3) The method to be employed in the solution of this problem is to scan the complex plane from left to right and from top to bottom and at each point to test for conditions (2) and (3). Since it seems highly improbable that conditions (3) will ever be met exactly, the test will be to see whether the function F changes sign in going from one point to the next. This is done by taking the product of F and the previous value of F (FNP) and checking to see whether the product is negative. The presentation of the results is such that we will print nothing if both conditions (2) and (3) are not met and we will print an asterisk (*) if they are met. Results for the entire row will be stored and then printed after the row is completed. In this way the output will be a plot of the root locust. On the accompanying flow diagram ATNI is the arctangent function, while x and y correspond to,T and w in s. FLOW DIAGRAM TO FIND THE ROOT LOCUS OF A TRANSFER FUNCTION | DATA | |DATA l Ft/CTOm \Y< MYECTE/\4 N Rdo RV0 W o All | 457T-NY.) |/I S. \4 XRii5 Ai XCOSCNI^ I /ER\ +R RDIX;#(COS( k) | E-343

The Root Locus of a Transfer Function FLOW DIAGRAPM (continued) (S)-(. TA Rb*J - NT R <k0 V W TAPF I/F/ < 0. 0oo -- MAD PROGRAM F;'C DEMOS EITZER TO90N A 002 005 006 2 R R THE ROOT LOCUS OF KG(S) R *COMPILE MAD,PUNCH OBJECT DIMENSION V(120) A(10),B(15) 01 START READ FORMAT MCARD,M,N,YZEROMYZERO,XZEROMXZEROINX,INY 02 VECTOR VALUES MCARD=$213,6F5.2*$ 03 READ FORMAT DATAA(0).,.A(M) B(0),*.B(N) 04 VECTOR VALUES DATA=$9F8.2*$ 05 PRINT FORMAT TITLEA(0)**.A(M) 06 PRINT FORMAT NAME, B(0)...B(N) A6 VECTOR VALUES TITLE=$65H1THE ROOT LOCUS OF KG(S)=SIGMA(M)(A(I 07 1)*S.P.I/SIGMA(N)(B(I)*S.P.I)/12H A(0)..A(M)=/(S1,5F9.2)*$ A7 VECTOR VALUES NAME=$12H B(0)*.B(N)=/(S1,5F9.2)*$ B7 THROUGH KAPPA, FOR Y=YZEROINY9 Y.L.MYZERO 08 FNP20O 9 THROUGH ETA, FOR G=0,1, G.G.(MXZERO-XZERO)/INX 10 X=XZERO+INX*G 11 RD=O. 12 ID=0. 13 IN=0. 14 RN=O 15 Nl=ATN1.(YtX) 16 N2=SQRT.(X.P*2+Y.P.2) 17 THROUGH ALPHA, FOR I=U0,1 I.G.M 18 RN=RN+A(I)*N2.P.I*COS.(I*N1) 19 ALPHA IN=IN+A(I)*N2.P.I*SIN.(I*N1) 20 THROUGH BETA9 FOR J=0.l, J.G.N 21 RD=RD+B(J)*N2.P.J*COS.(J*N1) 22 BETA ID=ID+B(J)*N2.P.J*SIN.(J*N1) 23 F=RD* I N-RN* ID 24 WHENEV.ER RN*RD+IN*ID.G.O, TRANSFER TO GAMMA 25 WHENEVER F*FNP.LE.O. *OR..ABS.F.L.O.0001 26 V(G)=S*S 27 OTHERWISE 28 GAMMA V(G)=S $ 29 END OF CONDITIONAL 30 ETA FNPF 31 KAPPA PRINT FORMAT ANSV(1).**V(G) 32 VECTOR VALUES ANS=$2H L,S1,0100C1*$ 33 INTEGER G,M,vNI,J,V 34 TRANSFER TO START 35 END OF PROGRA?' 36 *DATA 2 3 100 -100 -200 200 5 -4 D1 -100 -500 -600 100 500 600 100 D2 0 3 500 000-1300 500 20 -10 D3 100 000 17JO 800 100 D4 E-344

Example Problem No. 24 5 * * THE ROOT LOCUS OF KG(S) = - * s +8s + 17s. *3 * * 2 *** * ** *** *** * 2 *** * -8 -7 -6 -5 -4 -3 -2 -1 0 XEE-345

The Root Locus of a Transfer Function h W *, I L, 0~~~~~~~~~~~~!0 5o CAC. UL )O + t N tJ co.;.; o; i( oo o no oe ~ ~ o lA. o * 0 * 0*e * t * *; * *i* 0 0 E-346

Example Problem No. 24 The ROOT LOCUS PROBLEM in ACT IA on the LGP-30 In attempting to transcribe the Root Locus problem from MAD to ACT IA, several problems were encountered. MAD has available a four quadrant arctangent function ATN1 (X, Y) which is not available in the ACT IA subroutine package. Since the use of this function is necessary in the root locus problem, an internal subroutine was written to make it available. This program is presented in this report as a separate program but in practice it was always used within a larger program. The SINE and COSINE subroutines available in the ACT IA p1ackage are limited in that they will accept an argument no greater than nine (9) radians. Since in the root locus problem the possibility of having an argument greater than this exists, a second subroutine was written to convert the argument to within + 7 radians. The combination of the aforementioned subroutines made a direct conversion for MAD to ACT IA possible and for this reason a second flow diagram was not included for the ACT IA root locus problem. After starting to run this problem certain shortcomings of a small computer were noticed. The most obvious was the slowness of computation. The total execution time for a problem with 4000 points on the IBM 704 was 5 minutes. The identical problem run on the LGP-30 would have required 55 hours. This makes this solution highly impractical and the program is included for academic interest only, and the results are deliberately omitted. FOUR QUADRANT ARCTANGENT FLOW DIAGRAM A GArs-b\ --- —- F --- ( y XI 5061I- c -- ArA I4 =&- C,,,I — Mr E-347

The Root Locus of a Transfer Function ACT IA FOUR QUADRANT ARCTANGENT PROGRAM dim'comp'1600" read'eps' 'read'pi' O'flo'O'; '0. '"O'flo'2'; '2. "'0'flo'180'; '18Cl i sOO'read'y' 'read'r'' sOl'0'flo'510'; '510. '' s02'abs'y'; 'ya 'abs'r'; 'xa'' s03 '510. 'x'xa'; 'xat s04 'when'ya'grtr'xat'trn'slO0 ' sl9'when'xa'grtr'eps'trn'sll'1 s09'0. '; 'b' 'use's13 " sl0 'pi'/'2. '; 'b' 'use'sl3'' sll'atan' [ 'ya'/'xa' ]'; 'b'' s13 'when'y' less '0. 'trn's8' sl4'when'r'less'0. 'trn's6" s5'b'; 'ang' 'use'sl6l' s6'pi'-'b'; 'ang' 'use'sl6'' s8 'when'r'less'0. 'trn' sl5 sl2'neg'b'; 'ang' 'use ' sl6' s15'b'-'pi'; 'ang' s16'ang'x'18 0'pi'; 'deg'' s17'prnt 'deg'cr ' s18 'use ' sO0 '' FOUR QUADRANT ARC TANGENT FLOW DIAGRAM F 04- wAN& -2r ACT IA PROGRAM TO REDUCE THE ARGUMENT OF AN ANGLE TO + 7 RADIANS dimt comp ' 1600 ' 0'flo'?o; 7. '' read'pi2 ' sl ' cr'read'larg ' s2'abs'sarg'; 'a' s5'when' a' less'7. '-trn' slO ' s41,fihen arg 'grtr o0. 'trn' s9 s5 'pi2+'arg'; 'arg' ' use sf ' s 'arg'-'pi2 '; '.rg' use 's2' ' slO ' prnt ' arg '' E-348

Example Problem No. 24 PROGRAM TO PLOT THE ROOT LOCUS OF A TRANSFER FUNCTION dim' comp ' 1664 " dim'a'20" dim'b'20' ' index ' i ' j 'k' sO'O'flo'O''; 0. '0'flo'510'; '510. ' sl'0'flo'2'; '2. '0O'flo'7'; '7. ' s2'read'eps' 'read'eps2' s3'read'pi' ' s4'pi'x'2. '; 'pi2' 'pi'/'2. '; 'g' s5'rdhex'dot' 'rdhex'blk ' sb'read'wstrt 'read'wfin' 'read ' inw' s7'read'sstrt' read'sfin''read'ins' sb'iread'm' s9'0'; 'k" slO'iread'a'k' '0'flo'a'k'; 'a'k'iter'k'l'm'slO'l sll'iread'n' ' sl2'0'; 'k"' sl3'iread'b'k" 'Oflo'b'k; 'b'k 'iter'k'l'n'sl3'' s47 'wst-rt I; 'W ' s4b'sstrt'; 's"' s49'0. t; 'fnp' s50'0.'; 'rdI s51'0.'; 'id' s52'0.'; 'rn' s53'0. ';'in' I s54 ' abs'w'; 'ya'' s55'abs's'; 'xa'' s5b'ret ' s113 'use'slOO1 s57t'sqrt' l's'x's'+'w'x'w'J'; 'mag" s5d'01';'i'" s59'0'flo'i'; ''i. x'ang'; 'arg'' s60 're-t' s11 'use' s114 l sOl'mag power'i. '; 'mg' ' s62'rn'+'a'i'x'mg'x'cos'arg'; 'rn'' s63'in'+'a'i 'x'ng'x' sin'arg'; 'in' s64'iter 'i'1'm's59" s65'O'; 'j'' s66'0'floI'j '; 'j. I j. 'x'ang'; 'arg' s67 'ret' s119 'use ' s114 I s)d 'mag 'power ' j. '; 'mg ' s69'rd'+'b'j 'x'mg'x'cos'arg'; 'rd ' s70'id'+'b'j'x'rmgn'x'sin'arg.: 'id' s71'iter'j '1n'sbb6' s72'rn'x'rd'+'in'x'id';'att ' s73 'when'att'grtr'0. 'trn's7t' s74'rd'x'in'-Irn'x'id'; 'f' s75'f'x'fnp'; 'z'" s76'when' z'less'0. 'trn's79' s77 'when' l 'abs'f' J 'less'eps2'trn's79" s7d' aprnt 'blk 'use ' s80 " s79 ' aprnt 'dot ' s80'f'; 'fnp' s81's'+'ins'; 's' s82 'when' s'grtr'sfin'trn' s84' s83'use' s50' ' s84'w'+'inw'; 'w'' s85'when 'w' less 'wfin 'trn ' s87' s86'cr'use's48 '' s87 ' stop '' E-349

The Root Locus of a Transfer Function PROGRAM CONTINUED s10 ' 510. 'x'xa'; 'xat ' slO1 'when'ya' grtr ' xat 'trn' s104 ' slO2 'when'xa'grtr'eps'trn'slO5' ' s103'O. '; 'c' 'use's106' s104 'g '; ' c 'use ' s106 ' s105 'atan' [ 'ya'/'xa' ]'; 'c'' s106'when'w' less '0. 'trn' sllO ' s107 'when's'less'0. 'trn'sl09' s108 ' c; ang.1 'use ' s113 s109'pi'- ' c'; ' ang 'use'sll3' sllO 'when's''less '0. 'trn'sll2'' slll 'neg ' c ';'ang'use'sll3 ' s112 ' c ' - 'pi '; 'ang' s13 'exit '' sll4'abs'arg'; 'd' s115'when'd'less'7. 'trn'sll9' sll6 'when ' arg'grtr '0. 'trn ' sll8 ' sl17'pi2'+'arg'; 'arg'use'sll4' ' sll8'arg'- 'pi2'; 'arg' 'use'sll4 I sl19'exit ' DATA 1000000 ' -20' eps 1000000'-04' eps2 3141593'01' pi 10140o6vq' code word for "asterisk, space" o6o6vq00' code word for "space,space" 2000000 '01' wstrt -2000000'01' wfin -5000000'00' inw -1300000'02' sstrt 2000000'01' sfin 1000000 '01' ins O' order of numerator "m" 1' a(O) 3' order of denominator "n" 0' b(o) 17' b(l) 8' b(2) 1' b(3) E-350

Example Problem No. 25 AMPLITUDE AND PHASE RESPONSE OF A TRANSFER FUNCTION by Demos Eitzer The electrical engineering student is introduced to sinusoidal frequency analysis of circuits at the sophomore level. As he progresses through most of his courses he again uses the transfer function amplitude and phase as one of the many criteria by which circuits are classified and analyzed. He uses transfer functions in determining the frequency response of amplifiers, in determining the proper way to compensate a feedback system, in the design of filters, and in many other different places. In many cases there are simple rules by which the transfer function may be approximated with known accuracy in a given range. In certain other applications, however, it is impossible to use these approximations because the accuracy is no longer a known property. The general form of a transfer function is: a (jw) ) + am (j)m1 +.. + a mM1m m -1 G (jc) = a --- +a1 - +.... b (jo) + b 1 (j) + + For the purposes of a computer program, however, it becomes convenient to specify the transfer function mas: (Jo) + a I(jC)m1 +... + a0 G(ju) = n - - - (1) n 0 + n+19 (j)n- + + a 20 In this case: RN+ j IN G(jo) = RD+ j ID 2 4 where RN = a - a + a X- 0 2 4 2 4 IN = c (a - a3 w + -...) 2 4 RD = a20 - a 2 +a2 -4 20 22 24 ID = (a -a +a a 4) I21 - a23 + a25. ) We notice that each of the terms has a factor of the form: 2 4 a - a + 2 + ai+4 -... This lends itself to the use of a subroutine to calculate these factors. It becomes necessary only to vary the starting point of the subscript. This makes apparent the choice of the form (1) for this problem which is to evaluate the transfer function. E-351

Amplitude and Phase Response of a Transfer Function Solution In general, frequency response curves are plotted on semilogarithmic paper. It would therefore be advisable to use frequency intervals which are equally spaced on a logarithmic scale. This is accomplished by reading, as data, a set of graph points at which various transfer functions are to be evaluated. These graph points can then be selected from a given initial frequency to some final frequency with a skip of some definite number of points. In addition all the points may be modified by some constant multiplier. This flexibility allows the programmer to very quickly scan a large frequency spectrum and then return and carefully rescan a small section of the spectrum where the function was found to vary rapidly. FLOW DIAGRAM TO FIND THE AMPLITUDE AND PHASE OF A TRANSFER FUNCTION AS A FUNCTION OF FREQUENCY rsHRO UR\./ T 7- 1 pwSUM s RA PP NbzwojSKI/r5R=14. B2 6. b)7 7 A/4 I-i FLOW DIAGRAM FOR INTERNAL SUBROUTINE FOR THE TRANSFER FUNCTION PROBLEM f ~ YvO \ RN --- = e^ ^T, —/A- — SUM5,2 -E-352

Example Problem No. 25 ACT IA PROGRAM TO DETERMINE THE AMPLITUDE AND PHASE OF A TRANSFER FUNCTION AS A FUNCTION OF FREQUENCY dim'comp'1600 " dim'a'40' dim' gra'31 " index'sbs'k'ind " 1'; 'k'" sl3 ' iread'pts ' s12'read'gra'k' 'iter'k'l'pts's12' sO'iread'm' '0'; 'k' sl'iread'a'k' 0'flota'k'; 'a'k'iter'k'l'm'sl'' s2'iread'n' '20'; 'k' 'n'i+'20'; 'duram' s3'iread'a'k' 'O'flo'a'k'; 'a'k'iter'k'I'dum's3'" s4'iread'wo' 'iread'wmax' 'iread'skp' 'read'mult' s5'wo'; 'ind' s7'0'flo'1'; 'l. "'flo'510'; '510.' 'O'flo'O'; '0. ' O'flo'180'; '180.1 '0'flo'20'; '20. '' read'pi' 'O'flo'2'; '2. ' pi'/'2. '; 'g' 'read'eps' s6 'mnult 'xtgra'ind'; 'w s8'm'; 'alph'' slO'O'; 'jo I sll 'ret ' s84'use ' s76 ' s17 ' sum '; 'rn' s18'1'; 'jo' ' s19 'rett s84'use s76 ' s20' sum'x'w'; 'in' s21'20'; 'jo'' s22'n'i+'20'; 'alph' s23'ret's84'use ' s76 s24'sum'; 'rd' ' s25 '21'; 'jo' s26'ret's84'use's76' s27' sum'x'w'; 'id' s28'sqrt' [ 'rn'x'rn'+'in'x'in' ] '/'[rd'x'rd'+'id'x'id']' ]'; 'mag' s29 'cr '2'unflo 'w'; 'lwt '2iprnt'wl'' s30'tab' t20. 'Ixtlog'mag'; 'tdbt'3'unflot'dbt'; 'db"3'tiprnt'db"' s51'rd'x'in'- 'rn'x'id'; 'y' 'abs'y'; 'ya'' rn'x'rd'-'in'x'id'; 's''abs's'; 'xa'' ret ' s113 'use ' s100 ' ang'x'180. '/'pi'; 'deg' s32 tab'2'unflo'deg'; 'deg2 ' iprnt 'deg'' s33titertind'skp'wmax' s6 ' s55'stop ' s76'0'; 'sum'' s77'0'; jlJt s78'0'; 'pwr' s79'1.'; 'prod'' s80'neg'vw'x w'; '-w2t s85'prod'x'-w2'; 'prod'' s81'iter'pwr'1'j 's85"' s82'jo'i+'j 'ix'2'; 'sbs"' s87 'when' sbs ' igrtr'alph 'trn ' s84 I s83'prod'x'a'sbs'+'suml';'sum''iter'j '1'10's78' s84'exit'' slO0 '510. 'x'xa'; 'xat ' slOl 'when'ya'grtr'xat'trn' s104 ' s102'when'xa'grtr'eps'trn ' s105 ' s103'0. '; 'c 'use's106' s104 ' g 'I; ' tc use ' s106 ' s105'atan' ['ya'/'xa' ]'; 'c'' s106 'when'y' less'0. 'trn' s110 s107 'when's'less '0. 'trn ' s109' s108 ' '; ' ang 'use ' s113' s109'pi'-'c'; 'g'use'sll3" sllO 'when' s 'less '0. 'trn'sll2 ' slll'neg'c '; 'ang' 'use 'sll 5'' sll2'c'-'pi'; 'ang' ' sll3 ' exi ' '' E-353

Amplitude and Phase Response of a Transfer Function TRANSFER FUNCTION PROBLEM DATA 30' pts 1000000'00' gra(l) 1200000 '00' 1600000 00' 2000000'00' 2500000'00' 3000000100 4000000 '00' 5000000'00' 6500000 '00' 8000000'00 1000000 01' 1200000 '01' 1600000 01' 2000000'01 2500000 '01' 3000000 '01' 4000000001 5000000'01' 6500000 01' 8000000'01' 1000000102 1200000 '02' 1600000 '02' 2000000 '02' 2500000 '02 3000000 '02' 4000000 '02 5000000 '02' 6500000 '02' gra(30) 8000000 '02' 0' m( ORDER OF NUMERATOR ) 10' a(0) 2' n( ORDER OF DENOMINATOR ) 10t a(o0) 3' 10' 1,' wo i1' wmax 1' skp 1000000 '01' mul't 3141593 '01' pi 1000000 ' -20 ' eps E-354

Example Problem No. 25 TRANSFER FUNCTION PROBLEM RESULTS RADIAN FREQUENCY MAGNITUDE(DB) ANGLE( DEGREES ).10.083 1.74-.12.120 2.09-.16.215 2.82-.20.338 3.58-.25.533 4.57-.30.777 5.65-.40 1.427 8.13-.50 2.328 11.31-.65 4.300 15.66-.80 7.277 33.69 -1.00 10.45b 90.00 -1.20 4.905 140.71 -1.60 4.255- 162.90 -2.00 9o713- 168.69 -2.50 14.491- 171.87 -3.00 18.116- 173.58 -4.00 23.550- 175.43 -5.00 27.621- 176.42 -TRANSFER FUNCTION PROBLEM SOLUTION *Seond Orsde, System,' ^-. ~:~ ' "~:_. '.. ' ['' _'.: '' ' '.:i.1 " *'D' a ' ~ '"'. p io,15. i- --,-::-,- ~-~. - ---- -: -+ - _-^.-._ —+. ---- — j_-_[...-j-7 — ^/ ------- -:~-~ ---?.~ __ ---.::..4._._..4.i ---..+....,, ~..... 'i:':"!':~'"! J: '!: ' ''' i"...^.: "" ' "..'"! "!. '."* y \ 'JNs ar4,s Fiecuen'jy 1 rd/,,sec ~:....-:.-.,,'. -...-2:....;.:: 1. ~..:*....,,: s 20..........................,..-,....i.... —.-..._.... _..... —./-.-....,._....~ _._....~......;-..... S~ ~~~~~:..~. -. >:.. '-!,~.'}s..::!.. -.......,'.... "....... E 355

Example Problem No. 26 THE SERIES MAGNETIC CIRCUIT WITH AN AIR GAP by Demos Eitzer s As, Lw.'1/ /000 - - - APL X 0.OIt GCA PA = 2.32 i' In the magnetic circuit shown above the following data are given: A = 4 square inches L = 20 inches A2 = 3 square inches L2 = 10 inches A = 2 square inches L = 9.99 inches Area of Gap = GAPA = 2. 32 square inches Length of Gap = GAPL = 0. 01 inches Number of Turns = T = 1000 The material is USS-66 29-gauge Cold Reduced Steel, whose magnetic properties are given in the following table and graph. The problem is to calculate a graph of flux density vs. current. DATA FOR USS-66 29-gauge COLD REDUCED STEEL Magnamotive Force Flux Density Magnamotive Force Flux Density ampere turns/inch kilolines/square inch ampere turns/inch kilolines/square inch.19 20.33 70.20 26.34 71.5.21 32.35 73.22 38.36 74.23 44.37 75.24 48.38 76.25 52,39 77. 26 55,40 78.27 58,42 80.28 61 44 81.5.29 63 46 83.30 65 48 84.31 67 50 85.32 68.5 52 86 E-356

Table (cont'd) ampere turns/inch kilolines/square inch ampere turns/inch kT.i'Iines/square inch 54 87.94 97.Z.56 88. 96 97.6.58 88.5. 98 98.60 89 1.00 98.4.62 90 1.1 99 64 90.5 1.2 100.66 91 1.3 101 68 91.5 1.4 101.5.70 92 1.5 102.72 92.5 1.6 102.5.74 93 1.7 103.76 93.5 1.8 103.5 1. 8 103.5 *78 94.0 1.9 103.8 80 94.5 2.0 104.1. 82 95. 84 95.5. 86 95.75.88 96 90 g96.4.92 96.8 MAGNETIZATION CHARACTERISTIC USS-66 29-GAUGE COLD REDUCED STEEL '' -,:: ' ~ -;'.^.:...,.,'*:... i. I. i.:...-'.:" ';.. " ' ' ~; ': " ' ' ": ' -. -. -.. -.. -...:..L.. -.; -.i. y ~ - -. -. - l.. -.....{ -. -.....:,. -. - _... L..... '~~~~~~~~ ^.,;-: ~:..!.;' ', ': ~! ~;!. I::. '"4!": '[.....:,.o 0.,.....,9Mt' rt ev s/__.-"i —.3 %! ""' ----.-...57.'... —!, —? —! —*' ---; ---- ----- '.i',:p,./ " ' J L '...:. '. '". '. '! ' >.:i;.. '...- -...........-....................;....,... ~'::. -. ~:. ~:. ftwe^ T^^/^!....... i-..... —~-......,:......,......

The Series Magnetic Circuit with an Air Gap Solution A4 L A 3 A I, La l2 N/ am, ---' --- --— y f?~AREA OF SAP TURNS A general series magnetic circuit of uniform material (this does not have to be true but any other assumption would unnecessarily complicate the problem) with an arbitrary number of cross sectional areas, and associated with each area a mean length of path, as shown above, is considered. In addition, as suggested in the problem, there is a single air gap. In general there is a coil of N turns of wire around this core. The problem of determining the current required to send a specific flux through the air gap is easily solved. If, however, the current is specified and the flux is to be determined, the problem becomes one of trial and error. One approach to the problem is to assume a value of flux, calculate the current corresponding to that value, and then adjust the assumption accordingly. A second approach would be to plot a graph of flux vs. current for the particular configuration involved and then pick the result off the graph. This is the method that is employed in this problem. Analysis Assume a flux 0 in the air gap. The flux density is then B = 0 / Area of the gap gap or in general for the n'th cross section of core B(n) = 0/ Area (n) Let NI = ampere-turns for the gap gap = 313 B L. gap gap where the units of B are kilolines/in E-358

Example Problem No. 26 From the magnetization curve we can obtain H(n) and therefore the ampereturns required for the n1th section: NI(n) = H(n) L(n) The total ampere turn requirement for the core and air gap is then: N NI tota = 313B L + ~ H(n) L(n) total gap gap If this result is then divided by the number of turns N the required current for the flux 0is obtained. FLOW DIAGRAM; RE I P I / r0 _/4 ALPb,:\ _A..3 TA R MhtFA'X 1t PF AX Mt*AX^ T,, PrNATA 4 AL. Pot r B C*6 kI*Pr)-q~.AN,,,. PJ,X___A.. 3LWA14) DELP/ aT! icAPL,- PA i lB?.li^REU \Er~ g^ B} 3 ^/MC A L tO B -- ULX FO R-A PRI AR Tr JS'EM4RK CALCUL^r^ I ---------- I /^ = Gr+B Mt Ai- L- 7T /, E-359

The Series Magnetic Circuit with an Air Gap MAD PROGRAM EIO DEMOS EITZER R SERIES MAGNETIC CIRCUIT WITH AIR GAP R *COMPILE MADEXECUTE START READ FORMAT IRON,MMAX,H(1)...H(MMAX),B(1)...B(MMAX) 1 BEGIN READ FORMAT RANGEPH.IMAXPHIMINDELPHI 2 ENTREE READ FORMAT DATA, NMAX*L(1)...L(NMAX),A(I)...A(NMAX) 3 1GAPLGAPAT 30 PRINT FORMAT IRONtMMAX,H(1)...H(MMAX),B(1)..B(MMAX) 3A PRINT FORMAT RANGEPHIMAX,PHIMIN,DELPHI 38 PRINT FORMAT DATA,NMAX,L(1)..oL(NMAX) A(1)*..A(NMAX), 3C 1GAPLGAPA,T 4 THROUGH ALPHA9FOR PHI=PHIMINDELPHI, PHI.G.PHIMAX 5 BT=313.*PHI*GAPL/GAPA 6 THROUGH OMEGA,FOR N=1,1, N.G.NMAX 7 B=PHI/A(N) 8 WHENEVER B-G-B(MMAX),TRANSFER TO REMAK 9 GAMMA THROUGH GAMMA,FOR M=l,1,B(M+1).G.B 10 B=L(N)*(H(M)+(B-B(M))*(H(M+l)-H(M) )/(B(M+l)-B(M)) )l OMEGA BT=BT+B 12 ALPHA PRINT FORMAT ANS,BT/T,PHI/GAPA 13 SELECT READ FORMAT CODE,C 14 WHENEVER C.E.O 15 TRANSFER TO START 16 OR WHENEVER C.E.I 16 TRANSFER TO BEGIN 17 OR WHENEVER C.E.2 18 TRANSFER TO ENTREE 19 END OF CONDITIONAL 20 REMAK PRINT FORMAT REMARK 21 TRANSFER TO SELECT 22 R DECLARATIONS DIMENSION H(100),B(100), L(15), A(15) 23 VECTOR VALUES IRON=$S3,I4,10F7.3/(11F7.3)*S 24 VECTOR VALUES DATA=$.S3,14,10F7.3/(llF7.3)*$ 25 VECTOR VALUES RANGE=$3E10.4*$ 26 INTEGER NNMAXM,MMAX~C 27 VECTOR VALUES REMARK=$48H1MAXIMUM FLUX DENSITY EXCEEDED, PROC 28 1ESS NEW DATA*$ 29 1 DENSITY=,F 6.2,S2,26H KILOLINES PER SQUARE INCH *$ 31 VECTOR VALUES ANS=$9H CURRENT=,F 6.2,S1,7HAMPERESS 5913HFLUX 30 VECTOR VALUES CODE=$I1*$ 32 END OF PROGRAM 36 *DATA INPUT DATA 62 190 200 210 220 230 240 250 260 270 280 D1 290 300 310 320 330 340 350 360 370 380 390 D2 400 420 440 460 480 500 520 540 560 580 600 D3 620 640 660 680 700 720 740 760 780 800 820 D4 840 860 880 900 920 940 960 980 1000 1100 1200 D5 1300 1400 1500 1600 1700 1800 190C 2000 20000 26000 32000 D6 3800.0 44000 48000 52000 55000 58000 61000 63000 65000 67000 68500 D7 70000 71500 73000 74000 75000 76000 77000 78000 80000 81500 83000 D8 84000 85000 86000 87000 88000 88500 89000 90000 90500 91000 91500 D9 92000 92500 93000 93500 94000 94500 95000 95500 95750 96000 96400 El 96800 97200 96600 97000 97400 99000 100000 101000 101500 102000 102500 E2 103000 103500 103800 104100 E3 *24E03.12E03.6EO01 E4 3 20000 10000 9990 4000 3000 2000 10 2320 100000 E5 E6 E-360

Example Problem No. 26 RESULTS CURRENT= 1.71 AMPERES FLUX DENSITY= 51,72 KILOLINES PER SQUARE INCH CURRENT= 1.79 AMPERES FLUX DENSITY= 54.31 KILOLINES PER SQUARE INCH CURRENT= 1.88 AMPERES FLUX DENSITY= 54.31 KILOLINES PER SQUARE INCH CURRENT= 1.96 AMPERES FLUX DENSITY= 59.48 KILOLINES PER SQUARE INCH CURRENT= 2.04 AMPERES FLUX DENSITY= 62.07 KILOLINES PER SQUARE INCH CURRENT= 2.13 AMPERES FLUX DENSITY= 64.66 KILOLINES PER SQUARE INCH CURRENT= 2.21 AMPERES FLUX DENSITY= 67.24 KILOLINES PER SQUARE INCH CURRENT= 2.30 AMPERES FLUX DENSITY= 69.83 KILOLINES PER SQUARE INCH CURRENT= 2.39 AMPERES FLUX DENSITY= 72.41 KILOLINES PER SQUARE INCH CURRENT= 2.47 AMPERES FLUX DENSITY= 75.00 KILOLINES PER SQUARE INCH CURRENT= 2.56 AMPERES FLUX DENSITY= 77.59 KILOLINES PER SQUARE INCH CURRENT= 2.66 AMPERES FLUX DENSITY= 80.17 KILOLINES PER SQUARE INCH CURRENT= 2.76 AMPERES FLUX DENSITY= 82.76 KILOLINES PER SQUARE INCH CURRENT= 2.86 AMPERES FLUX DENSITY= 85,34 KILOLINES PER SQUARE INCH CURRENT= 2.98 AMPERES FLUX DENSITY= 87.93 KILOLINES PER SQUARE INCH MAXIMUM FLUX DENSITY EXCEEDED, PROCESS NEW DATA PROGRAM TERMINATED BY LACK OF DATA MAGNETIC CIRCUIT PROBLEM -FINAL RESULT 'T'-. Ti.... 'jl, -ti ^~......... ~, '".... ' '~~~~ ~~~~ 'I i' ', ' l.... f1...... ~~~~~~~~~: ___i-1~~:4- ~' 'i-^-; --- — -______ __ l:-!l:!, z!!~::.:! ':;', /; ~,!':~,::; a a, 'l: ~ it ~:: i,:::i;:;:::I j;::;*!':!~' -'-. ~~" i."m.:.~:. ~'?.:......? ---'"i —i......I.I"..' —?'.-......... '!" i: ~ *!:::."1 ': ~!;;:.;::: J: *::! i::: i:: *;::,!!/ '::: '.,:.. * ** * ' *............,.!; ' I ' ' ':._.:..::.!.... 7.1."~.~j n.r.........,:..,!.;i,,,.i ~ ~:,:....,...........I..... /-.... 0.Z.,. I I~;?M-~: i?'~: —...:::-/-:: —T':m. I,-i'::~~~~~~~ 361:!. ~!'!: ":.~.....: ' ".. ~i'"i

Example Problem No. 27 MOMENTS AND DEFLECTIONS OF A SIMPLE BEA M by Tung Au Introduction The sample computer problem reported herein is intended for an introductory course in structural mechanics. It deals with the computation of moments and deflections of a simple beam. While the concepts of obtaining moments and deflections at points along the length of a beam by successive integrations from a given loading configuration is rather simple, the solution may involve tedious numerical computations if the loading is irregular, or if the moment of inertia is not constant along the length of the beam. Class background The course "Structural Mechanics I" -- Introduction to Structural Mechanics -- is taught at the Junior level in the Department of Civil Engineering, Carnegie Institute of Technology. It is a 9-unit (equivalent to 3 credit-honr) course, with two lecture periods of one hour each and one recitation or problem session of three hours per week. The students are expected to have, as prerequisites, an adequate knowledge of the mechanics of rigid and deformable solids and the properties of engineering materials. The students have already completed integral calculus including a brief introduction to elementary differential equations, and a course in numerical analysis. While the latter course is highly desirable it is not necessary for this particular problem. In the past, most of the students in the course "Structural Mechanics I" have had no previous experience in the use of digital computers although a non-credit course on the programming for a specific machine has been made available to the students by the Computing Center for some time. Beginning from September 1960, a 6-unit (equivalent to 2 credit-hour) survey course on computers will be offered by the Computing Center to freshman elective (above and beyond the normally required units for graduation.) Objective of the Example Problem The example problem is a typical homework problem in the part of the course devoted to deflections of simple structural systems. This particular problem is chosen for programming because it is one of practical importance which cannot be solved analytically, and it lends itself readily to computer solution. Furthermore, it requires only elementary programming techniques so that the programming time will not be out of proportion with the time required for slide rule solution. Class lectures on the deflection of beams precede the homework assignment. The relationships of load, shear, moment, curvature, slope and deflection of beams are first reviewed and the numerical techniques of treating irregular loading and variable moment of inertia are then developed. The students are normally assigned this problem in a problem session in which questions may be raised for discussion, and they are required to complete the sliderule solution as homework. With a slight modification of the normal schedule, the student may be asked in the future to hand in instead a computer program in a problemoriented language. Although it is desirable to give the student some insight into the potential -of a computer, problems should be selected primarily to broaden the understanding of the subject matter through the use of the E-362

computers. The sample problem in this report is believed to serve such a purpose well. Statement of the Problem Write and test a computer program for computing moments and deflections at equally spaced discrete points along the length of a simply supported beam. The loading is a continuous function whose values at the discrete points are given. The variable moment of inertia is also a continuous function with given values at the same discrete points. The program should be capable of handling up to 25 discrete panel points (for N = 0, 1, 2,..., 24). The following three sets of data are supplied: (1) Uniformly distributed load and constant moment of inertia: N - Number of Panels = 6 L = Length = 72. 00 ft. Q = Load = 2. 50 kips/ft for all N E = Modulus of Elasticity = 30, 090 kips/in2 I = Moment of inertia = 24, 000, 00 in for all N For this case, the center of deflection of the beam is known to be (5/384) (QL /EI), which should be checked by slide rule. (2) Irregular loading and variable moment of inertia given at panel points 0 to 6: N = 6, L = 72.00 ft, E = 30, 000 kips/in2 Q(0) = 3.00 kips/ft I(0) = 12,000.00 in Q(1) = 4.00 I( 1) = 16,000.00 Q(2) = 1.00 I(2) = 20,000.00 Q(3) = 2.00 I(3) = 24,000.00 Q(4) = 3.00 I(4) = 28,000. 00 Q(5) = 6.00 I(5) = 32, 000.00 Q(6) = 5.00 I(6) = 36,000.00 (3) Irregular loading and variable moment of inertia given at panel points 0 to 12: N = 12, L = 72.00 ft, E = 30, 000.00 kips/in2 Q(0) = 3.00 kips/ft I(0) = 12, 000.00 Q(1) = 3.70 I(1) = 14,000.00 Q(2) = 4.00 I(2) = 16,000.00 Q(3) = 2.80 I(3) = 18,000.00 Q(4) = 1.00 I(4) = 20, 000.00 Q(5) = 1.55 I(5) = 22,000.00 Q(6) = 2.00 I(6) = 24,000.00 Q(7) = 2.23 1(7) = 26, 000.00 Q(8) = 3.00 I(8) = 28, 000.00 Q(9) = 4.81 I(9) = 30,000.00 Q(10)= 6.00 I(10) = 32,000.00 Q(ll)= 5.52 I(11) = 34,000.00 Q(12) = 5.50 I(12) = 36,000.00 E-363

Moments and Deflections of a Simple Beam Outline of procedure Basic Theory Using the sign convention shown in Fig. 1 for an element of a beam, the relationships between load, shear, moment, curvature, slope and deflection can be represented as follows: Quantity Notation Differential relationship conventional units Deflection: V inch Slope: 0 = dV/dx radian Curvature K = d6/dx = d2V/dx2 rad. /in. Moment: M ( = EIK = EI d V/dx ) Ft-kips Shear: S =dM/dx Kips Load: Q =dS/dx = d2M/dx2 Kips/ft. Modulus of E kips/in.2 Elasticity: 4 Moment of I in. Inertia: e +M A +M Figute 1 Figiure 2 The moments and deflections of a beam can therefore be obtained by successive integration. The solution may be carried out in two separate stages as follows: (a) Integrations involving only static quantities (forces and moments): Q(x) = Given S(x) = fQ(x) dx + So M(x) = fS(x) dx + M in which S and M are constants of integrations to be determined by the static boundary conditions. o o (b) Integrations involving only geometric quantities (rotations and displacements): K(x) = M(x)/EI(x) 6(x) = fK(x)dx + s0 V(x) = fe(x)dx + V -o E-364

Example Problem No. 27 in which 9 and M are constants of integration to be determined by the geometrical boundary conditions. o o In the case of simply supported beams as shown in Fig. 2, the boundary conditions are as follows: (a) Static boundary conditions, for x = 0, S = R (reaction at left support) o L M = 0 (no moment at left support) (b) Geometrical boundary conditions, for x = 0, 0 =aL (end slope at left support) V = 0 (no deflection at left support) The duality of the two stages of operation is obvious. Whatever method is used for the solution of the problem in its first stage, it can be repeated for the second stage. Such a solution of deflections,by referring to the computation of moments as an analogy, is generally known as the conjugate beam method. Numerical Procedure The computation of moments at points along the length of the beam can readily be obtained by statics if the given loading configuration consists of either concentrated loads or regularly distributed loads. The irregular loading may be treated by a numerical procedure commonly referred to as Newmark's method. essentially, the irregular loading configuration is replaced by equivalent concentrated loads at panel points equally spaced along the length of the beam. The accuracy of the solution depends therefore on the size of the panel H. Let the length of the span L be divided into n equal panels between the panel points 0, 1, 2, i,....n. Then, the equivalent concentrated loads P, P.,.. P may be approximated by the following formulas: P =(7Q + 6Q1 - QJ) H/24 P = (Q.j + 10Q. + Qj+ ) H/12 1 <j < n P = (-Q + 6Q + 7Q ) H/24 n n-2 n-1 n From the statics, the reactions, the panel shears and the moments at panel points may be computed as follows: (a) Reactions R = — Pj 0 j <n R - j=0 n RL = _ R 0 j -n j=0 E-365

Moments and Deflections of a Simple Beam (b) Panel shears S = R o L S =S +P 0 <j <n j+l j j (c) Moments at panel points M = 0 0 M =M.+S H 0<j <n j+l j j+l j < n By analogy, the end slopes, the average panel slope, and the deflections at panel points can be computed in a similar manner as soon as the curvatures are obtained from the computed moments in the previous step. Thus, K. = M./EI. 0 *j < n J I J Then, the values of K. may be used in place of the values of Q. in the evaluation of a new set of reactions, shears and moments for the conjugate beam. In carrying out the computation of deflections by analogy, the units of various quantities must be taken into consideration. For the conventional units used to represent these quantities, a factor of (12) = 1728 must be multiplied to the "moments" of the conjugate beam so that the deflections of the actual beam may be expressed in inches. FLOW CHART PR-/y7r Ab | PR | r PO 7^ Q, )2 ALPHA ^TA r) _ - At, Q 72 CYCLE ) I? C / LO X \b)..A o).^iw [i^^ -- --— 6 6 2, E..-366' v1- F (LoO

Example Problem No. 27 MAD LANGUAGE PROGRAM EIU TUNG AU T09GN 2 002 0(U2 (10 2 *COMPILE MAD, EXECUTE R RMOMENTS AND DEFLECTIONS OF A SIMPLE'BEAM R RMAIN PROGRAM R DIMENSION Q(24), P(24)s S(24), M(24), I(24} 1 INTEGER N, J, CYCLE 2 START READ FORMAT INPUT1, N,L,Q(O)...Q(N) 3 PRINT FORMAT CHECK1,N,L,OQ()...Q(N) 4 READ FORMAT INPUT2, E,I(O)...I(N) 5 PRINT FORMAT CHECK2,E,I(O)...I(N) 6 H=L/N 7 CYCLE=O 8 LOOP P(O)=(7.*Q(0)+6.*Q(1)-Q(2))*H/24. 9 P(N)=(-Q(N-2)+6.*Q(N-1)+7.*Q(N))*H/24. 10 THROUGH ALPHA, FOR J=1,1,J.E.N 11 ALPHA P(J)=(Q(J-1)+10.*Q(J)+Q(J+1))*H/12. 12 RR=O 13 THROUGH BETA, FOR J=O,1,J.G.N 14 BETA RR=RR-P(J)*J/N 15 RL=O 16 THROUGH GAMMA, FOR J=O,1,J.G.N 17 GAMMA RL=RL-P(J) 18 RL=RL-RR 19 S(O)=RL 20 THROUGH DELTA, FOR J=O,1,J.E.N 21 DELTA S(J+1)=S(J)+P(J) 22 M(O)=O 23 THROUGH EPS, FOR J=O,1,J.E.N 24 EPS M(J+1)=M(J)'+S(J+1 )*H 25 WHENEVER CYCLE.NE.O, TRANSFER TO NEXT 26 PRINT FORMAT OUT1,RL,RR,M(O)..M(N) 27 THROUGH SIGMA,FOR J=0,1,J.G.N 28 SIGMA Q(J)=1728.*M(J)/(E*I(J)) 29 CYCLE=1 30 TRANSFER TO LOOP 31 NEXT PRINT FORMAT OUT2, M(0)...M(N) 32 TRANSFER TO START 33 VECTOR VALUES INPUT1 =$I4,F8.2/(9F8.2)*$ 34 R RFORMAT SPECIFICATION R VECTOR VALUES CHECK1=$43H4MOMENTS AND DEFLECTIONS OF A SIMPLE 35 1 BEAM //21H NUMBER OF PANELS N = I4,$10, 9H SPAN L = F8.2, 36 13H FT//56H ORDINATFS OF LOADING IN KIPS/FT AT FqNEL POINTS 0 37 1TO N=//(9F10.2)*$ 38 VECTOR VALJUES INPUT2 = $F8.2/(9F8.2)*$ 39 VECTOR VALUES CHFCK2 = $26H MODULIJS OF ELASTICITY E =F8.2, 40 14H KSI//65H MOMENTS OF INERTIA I (INCH TO POWER 4) AT PANEL 41 1POINTS 0 TO N = //(9F10.2)*5 42 VECTOR VALUES OUtT1 = $23H REACTIONS IN KIPS,RL = F10.2, 54, 43 15H RR = F10.2,//44H MOMENTS IN FT-KIPS AT PANEL POINTS 0 TO N 44 1 = //(9F10.2)*$ 45 VECTOR VALUES OUT2 = $ 47H DEFLECTIONS IN INCHES AT PANEL 46 1POINTS 0 TO N =//(1H 9F12.4)*$ 47 END OF PROGRAM 48 E-367

Moments and Deflections of a Simple Beam RESULTS OF COMPUTER SOLUTION i,''":. F' -ll.:,:.:: '. OM.T! P! H,: rt r '.'.'F'-N 'T P' F k S.F-._ q?.i C - 7..-. 7"'i F'..~ T: I;O D i i".i E T E':,?._ F L ' i: E n rrT,?' f-; TN h l: t F: '.- P...T.E T P F:,":.' " ' 1' 0- _ N? t ":,_t-,,E,,,, ]" h?.' -* NtE_ H2. 50 2. 52 T2 5 59. ', i S OF T 6 I: -..E.. L.. K. -.-,O ',ETi"S.'* r-OF i'E.-.'i*i ' ':.7?.*.;-CIC- TO?i ' U iR: *i:i'T 'P::'-i r.'7':E T: * /,'. E i::I:r _, _? S! *, ti -,I'::E.: L - - - - 0r,.t " '" ' i',1t;,iEH T; I? i FT-KI..FS,::iT?,MEi_ POI TS. 0 T' t::i ' ' L? T 1 1 3 i. -! i.: D:i i 2 '. E t?.. F. T E ".; A.:-.. Ei T3 0? "i:?i' i,_i. n ) " - 0 i._3 i 0 i. 0-i: 0? 'i i2 i: j:. _ i i -._.? i; c. '!.;:3 _,::?.?, E-368

Example Problem No. 28 LIFT DISTRIBUTION OF A FINITE WING by Hsuan Yeh I. The Problem Calculate the lift distribution and induced drag of a wing of finite span given the information under a, b, and c below. Figure 1 is a sketch of wing planform, in which the x-axis is along the direction of relative motion of air, and the y-axis along the direction of the right wing and perpendicular to x. Suppose we are given the following pieces of V-" /information: (a) The geometry of the wing planform. This consists of wing span (i.e., tip-to-tip distance) b and chord c. Note that in general c varies s --- \ along the span, hence c = c (y). (b) The wing section characteristics which are in general again a function of y. For the problem that we shall consider here, the pertinent characteristics can be represented by a lift-coefficient slope a = a (y). (c) The angle of attack i(. Since in general the wing may be twisted, 0< Figure 1 also varies along y, or o( = o( (y). Note that o( not only depends upon the initial setting of the wing, but also changes with pitching or rolling motion of the airplane. II. Theoretical Outline The most general solution of the problem described above requires the calculation of the detail pressure distribution at every point (x, y) on the surfaces of the wing. So-called "lifting surface theories" have been developed for this purpose; however, they are extremely complicated and are more of a research than educational type of activity. Fortunately, for a wing whose span is several times larger than its chord (so-called large aspect-ratio wing), a simple theory, known as the "lifting-line theory" can be applied with relative ease. Basically, this simple theory ignores the detailed variation of properties along x, and concentrates only on the distribution of lift along y. The result of this theory can be represented by an integrodifferential equation for the unknown circulation r = r (y) along the span. This equation is the classical Prandtl' s equation: I2 dr ' =X - dy4 - dy' (1) acV 41TV b y-1 where the circulation F = F (y) is representative of the local lift at each wing section. The other variables have been described previously; they are: c = c(y) chord a = a(y) lift-coefficient slope 0f = &((y) angle of attack b span V flight speed E-369

Lift Distribution of a Finite Wing All quantities except r are assumed to be given. Although the equation for IAy) looks deceptively simple, it defies all attempts at a general solution. * This is because the integrand in the right-hand side has a singularity in the interval of integration, at y= y' Thus none of the elegant mathematical theories concerning linear integral equations can apply. Years ago Glauert proposed a clever numerical procedure which depends first of all on a transformation of the independent variable y by letting: b y - 2 cos e o <e T (2) (this is known as "Glauert's transformation"). Furthermore, the unknown r (0) can be represented by a Fourier sine series, ie., o00 r (9) 2bV V An sin nS (3) n = 1, 2... When Equations (2) (3) are substituted into the integro-differential equation (1), the integrals appear in a form which can be easily integrated: cos n Ot dot sin nO cos e' s c o sin ( The basic equation (1) now reduces to 00 i; A sin n (1 + in = o (5) n=1, 2... a(e) c(e) where. = 1 (0) -4b A=,x(e) Since Equation (5) is true for every value of 0, it represents infinite number of equations, each for one value of 0, for the infinite number of unknowns A. Once A Is are determined, the lift distribution can n n be calculated by applying Equation (3). Furthermore, the induced drag can be shown to be proportional to a quantity 6 A2 The quantity 6 is equal to or larger than unity. An efficient wing should therefore have a value of 6 as close to 1 as possible. * For a most recent attempt at an analytical solution for the special case of rectangular wing of very large aspect ratios, see Stewartson "A. Note on Lifting Line Theory, " Quarterly Journal of Mechanics and Applied Mathematics, February 1960, p. 49-56. E-370

Example Problem No. 28 III. Method of Solution The infinite set of equations represented by Equation (5) can be made definite by taking a finite number (say p) of points of E and then solve for the first p unknowns A1, A... A. Thus Equation (5) can be 1 2 p represented by a matrix equation: [T] {A} = {B} (7) Where [ T] is a p x p square matrix, and {A} and {B} are column matrices. The elements of these matrices are respectively: T =(1 + sin n 9 sn ( sin 0 s s B =. 0( s 5 A = A n n In other words, / ( + si; sin 1 ( + s ---) sin 2 (1 + sin ) sin p \ ( + sin 2 ) 2 ( sin s 2 \. (1 + 2 s2) sinp 2 T ( + si *i sin (1 + p ) sin 20 *(1 + --- ) sin pO / (l. sin e p + sin e p \ sine / p A1 F1 S 1 A^ A. A3 A 3 O(3 B FL O E-371

Lift Distribution of a Finite Wing It is of course understood that jp = pL (9 ) and d = ao(O ) are prescribed at the p points of 0. Although 0 can be chosen arbitrarily, it is convenient as well as desirable to choose 0 in the following S S obviously simple manner: =- s = 1, 2,.. p s p+l Once the matrix equation yields the unknowns A1, A2... A, we then calculate the lift distribution and 1 Z p the induced drag as follows: r =r (9) - o= =Z A sinnO n=l,2..p s s 2bV n n s \s=l,2...p Al:= n n = 1, 2...p Note that the lift distribution r is a vector having p values at p points along the wing span, whereas the s induced drag, A, has only one overall value for the entire wing. The flow diagram for this problem and the MAD program with sample data and results are given on -the attached sheets. (In the MAD program, use was made of a subroutine for the solution of simultaneous linear algebraic equations. FLOW DIAGRAM KAi...- h > I'" E-372 Cr-A {J AfiA ^ _N]_ ------ ^ s

Example Problem No. 28 MAD PROGRAM EIO HSUAN YEH-' TU9HN 5 '005 -005 050 2 * EXECUTE *FULL DUMP *COMPILF MAD R. 1 R LIFT DISTRIRUTION AND INDUCED DRAG OF FINITF WTNGS 2 R USING LIFTING LINE THEORY 3 4 DIMENSION MU(20),ALP(20),AF20),B (20),E(20),T(400,DIM) 5 VECTOR VALUES DI.M=2,0,20 6 INTEGER S,N,PM' 7 STAR'T READ FORMAT CARD1,P 8 DIM(2) = P VECTOR VALUES CARD1=$I2*$ 9 RFAD FORMAT CARD2,MUJ(1)... MU(P) 10 VECTOR VALUES CARD2=$8F10.8*$ 11 READ FORMAT CARD3,ALP(1)...ALP(P) ' 12 VECTOR VALUES CARD3=$8F10.8* - 13.THROUGH LOOP1,FOR S=1,1,S.G.P 14 9 (S) =MU (S) ALP(s) 15 THROUGH LOOP1,FOR N=I,9,N.G.P 16 ' Pr=3.14159265.17 LOOP1 T-(f-,N)=( 1+N*MU(S)/SIN. (S*PI / (P+ ) )'-S IN. (N*.S-PI/(P+ )) 18 D=1.0 19 M=1 20 K=SIMEO.(J,P,M,T(1l1), B(1) DF) - WHENEVER K.L.1.5 22 TRANSFER TO 51 23 OR WHENFVER K.L.2.5 24 TRANSFER TO S2 25 END OF COND1 I I)NAL 2 — ~ TRANSFER TO S3 27 S1 THROUGH BFTAFOR S=1,1,SS.G.P 28 BETA A(S)=T(S,1) 29 PRINT FORMAT OUT1,A(1)...A(P) 30 THROUGH LOOP2,FOR S=,1,1S.G.P 31 Y=-COS. (S-PI/(P+1)) 32 GAMMA=)0. 33 THROUGH LOOP3,FOR N=1,1I,N.G.P 34 LOOP3 GAr.AMMA=GAMM,1A+A ( ) I N. ( N-S-P I / ( P+. ) ) 35 LOOP2 PRINT FORM'AT OU!T2,S,YGAMMA 36 DFLTA=O. 37 THROUGH LOOP4,FOR N=191,N.G.P 38 LOOP4 DELTA=DELTA+N*A( N).P.2/A(1).P.2 39 PRINT FORMNAT OUT3,EDLTA 40 TRANSFER TO START 41 S2 PRINT FORMAT REMAK1 42 TRANSFER TO START 43 93 PRINT FORMAT. REMAK2 44 TRANSFER TO START 45 VECTOR VALUES OUJT1I=25H1COEFFICIENTS A(1)...A(P)/(S].,9F13.8)* 46 1! 46A V\ECTOR VALUES OiUT2=$18HO LIFT ISTr QIP!fTION/291-i STATION Y/SE MI 47 1SPAN GAMMA/I6,F12.3, 4, F 12.. 8*$.48 VECTOR VALUES OUT3=5$20)FH IINDUCFD DRAG DELTA\=F12.8'-S 49 VECTOR VAL!ES REM.AK1=$1H1,15. H OVFr-/UNDERFLOWLX_-'$ 50 VECTOR VALUES RFMAK2-$1H1,]14H T IS SINGULAR*, 51 END OF PROGRAM, 52 *t AT- A.7 Di 0.25 0.25 0.25 U.25 0.25 0.25 0.25 4.0 4.0 4.0 4.0 4.0 4.C' 4.0 E-373

Lift Distribution of a Finite Wing INSTRUCTOR 'S RESULTS., T., 'o.. -. -; -,. I...", _............. Lin ";~~i~~~~~~~~~~~~~. 1a:.;'_' '.: i...;:- -,..- ih..: ' ' i - 'I'! r..5........ -. _ _ _ _ E -374

Example Problem No. 29 BENDING STRESSES IN A MULTI-FLANGE AIRCRAFT STRUCTURE by F.M. White Introduction The subject matter here is that of elementary strength of materials. The particular problem is that of using the simple flexure formula to calculate the bending stresses in an unsymmetrical beam. The flexure formula is of course common to many fields of engineering. However, the structure to be considered in this problem is peculiar to the aircraft industry. A schematic of the structure is given below: Stringer (Flange) The beam consists of a number of stringers or flanges attached to a thin web or skin. A rigorous analysis of this structure for applied moments M and M could be enormously complicated. However, in actual x y aircraft practice, the following two simplifying assumptions are made: (1) the web is very thin and has negligible resistance to bending; (2) the area of each flange, A, is considered as concentrated at the point (x, y). With these assumptions, the analysis is simple. The difficulty arises because typical practical structures may have twenty or fifty or even one hundred stringers. To handle such a large number of flanges, it is customary, both in industry and in engineering school, to set the problem up in tabular form. The tabular computation of the necessary centroids, moments of inertia, and stresses or loads can be quite tedious. This is particularly true in design practice, where the calculations may have to be repeated several times in order to achieve a desirable stress distribution. It seems evident here that a digital computer would be very useful for data processing when the number of structural elements is large. Curriculum This unsymmetrical bending problem is encountered at Georgia Tech by junior students in aeronautical engineering. A knowledge of calculus is required for the course, but not for this problem. The relevant formulas in this problem are all purely algebraic. The students need only a nodding acquaintance with programming for computers. The problem is basically simple and should provide an ideal first engineering study for the novice programmer. Statement of the Problem The web of the structure will be neglected for these bending stress calculations. The structure has n flanges. The ith flange ( i = 1, 2..., n ) has an area A. and is located at the Cartesian coordinates (xi, y.). It is required to calculate the bending stress f. and the load P. in each stringer for all i. E-375

Bending Stresses in a Multi-Flange Aircraft Structure In general, the coordinates chosen are convenient rather than centroidal. It is necessary to calculate the centroid: A. x. EA '- A i Yi with x and y known, one then must compute the area moments of inertia of the structure: x^ FA^ -y)2 2 Ix Ai (yi y i (xi Ixy = EA (x. - x) ( - y) Finally the stresses can be calculated: f. = C (x.- x) + C2 (Yi- Y ) where M I -M I 1 - I I2 x y xy M I -M 'I C_ = xy x y I I - I2 1x y xy Also, of course, the flange loads are given by 1 [ In these formulas, the applied moments M and M are both to be considered positive when they cause comX' y~ pressionstresses in the upper right quadrant. Under this sign convention, the stresses given by the above formula will be positive for tension and negative for compression. The students are asked to write a program which will calculate f. and P. for any structure whose total number of flanges is less than or equal to one hundred. The program should be completely general. INSTRUCTOR'S FLOW CHART STA X)TYi A0\ XSAR, Y,,/v -~r_,, 6 ryrx XLA)...A x( x) E-376

Example Problem No. 29 MAD PROGRAM EIO FRANK M. WHITE TO9AN 4 001 003 006 2 002 *COMPILE MAD, EXECUTE-....... R USE OF THE FLEXURE FORMULA FOR MULTI-COMPONENT SYSTEMS R........................ _ _ _ DIMENSION X(100), Y(100), A(100), F(100) START ' READ FORMAT INPUTMXMYNMAXX(i)...X(NMAX)Y(.1)..**Y(NMAX) - 1 A(1)...A(NMAX).......... VECTOR VALUES INPUT$-2F10.2,14,/(7F10.2)*$' AA=0. c~. C=0. iNTEGER NM NNAX THROUGH ALPHA, FOR N=ll, N.G.NMAX........B......... ATi ---*X{-.N) C=C+A(N)*Y(N) ALPHA- AA"-AA+ATNN — - XBAR=B/AA Y5AR=C/AA IX=O...I.Y.-..-='O', -. -__ --- —------------------------------- IXY=O0 THROUGt-'BE-TA,~-FOR N1-rn-l-i-N.rMAX~ —.-N — A IX=IX+A(N)*(Y(N)-YBAR)*P.2 I 1Y +AiYA(N)*(X(N)-XBAR)~P. 2 BETA IXY=IXY+A(N )*(Y(N)-YBAR)*( X(N)-XBAR) PRINT FORMAT-DATA, XBAR9 YBAR I -X-I-, I i XY VECTOR VALUES DATA=$6HOXBAR=F10.6tS59,5HYBAR=F10.6,S53HIX= 1 F10,39-5593HtY=FIOiiiSj,4M-3 ---lIXY=F103*,$ PRINT FORMAT HEADER VECTOR VALUES HEADER-$5SHO N,S71NHXSi5,1HYqS15~iHAS15 - 1 1HF~S15,1HP*$.................. i..... =- - wM *'I-xY-Y I —m w /-(-IX-'IY- IX Y I XY ) -------- C2 = (MY*IXY-MX*IY)/(IX*IY-IXY*IXY) THROUGH GAMMAi ---GOR-t=1,l No,.GNMAXF(N)=Cl*(X(N)-XBAR) + C2*(Y(.N)-YBAR) GANMMA PRINT FORMAT RESULTNgX,-NX-)'Y'N) A(N)~F(N),F(N)-A(N) VECTOR VALUES RESULT=$1H,I4,5F15.4*$ TRANSFER TO.START - -i --- —--------- END OF PROGRAM RESULTS.:.:..: -- 5.'555: -.-, -: -7......: 4T44 4::::-222 2:', ' 2-}::~:: -7?. 7 7::.: 1~~~~~~~~~~~~~~~~~~~~~~~~~. ~ ~ ~~~~~~~~~. H ~ ~~~~~~~~~~.. - -.-. 1 0, 0 0 0 (3 (} 0 0 ': O 2.:] '. 0'] 3 '7":j {3H, <' 03 ' 2 ' 7 50 0'!!]'!0:.- 3: 20 0y -10 000 4. 0 0 1 4P 9 G 4 00. 9 5 ** 12 0. 07 0 0 0 1 ': 3",,:::.3, 4-:7 -i. 9., 9 -. 99 -2 20 '". 0~ 0] 0 0 " 0 'l 00 0 ~S;]~...i " 0.: 0. 0] ]-J ']] 7.1 2 -J 1: '2.. 1 '..?,..]: —.!5i - ':.:'.i:-. 0 0g.. 0_', 0!" 05.~-;:::E Bt R: '- 1,7.. 0-,:0,' 04 0 ": ',-:F;..3.: F.:':i:.,' B - 4 '?; 0"it 05 0.;'." I: '., 1........0 IS S':: 1 '.:0 0- 9 I:"<: ",:: - 02. '0 ' 0 -J Ip 1P;;1] 0 il. ]'!:{- 0 f~ 0J] 0 0l {' 0i' 0 0l 0 I 2 n'~ 0 0 0_ 0 "- 9 I m Im iI I. 3f i I... - [1~ 7 {'} 7 l ' '7 '7 7l' 7'' 6 2______________________, _...__ _0.00_0 _..._____....3..__0_9...,......_________ H.-:.............. q '' I I —q.........................~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~........ 3^u~~'.'n T " "' r OO:"" ~ " " l 0 0 " ' - 9: 99: ' 99 '9 9. 9999 E-377

Bending Stresses in a Multi-Flange Aircraft Structure RESULTS (continued) i-!R-'!. 1 1 -7357.1I 4 2i9_Fi1,i::..l. i.i -t12 i-i.717 CiO 4.44 _il,- _j..5 O _, 4 - 9.; 7,7 -.: '. 1 i -, —, '-,,.. - ~ _" -. *6 T i-! -4. ' 9 i 0_f, '.' 0_ --!1 6 ' 9 4. 9 9 ' -8 i' - "-. 4:9::9"2 4 ' '3 ' i 0 540 - 1' 4 ' 05.7 ':2' '' 2 ~1 i2* i..000_, i. 2_c00.: _i___ ___ 5t i 662. 3........1 - 121 7.5400 -4.290 150 1.4 4.1 9._22 I,~ --; ~ 31 --- — '-3 I' —" '-.-, 3.-'. i:,: 3 1 '9 '.- -i- E-378

Example Problem No. 30 NUMERICAL SOLUTION OF THE BLASIUS DIFFERENTIAL EQUATION FOR THE LAMINAR BOUNDARY LAYER ON A FLAT PLATE by F. M. White Introduction The problem is that of calculating the properties of the laminar boundary layer in incompressible flow of a Newtonian fluid past a flat plate with zero pressure gradient. A problem of this sort is ordianarily first encountered by senior students in aeronautical engineering. Historically, the solution to the problem was given by H. Blasius in his doctoral dissertation in 1911. Blasius first reduced the problem to a non-linear ordinary differential equation and then solved this equation by matching a power series solution, valid for small values of the independent variable, to an asymptotic expansion valid for large values of the independent variable. This procedure gives an overall solution accurate to three significant figures. Later, L. Howarth improved the accuracy by obtaining a trial and error numerical solution of the differential equation on a hand calculator. Even today, no closed form solution is known to the Blasius equation. Students are still taught the original method used by Blasius. Curriculum Students at the Georgia Institute of Technology encounter the Blasius equation in a senior level course in aerodynamics. These students would have already had the following courses (1) A one-year, three-credit-hour course in basic aerodynamics of perfect and compressible fluids. (2) A one-quarter, 3-hour course in ordinary differential equations. (3) A one-quarter, 3-hour course in partial differential equations. (4) A one-quarter, 3-hour course in numerical analysis. At present, students are not required to take any courses in programming for a digital computer. However, it is thought that a student could not really handle an equation of this type without some prior programming experience, preferably with a compiler language such as MAD. Items (1), (2), and (3) above are considered essential to the problem. Item (4), however, could be omitted in favor of presenting a suitable numerical technique in class for handling the Blasius equation. Objective A student who successfully solves this problem will have learned a number of new concepts can be considered as "objectives" of the problem; (1) The Blasius equation is third order and non-linear. It is typical of the equations which result in viscous flow theory from the application of similarity transformations. The student will gain experience in numerical solution of higher order non-linear equations plus added insight into the mathematics of viscous flow. (2) The Blasius equation is a two-end-point problem with one end at the origin and the other end at infinity. As such, it provides an unusual opportunity to learn how big "infinity" really is when E-379

Laminar Boundary Layer on a Flat Plate dealing with a finite machine. (3) The problem presents an opportunity to use the Newton-Lagrangian interpolation formulas as a means of increasing the solution efficiency. (4) The student has the thrill of solving for homework a problem which was once a doctoral dissertation. Statement of the Problem The Blasius equation is f(x) f (x) + 2 f '(x) =0 (1) where the primes signify differentiation with respect to the independent variable x. The equation is to be held subject to the following three boundary conditions: f(0) = 0; f ' (0) = 0 (2) f (00o) = 1 Note that no parameters are involved. Only ths single particular solution is desired, and the problem is thus ideal for a "one-shot" attack on a computer. Once f(x) is known, the problem is completely determined --- all the properties of the boundary layer, such as displacement thickness, momentum thickness, skin friction coefficient, etc., may be calculated fromf(x) and its first two derivatives. Mathematical Considerations The student.will be assumed to be familiar with both differential equations and computer programming. Most of the analysis which will be given to help the students will have to be given anyway as part of the standard course material. A few extra hints, having to do with programming tricks, can be added in a short period of time. Also, a specific numerical integration scheme can be suggested and developed, in case the students have not studied numerical analysis. The following specific suggestions would be offered: (1) The differential equation is of such a simple form that a Taylor series solution is a particularly inviting scheme. Given values of f(x), f '(x), and f " (x), the third and higher derivatives may be easily calculated: 2f '" = - f f 2f "" = -f ' f" - f f 'it 2f ""', = -f 2 - 2 f f t"' - f f'"' Once these derivatives are known, the values of f, f ', and f " at the next integration step may be estimated by three Taylor series: f (x+h) = f(x) + hf' (x) + f (x) +... 2 fI (x+h)= f' (x) + hf" (x) + h f '" (x) +... f" (x+h) = f" (x) + hf"' (x) +-~7 f "" (x) +... Assuming that f""' is the highest derivative calculated, the above Taylor expansions would be truncated'after the term containing f""' (x). The maximum error could also be estimated from the Taylor remainder theorem. E-380

Example Problem No. 30 (2) Some means must be established to determine how large a value of x is needed to represent "infinity". Physical grounds will be given in class to show that x = ten or fifteen is sufficiently large to be considered "infinity". A second aid in this regard is the fact that the second derivative f I" must vanish at infinity. (Also justified on physical grounds, although it may also be shown mathematically.) Thus, the numerical integration can be stopped at a smaller value of -6 x if f " has fallen in magnitude below a certain arbitrarily small number, say 10 (3) The obvious place to start the integration is at the origin, where two conditions are known, f (O)and f ' (0). Clearly f " (0) cannot be zero, since that would result in a trivial solution. It is also clear (or it can quickly be shown) that f ' (x) can never be negative, since it represents the velocity profile in the boundary layer. Therefore, f " (0) must of necessity be a positive number. Neither can f " (0) be a large positive number, since this would cause f ' (x) to overshoot its known maximum value of unity. It is proposed that the students be TOLD that the correct value of f " (0) lies somewhere between 0.2 and 0.4. (Time permitting, the students could certainly determine this for themselves with a little slide-rule work --- not to mention that the correct solution is given-in the textbook anyway. ) It is further proposed that the equation be integrated for five equally spaced values off f" (0): 0. 20, 0.25, 0.30, 0.35, and 0.40. The five resulting values of f ' ("oO") can be stored in the computer memory. Then the second part of the computer program will take these five results and interpolate with a NewtonLagrange formula to obtain the value of f " (0) for which f ' ("no") - 1. The equation can be reintegrated for this f. ' (0) and the final results printed out. The student must do all this in a single program. Instructor's Solution The instructor calculated derivatives up to and including f ""' and integrated forward with a step size H = 0. 1. Values of x, f, f ', and f " were printed out every ten steps (x = 1., 2., 3., etc. ). The instructor carried through five integrations, for initial values of f " (0) =.2,.25,.3,.35, and.4. Interpolation by forward differences in the five resulting values of f ' ("oo") gave the approximate value of f " (0) for which f ' ("oo") = 1. The equation was re-integrated and results printed for this new value of f " (0). The following variable names were assigned for use in the MAD language program: H = stepsize F = f Q = h 2/ 2! DF = f ' R = h3/ 3! D2F = f" S = h' 4! D3F = f '" T = h5/ 5 D4F.f "" X = x D5F = f ""' The accumulated error of the Taylor series used was estimated by the expression ERR = ERR + h f ""' where the error at X = 0 was taken as xero. This formula gives a very conservative upper bound to the actual error. E-381

Laminar Boundary Layer on a Flat Plate FLOW CHART FOR INSTRUCTOR'S PROGRAM START THROUGH IVAN Y(I) = DF \FOR N = 1,1 THROUGH JEANNE, FOR I = 1 1, \-I - 5 ^ /CALCULATE EANNE!*f ~ HIGHER -DERIVATIVES READ INPUT, D2F, H.... ___ CALCULATE NEW CALCULATE 1st, VALUES OF X, F, 2nd, 3rd, & 4th ^ LDF, and D2F DIFFERENCES OF PRINT Y(1) INPUT and |TITLE and(IVAN INTERPOLATE TO GET CORSET INITIAL VAL- PRINT RECTD2F(0) UES OF X, F, DF, RESULTS ERR --- ----- X, F, DF, ERR. ___ I _____ 4 D2F, ERR CALCULATE TAYLOR SERIES COEFFICIENTS PRINTL D2F < 106 ) VALUES XF, DF', DF, ERR OSTOP I I MAD PROGRAM "EIO FRANK M WHITE - TO9AW —01.O -— 06 —2 *COMPILE MAD, EXECUTE R A FAIRLY rSOPHn 11CAITED ONE-SHOM bOLUIIOUN OU IHLE LAbIUS Ltb IN R.D I ME NS I '-Yt51Y-'- Z ( 5 ) INTEGER N, It J. — -''' THROUGF —JE;ANNET- FOR I = 1-T4-1-.G. 5 START READ FORMAT DATA, D2F, H VECIOK VALUS D AIA=$/FI1U.0*$ PRINT.FORMAT INPUT, D2F, H - _ --- —- _ "- VECTOR- VALUES- INPUT=$1HOTHD2F(O)=t.4S10~3HH =F6.3*$ ALPHA F=O. X=O0 tKRRK. Z( I)=D2F -_-OO5 --- - Q *H*H R=Q*H/3. $sR*H/4. T=0.2*S*H PRINT FORMAT HEADER VECTOR VALUES HEADER=$1HO,5H X,S5,1HFSll,2HDF,S10, — ~- --- ------- F —3 5F85HERROR*$D. -3 E-382

Example Problem No. 30 MAD PROGRAM (continued) PRINT FORMAT RESULT, X, F, DF, D2F, ERR SONYA.. ----.-. — THROUGH IVAN, FOR N=i1,, N*.G1i X=X+H D4F = -05*(DF*D2F + F*D3F) DSF = --- -5* —(D2F*D2F'- + 2.}-*L)DF*D3F + -F*D4F)~ ERR=ERR+.ABS. ((Q*R+H*S+T)*D5F) +*~-r- FH -DF+Q*uR2+K*D3LF+S*+D4+T*f*DF DF = DF + H*D2F + Q*D3F + R*D4F + S*D5F IVAN =D2F M D2F- -HD3F + (HD4F + K*DbF PRINT FORMAT RESULT, Xt F, DF, D2F, ERR VECTOR VALUES RESULT=$1H 0Fs*294F12.8*$ WHENEVER D2F.GE*0.0000001 TRANSFER TO SONYA..-.. -WHVER i.G.G IRANSFER 10 5IART JEANNE Y(I) = DF -DELY = Y(2) - Y(1 WHENEVER DELY.E.O., TRANSFER TO HARRY. ~ - '" DET2Y.=. Y(3) - z.**Y(2) + Y( --- — DEL3Y = Y(4)-3.*Y(3)+3.*Y(2')-Y(1) DEL-4Y-=-Y( 5)-4.*Y(4)+6( 3)" )-4Y*Y ( 2 )+Y ( 1 ) V = 0. VNEW = 1,~ THROUGH BORIS,FOR J=llJ.G.l100.OR.*ABS.(VNEW-V).L..000001 V = VNEW ---- -- BORIS VNEW=(l.-Y(l)-0.5*V*(V-1*)*DEL2Y-V*(V-1.)*(V-.)*~DEL3Y/60 --- --- f l-~"t'~~-I'*-t"V-2. )*(V-3. )*DEL4Y/24. ) /DEL~Y D2F = Z(1) + VNEW*(Z(2)-Z(1)) PRINT FORMAT ANSWER, D2F, (VNEW-V)*(Z(2)-Z(1)) VECTOR VALUES ANSWER'=$1HO,'7HD2F(O)=F10.8,6HERROR=F10,8*$.....RANSFER TO ALPHA HARRY PRINT FORMAT OOPS..-.... VECTOR VALUES OOP'S=$iOH DELY=ZERo*$ TRANSFER TO START END OF PROGRAM *DATA RESULTS D2?FC,:: 0.2000 H - 0. 'I. 2 00 0C. 3 9 4 3024::-]::. 3 3 7' 2 0 4 '? 0. 1, 'u'"; I: 6 ' 1 0!.- 0 i 0 0 -;." 5. 0 " 2.49......24....7:?.....00-. 7.0i30 3. 4 -5 3 " 9233 ''. 7 1 ' 2 - 9 ':-.' 9 G. 0 0" 744- '- ' 0 0 0 0 0 0 1:} 3 1 0. 0-i 0i 2:;. 2; '' 9 4:'' ' 0:3 0 ' '7 3 0. 0 0 0 t i '?'". 11 i '... ~.. 3 9..1.. 0.7 El 2 F: 0. 2 5 0 H O. j..,I.-.-. ---.-.-.......-. - 9.: 0 5 329 0! 0 0 ) 20 0 C.5 F;.': q q F.....3. 3...,....:

Laminar Boundary Layer on a Flat Plate RESULTS ( continued) X F D F D 2 F- E R r:0 R 0. 00 0.00000000.00 000'-q000.3 3":':'"!:00 000. 0!.';00':0 0000 1.00 0. 14962682 O.29813956 0. 292 01 0 0.-I C000057 -. 2.00 0.5884522 1 D". 5 71 7259 0. 2 4'::. 0 0, -.1 --, O l -11 f-I 0. 7 3.00!.26947351.:77509' ' 0.1 '1, O. '7- 2 2 C 45 3 un 1 ~~ -"+ ii 1 779C-I. 0q 7~'~" 3 iiC0'4.00 2. 10 6 424 3. 84 35 691.063732 5 0000205 4O0 ~'' -' -' 1. 92:3 -5.1 0 3.01475981 0.92331014 0. 0 7:.'75677', 0. 0000022.3 G. Ii0.00 '3.94443855 0. 933 03534 0 00 29 3 0000253 7.00 I 4. 8 7. 39i. 39 5 0.0.3441305. 0 0- '. I -0.00i002 7 8.00 5.81289792 0. 9345433 6 0:0025000.I 0000 2'6 9.00 6.74744707 -.93455172 0.00000107.000002701 10. 00 7.68199879. 9. 3455201 0. 1000 00 il 2.00000270 02F(:0 =. 0. 3500 H I. 1 00 X F D 1F El! 2 F E R F.. +: ':. 0.00 0.0010-.00000 F 0 0. O _ 34 9 9' 9 -. 000000 i 1.00 0.1744924. ' 474 71 01 0I.33 5 I 5 0.00 0 7 6, 2.00 0..6 843799 1. 661 0 987192 - -,I '027 73 90 6 0 -1 - i.'0 107 3.001I4. G4 74 G 1 7 2"8:8 49,5.. 5390-.1 373 78 0.-004 4.00 2.741.553220 9. 4 1 4 9:3 5- I '.23 ii2, 5.00 3.43070555 1... 0 2.29 O.-_!.0 0 6.00 4.4 6.329'21:.; 0343737.g57,0. 00:201 1 34.000 0335 7.00 5.49869 3 701]!. 0 3.56 _: 4 339 O. 0001 O: 6651 0. 000 "0 L346. 3,4:, B.OO0 6.53437620 1.03569352 Cj.0.j170 0 0820-' 0. 000003149 _____...00 7,57007599 0"35 7003 0,. 0 8 2 C 0" 0! —.240 -i 00000 D2F'CO)= 0. 400 0H - 0. 10O XD FF DF DFRO 0.1::,. i~01:ctooict 0. IO tOF O I 0 U.I fjt 0.0.0 0.'0000000" 0 0.-O O 0 00O.. 4 030 0. 00 0 -0 1. 0O 0 0.1993376 ', 4 0.396701 0.36 0 6 3' 4 00-9 2.00 O. 779724 44 4 ]). 7503 -16 `37 0. 3 742 76. 0 0 E!00140 3.0I 1 L6t 21 '3573-' 0.1 C r73, ' 33. 77 3 0 0' " 2. 4.00 2.71571 568 1.09 7 13.. 0..70'..., 1... 0337 5. 00.33. 1 8 975 ' 1 127 0:273 0 1 11 046 1 0. 0 Ei 0'0-.- 7 6.00 4". 9 G6 1 9 55'.:). 1 '1 '701I0 1.1 1 2254.0 04 7.0 0 6.G'. 39593'1 1. 13 211034:.3 20 772 0! 4. "O'i034._- 7. 22 72:, 0794 1._'4r132 1 2:63:535 0.0: i0.0l FCi 44 i. 3ii.6 9.00 3..35'32 0639! - 1.1321!272. O.,.5 0.00 0 04-6 D2F (0O)=0. 3.32061440ERq:OR= 000000' p pacng:.' D F rD 2 F 0.0f 0 000QQO 0 0 000000 L 0 ".D ';.".:-. G Cl..4.t i _.i C I"D 1.00 0. 1 6: 55 7373 3.2 9 73 4 0.32301" 0. L S0-00 69 2. 0O G. 5:0"31 43'. 6".. '. 0 2: ':i, 7 7; "' -737 0 00 096:':, 3 3,C. 0! ~ 3 9.,2, 8 1 9 9 — 2!.-I. 8 ~4 6. 0 4 7?9:-:,,!3. i:-, 'I.3 57,'?,F., —. C-iC 0C 0 C — ':-I2 4..00 2.30576059 0. 9 5 ' ' 423473 0.0000024 5::; _ 5.00.3.28329045. 9 915453! 0 4 '.1' 90 0.0 - 00 02'7 O 6.00 4.2 79,6, 4091 O. 93 76 43 0Li.00 240 CI 1:,. '; 77 C'.0!.J.0 0 0 3 0 5 7:_. 0 5. 2 7.26159. 9199 2 49.2 0. 0 2 1399, (..![-I ' CJC!.f-Ju 3 -17 9.0078. 279240'791. 000.0. 304 0. I'-:):00. r'3 1- 7- 384 4

Example Problem No. 30..............J.....: i.. o!;.....''. '....... I 4- /- * 1 -1 - **- - 1 i - ** 1 1 ^ ^ - - (~ - w L —. -........ ^,.-...,.. _. —. 0*' i l l I \ \* ' \ ' 4 \ \ to \ \\ I( \ \\\ \ ro 'i o o E-385 H 0 ~ 0 0 4-4 E-385

Example Problem No. 31 STEADY STATE FLOW IN A LONG TUBE CONNECTED BY FLARE FITTINGS TO LARGE ENTRANCE AND EXIT PIPES by Frank M. White Introduction The problem is to determine the mass flow which results when a given pressure drop is imposed across the series system shown below: Large Pipe / — Flare Fittings. Large Pipe P — G - P2 -- 1- a Tubing: -Length L ^Diameter D The flow in the tube will be assumed to be isothermal, at temperature T. The flowing fluid will be assumed to be a perfect gas with specific heat ratio Y and coefficient of viscosity Ip. The pipes at the ends of the tube will be assumed to be so large compared to the tube diameter D that the fluid in these pipes is essentially at stagnation conditions. The fittings have a diameter Df which is smaller than or equal to D. Under these conditions, a functional relationship should exist for this flow of the form G = G (P1, P2, T, L, D, Df, R, y, [) where G is the mass flow per unit tube area and R is the gas constant of the fluid. The actual form of the relationship is a complicated implicit transcendental expression. Yet the problem itself is quite practical. For example, barosensing systems for aircraft and missile control are almost always of the configuration shown in the previous sketch. The pressure P1 is that of the air near the sensing port of the craft, and the pressure P2 is the pressure in the measuring element of the barosensor. In general, the system under study here is representative of a wide variety of control systems which rely upon pressure measurements for actuation. Curriculum The flow equations in this problem are studied in a wide variety of engineering courses at the junior and senior level. Students who take these courses must have a background in ordinary differential equations. However, the equations used in this problem are all algebraic in form, being the integrated form of the relevant differential equations. It would be useful for the students to knoow some methods for solving algebraic equations numerically, such as the Newton-Raphson method, but this could also be taught in class as part of the problem. Finally, the students should have prior programming experience on a digital computer. The solution of this problem requires a set of nested iterations. Assembling a correct program requires considerable care, and it is not recommended that this be a beginner's first computer problem. E-386

Objective If a digital computer were not available, the separate components would be studied and perhaps some problems would be assigned to calculate the pressure drop across these separate components. But no attempt would be made to solve the more practical problem of what happens when these components are joined together in series. The computer makes the practical case a reality. The problem also affords a particularly good example of the use of iterative techniques. Three small iterative solutions must be nested within the overall iteration. Furthermore, the order in which these iterations are carried out markedly affects the rate of convergence of the method. This very important point can be well brought out by assigning different sequential procedures to each student or group of students. The marked differences in execution times should be a revelation. Statement of the Problem The basic problem is to calculate the mass flow per unit area, G, through the tube, as a function of all the relevant variables: G = G(P1, P', T, L, D, Df, R, y, L) Let us define the following demensionless quantities: (a) Flow Factor: X = RT for all j GD (b) Reynolds Number: Rey = (c) Pressure Ratio: r = P /P (d) Fitting Diameter Ratio: B = D/D (B 1.0) Then the equivalent dimensionless problem is to determine the entrance flow factor ^1: ~} = Al (Rey, r, L/d, B, ) The last named variable, A, will be given a constant value of 1.40 (sea level air) for t'he calculations in this sample. Once the flow factor 1A is calculated, another quantity can also be tabulated, f*, given by - 1 4f* = 2r 2 2 L/D The quantity f* is called the pseudo-friction factor; it is useful in showing the results graphically. Let us redraw the original figure of the system: -- I P1 Pi PI PII Pe PZ Referring to the figure above, we may break down the problem as a whole into five basic contributions: (1) Pressure loss in the entrance contraction, from P1 to Pi. (2) Pressure loss through the upstream fitting, from P. to PI (3) Pressure loss in the tube, from P to PII. E-387

Steady State Flow in Pipes and Fittings (4) Pressure loss through the downstream fitting, from PII to P (5) Pressure gain in the exit expansion, from P to P. Corresponding to each of these contributions, respectively, we have the five basic flow equations (dimensionless): P. =l- 1-.2 2 (1) 4 I)r / \ P ^ ^ *"1(^ *"*( I1-( (1-B4) XI = 505 +.373 +.171 i 1 (I B 2 i L p. (2) P 2 () P = 1 - (5) 2. The quantity f is a dimensionless friction factor which is dependent upon both Reynolds number and L/D., There are two formulations to be used here for f, depending upon whether Rey is greater than 2000 ("turbulent") or less than 2000 ("laminar"). We shall use the following expressions for f: (a) Laminar Flow: (Rey% 2000) 4 = 64 2. 28 (6) Rey L/D (b) Turbulent flow: (Rey >2000) f- I + 27 000 f= KN + Rey L/D 7) log0 (Rey /4K =: 0.4 + 1 (8) I 0 'A 5K) 224 Equations (1) through (8) represent the desired functional relationship: \1 = X1 (Rey, r. L/D, B,") The quations are clearly semi-empirical in nature. It is proposed that various vls uebe assigned to Rey, r, L/D, and B, with ' = 1.4, and the resulting values of >1 obtained. Suggestions to the Students Each student's solution must of necessity be an iterative one, but different ORDERS of iteration will be assigned to each. For example, the obvious method of iteration would be to proceed as if one were a fluid particle, i.e., to move successively through Equations (1), (2), (3), (4), and (5). Equation (1) would use a first guess for 1. Equations (2), (3), and (4) would follow from this first guess. Then Equation (5) could be used to calculate a new "better" guess for X1, so that one could repeat the procedure. However, convergence is faster if one orders the equations differently. In any case, no matter what order one uses, certain considerations should be pointed out to all: E-388

Example Problem No. 31 (a) In all cases, Rey, r, L/D, B, and = 1.4 will be specified, and the problem will be to calculate X, and subsequently, f* (b) It helps, of course, to start with an accurate guess for N1. Perhaps the class should be allowed to make their own guesses. The instructor used as his guess the following: 1 / r2 - 1 3 r (4fL/D) Needless to say, there may be better ones. (c) Equations (1) and (5) are explicit and need not be solved iteratively. (d) Equation (3) is implicit in the pressure ratio P /P and must be iterated if this is the unknown. Convergence is rapid if one merely uses successive substitutions. A good first guess is "r". (e) Equations (2) and (4) are also implicit in the pressure ratios. However, convergence by successive substitution is very slow. The Newton-Raphson method is recommended here; it will always converge unless the pressure ratio is identically unity. The instructor tried to help things along in his program by breaking the equation up into short lengths of pressure ratio. (f) Since X is typically a small fraction of the order of 0. 2, convergence should be at least to the fourth decimal place. The instructor's program had \ converge to less than an iterative change of 0.00001. The most important thing here (in the instructor's mind) is to note that different attacks to the problem are possible in wide variety. Thus, the problem offers a good study of the philosophy and relative efficiency of an iterative solution. Instructor's Solution The instructor's own program followed the basic suggestions given in the preceding section. The order of solution chosen by the instructor is as follows: (a) Guess an initial value of!: r - 1 2 3 r (4fL/D) (This is thought to be a good average guess.) (b) Solve Equation (1) for P. /P ~ 1 (c) Solve Equation (5) for P /P2 (d) Solve Equation (4) iteratively by the Newton-Raphson method for P /PII' This done, calculate. (e) Solve Equation (3) for PI /PII by successive substitutions. (f) Solve Equation (2) for P /Pi by Newton-Raphson. Calculate Xi (g) Calculate a new value for A1: Xnew -a (Pil/P (h) Return to part (b) and repeat as desired. E-389

Steady State Flow in Pipes and Fittings INSTRUCTOR'S FLOW CHART AAX / THfROV&H /TH 'OU ' \ /PIOOO) \ r i Rf - rHU ' NA|-IAX z S7 / JEVN I\ E T 6/E \ /A IJ \ A)Ali eLCULC) A- STAR~TY - "oR VALUES FOR VA4LUEr oRg VAiLUES pR ~V*tLQ6 P&4R, FtL& A 00! OF R OF m p 6 cA LCcULA7TE /TIROua-\ ALC UL 47E C 'ALcuLATE (APHAb(l/ 7~ i /.Sg T T441 40 O RIDI-I-EP-.TEx <,re>i.se r TROU&# \ I --- - CAL cuL^4 tr ^ I — -i g^/wi^A^,roV = 2 X 0 '/ gE rE X -( 3|RF/rDP k 1 7- -.b/. LAM evc W -0 6 'Rrrex It' I -/, I 7rlHRovuPCALrC-L4TE C4t4CUL*/TE cALJcu1 r F0 /DETAFOR I TERAT6 Ir 7eCEr F- ] - -e], HARRY MAD PROGRAM IE I 4-( ^;rH^\ |^^TR i - ". ( r^^J^^nrmy R?rcP;A) (M2A) ROG F/A =. r',/$~ T..^ -fR F'.S.IJRF D RP THROUGH LONG T3INGA INCL UDING ENTRANvRCE R ANRFr. fE-XIT L- L NE AD LO.SE T R r REDUCTIrON FLA!RE R FITT. __O-g. T 0T cND OF rI.?/IETFR RATIO 7' INlTELi'R LOD, I N UAX INTER2NAL FUNCTION F.(XY) = X*Y-(.5D5+.37'3*Y+.171*Y'Y)*f 1 C-RT. ]Y) __-_._-:_ _________-._ e.....,B............ INTERNAL FU NCTION FRRI:,4[E_-.(XY) = X-(.373+.342-*-Y)"1 RrT.( 1.-Y)+(~.5,35+~37.3.'-+.171'*YY)/(2.'xSORT. (1..-Y)) IVMAD PROGRAM NMAX = 5. F ) F RAINY m W HITF T 9.AN n02 I 2 T PRO'. H JRER AN,' _, FROR VALNUES OF TRFI = G INCL.. IN ENTRANCE., O. THR O H JFANNIT FRS A ALUES TOFLOD =,, 3 EDUCTION FLA1RE R NITTIGS A T BOQTH ~7ENDS ON!-) F D IAMT RRATIO I _ INTEGER N9 I 9 NVA X INTERNAL FUNCTION F.(XY ) = X —Y-(. 5 +. 373- Y+. 1 7 —.Y()-YY )INTERNAL FUNCTION FPRI.:\''E.(XqY)= X- (. 373+. 342- Y ) ^ IVAN NMAX = THROUI.Gi J AniNN F, FOR VALUJ'ES OF RL = 1.0.2,1.5,2. 0,5.0 1 20. 1" 1 1 0 '. ) E-390

Example Problem No. 31 MAD PROGRAM (cont.) WHENEVER REY.L. 90u0'., F4AR = 64./REY WHENEVER REY.G.9J000. FBAR -=.0308891 WHEN VE R REY_.G __2'030__-N,_, FRAR =. 0234871 WHENEVFR REY.G. 80300., F6AR =.0179927 WHENEVER R.EY.L.. 9,00i0. FLOD = FRR-*-LOD + 2.28~ WHENEVER REY.G. 900J., FLOD = FBAR*-LOD + 27:J,00./REY ALPHA = ( 1.-B. P. 4)/( 3 ) WHENEVER R.L. 1.1, TRANSFFR TO BORIS PU. = (R R-I R- 1.....)./(..R-'-LOD ) LAMONE = SQRT.((R"R-1.)/(3. —R^-?FLOD) ) WHENEVER LAMONE.G_.4_.4LAVONE - 0.4 LAMNEW = LANONE + 5. -'-EPS THROUGH BACK, FOR N =, 1, \ N. G. NNliAX. OR..* ABS. (LAINEW-LAMONE) 1.L.EPS LAMONE_ = LAM NElW__ _ __ RAENTR = 1. - 1.2-LAMONE'-l AY',)'-NEc RAEXIT =. ~- 20.. -LAMONE.P.4_____ RETEX = ALPHA*LAMONE -R/RAEXIT WAHENEVER BETEX,.LE..04694267,TRASFER TO NEAT RFITDN = 0.998.W.H'E NEVER.3ETEX.G..344C5932, RFTTDN = 0.9 WHENEVER 3ETEX.G.O.58729167, RFITDN = 0.375 WHENEVFR BETEX.G.1.0383863, RFITDN = 0.5 WHENEVER BETEX.G.1.5801854, TRANSFER TO FINE - Z - O. THROUGH GAMMA,FOR I=O0, 1,I.G.NMAX.OR..A S.(Z-RFIT'DN).L.EPS - _ _ =.R- I..LDN GAMMA RFITDN = Z - F.(3ETEXZ)/FPRIM'E.(BETEX,Z)...._....._... TRANSEER TO ZEFTA BORIS RFSTAR = (FLOD+(2.4+3.635,4-*-ALPHA,-ALPHA)/1.4)'/LOD I AMNEW = - ' N = 2 TRANESFFR TO JFNJEN NEEAT RFITDN = 1. - (-ETEX/1.49 ). P. 2 TRANSFER TO ZETA FINE RF ITDN = 0.52936211/BETEX ZETA LAMII = LAMONE*R*RFITDN/RAEXIT W = 1.4*-LAMI ILAMII H = R HNEW = 0. THROUGH DELTA, FOR I=0,1,I.G.NMAX.OR..Ai-.S.(H —HNEW).L.EPS HN'EW = H DELTA H = SORT.(1.+W-*(FLOD+2.*ELOG (HNEW))) BETENT = ALPHA*-LAMII/H WHENEVER 5ETENT.LF.O.0,4694267,TRANSFFR TO GOOD RFITUP' = 0.998 'WHENEVER. BETENT.G..34405932, RFITUP = C'0.9 WHENEVER iBETENT.G.0.58729167, RFITUP = 0.75 __ __ _ WHENEVER BETENT.G.1. 383863, RFITUP = ).5 WHENEVER BETENT.G.1.58U01854 TRANSFER TO SWELL *..':..... T =.. ____ ________________________________________ ___ THROUGH NUFOR I=u,,1,I.G.-NMAX.OR..ABS.(T-RFITUP).L.ePS T = RFITUP NU RFITUP = T - F.( BFTE'-NTT)/FPRIM',F. ( ETENT T) TRANSFER TO HARRY GOOD RFITUP = 1. - (, FETFNT/1. 49).P.2......... TRANSFER TO HARRY___ SWELL RFITUP = 0.52936211/RETENT HARRY LAMNlEW = LAMI I* -RFITUD*RAFNiTR/H WHENEVER LAMNFW.G.t.4, LANNEW = 0.4 RACK CONTINU ____ RFSTAR = P../(LAMNEW" —LAMN EW ) JENJEN PRINT FORMAT RESULT,RI REY,FRAR LOD',,( N-1.),LAMNEWRFSTAR VECTOR VALUES RESLULT=$3H"R=F6. 1,5H REY=F8.1,4+H 4F=F9.7, H1 H LOD=F6.],3H:=F4.1,3H N=I3,8H LAtM'!ONE=Fq9.7, 2 9H 4F ST.AR-F9.7*$ JEANNF N CT F CO N T I ____.... END OF PROGRAM E-391

Steady State Flow in Pipes and Fittings........ r".. {***! r -i I~' i =*':, ^.t *..... r"- (:::. G -.' r- I i "~; '~~-I" i'"' ''~i""*..I..::;-*.. r -... r,.! o:'. i"' "' i:'3! i":);:**..' i:- -. '< ** ".' r -':' '*- "I **::- **:, " ***:** h ~~~~~~~i r " - i:"............ Il '. i':: ii i.':::..': L.:;;;".: i::: F::;:.:: i:..:: j'.: i::::': i:.:; (::.: i::g" I i'..;.:.. ^ r-;; r~ ~~ i. i- r-. r - i s **!*** i~ ~ ~~~r * i-.....*....... f~~ ~ ".* ~1 ~I,- ~~~".,:* ~: r" r^, *a.-:; ^~"r: ":: *...... '...... |~ ~:1 ~-1~-::;:;;t:.^::^::::'1^ ^:;;:;a:'*:l::::1;.'":: i..i~i l..^; i~i!....... i.;...... i..^ L U ~ n i~i; U i!J..' '.;..; [.., [:.! \.;\ i..i..j ~ i~l i^.i L:.i pi~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i.......... l " ~. I 1: ~ ~: - I ' ~ fi.' t"~~ ii. ^ * *! ';'I: I '^:r I ^. 1::' u'\ L -:; 0:!!."~":;* '"!:: I; I s i II.: ":';; I ' ' I '.: l ':\!:''' E-39Z ''~ ' I.:. f~i~:. ii` r;~ ii: i..l I..i:.::~'' 1...:. I i:.. I i:::: i............i I ':::............ ~ ~ l... I i:i:::::~:.. i..:'i I r ~ i I i ii i i i ~~, I i ': I ii; i::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...... i..... I..l... I ii.I!.:.I Iil ii.I I'. i. i:.I i-.IIi.li..:i I i~ i i.. I~~~~~~~~~~~~~~~~~~~~~~~~~~: L~ ~~ I I':l ~.~~~~ I ~: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~......................~ I ~'i ~ " " '. ~I i i ~~" ' i - -: I -~ ~~I:~i~~ ~: ~~ ~ ~~il ~ ~':: I '~:'" I::: I!: l i' Lm.

Example Problem No. 32 MINIMUM WEIGHT RECTANGULAR RADIANT COOLING FIN by C.Y. Liu Consider a rectangular radiant cooling fin of length of L, width W, and thickness 2b, as shown in the accompanying figure. The base of the fin is at T while the surroundings are at T. If heat transfer from the narrow edges X 0 S I of the fin is assumed negligible, the heat balance around a differential element, dx thick in the L direction, is Heat in at x = Heat out at x + dx + Radiation or.2 ( dt d4 -k ( 2bW) d- = -k (2bW) - d + T dx + 2Ws dx ( T4 T dx dx 2 S Surroundings (/ T Here k is the thermal conductivity of the fin, T is its absolute temperature at any distance x from the base 4 4 and s is the radiation constant. For a fin operating at high temperature T >> T, or T may be negTs may be neglected and the heat balance may be simplified to the basic non-linear differential equation, 2 4 dT sT _ kb - o (1) 2 kb dx The boundary conditions are T = T at x = 0 (2) o0 dT/dx = 0 at x =L (3) The cooling rate of the fin with W taken as unity is q = -2kb (dT/dx) (4) x = 0 The problem is for a fixed area A = 2bL, to find the values of b and L such that q is a maximum. An alternative way of stating the problem is this: Suppose a fin of fixed width W is to be constructed from a given volume of material. What are the dimensions for b and L to give maximum heat transfer, where the relation between b and L is given simply by the volume, V = 2bLW or V b L = = constant 2W Solution dt Equation (1) may be integrated by the standard mcethod of substituting v for d- Thus, d2T dv dv dt dv 2 dx dt dx dt dx Combining (1) and (5) yields dv sT4 v - dt kb or E-393

Minimum Weight Rectangular Radiant Cooling Fin sT v dv = kb dT (6) Integration from x = L to x = x gives v s 5 - V - - 5kb (7) V T (x= L) (x=L) Considering boundary condition (3) and taking T at x = L to be the parameter TL, there results 2 v =- (T5 _ T ) (8) 2 5kb L or dT 2s 5 5 v = -+ d (T - TL (9) Since in the actual situation of a cooling fin, T decreases as x increases, dT/dx must be negative, so the positive root will be discarded leaving dT/dx = -(2s/5kb) (T - T ) 1/ (10) Introducing the new variable, 5 (TL/T) =t (11) Eq. (10) becomes 0.7 -05 05 1.5 (12) t 0 (lt) dt =(lOs/kb) T dx ( -ntegrating Eq. (12) from x = L to x = x, gives [ -0.7 0.5 -0.5 0.3 (13) wu (1-u) du = (10/3) G t (1-x/L) I O where G = 40kb3 /9sA and t = (T /T )5 (14) o o L o Eq. (13) gives the temperature distribution T as a function of x in terms of the parameter T which can be determined by using Eq. (2). From Eq. (13), with t = t at x = 0, one may write a function p in the form, 0 P - 0.7 - 0.5 - 0.5.0.3 (15) u - (1-u) du ( 10/3)G t = 0 /00 After T is evaluated from Eq. (15), Eq. (4) and Eq. (10) can be combined as L 1/2 5 5 1/2 q = (1.6skb) (T 5 - T ) 1/ 16) To maximize q for a given area A by varying b, it is seen that as b varies, TL varies with it according to Eq. (15). If p and q are now to be considered as functions of b and TL, the problem of maximization can be solved by means of a Lagrangian multiplier m defined by ~p/bb + m (q/bb) = 0 (17) ap/.TL + m (q/TL) = 0 (18) Performing the indicated partial differentiations, we get: 0. 3 1.5 120 kb2 p= - 10 0.t (-0.5) G1'5 120kb =b- 3 to (, 5) - 3 (19) o E-394

Example Problem No. 32 4 4 5T 5T __P = -0.7 -0.5 L 10 -0.5 -0.7 L - - t 7 (1- 5 - G (0.3) t (20) &;T 0o o 5 3 0 5 L T 0 0 plying Eq. ('17) by -5b T and Eq. (18) by (T - T ) and subtracting, while making use of Equations (19) ZIT T h T 5 (T0 L -T3) ~b-, (1 6 k) 1/ +b 1/Z (T - T ) (21) ' ro L = ( 1 6 sa 1/2 5 5 1/2 4 T (1.6sk b) ((l/6)(T - ( l( -5 TL (22) ( Note that in these differentiating t is a function of T and that Leibnitz rule is employed for differo L entiating the definite integral in Eq. (15) ). Multiplying Eq. (21) by - 5b TL and Eq. (22) by(T 5 TL5 ):makes them identical. Thus, multiL-5 1 - 121+ 36to (26) 4 5 0 plying Eq. ('17) by -5b T and Eq. (18) by (T T and -subtracting, while making use of Equations (19) 5 0.3 -1.5 120kb 4 5 5 -0. 7 05 5T 4 36 t + G_ - 12) - +l -5 + ( T L) (-t) o L o T Notsing the deinition of G and factoring out we obtain G 5 1 50 -0.S5 -(24) t + T ( - ) + (t 0 (24) or G (1-6t )t (25) o o SqAnd uaring both sides of (25root gives (1/72) (-12 - G + (G + G2) 12t (26) o o 0 This may be rearranged to 2 36Introducing Eq. (29) into Eq. (15), t (G-results12) -a transcendental 0 (2 7) 0 0 Usoting the quadratic solution to obta fin t, yields o t t (1 t is g b (- t)he fo g q s a e 0 7 2 (28) o 72 And using the positive sqaure root gives t (1/72) (12- G + (12G+ G) (29) Introducing Eq. (29) into Eq. (15), there results a transcendental equation involving the only variable G, the root of which determines the required optimum condition of the fin. To determine the root G of Eq. (15) where to is given by Eq. (29), the following questions arise immed iat~lyf (b) Since the the integrand is unbounded at the upper limit though the integral exists, how do we know the numerical integration gives us the required accuracy? E-395

Minimum Weight Rectangular Cooling Fin (c) How do we start the program if we have no idea about the root at all to begin with? The answers to these questions are respectively: (a) Since the two terms involved in Eq. (15) are both single-valued functions of G, there is only one real root. (b) The integral is approximated here by N u u-0. 7 -0. -0.5 ET i (1 - U.) Au i=l where N is the total equal subdivision; Au = i+l -ui; Ul = t and uN+= 1. The integral is evaluated for different N until the root G,is insensitive to the change of N. ~c) A suggested program and flow chart based on MAD follow. Different ranges of G may be arbitrarily assumed until the desired value of G is obtained. _____L vr O /THRoU $COPI 4LE MAD AEXEU E>A CCT ~F~,, ---—. S -> —/ Al 7- _oT/,v =PO_ A.o' ~ I r^, _. ET CHEN YREAD FORMAT DATA LMN MAD PROG R MNC>EN YAIUES AA/A- X: 70 ' 50 "-" I.. *COMPILE MADEXECUTE R EXERCISE PROBLEM REVALUATE THE ROOT OF A TRANSCENDENTAL EQUATION -3 ---- 9 -R 4 IM-_.L.N.lON UI ljU.)-. --- START __ READ FORMAT DATAtGMINGMAXN 6 'EOC4OE VALUES DALtTA='-1$y.OI'*$ — PRINT FORMAT TITLEGMIN,GMAX,N 8 1L INTERVAL N IlO* 10 'PRINT FORMAT ANSWER.10 VECTOR VALUES ANSWER=$38HOTHE ANSWER IS THE VALUE OF G WHEN F 12 R=E/V7$2H G$13j,3H T0,512,2H FA 1,A2H SEAT*$THROUGH BETA,FOR G=GMIN,0.001,G.G.GMAX 14 rO=.( iZ.MAG+ST Ir ( 120,*G+bMGP ) Z / 152 INVZ=O 16 UIi=1 U 17 THROUGH SUM,FOR Ill1,I.G.N 18 Z=Z+EXP,(-0O*7ELOb,(U{ i) )-0O5*ELOG<,(le-U('!i) ) )19 19 SUM U(I+1)=U(I)+(1,-TO)/N 20 F=Z*(1i.Ir0)/N -- S=10*(EXP.(0.3*ELOG.(TO)-O.5*ELOG.(G)))/3. 22 BE.IA KPR1NTI FURMAI RSEULT,G, IO,FBS 3 VECTOR VALUES RESULT=$4F15.5*$ 24 INTEGER IN 2 -TRANSFER TO START 26 END OF PROGRAM 2 7 *DATA 13530U 13U00UU 9'U - v1 138000 1390001000 D2 E-396

Example Problem No. 32 RESULTS MIN. G= 1.38300 MAX* G- 1.39000 TOTAL INTERVAL N= 900 THE ANSWER IS THE VALUE OF G WHEN F=S G TO F S 1 38300 0O32741 2202511 2 02766 1 38400 0*32746 2.02515 2*02703 1 38500 0*32751 2.02494 202639 1*38600 0*32757 2.02476 2.02575 1*38700 0 32762 2*02454 2*02512 1 38800 0.32767 2.02458 2.02449 1.38900 0 32772 2 02436 2X02385 1.39000 0.32777 2.02418 2.02322 MIN. G= 1.38000 "'MAX. G= 1i. 9YOU0 TOTAL INTERVAL N= 1000 THE ANSWER IS THE VALUE OF G WHEN F=S G TO F S i, 38u0U- 03 20Z9 Z3UZ755 Z5 0Z957 i 38100 0.32731 2.02740 2*02894 1 38200 0*32736 2 02726 2 02830 1 38300 0*32741 2*02711 2*02766 1 38400 0 32746 2.02696 2 02703 1.38500 0.32751 2.02681 2.02639 1 ~38600 00 32757 2.02670 2 02575 1.38700 0.32762 2.02655 2.02512 1 38800 0.32767 2.02640 2,02449 - 1 38900 0*32772 2.02624 2*02385 1 39000 0 32777 2. 0260-9 --- CT2-3'22 DISCUSSION OF THE RESULT The above result shows only the answers corresponding to two different values of N. It is only necessary to change the data cards for other values of N. The resultant G values are as follows N G CHANGE IN G 100 1.546 0.071 200 1.475 0.031 300 1.444 0.018 400 1.426 0.012 500 1.414 0.009 600 1.405 0.007 700 1.398 0.005 800 1.393 0.005 900 1.388 0.004 1000 1.384 It is seen that successive values of G are changing by 0. 004. It is therefore considered satisfactory. The final answer is G = 1.38. E-397

Example Problem No. 33 DYNAMIC LOAD ON A UNIFORM BEAM by Royce Beckett The problem of dynamic loading of structures and structural elements is covered in civil engineering courses in structures, in advanced strength of materials, in vibration of continuous systems, and elasticity. One of the simpler problems involving dynamic loading of structural members is that of a force moving across a beam. It is assumed that the force remains constant while on the beam, but its motion along the beam may be rather complex. This problem might be assigned in any one of the above-named courses which will be equivalent to three semester hours in most schools. Prerequisites for handling this problem would be the elementary mechanics courses and mathematics through differential equations. Statement of the Problem A force moves across a beam of uniform cross section in such a way that its distance from the left end is equal to. The force may start at some position o on the beam and move across with some acceleration a, or the force may come onto the beam with a velocity v and continue across with some acceleration a. The problem is to find the motion of the beam under this loading. (Note: By the same technique that is used here, it is possible to find the results for a number of loads moving along the beam at the same time. ) Derivation of the governing equations would be done by the student at the stage of the course where this problem could be given. P I- ' j -- X X -- L Let E = modulus of elasticity of material of beam I = moment of inertia of beam (assumed constant) L = length of beam = distance of force P from left end (a function of time) p = mass density of beam material A = cross-sectional area of beam E-398

X = distance along beam, zero at left end t = time y = displacement of beam measured positive down,(a function of x and t). The equation of behavior of beam is given by Ely + pAy = PS(x, ) 6(x,') is the unit impulse function or Dirac function and is defined in the following way (xf) = 0, x f L.+e(x,4)dx= | (x, )dx= 1 0 f-e The deflection y is expressed as an infinite sum of products of normal beam functions for the beam in question and corresponding generalized time functions. = X )qt) + X(x)t)+ X(x)(t) + + X(x)qm(t) +... 00 y= / Xm(x) q(t) /._/ m= 1 X (x) is the normal beam function generated from the eigenvalue problem. IV 4 X (x) - X X (x) = 0 m ' m m where Aw 4 m m EIl w is the natural frequency of the mth mode. q (t) is a generalized time function which is to be computed. m m It is assumed that the Dirac function can be expanded in a series of the normal beam functions. Thus, 00 (X, A mXm(X) X m(f) A = m J m J = LXm(X)X (x)dx m J0m Let y and & be substituted into the equation of behavior. EI Xlm (X)qm(t + pA Xm(x) q m(t) = P J Xm(P')X(x) Using the condition that E-399

Dynamic Load on a Uniform Beam IV 4 X = X there results m m m El IX (x)q(t) + pA7X (x)jq (t) = P 1 X()Xm(X) Since this equation is true for all x and all t it must hold for each m independently 4 EI X qm(t) + A q m(t) P Xm(f) m or rewritten El 4 P 1 C 'm(t) + — X qm(t) = A J X m A mm AJ mT) m This is the equation to be solved. Before proceeding it will be helpful to put this equation into dimensionless form. Since it is assumed that X is dimensionless, q must have the dimension of length, t is time in seconds. m m Let q = q ' L qm qm t = '" at t == 0, = 0; at the time the force leaves the beam t = to and?= 1, so to = I. d d dr 1 d d 1 d2 dt d- dt p d d' 2 2 2 dt 3 d'fr Then: (1 + 32 w q* (T) = qm mpAL J 2 El 4 w =- X m pA m If the force moves onto the beam with a velocity v_ and proceeds along the beam with a constant acceleration a then f will have the following value. 2 T -1/2a t + v t 0 If the force should start from rest at the position f and move with a constant acceleration a then = 1/2 at + The initial velocity v is zero. 0 We may write a general expression for f 7 = 1/2 a t2+ v t + D provided it is understood that when v is not zero then must be zero, and when f is not zero then v must be zero. The argument in the normal beam functions is acutally X x, so X (') is written as E-400

Example Problem No. 33 X m(Xm) = X m(k(1/2a t2 + v t + )) = X m(\(l/Zap2 2+vp + f)) Finally: 2 22 () P3 1 2 q *() w q- X (\ + (/2aP +v + )) m r 1m mm pAL J Xm(Xm o (/2 Z ) m To proceed from this point with numerical calculations it is necessary to prescribe the beam under consideration. For purpose of illustration the simplest case of a simply supported beam is used. For this example X (x) is sin X x, where X has the value prescribed by the condition that sin X L = 0. m m m m X (x) = sin X X = — m m ' m L = X2 dx L m J m 2 0 2! m rw 4 EI 42 w - (-) - = m w m L A 2 4 2 4 22 2P, mr 2 q (' + p m wq(r) = 2 sin ( L (1/2 a p + v Tr+ )) 2 pAL Let 1 R 2 L pv TrV P ~ = V ~sr _13 = C P = B w! = Wm=M Furthermore since q* is linear in the load P, the factor aP/pAL is equated to unity. q * (7) + BZM4W2q* ( B') = B2 sin[M (Rr2 + VT + C)] Some comments are made about the parameters in the problem. B is the time the force is on the beam and is dependent upon a andv or a and. W is the first mode frequency of the beam and is a measure of stiffness. R is a measure of the acceleration of the force V is a measure of the velocity of the force. C is a measure of the initial position on the beam. Solution The equation in q* is solved for given numerical values of the dimensionless parameters by: E-401

Dynamic Load on a Uniform Beam 1. Runge-Kutta method 2. Convolution theorem and Simpson's Rule Solution by the Runge Kutta Method It is required to solve the three equations obtained by letting M = 1,2,3. These are listed below. q + B2 W ql B2 SIN (RT2 + Vr+ C) q 2+ 16 B2 W2 q = BZ SIN[2(R2 + V + C)] 1..+ 812B2W2.2 q + 81 B W q B SIN[3 (R2 + vr + C)] Reduce each equation to two 1st order equations in the following way. Y(1) = Y'(2) = ql Y(3) = Y'(4) = Y(5) = Y'(6) = q3 1 2 3 Yv(1) = ' Y'(3) =q 2 Y'(5) = q2 - 1 2 2 Y(l) = (-Wz * Y(2) + SIN (R *2+ VT + C)) B2 = F(1) Y'(2) = Y(1) = F(2) Y'(3)= (-16 W *Y(4) + SIN (2 * (R * T + V * T + C))) B = F(3) Y'(4) = X(3) = F(4) Y'(5) = (-81 * W + Y(6) + SIN (3 * (R * T * T+ V * T + C))) B = F(5) Y'(6) = Y(5) = F(6) A flow diagram for the computer program, the MAD program, and results of the computations are given on the following pages. Computations have been made for the following choice of parameters: 1 R = 0, V = vr, C = 0, W = 100, H =.0025, B = 1 2 R = 0, V = r, C = p, W = 100, H =.0025, B = 1/2 3 R= 0, V = ir, C = 0, W= 100, H =.0025, B = 1/4 Solution by Convolution Theorem and Simpson's Rule The basic equation is q *4 q () + B M q ) = B Sin[M (Rr2 + Vt + C)j where all terms are defined in the same way as in the previous case. E-402

Example Problem No. 33 The solution is q*(S) = AM COS (BM W1 S) + DM SIN (B M W S) 2 S 2 2 B2 + B2- SIN (M ( RT + VT+ C)) SIN (B M W (S- T)) dT BM W O S is dimensionless time. Values for q* are obtained using Simpson's rule for integration. m For purpose of illustration it is assumed the system is initially at rest and the farce moves onto the beam at time S = 0 with a dimensionless velocity V and a dimensionless acceleration R. Under these conditions the coefficients A and D are zero for all m. q* (S) is then given by the m m m following integral: q*m(S) = 2 0 SIN (M * (R * T * T + V *T + C)) 2~2 SIN (B * M W * ( S - T) dT For a given S the integrand is a function of T only and may be written F(T). If the interval 0 to S is broken up into r subintervals, so h is equal to s/r, then an approximation to the integral can be made by Simpson's Rule. \ F(T) dT = h(F(0) + 4F(1) + 2F(2) +.....+F(r)) "0 F(1) = the value of F(T) when T equals h F(2) = the value of F(T) when T equals 2h, etc. B h then q* (S) = Z 3 (F(0) + 4F(1) + 2F(2) +....+F(r)) In this problem S goes from zero to one while the force is on the beam. Let the interval 0 to 1 be divided into N equal parts for the purpose of evaluating the integral. A print out of the value of q will be required for several values of S. Let these values for which a print out for q is made be M intervals. M will always be less than (or at most equal to) N. Let S1 be the value of S after M intervals, S2 is S after 2M intervals and so forth. B H q* (S ) M= W - (F(0) + 4F) F) + F(+ F(M)) m 1 M2W 3 B H qm (S)= B2 (F(0) + 4F(1) + 2F(2) + + F(2M)) m 2 w 3 r must be an even integer, M is an even integer. E-403

Dynamic Load on a Uniform Beam 1 H=- F(2) = F(i) N F(1) = F(H) F(M) = F(MH) It is noted that the value of F is zero at each end of a print out interval. Thus in the expression for qm(S) F(0) and F(M) are zero. This permits a simplification in the program. On the following pages is the flow diagram, MAD program and results for calculation of qm M = 1, 2, 3, The choice of constants for numerical computations using Simpson's Rule are precisely those chosen for the Runge-Kutta method. The data is printed out for the MAD program and headings have been put on the data for identification. A sequence of calculations must be made for each data card. The first card gives the values for computing ql, the second gives values for computing q2, and the third q3 when B is 1 sec. The next sequence of three cards gives the data for ql, q2, and q3 when B is 1/2 sec., and in the third set B is 1/4 sec. This is done to give results that can be checked against the Runge-Kutta method. FLOW DIAGRAM FOR RUNGE-KUTTA PROGRAM.t4Qf T 4. IT 4 W )..Y D) YIL)... I Y( 6) RcuLFATD-E F"'...,. MAD PROGRAM FOR RUNGE-KUTTA SOLUTION *C MP ILE IMAD, EXFCUTE R SOLUTION FOR DEFLECTION OF A SIMPLY SUPPORTED BEAM LOADED BY 1 RA MOVING FORCE 1A RSOLUTION CARRIED OUT THE TIME FORCE IS ON BEAM BY RUNGE-KUTTA 2 DIMENSION Y(6),F(6),Q(6) 2A START READ FORMAT MASTFR,TAUR,V,C,WB,H 3 VECTOR VALUES MASTER=$I4,6F12.4*S 4 READ FORMAT CARD,Y(1)...YY(6) 5 VECTOR VALUES CARD=$6F8.4*$ 6 PRINT FORMAT CHECK,TAU,R,V,C-,W),B,H,Y ( 1)... Y(6) 7 VECTOR VALUES CHECK=$1H1,75HTAU R V 8 1 C W B H //I4,6F12.4//20H I 9 2NITIAL VALUES OF Y //6F12.4//84H T' Y(1) 10 3 Y(2) Y(3) Y(4) Y(5) Y(6) *$ 11 T=0 12 N=6 13 INTEGER N,RKSU.B. 14 52 WHENEVER T.G.TAU,TRANSFER TO START 1.5 S3 TRANSFER TO S(RKSUB.(N,Y,F,Q,T,H)) 16 S(2) PRINT FORMAT RESULT,T,Y(1).. Y(6) 17 TRANSFER TO S2 18 VECTOR VALUES RESULT=$1H,7E12.5*$ 19.S(1) F(1)=(-W*Y(2)+SIN.((R,*T+V)*T+C))*.P.2. 20 F (2)=Y( 1) 21 F(3)=(-16.*W*Y(4)+SIN.(2.*(R*T+V)*FT+2.*C))*B.P.2. 22 F(4)=Y(3) 23 F(5)=(-81.tW*Y(6)+SIN ( 3.*(R*T+V)*T+3.*C))*tB.P.2. 24 F(6)=Y(5) 25 TRANSFER TO S3 26 END OF PROGRAM 27 *DATA 1 0 31416 0 100000(00 10000 100 D1 0 0 0 0 D2 E-404

Example Problem No. 33 TYPICAL PAGE FOTU RMTERN -UT RGA ~~~~~~~~~~~ — ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~j- ~~~~~~~~~:.~' -....-' ':: f- '. _ - 4:2-.i54...-. ~~~~~~~~~~~~~~,,-'=,'i:"!.- <',O::E.!' ~ L:. 1:.:,-:,:E —..-! _ - I::'i!: -,..................,................. -............ O.0I4999.,-.:':: ':.. -.-:: i57:: -:".-, 3!234i ---:_.,::, -.:~iT.!: L', O 1,_:F'-:,E-04 0,i':::,. E- 0,:: 7.:: 0l-..', O:::3!3?;, 24::::. i:.-05,.-':7 i::.::.,...:! '.::2:.-' S. ii4 4:.-'"E- 4 O 2:i 30O - O. '20 00 00 O,: 44 0E-0::}.: 2::;:'::::: - 9.5: 3-.4 7":.: E::: 4, S 0 0i::-:.:. O i.::, S 04 O 2: t:2t -- r-' {-{ t! 2:_:: '-J'.=, -,,'_-. n.~..- 12 E.-03 n 4:::'2 '::-n5 i:. 1,l -- }:T -:"l: n.:.-',:::" 3::;- n:: {-,.i 4::-' S-'{4 n 25.:; 9! E- I T,... ~..,...,,. i:.I.,._. ~........._. 0 0 4 4 9 '-::, 9 9 ':', r', ':~ "-:? ": G', E -l.-.i.3~~~~~~~~~~~~~~~~~~~~~~~~~~~~,;1." - -........~~~~~~~~~~~~~.. -.... 1:.-.............=~.....:.. O.0.i.749,:!9.: "' 7:' r_{. 0:~::.:.-:i4,2:',0'':,?i:.!:):,:'.::~4.: i7. {: (!, E ~!!E -.I- E O.:: -.,999:: -:::::1.:.:5E:'.' l;:?.':: -:).!97:.':9E!: 4'..' l::..-i?9::-0:. O._:9!7-: ':.5:.,(!:.:..,'':2'~'':..).: -j {:,i'::::2E -_}.i?{ ili.~:: --—::: {J,;:i: '.'?" J' ~:'J, )47"" - ' -,! J.J2i,.:' ~:''",, '" ~ 1~~~~~~~~~~~~~~~~- —... -...... ~ J, ~. _ ~._;..,, -.:.... J.:. _,........,...._....... _-...~... 0_0 ' 999.:,,.7 -:i,..-:!y - 't ";,'.':i::34i::.- O?:2!IE::. i:'97 E. 5 0,,'::9 E-:': 5 3 E,:.: 3.':-E- 0:: ~~~~~~; _...t.!.......,,_ ~ — _*.,,.: 9,'::974".::.:: () 59' "! i"-(:::::!: '!:,7:'. '~ i' ',43E: 4:..'.:"5::..(,3~:. 7097' E-95 9 9.::.I.?:"-! ~~~~~~~~~~~~~~........ _,,..;, _,, _..,,...,.... ~~~~~~~~~~~~~. O, 2 7 9 4..7.- =: 0 'i..':'::,:.:::9'::..::.O,"i::1!::. ':J4 9 4: '.-':':"'..:,.:.:':;: 5:-.- ~: 9.!' 1 Ti.7.':.... ~~~~~ ~~-"I405:. -:".

Dynamic Load on a Uniform Beam U -; tJTTA...RIJST:IME:.:.'.:.. '*.: ' '..: '. '..:::. '.;'i -: ~: '. '_ —:.t —:/ --- —* - - -t:-*' - -T —:-::-;.: ^:: 4' -,'-. L -.:.: ' Q -_....i -,:....... ':,' ~:i::. i iig: i ~ 2:' i 1,: Z:::S TIME" 0.: 2 Se:::;~ ci.-.:'':: "' 5;:ii. j:6 —1.............. ": a.";.":.:I..' ' /: '; '. ':.:.;i:; Ii:': ';I" "i:....:. -,:: - 7, *',;- * -7 H /:ELoITY. 2 Se-c. o:..4. ', - '.............. '.. H.^~~~~~~~~~~~~~~~T. ~ ' _ -O. "_.... I...i. - j Q I..:..:...... o.-~ —i,.-.~,]__0. ~~ ': II ' ~ i I j i j I 2 I / 'i' i - / ~ RUNGE KUTTA N... q. VE.RSUS TIME. / VELOCIT Y i= 2L Ft. /Se c.: 0 Is....... DIMENSIORENLESS TIME 0.BEAM 1/250 Sec. E-406 O 5 m / o 4. o 1 I 2.3.4.5.6.7.8.A L >: DIMENSICONLESS TIME 0. 50 Sec. ~~~~~~~~~D ~ ~ ~ ~

Example Problem No. 33 4ci 0 *........... ^l,.. _.:!:..:....:.i j: ^'~ ' ' - -':.. '.' -j'. j': D E ONE TIME 1 ec..^()~~E-..4:-, -07,........... i.. /_.......,.....: ' iii,' ';i''':i.... I. ';'_:''!''''___ I ' I',!. 1;:. P -': i i..... ~4 ~.!:~!:I;.:.::.." DIMENSIONLESS T:.M 1'..:S.: Eb PR: / I:., V -:. S..::: I I A / I.......; Al. DIO TM 10 Sec. j ii 1 f i:i:;i E - 4 0 7 jI~

Dynamic Load on a Uniform Beam MAD PROGRAM FOR SIMPSON'S RULE SOLUTION EIO ROYCE BECKETT T09IN 001 005 020 2 *COMPILE MADEX.ECUTE _ RSOLUTION FOR A FORCE MOVING ON A UNIFORM BEAM 1 RINTEGRATION CARRTED OUT BY SIMPSONS RULE 2 START READ FORMAT CARD,R,VCOQPHqMN 3 VECTOR VALUES CARD=$6F12.42I4*$ 4 PRINT FORMAT CHECK,R,VC,0,BHM,9r 5 VECTOR VALUES CHECK=$1H1,96H R V 6 1 C 0 B H M 7 2N //6F12.4,2112//1H I 30H J SU" M -$ 8 THROUGH ALPHA,FOR J=M,.M,J.G.N 9.S=J 10 Sl=0 11,S2=0 12 THROUGH BETA,FOR I=0,2,I.G.J-2 13 A=I 14 S2=S2+2.*SIN. (A*H*(R*A*H+V) +C)SIN., ( Q8*H-* ( S-A ) ) 15 BETA 1 S ]+.- IN ~ ( ( A+I. *) — H'- ( R' ( A+1. ) -x-*+V) +C) *S IN. ( 0* — H* ( S-A-1 )) 16 SUM=(S1+52)*R-H/ ( 3.*0) 17 ALPHA PRTI!MT FORMAT ANSW,,JSUV 1_8 VECTOR VALUES ANSW=$59,I4,S8,E12.5-$ 19 TRANSFER TO START 2C INTEGER,J1,MN 21 END OF PROGRAM ____.__. 2 n*DATA V C qI o O 3'1416 0 10000U luUOO 100 4 10C 0 62832 0 400 () 000 10(000 100 4 100 O 94248 0 9000.000 1':94104 0 9 100 4 10C 0 31416 0 100000 0 5 0 4 10C 0 62832 0 4000000 50('00 50 4 10C 0 94248 0 9000000 5000 50 4 10C O '___________ 31416 0 ] 1000 0 22500 25 4 l (r. 0 62832 0 4000000 2.-0 25 4 10C 0 94248 0 9000000 2500 25 4.10C TYPICAL PAGE OF OUTPUT FROM THE SIMPSON'S RULE PROGRAM R >1 _0____00 3. i 41 9 O. 5 C! E- 0 l. 2j:.14 24 0.0 1 EU. -- " -....-..............7......t '2. 7 C:,7 8.3 E ' -0:___ 2S',E'.0. ~76!S781 E - 04_....:2 O. 8.3. 3 5 i.rO~8 E-3-.3 — 4 _0. 941 * 4)9E ri4 * 40 O. 9.3505 -::.- E - 0-," 4 4. 4. 3 E -. - i '::i. __! _ O. 74i "':2 '3iE — L4-.I _~._E.5. '" i 9. E -.:i. 5~? 0:.;. 1 i:i.55E-33:: -- --------.J 64 '...:~17 5 ~ -04_ S7:2 O. 2" E0 r; - -.3 -. _ 3.: 7 4?0. 41.iS21i9E —4 _,'.,'2 2:269 E - 0 4 ';' '_: O. 2.2:7','i-1 E -..4 __ 96 O. 9 594 iE-. "? E -;3 5'E-408

Example Problem No. 33 N %,4 C O i.. " - ll. = - _ _ _ ll_ _ T _ _ll "!^! T F' DIMENSIONLESS TI-MlE 0 25 Sec..? t ti iii fi|iiili Tj DIMENSIONLESS TIME 0.25 Sec. FW~~~1 Ij~~~ - l 40 DIMENSIONLESS TIME J0.5 Sec. o}X~~ 0 U1X it-tl l I tl Ilt t V!)Q 12!1 40 il t g titt I__ I ttfi-4 -, M:.4 J V, fl-E-409

Dynamic Load on a Uniform Beam...~~~~.. f ij I,~i, I!i | j i 0 1 I!i' |', I i i............... ~:!! I 'i, ',,1 f.l',LI, i I ' i,.!,'......... t..!.:.... '. I. iI:' 1 ''. '1. I '.. ' 'Ii jiI _I _ I _.. i. I l...... I;! I if ' iri~~~ii ii- i r: i iA >. i i t;,. ttj —i ' I,:~~~~~~~ q, i t I i ii i — iIL: |-:~ -! i i I 1 i:- C t~l i 1 j - i * j: f | | i I-.l - ii S ~ ~ ~ f."~T; 10-l i } - i I ^1 j -]; i 0 i j i ii tt j i t i. r;i. t I t i i |. i i i i i Xi tii i..11 f f I Is jt it!,!, I.,;., i....,;i... _:. i. - t t - i R L. I. ii i i -t 1 ' i~ ' f 1' '1 ' I'i "-. _i:i ri '' i. ' "i "' ''.i i. '' 'iii 'i i ~ -;S-i wi- L.,s1 —t ---- -1 - 1i t 't',- i i: i ' ': 1- 1 — 4- -i I -. i~~~~~~~~~~~~~~~~ —f;1 /! -I - t 2, i' '' ' i 'l T: ',ii~' _ -- '._o i _: _ l:; i ^ i e Y- i- i 4;!;i i i -i t j i.; i -,1 x, I ji Ii, 8 j... i1- i, i i:,!4!d,i';i i l l;-;.''S i l;j','.i I i r; j i i i; i r, iI.. ' i '' T i l;t''ii. w~~~ I-i2c~.-ii I s:. K Y ' ' ' j 5 I I: i ~ll rl >^i li0!i it It l, l ll':a {'lj it 'i: i I i:: IM:~D I E S O L S T 1 0 S i.c U ) 7 I:;, i i liiii Ii4iiI I i ~iii iiiiii i Ij v i i Lj* - f ii ~t 1-tir '...1~. iiiii i iiri;ri i ii i-li~~~~~~~~~~~~~~~~~~iiiii!i 41~ ~~E 1 P4 7 iI. i IiiiIi;i ~iii: I N jl i ii ~ i~ii. i f1i:i:i:: i~:I17 TiiIj:ir ff iiiIIj;;; i iiI''' i1IiiiiIIii iiiijIi;t........... r~ iii~!:Ltf- l... ii i i ~ i: i i r I i:; I j j ~: tI i ' '' ' I i;IL \a i i:i /I 1 ii iii: 1 I i iii i1; -.- -: —:i rII:1i ~~tt l ' 'i - i i~~~~~~~f '-_: l~~~~~~ilr L~~~~l~~: A tfI~;I 1iiiIi: iiitrI: i iii ji.. n i: i i; 1 i I I; i; i I~~~~~~~~~~~~~~~~~~~~~ I'' LL~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4 d I i ' I i I ' ' i ': ':~~~~~~~~~~~~~~~~~~~~~~~~~~~i i. iI ij DIMENSIONLESS TIME 1. 0 0 Sec. iI IIfi ij

Example Problem No. 34 THE SOLUTION OF DIFFERENTIAL EQUATIONS BY NUMERICAL METHODS a) Second Order Linear Homogeneous Equation b) van der Pol Equation by Demos Eitzer The two problems presented are intended for use in a sophomore course in electric circuits as an example of numeri cal solutions of differential equations. It is not expected that the students will program these problems but that they will instead be made aware of the technique of numerical solution. The students will already have had a course in differential equations and in this course they will have discussed in detail the analytic solution to the second order linear differential equation. In an advanced (senior level) course in servo-mechanisms the students may be required to program the solution of a differential equation. The van der Pol equation is included as an example of the solution of a non-linear differential equation, The specific equations to be considered in the two parts of this problem are: Part (a) 2dy + 2, w dy + w y = 0 where A and wn are constants (damping ratio and natural frequency respectively. Part (b) dy + A (l-y2) dy + y = 0 dt2 dt where/ is the parameter of van der Pol's equation. Both problems are to be solved by integrating numerically from a given initial condition to some time tmax using the Runge-Kutta method and Gill's coefficients. The students will be introduced to general Runge1 Kutta procedures and then to the form used when Gill's coefficients are employed 2, 3 Solution. Part (a) The usual method of reducing a second-order differential equation is followed by substituting a new variable for the first derivative. Thus, let 1) Bennet, Milne & Bateman. Numerical I ntegration of Differential Equations. Dover, 1956. p. 77. 2) Bartels, Introduction to Numerical Analysis (Lecture notes prepared for summer 1960 participants in Ford Foundation Computer Project, The University of Michigan), pp. 37-38. 3) Ralston and Wilf, Mathematical Methods for Digital Computers E-411

The Solution of Differential Equations by Numerical Methods dy = yl = y dt Y Y and d2y In this scheme of nomenclature the f's are derivatives of y's, so that in a parallel way we may let y=Y2 and y = f2 so that fz and yl are identical. Applying these definitions to the second-order linear equation, y" + 2wny' + Wn2y = 0, we obtain dt fl = - 2WnY1 - wn2y =dt and f2 = Y - = dt dt As a first approximation the increment in y is just by the Euler technique AY2 = f2 At and the increment in yl is 'y1 = flAt where fl and f2 are evaluated at the beginning of the interval. Beginning with initial conditions for yl and y? at zero time, one can proceed by increments in a t to any desired final value of t. The method of RungeKutta merely refines the estimates for Ayl and & yZ. This method, as modified slightly by Gill, states that the increment in a dependent function y (such as y1 and y2 above) is given by the expression, y = f3 t _ q 6 3 Here the function f3 is the function f evaluated after several repetitive steps and q3 is the result also of evaluating an arbitrary function q after several steps. The procedure for evaluation of these functions is given by the equations, Yi = Yi-l + ai fi1llet -qi] qi = 2aifi l t + r1-3a] qi-1 where i goes from 1 to 3, yo is the value of y at the start of an increment in which:Ay is to be determined, fi- implies the function, f(yi-1) qo is 0, and the values of ai are a1 =0.5 1 1 and a3 = 1 +,. a2 =1' 1 a?= 1 -spThese equations are applied to both the y1 and y2 functions simultaneously so that the integration of the second-order equation is accomplished by integrating the two first-order equations. The data used in the solution are shown after the program. It is noted that two different time increments were studied and one can E-412

Example Problem No. 34 compare the effect of increment size on the results. The graph is for the smaller time increment. The ACT IA programs that follow can easily be converted to higher order differential equations. It is only necessary to change the dimensioning, read, and print statements so that more first order equations can be handled. It will be necessary to change the limit of the iterate statements. It is then only necessary to add a single statement after s33 for each additional order to complete the process. The approximate time for each increment is 50 seconds on the LGP-30. Flow Diagram for the Solution of a Second Order Linear Differential Equation By the Runge-Kutta Method Using Gill's Coefficients Y(L),Y(),4 - M r 30 TMA Et= 4X,____. X, rHoui \ (S2S))SO F. \F-2-Z*W14-A^j+Wt42-*Yf S44 \ 14 ~ Y, TT-r A ^T,,-.. M 'H -Q ~- - J u ------- \2- Y — f- Ozi2*(/3A)-i 3t 2A jl AY 649 F4 M t-T 23+ M.M C Y P -IAJT?'>7N4s 5Tot7....T, YC) I E-413

The Solution of Differential Equations by Numerical Methods ACT IA Program for Solution of a Second Order Linear Differential Equation by the Runge-Kutta Method Using Gill's Coefficients dim'comp'1664'' dim'q'2' dim'f'2'' dim'y'2' index' i ' sO0''flo'0'; '0.' '0'flo'2'; '2. ' sl'0'flo1l'; '1. '0O'flo'3'; '3. ' s2'0'flo'6'; '6..' s3'1 '/'3. '; '.333 '1f l.t/'6.; '.1667 s4'1. '/'2. '; '.5 s5' ['.'+'l.'/'['sqrt'2.'J'J'; '1.707'' s6l[l.,-'l. /t['sqrt'2.'J'J';l'l.2928'T s7'read'y'l' 'read'y'2' sd 'read 'tmax " s9'read'At'' s0l'read' z' 'read'wn' sll'2. 'x'zfx'wn; '2zWn' ' s12'wn'x'wnl'; 'wn2 ' s27'0.'; 'tl s28'0'; 'm"' s29'1'; 'i'" s30'0.'; 'q'i' 'iteri'1'2's30"' s31'.5'; 'a" s40't''+.5'x'At'; 't' s41'1'; 'il s32'neg' [ '2zwn'x'y'l'+'wn2'x'yt2' '; 'ftl'' s33'y'1'; f'21" s42y' i'+'a'x' [Lfti'xAtt-tqti']t;tyit t s43'2. 'x'a'x'fti'x'At'+' ['l. '-'3.tx'a' J x'q'l't;t'q'il s44 'iterti '1'2 ' s42 ' s45'm'i+'1l; 'm"'' s46 'when'm' ieql' 1'trn's50 ' s47'when'm' ieql' 2 'trn' s52' s48t'when'm'ieql'3 'trn's54 '' s50 '.2928 '; 'a s51'use's41" s52'1.707';'a'' s53'use 's40"' s54'1'; 'i' s55'yi'+'.1667'x'f 'i'x'At'-'.3333'x'q'i'; 'y'i" s56'iter'i'1'2's55" s57'cr' 'tab'prnt't' 'tab'prnt 'y'l' 'tab'prnt 'y'2' s5 '*when 't ' grtr 'tmax 'trn ' s60' s59 'use ' s25 ' s60 ' stop" ' E-414

Example Problem No. 34 Data for the Second Order Linear Differential Equation Problem 0000000'00 ' initial value for dy/dt 1000000'01' initial value for y 1000000'02' tmax 5000000 00' At 400000 '00' damping ratio "z" 1000000'01' natural frequency "wn" As second run it was decided to change the step size so that the results might be compared. 0000000'00' initial value for dy/dt 1000000'01' initial value for y 1000000 '02' tmax 1000000 '00 ' At 4000000'00' z 1000000'01' wn Second Order Linear Differential Equation Results Part 1 00325 0000000'00 1000000 '01' 1000000 '02' 5000000 '00 4000000 '00 ' 1000000 '01' t dy/dt y.5000000 00.4118186- 00.9066073 00.1000000 01.611040o5- 00.6523423 00.1500001 01.6213105- 00.55397808 00.2000001 01.4985192- 00.5218069 01-.2500001 01.3092108- 00.1579922- 00.5000000 01.1133978- 00.2705761- 00.53500000 01.4598055 01-.2920061- 00.5999999 01.1467915 00.2457996- 00.4499999 01.1859461 00.16253-27- 00.4999998 01.1741958 00.7065061- 01-.5499998 01.1296328 00.7684641 02-.5999997 01.7165322 01-.6055214 01-.6499997 01.1650072 01-.8422380 01-.6999996 01.2516153- 01-.8315321 01-.7499996 01.4876611- 01-.6502532 01-.7999995 01.5492415- 01-.3886964 01-.8499995 01.4770689- 01-.1262072 01-.8999994 01.53273162- 01-.8204545- 02-.9499994 01.1551257- 01-.2091783- 01-.9999993 01.3386457- 03-.2555258- 01-.1050000 02.1024525 01-.2312434- 01 -E-415

The Solution of Differential Equations by Numerical Methods Second Order Linear Differential Equation Results Part 2.0000325 0000000'00' t dy/dt y 1000000 '01'.1000000 00.9662805- 01-.9959197 00 1000000'02'.2000000 00.1849982- 00.9825190 00 1000000 '00'.3000001 00.2648818- 00.9606338 00 4000000'00'.4000001 00.3361495- 00.9311190 00 1000000,01'.5000001 00.3987652- 00.8948382 00.6000001 00.4527793- 00.8526549 00.7000002 00.4983217- 00.8054246 00.8000002 00.5355937- 00.7539864 00.9000002 00.5648623- 00.6991564 00.1000000 01.5864507- 00.6417221 00.1100000 01.6007325- 00.5824360 00.1200000 01.6081232- 00.5220119 00.1300000 01.6090738- 00.4611202 00.14ooooo o0.6040632- 00.4003852 00.1500000 01.5935916- 00.3403821 00.1600o000 01.5781742- 00.2816358 00.1700000 01.5583351- 00.2246188 00.1799999 01.5346011- 00.1697515 00.1899999 01.5074969- 00.1174015 00.1999999 01.4775400- 00.6788407 01-.2099999 01.4452364- 00.2146337 01-.2199999 01.4110761- 00.2164647- 01-.2299999 01.3755303- 00.6127961- 01-.2399999 01.3390476- 00.9731638- 01-.2499999 01.3020518- 00.1296811- 00.2599999 01.2649395- 00.1583390- 00.2699999 01.2280784- 00.1832939- 00.2799999 01.1918058- 00.2045853- 00.2899998 01.1564278- 00.2222847- 00.2999998 01.1222187- 00.2364934- 00.3099998 01.8942057- 01-.2473386- 00,5199998 01.5824345- 01-.2549703- 00 -3299998 01.2886617- 01-.2595583- 00 -3399998 01.1436356- 02-.2612889- 00 -3499998 01.2392840 01-.2603618- 00.3599998 01.4713932 01-.2569877- 00.36, 9998 01.6813524 01-.2513846- 00.3799998 01.8688102 01-.2437754- 00.3899997 01.1033660 00.2343860- 00.3999997 01.1176022 00.2234419- 00.~4099997 01.1296222 00.2111669- 00.4199997 01.1394778 00.1977805- 00.4299997 01.1472380 00.1834965- 00.4399997 01.1529863 00.1685208- 00.4499997 01.1568198 o00.1530508- 00.4599997 01.1588464 oo.1372735- 00.4699997 01.1591836 00.1213648- 00.4799997 01.1579561 00.1054884- 00 E-416

Example Problem No. 34 Second Order Linear Differential Equation Results Part 2, Continued -- t dy/dt y.4899997 01.1552945 00.8979511- 01-.4999996 01.1513329 00.7442295- 01-.5099996 01.1462084 00.5949632- 01-.5199996 01.1400586 00.4512577- 01-.5299996 01.1330207 00.5140811- 01-.5399996 01.1252300 00.1842649- 01-.5499996 01.1168190 00.6250610- 02-.5599996 01.1079160 00.5062882 02-.5699996 01.9864429 01-.1546993 01-.5799996 01.8912151 01-.2493861 01-.5899996 01.7945879 01-.3344848 01-.5999995 01.6975016 01-.4098994 01-.6099995 01.6012211 01-.4756346 01-.6199995 01.5063325 01-.5517886 01-.5299995 01.4157402 01-.5785446 01-.6399995 01.3241653 01-.6161627 01-.6499995 01.2382453 01-.6449719 01-.6599995 01.1565340 01-.6653613 01-.6699995 01.7950229 02-.6777719 01-.6799995 01.7540443 03-.6826884 01-.6899995 01.5904005- 02-.6806313 01-.6999995 01.1200035- 01-.6721492 01-.7099994 01.1751860- 01-.6578107 01-.7199994 01.2244922- 01-.6381987 01-.7299994 01.2678906- 01-.6139023 01-.7599994 01.3054095- 01-.5855116 01-.7499994 01.3371316- 01-.5536113 01-.7599994 01.35631896- 01-.5187761 01-.7699994 01.3837609- 01-.4815650 01-.7799994 01.3990623- 01-.4425181 01-.7899994 01.4093456- 01-.4021519 01-.7999994 01.4148914- o1-.3609567 01-.8099993 01.4160053- 01-.3193938 01-.8199993 01.4130124- 01-.2778929 01 -829993 01.402530- 01-.2368504 01-.8399993 01.390777- 01-.1966286 01-.3499993 01.3828440- 01-.1575541 01-,8599393 01 3569115- 01-.1199179 01-,8699993 01 3486390 01-.8397468 02 -38799-93 01.32830o5- 01-.4994379 02 -3,889995 (i.3064823- 01-.1800929 02-.8999993 (1.2832806-1-.11.67895- 02 -9o99993 01.2590983- 01-.3900419- 02 -9199992 01.234243- 01-.63 123- 02-.9299992 01.2090079 01-.8625510- 02 -9399992 01.1835669- 01-.l6O994- 01 -* 499992 01.1534650- -.1234140- 31 -~ "35".)'992.~fr-*O 01- I i8.2.1- 01-.9699992 01.194118- 01-.1J57- ) 1.97)'' o2 01.83598- 02-.1605:l- o0i* -j3,c~kv92 I,) 34 ~- ilc -' ~ 389992 C1.34566- 02-.1601208- O-' "9<-g)20.42Q47C;-4 02-.1735281- 01 -'.01l )0,2.2:9- 02-.1' ''981,- 01 -E-417

The Solution of Differential Equations by Numerical Methods /::| ": ---{"_ Solution of Second Order Differential Equation ~'i:.;.|il}. by Runge-Kutta Method natural frequency = 1 rad/sec damping ratio = 0.4 F::*'.!*;, I, * }:^ ^ ' A t 0.1 sec............ - '...... L'....:.....:1....-: - -: ~.'.,-J.i. -..-;^ -.-.:-L.-:..........'....:. -^ *................... IT.-.^.,....J "*.. - '............. ir-!^ -""'[r'T'.'j t Part (b) The same technique is employed to solve van der Pol's equation as was employed with the previous linear equation. Using the same definitions but with subscripts, 1 and 2, reversed, the van der Pol equation, y + ( - yy' + y = 0 gives f2 = -A(l - y )y2 - y and f] =y. The following solution shows the similarity of procedure in both Parts (a) and (b). The interesting results are best shown on the graphs at the end where the function y and its derivative dy/dt are plotted versus time. E-418

Example Problem No. 34 ACT IA Program for the Solution of the van der Pol Equation Using the Runge-Kutta Method with Gill's Coefficients dim' comp ' 1664 ' dim'q'2' 'dim'f'2' ' dim'y' 2' index' i ' sO 'O'flo'0'; '0. ' '0'flo'2'; '2.' ' sl'0'flo'l'; '1.' '0'flo'3'; '3. " s2'0'flo''b; '6.'' s3'l. '/'3.'; '.3333' 'l.'/'.'; '.1667'" s4 l. t/ '2.;.5' s5' ['l. '+'l. '/' 'sqrt'2. ' 'J '; '1.7071" sb'L 'l.'-'l.'/' 'sqrt'2.'J '1'; '.292'' s7'read'y'l' 'read'y'2' s 'read'tmax' ' s9'read 'At' slO 'read'mu' s27'0.'; 't'' s2d'0'; 'm" s29'l'; 'i' s30'0.'; 'q'i' 'iterli'l'2's30'' s31'.5'; 'a'' s40't'+'.5'x'At'; 't' s41'll'; 'it s32'y'2'; 'f'l'' s33t['l. '-'y'l'x'y'l' 'x'mut'x'y2'-'y'l'; 'f'2 ' s42'yti'+'a'x' L['f'i'x'At'-'q'i'J '; 'yli'l s43'2.l'x'a'x'fi'x'Att+' lll.'-3.txtatJtxtq'it;tqi'tt s44'iter'i'1'2's421' s45'm'i+'l'; 'mi' s4 'when 'mieql ' 1 'trn' s50 ' s47'when'm'ieql ' 2 'trn' s52' s48 'whentm' ieql ' 3 trn ' s54 ' s50'.2928'; 'a' s51'use' s41 ' s52'1.707'; 'a' s53 'use's40 '' s54t'1'; 'i s55'yti '+'.1667'x'f'i''At'-t1.3333 'x'q'i '; 'yti I s56'iter'i'l'2's55'' s57'cr' 'tab'prnt'tt 'tab'prnt'y'l'l'tab'prnt'y2 '2 s58'when't 'grtr'tmax'trn's6o0 ' s59'use's28'' s60' stop '' Data for the van der Pol Equation Problem 1000000'01' initial value for y 0000000'00' initial value for dy/dt 1000000 02' tmax 1000000'00' At 5000000 '1 ' mu After the problem had run it was found that the solution had only started to become periodic. For this reason a second set of data was processed using as initial data the final data of the first run. 1766246'01' initial value for y -164003)'00' initial value for dy/dt 1000000 '02' tmax 1000000 '00' At 5000000 '01 ' mu E-419

The Solution of Differential Equations by Numerical Methods Solution of the van der Pol Equation Problem - Part 1 (cont ) t dy/dt y t dy/dt y.lOOOOO0 0. 9958335 009942.1000000 00.9958355 00.9994627- 01-.5099996 01.1506948- O1.2254509 00.2000000 00.9816625 00.2005762- 00 5199996.148489-.21753 00.~ -^ 0~0~0001O:9531 O:0 ~04~17-00.~00000l 00.9573516 00.3043417- 00.5299996 O1.1460424- O1.2417289 00.4000001 00.9222515 00.4180725- 00 5996 01 1 864 01.5399996 O1.1435864- O1.2512602 00.5000001i O0.87504583 0.5519441- O0.5000001 00.8750485 00.5519441- -.5499996 01.1410303- 01.2619553 00.6oooooi 00.8130594 00.7230299- 00.5599996 01.1383617- O1.2740501 00.7000002 00 O 7i5 00.5.9608051-O0.7000002 00.7I48.608051- 00 ~5699996 01.155651- 01.2878479 00.80000oaS 00.0215-709 00.1519465- 01.5799996 01.1526221- 01.5057444 00.9000002 00.474649 O0.1904177- 0101.129506- 01.5222659 00 1 -~~~5899996 O1.1295096-01. 3222639 O0.100000G0O1.2389928 O0 Cj.2920913- O1.10O000 01 258d99280 Go.2920915~- 01.5999995 01.1261985- 01.3441155 00.11000o0 01 1201642 00.47042776- 01.6099995 01.1226518- 01.3702763 00.1200000L 01.015007- 00.71i54553- 01.6199995 01.1188207- 01.4021240 00.1o00000 0 i432010- 01.6900555- 01.6299995 01.1146407- 01.4416534 00.140000C: O1 ci.1925800- Oi.236ol109- O1.l40oooo cl.1)25800-01.2560109-01:6599995 01.1100254- O1.4918360 00.1500000 01.206 6445- 01.1142880- 00.995 4844- 015572484 00.649`995 O1. 1048445- O1. 5572484 O0.idooooo ca..2ob84-2 01.1245809 00.6599995 01.9892577- 00.6452059 00 9.170000 01.2055880 01.126 6559~ 00.6699995 01.9198929- 00.7679113 00 ~ 17919999 i. 2043173-O01.127[~,-142 00.179999 01 2 5- 01 ~.12(9142 00.6799995 01.8361378- 00.9467052 00 ~ 1899999 0i.2030332 -O1.129.2080 00 1899999 0120 0552' 0~11292080 00.6899995 01.7309070- 00.1220901 01.1999999 01.2017(00- 01.1505442 0 0.6999995 01.5918699- 00.1666735 01:20J9c,9999 O1.20o4253-OC)1. 13-19253 O0 ~~.2Q99999 01 ~~~~~~~.o 019 0 7099994 01.3965049- 00.2437137 01.2i99999 0C1 199100 c ^ 1.155 559 00 7199994 01.1009431- 00.382842 01.2299c9 O 19 7 714O.1C82 O0.~22y~9>999 01.lo19 l4- o1.1548523 00.7299994 01.5705513 00.6143092 01 2399 O. 96407i-O1i i33649 0:.239 999-) 01 1)64071- 01.15656-7599994 01.1079364 O1.8016481 O1.249999 O.1903730i.1579556 00.249999 01 19 77 01.1395636 00o.7499994 01.1764417 01.4561258 01 -2 599 —;9; 0 i.1936513,-Oi. 2396026' 00.2599999 9' 01.1 &^*~ 00*-7599994 01.2049716 01.7508496 00 ~ 2099999 Ca. 19224DS6- O1. 11355O ~.2o,9999^^ 01j 4oo 1.1413155 00.7599994 01.2089077 01.1150833- 00 *2799999 01 ~0u285- 01 140-97 00.7799994 01.2077188 01.1247548- 00.28!)9~93~~~~G C1 183:02-O.1I 44-509 00.~0)' 9 01 oo' y f c.449509 00 *~.7899994 01.2064670 01.1258102- 00.2)9999>C8 0 3 7 u~1-C.146'8832 00.7999994 01.2052038 01.1270375- 00 -3099998,~. 1645'4- O1. 4i88991 O0.)099998 1 4 colt 3.14 88991 00 '.8099995 01.2059282 01.128505533- 00 -31c99S-,"8 O1) 4"3'....' 'i ' '.51999 0 1t'~ 4 9n c.1510049 00.8199995 01.2026598 01.1296102- 00 3299998 01Q.10)3440) 1 -.55207,2 00.8299995 01.201335581 01.1509602- 00 ~ 3399998 DI.1813991-1 -1555139 O0 }9) >1 t10 139)1.155139 00 ~-.8599995 01.2000228 01.1525559- 00 4-9' 980 u t,4 1.15795400.8499995 01.198693355 01.1337999- 00 -3599998 C1. 1~8Y74494-O. 10i I'D p5909y 0-1 ou[44- ^i ~.lo00'4748 00.8599993 01.1973491 01 1352952- 00 -36-99996 '0i.1722-, 41318 O0.)O)99)0 1 ~ ~ * 4-~?1 16486 00.8699993 01.1959898 01.1368448- 0 75999)8 01. 17j::07- i.159 67 00.8799995 01.1946147 01.1584519-00 58>-'9S7.1(i2 C.189426" 00.8899995 01.195223355 01.1401204- 00 ~3999997 O1.17~~~21132- 2,'i. i 20086 39999'97 17 2115 17.1720'9S.08 0 - 8999995 01.1918150 01.1418544- 00 'K40 ^9) I ~( 8~ 01 *.4287 00.9099995 01. 1905890 01.1456579- 00 ~ 41~~~~~~~~~~~~~~~~~~~~~~~~~~a999972C.6i03-O11874O.41)9997 ~.i1Xol- 01.1()74 oo.9199992 01.1889446 01.1455560- 00. 42999>57 1 0004- 1.2b7531 0.9299992 01.1874812 01.1474958- 00.,6^-99( ci.16o4>1ol- Oa.17(0(74 )0.9399992 01.1859978 01.1495372- 00 ~ 4499997 O1.i63~076-.11077 *44)99)7 Ci 10'50705073*.10 07[7 C00:.9499992 01.1844936 01.1516725- 00 ~ 4599997 0 i. 1 45 - Si.95 74~4 0-o 99920 4599)^7 o 1311i40) 1.19574~4 coo.9599992 o1.1829677 01.1559069- 00 0.4699-7 C).20/,1-588 0.00498O0.'U0 997 ci '> lo u~ ^.2-007(48 00.9699992 01.18i4190 01.1562478- 00:4(99997 C J.5717o 0~.2 'I 3 9 00.9799992 01.1798465 01.1587045- 00 ~4-899997 On. 1550'540- Oi.2120320 00 48)9>97 0~%.l5P 01.2120520^~.9899992 01.1782486 01.1612861- 00 4N+999~96 01 I 1529-07-7- 0t. 2184 3 58 00.^99>9o 01 ~>^o07- 01.21)^45)0 cO ~.9999992 01.1766246 o1.64op5'3- 00.1010000 02.1749727 0.1660899- 00 E-420

Example Problem No. 34 Solution of the van der Pol Equation Problem - Part II dy/ty t dy/dt y.1000000 00.1749727 01.1668699- 00.5099996 01.1941647- 01.1389869 00.2000000 00.1732915 01.1698980-00 5199996 01 1927682- 01.1406757 00.3000001 00.1715793 01.1731039- 00.5299996 01 1915546- 01.1424311 00.400oooo0001 oo0.1698341.1765050-00.599996 01 1899231- 01.1442578 00.5000001 00.1680541 o1.1801217- 00.5499996 01 1884750- 01.14616o8 oo.6000001 00.1662369 O1.1839771- 00 5599996 01.1870036- 0l.1481451 00.7000002 00.1643801 01.1880978- 00.5699996 01.1855140- 01.1502171 00.8000002 00.1624809 O1.1925149- oo.5799996 01.1840032- 01.1523830 00.9000002 00.1605362 01.1972641- oo 5899996 01.1824705- 01.1546502 00.1000000 01.1585425 01.2023879- 00 5999995 01.1809146- 01.1570269 00.1100000 01.1564957 01.2079360- 00.6099995 01 1793343- 01.1595221 00.1200000 01.1543915 01.2139676- 00.6199995 01.1777287- 01.1621459 00.1300000 01.1522247 01.2205558- 00.6299995 01.1760962- 01.1649093 00.1400000 01.1499895 01.2277799- 00 6399995 01 1744354- 01.1678252 00.1500000 01.1476789 01.2357501- 00.6499995 01.1727449- 01.1709082 00.1600000 01.1452851 01.2445928- 00.6599995 01.1710227- 01.1741759 00.1700000 01.1427987 01.2544670- 001.177641 00.1799999 01.1402084 01.2655729- 00 6799995 0 1674758-01.113507 00.1899999 01.1375011 01.2781657- 00 6899995 01.1656466- 01.1852671 00.1999999 01.1346605 01.2925743- 00 6999995 01.1637769- 01.1894785 00.2099999 01.1316668 01.3092300- 00.2199999 01.1284953 01.3287082- 00.2299999 01.1251144 01.3517908- 00.2399999 01.1214840 01.3795635- 00.2499999 01.1175511 01.4135694- 00.2599999 01.1132446 01.4560615- 00.2699999 01.1084664 01.5104300- 00.2799999 01.1030774 01.5819543- 00.2899998 01.9687347 00.6791825- 00.2999998 01.8954291 00.8165776- 00.3099998 01.8058803 00.1019843- 01.3199998 01.6917240 00.1537118- 01.3299998 01.5381059 00.1863071- 01.3399998 01.53172521 00.2787525- 01.3499998 01.2352768- 01-.4448487- 01.5599998 01.5687914- 00.6973284- 01 35699998 01.1324307- 01.7607559- 01.3799998 01.1895622- 01.5017115- 01.53899997 01.2077219- 01.2219002- 00.53999997 01.2085720- 01.1271022 00.40)9997 01.20753094- 01.1249663 00.4199997 01.2060550- 01.1262077 00.4299997 01.2047382- 01.1274469 00.4399997 01.2035089- 01.1287256 00.4499997 01.2022166- 01.1300458 00.4599997 01.2009108- 01.1314100 00.4699997 01.1995912- 01.1328208 00.4799997 01.1982574- 01.1342809 00.4899997 01.1969087- 01.1357930 00.499999 01.1955446- 01.1373606 00 E-421

The Solution of Differential Equations by Numerical Methods Solution of the van der Pol Equation '...!.-!!!17:::::.: -=-:~::'::::=i — ~ k'.= X s-m~4 f 0 1 F-:-:i'= '-tl~y gtti;- pr! 2eil: k Y(O): 1 dY/dt (O)= 0 4: F 4- -0W - = < iee- t t H 1:::? i'0 - =4.- =.T t:4 —: '! t sec,. ~.~...:...: Solution of the van der Pol Equation =I~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' -t L 0! V 0 0 | z g 0 0 tT-,~ ' "',5 o, — iizzzi-'" -~ -: -.-.:. i..,.. -.....- -:I '....:__ ~0) d/d ( _ _ | _:0)- 0... "T, t I tif + 4. t s t~ ~ ~~:i..................:...... i ---:-: —: -....::: f 'j,..::...:.... - i: — E-42...... ':' '1.' L -.... Y ~................4....2.... I......... T.

Example Problem No. 35 LUMINOUS EFFICIENCY OF A BLACK-BODY RADIATOR by Edward Szymanski Problem Statement Determine the luminous efficiency of a black-body radiator at temperature specified below. Use Simpson's rule for numerical integration and solve for the luminous efficiencies using the no. of intervals indicated. Temperature No. of Intervals for Visible Range 6000 30 4000 30 2000 30 6000 120 5975 30 6025 30 Theory The students study the basic mechanisms of heat transfer, devoting about 30% of the course time to problems in thermal conduction, radiation, convection, and thermal transients. During the discussion of radiation phenomena, some attention is focused on the radiation characteristics of so-called "black bodies." This sample problem affords contact with Planck's equation and Stefan-Boltzmann equation for the radiant energy of black-body radiator. Luminous efficiency is the percentage of the radiant energy of a black-body which is of wavelength such as to be in the visible part of the spectrum. Planck's equation, E = 2.39 (10) x E5 '432/xK -1 describes the monochromatic emissive power in units of watts per square centimeter area per cm. wavelength, for the spectral energy distribution curve. In this equation, "x" is the wavelength (cm.) and "K" is the temperature in degrees Kelvin, and "e" is the base of natural logarithms. The Stefan-Boltzmann -12 4 equation, E = 36.9 (10) K watts per square centimeter area, formulates the total emissive power. The luminous efficiency becomes [, f2 J / where xl and x enclose the visible range x l /E of the spectrum. The students attack this problem using numerical or graphical integration. It is proposed that this problem be done using a digital computer. This would much alleviate a burdensome problem and permit studying more cases with greater accuracy and in less time. Solution This problem can be solved simply on the computer, especially of programmed in a language like MAD 1. Read input parameters temperature (K) and no. of intervals (N). 2. Compute the integral (AREA) AREA E dx E4 x E-423

Luminous Efficiency of a Black-Body Radiator from Planck's -equation using Simpson's rule integration with N intervals over the range. AREA is E iibl x = 3800~A j 1 00 visible range. x2 = 7700~A Use a special subroutine, (an EXTERNAL FUNCTION S IMPS. in MAD) for Simpson's rule. E is itself defined by a subroutine (an INTERNAL FUNCTION F. in MAD). 3. Print results: temperature, (K), 2 J3 Ex dx, (AREA), no. of intervals, (N), E STEFAN - x1 BOLTZMANN (ESB) and luminous efficiency, (AREA/E). 4. Repeat steps 1 thru 3 for other sets of data. REFERENCE. A. D. Moore, Heat Transfer Notes for Electrical Engineering; George Wahr, Publisher, Ann Arbor, Mich. FLOW SH-EE T MAIN PROGRAM V(STA FT^ ^^ FFC )\ bATT — F ^. PkTE ^ 9 y NSIPS,8.(^,,77.% |. x K I N\P! I" I r-/, F.) 4IEviS3 N2 =. (x) Z.39^e - 31MPSO'50 5 RU LE 5QBROL)TrlJE AL. PHR S _ F.X FUNCTION RET URN To SI) S _ F ---, 5, + Z.() MAD PROGRAM I _J() -)WARD SZYNIANSKI TTC.:9PN 6 )001 002 ClO 2 -'.CO''PILF ', AD -E:XFCIJUTE RL U INOUS: EFF ICIENCY F A LCK-BODY RADIATOR Pr T ART PR FAD FORMAT R E ALTA,,A' P1 01 VECTOR VALUJFS DAT.A=Fl- 1., l:", _1 _- 02 AREFA=SIPS. ( 0.38 F -14, 7.K).774-!,NF.) 03 INTERNAL FUNCTIONN F. ( LA DA ) = ( ( V 9E -1 1 ) /L:AMP 2 Fi,. 5. ) / ( EXP. ( 1 0 1.432/LAN3DA/K)-1.) 05 E=(36.9E-12 )*K.P.4. 06_ PRINT FOPSIAT RESUJLT, KAREA\, N, F fARFA/ 07. VECTOR VALUES RFS'JLT=S651-1OEE)T!F IV POM I ER DF A 3LA C K-BODY_0Y O. IRADIATOR AT A TEF.PERATUPE OF F5..,19H DFGI:RS K -LVIN IS 1PEi2 09 1.6,19H WATTS/SQ.C. IN TIHE / 49-IOVTI SIi LE RANGE 0- TIIE RADIAT1O 10 1N,DIVIDFD INTO I3,4.:- INTERVALS. THE TOTAL E'-:ISFIVE POWtER IS 11!1PE12.6,17H WATTS/SO.CM.,SO /2811OTHi- LI!MINO!IS EFFICIENiCY IS 12 ] 2PF6.3,QH PERCr.NT. " —. 13 TRANSFER TO START 14, END OF PROGRAM 15 E-424

Example Problem No. 35 MAD PROGRAM (cont.) ' COMivP I i._ M",r), FX-rC ITF, DJ~INC[H O:JF CT EXTFRN;AL FJNCT IN! ( A,,!, F ) 16 INTFGFPR,iM i'7 INTRY TO SIMPS. 1 11= ( i-3-A ) /,1 ]9 S, 1 =.. 20. 2 S=.!.o.2 1' THROULGH ALPHA,FOF X= A+ -,2. ' H,X.G. 22.1.=S1= + F.(X) 2 ALPHA S 2=2 -- F (X+H) 24, lFUNICTION R 'FT URN H ( F. (A )+4.* 1+ 2."2-F4r (4) )/3. 25 END OF FIINT'CT T ION' 26 F N..! OF bRP 0.RA h' "- DAT A 6 ') '~. r' L) 1 4000 30 ) 2 6000 12. L4 6 o ) 2.; L) 4 5 975 3, 5 602 5 ' 6 RESULTS The program compiled and executed with the results printed out with the following formatt aTE MISSIVE POWER OF A BLACK-BODZ RADIATOR AT A T'(PERATURE OF 6000. DEGREES ESLVIN IS 2.234537z 04 WATTS/SQ.QC. IN THE VISIBLI RANGE OF THB RADIATION, DIVIDED INTO 30 INTERVALS. THE TOTAL RISSI1 POWER IS4.782238E 04 VATTS/ SQ.OC.,S0 THE LUMINOUS EFFICIPqCa IS 46.726 PERCENT. Results for the other data were similarly printed out and all of these are tabulated belowt Temp. Eiible No. of Intervals 1 %Eff. 6000. 2.2345371 04 30 4.7822381 04 46.726 4000. 2.658971 03 30 9.446395103 28.010 2000. 9.362740B 00 30 5.903997E 02 1.586 6000. 2.2345371 04 120 4.7822381 04 46.726 5975. 2.193116E.04 30 4.703029B 04 46*632 6025. 2.2764251 04 30 4.86244.1 04 46.817 The computer expended an elapsed time in minutes of 0.5 for execution and 0.5 for compilatin. E-425

EDITORIAL PRIVILEGE MADMADMAD MADMADMADMADMADMADMADMA MADMADMADMADMADMADMADMADMADMADM MADMADMADMADMADMADMADMADMADMADMADMAD MADMADMADMADMADMADMADMADMADMADMADMADMADM MADMADMADMADMADMADMADMADMAD-MADAD-MA-tADMAD MADMADMADMADMADMADMADMADMADMADMADMADMADMADMAD MADMADMADMA DMA AVMA.DMADMADMADMADMADMADMAD MADMADM MM M ADMADMADMADMADMADMAOMADMA MADMADMA —..-.. M-A-A:0-A..MAU --- MADMADMA MADMA MADMADM MI-AD-MA --- —~ - MADMA MMMMM"WM MADMA MADMA M M MADMA MADMA.~...~ M~MiMMMMM MADMA *****MADM, (U) 4*,**.. MADM * *MA ****e * (U) * MAD *_ *. *, I 4 e ** * -_ - - -**___ __ __ *________~ * 0*_ ~~~~~ **~~~~~~~ 0~ * * * * *. *.* * 9....*. * -* * 9 9. 9 *.*a *-.*** *~ e* ***9 ****** * ___ * **~-I, -~ ***a. *eM M M Mo. * * ** * *.9...*. *.H.. * **W*O *............... * * e ***** ***~ * ~*** * - -* * ____ ** ** * *** * **- * * * ** * * WHAT t ME WORRY * ******** ** ******** NOTE: In the final assemlby of the report, we found an unused page after all the remainder of the pages were properly labeled. To fill the void and show that we have not completely lost our sense of humor, the above figure is included by special request. E426

Example Problem No. 36 DETERMINATION OF THE UNNECESSARY ELEMENTS IN A SWITCHING-CIRCUIT TRANSMISSION FUNCTION by Edward Szymanski Objective One of the prime objectives of the theory of switching-circuit design is to conserve or minimize the number of components, such as relays, tubes, transistors, etc., which are needed to form a circuit which can accomplish some desired logical result. An insight is provided by the transmission function representing this circuit. The variables, (literals), X0,X1, X2,... etc., in this switching (Boolean) function represent relations between circuit components. Theory The transmission function as expressed as a "standard sum" appears in a form like that of the example which follows: T(X0,X1,X2) = XXX2 + X0X Xz + X0X1X + X0 x 2 in which the primes indicate complements. The terms may be decimally-designated by stating the decimal equivalent of the binary states of the variables. For example, in the three variable functions above, the second term, X 0XX2, has binary states 101. Non-primed literals are represented by state "1" and primed literals by state "0". The binary number, "101", has the decimal equivalent of "5". This permits the use of decimal designators for the terms in a standard sum. The above example could thus be stated as: T(XO, X1, X2) = (7, 5, 3, 1) Transmission functions like the sample above may be expanded about one of its variables Xk, by using the general switching algebra theorem: f(X0, X1.... Xk,....X ) = Xkf(Xo, X,..... 1,.. ) + Xf(XO, X1. 0....Xn) or more simply, f(XO, X1..., Xk,.. X) = Xk(Rk) + X(RPk), where Rk = f(Xo0 Xl,...1,.. Xn) and RPk = f(Xo,, 0. X n These functions, Rk and RPk, are the residues, obtained by replacing the literal, Xk, in the function by the Boolean state quantities, 1 and 0, respectively. As applied to the sample function, the result expanded about X1 becomes: * S. H. Caldwell, Switching Circuits and Logical Design, Wiley E427

Unnecessary Elements in a Switching-Circuit Transmission Function T(Xo, Xl, X2) = Xl(X0X2 + X X2) + X (XoX2 + XX), giving R = (XoX + XX) = RP1 The residue test may be used to determine whether a literal, X or its complement, X, is needed in order to represent a switching function. The first step in applying the test is to expand the function about the variable, Xk, to be investigated. The second step is to examine the residues Rk and RPk, and to compare the residues to see if they are identical or if one residue is fully contained in the other. Four conditions are possible, (a) If Rk " RPk, then both Xk and X are redundant. (b) If Rk contains RPk, then the X' literal is redundant. (c) If RPk contains Rk, then the Xk literal is redundant. (d) If none of the conditions above are satisfied, both Xk and XI are needed. In the sample expansion about X1, condition (a) shows that both X1 and X1 are redundant. This process would then be repeated for each of the other literals, k = 0, 1, 2,.... The theorem, which can be used to determine whether a particular term contains Xk or its complement, can be stated as follows: "The decimal number, d, contains the number 2k (and therefore has state "1") in its binary number representation if and only if [ d/ 2k] is odd. k = 0, 1, 2, 3,..." The residue test discovers an unnecessary literal, Xk, whenever its residue components in a standard sum (expressed as a decimal or binary number) plus 2k is fully contained in the other residue of the pair. This residue test may be performed in succession for each variable. The problem becomes somewhat formidable if there are more than five or six variables present. The digital computer may be programmed, as done in this problem to systematically examine all the residues very quickly. This may be done as a preliminary to a further minimization to ensure that results obtained do not contain unnecessary components. The sample program was designed to employ this residue test in succession to each variable of seven-variable functions. Problem Statement With the associated theory as background, examine the "residues" of specified transmission functions to determine which, if any, of the literals, or their complements, are redundant: T = S(2,3,4, 5, 6, 10, 11, 12, 13, 14) a Tb = (8, 9, 10,14, 26, 45, 67, 79, 83, 95) T = 2(0, 1, 3, 8, 9, 13, 14, 15, 16, 17, 19, 24, 25, 27, 31) Td = 2(0, 2, 5, 8, 10, 12, 13, 16, 18, 21, 24, 26, 28, 29, 30, 32, 34, 37, 39, 40, 42, 45, 46, 48, 50, 53, 55, 56, 58, 61) E428

Example Problem No. 36 Solution 1. The standard sum is read as decimal data in a list. 2. Iteration loop is set up to perform the residue test on each of the seven variables. 3. Each element in the list is divided by 2k where k successively becomes, 0, 1, 2, 3, 4, 5, 6. 4. Upon each division the quotient may be even or odd. The odd condition is indicated when the decimal value of the element is greater than the truncated quotient times 2. 5. The number (Q) of such even elements and the number (N) of odd elements are counted and constitute the residues and are arranged in two lists, R and RP + 2 called RPQ. 6. The decimal values of the elements in the R residue list are compared for equality with those of the RPQ residue list. 7. For each such equality a sum (TEST) is accumulated. 8. When this sum is equal to N, the particular literal, Xk, is redundant. When this sum is equal to Q, the complement of Xk is redundant. 9. The redundant literals are then printed out. Flow Diagram PRI NT START Si FOR~ 1=0,1, T T,-,04 S2T(O)...T(M) TITLE2 ^_ at TROUGH S4 \ _ /TROUGH S5 \ _ f W 6FOR J=01EQ FOR 1=0,1, N=O Q = FOR — lZ.G. (Z/2)*2 T J __^ \. N\.G. 128,. =TEST= = l TEST + 1 PRINT X(J) PRINT X(J) /^\s,^'- ~ — - TI UNNECES- T UNNECES- / (<f}-~^ TEST.EoN J~-^ SARY T^ TESTEQARY 4 Q4......,4 E429

Unnecessary Elements in a Switching - Circuit Transmission Function MAD Program EIJO E.A. SZYMANSK I TO9PN 9 001 002 0,5 2 *COMPIL.E NAD, EXECUTE RDETERMINATION OF THF UNECESSARY ELEMENTS IN A SWITCHING RCIRCUIT TRANSMISSION FUNCTION9 R NORMAL MODE IS INTEGER 01 DIMENSION T(128),R(128) RP(128) 02 VFCTOR VALUES X ( )=1,2,4,8, 16,32,64 03 S1 THROUGH 52,FOR I=0,1,I.G.128 04 S2 T(I)=-1024 05 S3 READ FORMAT CARD,MT(G)...T(,t) 06 VFCTOR VALUES CARD=$I3/(24 I 3 )* 07 PRINT FORMAT TITLE,M++1,T(0)...T(M ) 08 PRINT FORMAT TITLE2 8A THROUGH S4,FOR J=O,1,J.G.6 09 TFST=O. 10 N=O 11 ~0=0 1 2 THROUGH S55FOR I=O,19I.G.M 13 Z=T( I )/X(J) 14 WHENEVER Z.G.Z/2*2 15 N =N+ 1 16 R(N)=T(I) 17 OTHERWI SE 1 8 0=0+1 19 RP () =T(I)+X(J ) 20 S5 END OF CONDITIONAL 21 THROUGH S6,FOR I=1,1I,I.G.N 22 THROUGH S6,FOR K=1,1,K.G.Q 23 S6!___ WHENEVER RP(K).F.R( I ),TEST=TEST+1 24 WHENEVER TEST.E.NPR I NT FORMAT OUT1,J 26.54 'AHENEVFR TEST. E.O, PRINT FORMAT OUT2,J 27 VECTOR VALiJES TITLE=$59HCIN THE TRANSMISSION FUNCTION REPRESE 28 1NTED BY THE FOLLOWING I3,45-1 DECIM!'ALLY-DESIGNAI\TFED TERMS IN A 29 1STANDARD SUMI //(24I5)' $ 30. VECTOR VALUES TITLE2=- 119HOFOR WHICH TH-E ELE'MENTS ARE X(O 31 ]),X(1),...X(6) AND THE COMPLEMENTS OF THESE ELE,MENTS, THF FOL 32 ILOWING ONES ARE UNFCFSSARYY //-S 33 V\FCTOR VALUES OUT] =$S2, 12HX ( 1,1H);$ 34 VECTOR VALUES 01.IT2=S; 1 1]. 61-COMPL EMIENT O)F X(Ii, 1H)- 35 TRANSFEn TO S1 36!rND OF DPDGRA" p37 (-DATA 9 2 4 5 6 10) 11 12 13 14T 1 9 8 9 1 14 26 45 67 79 83 95 D2 1. 4 0 1 3 8 9 13 14 15 16 17 19 24 25 27 31 D3 29 O 2 58 In 12 13 16 18 21 24 26 28 29 30 32 34 37 39 40 42 45 46 48 04 50 5 59 5 56 58 61 04 E430

Example Problem No. 36 ~~~~~~~~~~~~~~~~~C.f...-T!.Q ~ ~ ~ ~ ~ ~ ~ ~ ~ I ITF -^ —:'^~~~~~~~~~~~~~~~~~~~ ~: S~~..~...iiJ.!..... ':...:~0~~~~~~~~ ~~~~~I:..: *i.. i'"" I' K:*:::: "JVI-;*,* Ii I I I~~~~~~~~~~~~~~i 1!!"' rrinn:: i,", a-i.".- i: —j~~~~~~~[!:T:i::C '-'" =[1.."!11C l ', UJ 1.0 M L.J UJ,;::.. i[]]-::,0:;'..i x.,.K* i':;^"!;"^ ':' i., i]l; *~~~ ~ ~ ~~~~ ~~ ~~~ ~ ~~~~~~~~~~~~~~~~~~~~:":.:.i: Cr.,:,:"|T {'*, - _J~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LF I~ ~ ~ ~ ~ ~ ~ ~ ~ ~~'- ~!......f.J" '! II..D5~.iji " IIII. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"' -':::: "'' -L..!i-L J*-..!..!!- 1 — 1-i-.- j **::.- I jII f-I ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [ i^~~ ~ ~~~~ ~~ ~ ~~~~ ~ ~~ ~~~~~~~ ~ ~ ~~~~~~~~.:"!" ano..ni " in jLUJ? L!.. '...!:1:: ^~~~~~~~~~~~~~~~~~~~~- II' n: rnj I- [;'I LII;! IT I CD T, jLJ,!!'' 1 I II-1 c! i, F"-:.L!-"'*'7!.Ij~ f- j ' ^ 1'~^i'" -J r:":;"-I::i; '?~~~~~~~~~~~~~~L I U^ i!-.!.!~L!!;..... I IJ 5 '**. 1^'"-! ^":.::i ^! '**^ "":::' i...E 3 w ';"* oi-i c ~~~~~~~~~i-,c'ji ^ j,6 i; i~~~~~~~~~-I -'..I r'-) **!.'..!;::;-. ^ | L" 'nj "!.!.:!*.::, ^ I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... (:':)!.'** ** *..i..i.";.,,-,l,:~~~~~~~~~~~~J I::: C'.- ''":!...*'*.*;.!.f- ** j —. LAr":... f- i::)- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~:': i...*'i-.l —.:..!. -.;*i!!:' %D'-",......":::: *:.....::::: '.........,j IJ'i~~~~~~~~~~~ I'-'"' i-l-i l.'-.l Li l ~ ~ ~ ~ ~ ~~l.IUjJl1.'! i.dIIi LL.[~ ~ ~ ~ ~ 17 " t I _t7.:!= ** S LiU.-.'l^ * -" -!!..!~:~:*:: I..l t~i... 1 =:' i.l":l l.lL t^-:;:I:..... rj:~.... -Ji.J LO L LI.JL.J I- i EL...J:T S!:i::'::::i;:;::!:31: It'-, 'Nr- 0"'!-T-r."i- "'. ^ ^:::'r^ ^*~~ ~ ~~~ ~ ~~~~~~~~~~~~~~:Z:Zp E431

Example Problem No. 37 POTENTIAL DISTRIBUTION IN A TWO-DIMENSIONAL FIELD by Edward Szymanski 1. GENERAL AREA Problems of this type are examined in most undergraduate E.E. courses on electromagnetic field theory. In effect, this problem is an application of th'e two-dimensional Laplace equation: 2 2,V + V 0 2. COURSE. This problem could be presented to electrical engineering students in their Junior year in their introductory course on Electromagnetics, or in their Senior year in the applications course, Principles of Electrical Design. The course credits are three semester-hours for the former and four for the latter course. 3. OBJECTIVE. The students generally will have had experience working out similar problems by the methods of graphical field-mapping, direct analog solution with Teledotus (Resistance) paper models, or methods of conformal transformation. This computer solution focuses attention on the solution of the Laplace equation at many prescribed grid points, resulting in many simultaneous equations which are then solved by iteration. Hence, the problem would serve as a good example for introducing digital-computer techniques as applied to this area. 4. PROBLEM STATEMENT. Fundamentally, the problem consists of determining the potential distribution in a rectangular block of the following general shape: J43 The side along 1-2 is established at a constant potential, VU, and the side 5-6 is at a constant potential, VL. All other sides are insulated perfectly. 5. THEORY. After selecting a coordinate system as shown by the coordinates i and j in the diagram above, a square mesh is specified of whatever fineness is appropriate for the degree of accuracy desired. The i j coordinates of the mesh points are then used as subscripts on the potential, i.e., V... The Laplace equation is then approximated by using potential differences between adjacent mesh points. For an interior point, the equation becomes,(V.. i, V + (-V., -VV ) + (V..-V. j) + (V. 1 j- V..) = 0 (. ]+l i, 1., j-1 t,3 i+l,, i-l, ( v,j or V.. = (V. +V + V.. + V. + V. )/4 i,J i,J+l i,J-l i+l,J i-l,J E-432

Similar equations can be developed for points on the boundaries. For a point on an insulated boundary (but not at a corner) the equation is, I l V... (2 V +V. + V_ _ __)/4. I_ _ i i(2 V j i, j-l + i, j+1 I i L ',// / / // y // v/ //// At an exterior corner adjoined by two insulated edges (point 3 in the sketch) the necessary equation is V.. = (V +v.)/2, X j it,j-1 i-l,3 ' / Ji- { and at a reentrant corner adjoined by two insulated edges (point 4 in the sketch) the equation is V.I(2V,+ v +2V. _+ v )/6. V.. ( V +V, + V j+ V *,.)/6. i i,j-1 vi,j+l i-l, i+l,j -- * j The number of equations will approach the product IB X JB where these are the highest subscripts used. 'The actual number of equations will be less since a corner section is cut out and since boundaries 1-2 and 5-6 have fixed potentials. If the number of grid points is small, i.e., 25 or less, a manual iteration procedure is possible. This would proceed after establishing some arbitrary initial potential distribution. A new potential is calculated for each point using the above equation, and repeating until the difference between the values of two successive calculations is sufficiently small. The digital computer is particularly well-suited to doing this type of calculation. Consequently, this problem also illustrates the power of automatic machine computation. E-433

Potential Distribution in a Two-Dimensional Field FLOW DIAGRAM FOR POTENTIAL DISTRIBUTION t^MOD, r-, T B l o, o, Fo, I OATvI A L,( f 2 —; — V. 'AMW 4 7- 7 VA.4l MAD PROGRAM R P T E TIAL D I STRIUT I ( N I N A T W-') I MI S I 1NA L A- f LR _ START READ FORMAT CAD, IBJBI/\,JA,VU,VLNMAXEPS 1 VFCTOR VALUES CARD=$4I59211 O2I5*$ 1A NORMAL MHODEI I S I NPTEGER 2 IFNSIN ),H( 4) 3 VECTOR VCALJFS DI-1=21 4 FQIIVALFNCE (II2),J) 5 PRIEANT FORMAT DATARD IB,JB, I AIJA,VU, VL, NMiAXEPS 6A VFCTOR VALUES DATA=$411H1POTENTIAL DISTRIUTION IN THE TWO-DI 6B 1MENSIONAL FIELD OF A RECTANGULAR BLOCK WHICH HAS LENGTH ONE L 6C 1ESS THAN THE NUMBER /21H OF GRID POINTS, I3 =I3,25HWIIDTH ONE 6D 1 LESS THAN JB =I 334H,MWITH /A CORNER CUT OUT 3EYONDL IA =I3,9H 6E 1ANfD JA =I3S18H. THE TOP AND THE /31H BOTTOM ARE EUJIPOTENTIAL 6F 1S VU =I6l.OH., AND VL =I6,37r-l THE MAX NO. OF ITERATIONS IS NM, _ 6G lAX =I3922'H, WITH ACCURACY,9 EPS =I4-*$ 6H THROUGH INPOT )FOR I=1,1, I. G. I B 9 THROUGH INPOTFOR J=1,iJ.G.JB 10!WHENEVER I.E.1 11 V(I,J) =VUJ 12 OR WHENEVER I.E. IB.ANLD.J.LE1.JA__ 13 V(I,J)=VL 14 _____OR WHENEVER I.G. IA.AND.J.G.JA- 15 V( I,J) = 0 16 OTHERWIS.SF i17 V(I J)=VU —I*(VU-VL)/IB 18 INPOT FNND OF COND)ITIONAL 19 E-434

Example Problem No. 37 MAD PROGRAM (cont.) N =0 2 0 ITFRAT C=0 21 THROUGH MODIFYFOR I=2,1, I.E.In 22 THROUGH OiD)IFYFOR J=1,],J.G.JB 23 W!,HENEVER J.E.1 24 VNEW=(V(I,2)+V(I,2)+V(I-i1))+V( I+1,1))/4 25 OR WHENEVER J.E.JA.AND.I.G.IA.OR.J.F.JJ3.AND.I.L.IA 26 VNEW=(V(IJ-1)+V(IJ-1)+V(I-1,J)+V(I+1,J))/4 27 OR WHENEVER I.E.I A.AND.J.G.JA.AND.J.L.JB 28 VNEW =(V( I-1,J )+V(I-1,J ) +V( I,J-1 (I, J+1) )/4 29 OR WHENEVER I.E.IA.AND.J.E.JB 29A VNEW=(V(I-1,J)+V(IJ-1))/2 296 OR WHENEVER I.E.IA.AND.J.E.JA 29C VNEW=(V(I-1,J)+V(I,J-1))/3+(V( I+1,J)+V(IJ+) )/6 29D OR WHENEVER I.G.1.AND!.I.L.IA.OR.I.GE.IA.AND.J.L.JA 30 VNEW=(V(IJ-1)+V(IJ+1)+V( I-1,J)+V(I+ 1,J) )/4 31 OTHERWI S 3iA V N EW - 0 3 31 END OF CONDITIONAL 32 W4HENFVFR.ABS.(VNEW-V( I,J) ).G.EPS,C=C+1 33 MOD IFY V( I J )=VNE 34 N = N!+ 1 35 WFHENEV F-R N.L.N!'.AX.AND.C.NF.(, TRAN.%SFER TO ITERAT 36 PRINT FOR(MAT TE.ST,NIC 37 VFCTOR VALUES TEST=$24H N.UMLi'ER OF ITERATIONS =,I2,18H ERROR 38. 1 INDFEX, C =,I3 $ 39 THROUGH HEADFOR J=1,19 J.G.JB 40 HEAI) H ( J ) =J 41 PRINT FORMAT TOP9H(1)...H ( J ) 42 VECTOR VALUES TOP=$S14,21 I /5-* 43 THROUGH ALPHA,FOR I=1j9,I.G.I8, 44 H(O)=I 45 THROUGH BETA,FOR J=1,1,J.G.JB 46 BETA H(J)=V(I,J) 47 ALPHA PRINT FORMAT POIN]TS,9H(Iu)... r-i (Ji ) 48 VFCTOR VALiFES POI NTS=$1HO,I9, H ---- 92 I 5 /S 52 1 I 5;c$ 49 TRANSFER TO START 50..END OF PROGRAMI 51 Editor's note: The statement NORMAL MODE IS INTEGER causes all arithmetic operations to be done in integer arithmetic, wherein all quotients are truncated (not rounded) to integers. E-435

Potential Distribution in a Two-Dimensional Field, I l.J,~ _ i z: u-i VL LL: i..:I Li,! LuJ l I-I.. I' I i... i. i: ':J Icr_ ' i i:-3I l* r_ Tir [X- 0i,,T, -,.) i_ -. T, -,- -,i Jl i- -.S' If I: i ' I.... - 1 I -..I u, if II' OE< 0:1 I 0,..., -.l Q:" I '" LI....., 1_., _'!.,.i **r|! C. - 1,-) i: L..! i J'.J...; >-. r- -. 0'.'1 1? **. 1.j * 0. * {, *'? r ' i r —. i l —... Z i.i"'

Example Problem No. 37 LO Eij!~~~~~~~~~~~~~~~~~~~~. |l C. Ci c, r CCCL.", Ir.. I:.. C V:-: 01 C, C) I,, 0D C. M' II1 " INa ~ - Cal 'C' I 'j H rU jS.i i, II ^~~~~~L II I I I. 0 '2 '2i —..t-,; j, frr:, r.. "4 " ' -,: C cI;* ^.. Q ^.. r-"i >~~~~~ ~~~,.-I C; tC ~ " I ~ *:7 C,!F L: - '..'so *:t *:t *:! r r. I I i r oo,:,,:,,::, IT r fI" 7I C:7 I"" f- "I4"' 1 1C) 11 21 f' ~ ~ ~U *l..t: o r- r"-i.lr"<.. ' Ln!r! o Tir-"~ <.;:i i~r-, *.:t or-,rJ r:;i., - CIr I 10':t r r1"'" II i in ~ S 5 ^ r~~co^ ^ ~ cl 0 0 0 cl o o oo'o':: i, F..' -.. '._ r.; > r I '1' ":* r — -:3- C;-. *7-> If:- -rt- CC ~ f — 0N0'C:' 0 0,-,,.-,,-. r::i, —.,-.,**-*, ~.*: 0 '0 i.I: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ' r-'' 1'I '4.** rr. ir' -.. -.<, - ~(12 ". r-i: r1I '| H~~~~~~~~~~~~~~~~C I 10 U1 e CII f- f C:.,~~~~~~~~~~~~~T ~~~~z1~~~~~r i'i,i]11~ ~~~'11 I'- -D ~ ~ ~ ~ ~~~~~~~~~~~~~I I 4I C ~***! C:' '-.'^ **.'"i 0 *'-Ill rCl f' i 40 f 113 1| I '..C '0I" '1" N I "'I '"" t-~~~~~~~~~~~)V j r- ''r. I f f~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:'I G" rl-_ cl, 1P3 I?-, ~.*...:' (-),..-:" i" '- C^ O * -.:| '*| IC'**" 4". 4i H NI f- 3' 1 - ^!;I *-> 10 r"- G — coru-' **** 17- in ~-~ f-I-; *:::** c^ Q,"*"> NI. NI-i 113-. = —,3 'H 3"'' i-> r"-;-r (.:! '4" "i' I("'I I%.4 1O** r f- I'" 1I*I:~f fyj f — >,;j j,") **:+ *.:::;- r-.-i r-'";3 fII i o '<t '1') '-o co *3" u'" L ~ r"- -'':i.r- '^1 N I ["~. "-'- Ir"3 Ni*'I "* "' 'i 'I' '"'i *r- c -t hn CO 0 *. Li" r" ''O *:f.''- r - i'". C.0 *:.!4"::* "1"rfi L!" fl-s r,"' *, i" f" i~ I. I", -" W ~ ~ ~ ~~ CI"*. i *:** * r. *, c- *- I f~- f.. rI I*" rI f.t i3- i! ^-i r- ' ft;~ ~ ~ ~ ~ ~ ~~~~~~~~e C"*^ ~*! C- '.!' -: 1, *:- ** r-J j1".71 rCO r* —* - v.i r., r. **-." *f!*.!; r YI ~ ~ ~ I 1-3 I r- C ' *!."C, 1"- Li *- r':t!** C~ * ^ ** ** "-.,:**, [- "', "'. **' i"..i "*, '.) r' C c-1.cr - * ' n *D*.- '- '*j '. **.- 17i r*-:.;!e. N ~ -- -i *!' ~ - O *I' r " C*' * i i,:' c r..i i, I " ' NI 01" fll3 '4r ",'r "' r~ i n O: ~-:.J j- (Y.o rr..r-, t.; r-" iE-4 0r** ei" --- CO '*-0 ~***! >*::' **^1" '..;:) C.,)** rCO, rr- C,:i r"" *..+*,...., n-i 10 '"*'**I i";'-. **.^ **^ >"***'' "-: I!*: 1..0 C::J**J:' in *..'."i - O'. ~;*** 0 ~***! in I"- J.,;::' ':".l,-r.,,.**, c-'.} f:';,.**,."'*.4 i-, **0 r —irF i IJ..I C") *'- ''-*:f ij-:i CO ~ ~ ~ ~ ~ r —:i r —" C';''CT r-i *..;: L..:: r-C%..;', i^, i, '. r>I 1i"';' %!..I r-,- (*-i 1-1 r,'),0 C, rI (7 -i_ e '.7'.1 i i 1 i 1 i i i i i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'.' i Yi 0 ''" '. '.'. *+* <**D' O.': C%4-** r': -: ''< I- -- re- r" I *- L"i LI,: *-tD I'r "' (D^ C i *-JI r**- '.0 * C '0: — r***r I".- '*j" C-D i-r- r'*** L-.( CO;* U *'* g, r-:", I!: i *- r 10 CO - r — cc, 0 r —:i..0 *,>: r '':! F,-,r &;' co r"- *.r~~~~~~~~in **^ ****i~~~~~ r-.. -- c r~ r...,,;,..*, r.. ^, ( n ^.,"!.,J 0rr-e:: rN 17.: *i r-t: LI L0, - r-Ji CO~? C~. '~ [i *t * r'! *4 '- ~I — *,.j. >:;f r' -" ** LO O:' r- C jZ~~~~~~~~~~~~~~~~~~~~~~~~~~~~i ~" o ur~ ' (*4 o n - c..!) r- c 0 - r" **+ r i'' LO "-.i '". "', r""f i'-i 0 r- '" u ' ~:": ** <' i"" rvi.5. r.n*' r~i i:.,;* *" -, i,, r",." -i i ~~~~~~~~~~~-43

Potential Distribution.in a Two- Dimensional Field,-, *-i r'..i f-: ',{-'. '**- *..-f - iTr-, rO i 0 0 0 0 0 Q 0 Cr10 - **...LI.:' L". "33'.-:... E:L. "j I-J i'', c- *.O:> co r"-| **ltr"- "'7' o C. o o C: 1-1 - U~~~~~~~~~~~~~~~-) "z": L r.......". (~~~~~~~~~~~~._. K...... C~.C '*-.;"i~ -: ci' c: C: cr n'""" circ:3cicico:':! 7"-, **-":"".:-'!'**"' '****** **-* '*.':' c —.8 o' — 0:1 r"- ''~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, 3- -.33 3 ~... J LI-'' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-.:i'~~~~~~~~~~~~~f.:~ I" C~~~~~~~~~~~~~~~~~~~~~~~~~~~('q T"~~~~~~~"r,:"':, ~ ~ ~ ~ ~ ~ ~....... J- '-7r, **i ^. r...*.i. ''* U)~ ~~~~~~~~~~~~~~~~~~~~~~~ 33 C:)I,'T'-: *: r - *0 k. i. i *::**f* r"=, CD c::0:.,.:::!!** *!: ~ j i r ":' *': ',",C -.:. co!'"- '..;:' *..'i i~r' 1.0 **t **:- ***1 YT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I ("-4 71 C,,.,~~ ~ ~~~~~~~ 7I co?.E ~~~~~~~~~~~f -.m I" Ir.D * r- U" r Ii.",:" s o r- L L C."-..0:;.! S.O *;f *: ~; " I' rim-.!*;:.;i:: ' r'":**. r "l'.!-: It!,: It.:~~~~~~~~~~~~~~ -'-rI:TI I- I I3-. J 'ii~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, F"3 '1" J"'3 33"3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~L:,'.:.", i: -L LI-.'!;**Li,_, - i:::'! c-'j~ ~~~ij":; c;'-= r-'":' r — *:'-J c;" — r" — 7 - L~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~II E-4 ~ ~ ~ ~ ~ ~ ~ ~ ~~-3 '::;1 r "-' '.***i "-* r"~ r-..( i"-.^ if~~~~~! S T)""* - rr-" ~ '._*: %,;: Li*+ r... *i -.!.*.!-" i~: 7,': ".' C - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.... r; I E~~~~~~~~~~~~~~~~~-48 C.: i!-; r"17.**! i.4 I i'- - r - r —i r.i **- *4 r --- Cf). C,:,!* **j._:-. ** '"* *Q*- C 10 (** co;::^.n:) o 10 c —.i * —~ ~ ~ ~ ~~"**j '** r - *:i *j: C "**4 r — " **- i"i ***i.:: rn-: b") ^- o i — i c:.. J. 'r,: ""'.f |:% * 1! 4 ^.,.. _!~' **-" *- * r' '.'i r" *^ - ' —i **: * c ''' **r - '.':' ';.i c."! "" r - ''o *.!:1 o c co co 7 - c ',, *,.*- C; r-.i!;>*! *.-?" "-. i-,' r'';:*) **t r —:i ~:^ i~ O!"*- 1. ''O C (. r — 'A C*" O l i*4 (/J i~~~~~t "" ~ C 1O7*-* 'r?"!r **t-4' *-M -., -j.-* -. C- '**: (.%*"' **r...'!; 0 **!* f -, tt:, ''"......... I I! t! i S I! 1 I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1:.% % 1 i:"LLJ*,-:(: i~ '.') *j i;*");:", I'::.( o: ~ ~ 'T, *-*:*! >** *:::i c" "' c **D - ^ " i^i."?*** r - *i rn **: f': -" *;- *;i *.,.:*. *.*. *:- ***:,* j); "* ""* '. I rO '~

Example Problem No. 38 INDUSTRIAL DATA PROCESSING by Walton Hancock Introduction: This report contains three problems which are encountered in the area of data processing in industry. The problems center around those situations where a high amount of numerical information has to be processed and reports generated as a result. Three typical problems have been programmed to demonstrate the use of computers as data processors: 1. The calculation of a payroll with the memory of the machine used as a master file. 2. The posting and updating of an inventory record. 3. The storage of standards in computer memory for the purpose of calculating anticipated spoilage on a series of successive operations. The above problems are programmed in the Act IA Compiler System for the LGP-30 Computer. Name of the Course: These problems will be used in the fall of 1960 in Industrial Engineering 165, "Data Processing". This is a required course on the Senior level. There are no prerequisites; however, all students have a background in Industrial Organization, Production Control and W ork Measurement. Objectives: In the past, the methods by which industrial information is processed have been demonstrated in class by drawing flow charts of the process and then discussing what happens to the information and the advantages and disadvantages of different methods. One difficulty in teaching data processing in this manner is that the students do not fully appreciate what is required to establish a workable system. This is primarily because of the input restrictions for a system that uses a computer. In addition, it is difficult to get the students to realize the full potential of a computer-oriented system. These problems are designed to serve as "take off points" for areas of investigation by individual students. The programs presented in this report are very simple and have purposely been designed to present the very elementary concepts. For example, in the payroll problem, income tax is calculated at a straight 20%. In industry, this would not be acceptable. The number of dependents would also have to be taken into consideration. Also, none of the fringe benefits are included in the calculations. In the inventoryproblem, the calculations of inventory costs on issued items has not been included. Also, no consideration for economic reorder points has been put into the program. In the standards problem, only a few operations are presented, and none of the exceptions that would normally be in the standards have been programmed. The conversion of these simple programs to more realistic ones would be appropriate assignments for the students in the class. This procedure would enable the students to get further insight and a fuller E439

Industrial Data Processing understanding of the potentialities of the computer by exploring just how one would introduce the other fac,tors. By starting with the Instructor' s Program, student's time would be saved. Also a programmed example would be available that would aid students who have no computer experience to become proficient in the Act IA language for the LGP-30 computer. Statement of the Problem and Proposed Method of Presentation 1. Payroll Problem. This is a problem where all of the master personnel information is stored in memory on the computer. The factors of the hourly rate, accumulated gross income, accumulated overtime income, accumulated income tax, accumulated fica tax are stored in the memory for 100 individuals. By reading in the individual's clock number and the number of hours that he worked, the computer would then calculate the following factors: a) total pay b) net pay c) straight time pay d) time and a half pay e) double time pay f) fica tax g) income tax h) accumulated gross pay i) accumulated overtime j) accumulated fica tax k) accumulated income tax At the same time the calculations are being performed, the memory is also being updated so that, the next time the man' s clock number and number of hours worked are processed, the memory will have been updated by all previous transactions. Income tax is assumed to be a straight 20% and fica tax is 3% of the first $4800 of accumulated income. 2. Inventory Problem. The Inventory Problem consists of retaining in memory, for one inventory item, the amount available and the back orders existing. In addition, the program holds in memory the date on which the back order is ordered, the time to deliver a back order, the quantity of the back order, the minimum purchase reorder point and a normal purchase order quantity. When an additional quantity is requisitioned, the program first updates its internal records by tracing back to see if any of the back orders have been delivered. When an amount is ordered that reduces the available inventory below a predetermined point, a purchase order for a predetermined quantity is automatically produced. In addition, when an amount is requisitioned that is greater than the available amount, then a back purchase order is placed for the entire quantity of the order. This problem does not contain the evaluation of inventory in terms of the cost at the point of issuance. This, of course, would be included in a realistic situation. Only one order may be placed each day and the program is for one Inventory Item. In actual practice hundreds of different items would be processed every day. E440

Example Problem No. 38 For every order entered into the computer program the computer prints out the date, the order number, quantity ordered, the amount available, the quantity issued and the sum of the outstanding reorders. 3. The Standards Problem. The standards problem consists of storing in memory the spoilage standards for the production of cartons, an operation involving lithographic presses, cutting and creasing presses, a stripping operation and a straight line gluing operation. The standards are broken down into the running of cardboard and paper and then are further broken down into the spoilage for "set up", which is called "make ready" in the printing industry, and spoilage for the running of the job. The output of the program gives the information concerning the gross number of sheets that should be run, based on anticipated spoilages, to produce the net required. The anticipated spoilage at each one of the operations within the plant is also printed out. Part of the standards are in terms of sheets, the production unit of the presses and cutting and creasing machines. The standards for the stripping and gluing are in cartons. The number of cartons per sheet is assumed to be a constant. This program has been simplified to the maximum extent possible in order to exhibit to the students that the calculation of standards is possible on a computer. None of the exceptions that would normally be encountered in establishing the spoilage standards have been included. As an exercise, the students will be asked to include ten exceptions which are necessary to make the spoilage calculations realistic. Outline of the Theory and Math Involved: In the data processing field, one is primarily concerned with the replacement of clerical operations with a computer. The clerical operations are usually relatively simple and involve multiplication, division, addition and subtraction of large quantities of numbers. The mathematics involved usually go no further than simple algebra. E441

Industrial Data Processing PAYROLL FLOW DIAGRAM READ READ START )- T AOP- H C>40 STPH X R THP=O DTP 0 --- AFICA T H* ----> 48 P RINTP A CA STP=4 THP (H-40) 1-5R -ICA DTPA FICA (V DTP gF TPPRINT T, PICA = 0 --- ------- ------- ------- -------- -------- PICA, IT, I.2 TP NPTP-IT AGITPAI F AIT=IT+AIT - NP,AGI,AIT TP' = TH A > A4-AFICA AFI AFA+ ICACN AAA KEY AGI Acc. Gross Income AOP Acc. Overtime Pay AIT Acc. Income Tax AFICA Acc. fica H Hours worked CN Clock Number STP St. Time Pay THP 1 1/2. Tinne Pay DTP Double Time Pay R Hourly Rate TP Total Pay IT Income Tax NP Net Pay E442

Example Problem No. 38 PAYROLL PROGRAM. IN ACT IA COMPILER LANGUAGE FOR LGP-30 COMPUTER dimtcomp'512' r = hourly rate dimr ' 100 ' dimtacg'100t acq = acc. Gross Income dim t aco ' 100 dim' ait ' 100 ' aco = acc. Overtime Income dim' afica' 100 ' index'cn'' a i t = acc. income tax l'; tent iread'n'' afica = acc. income tax sl'iread'rtcn' ireaad'acgcn1 cm = clock no. iread'aco'cn" iread'ait'cn' ' h = hours worked iread'lafica 'en' s2'itertcn'l'n'slt tp = Total pay s3 'iread'h' I s4 ireadl' cn t np = net pay s5'llfloh'; 'h'' s6l ' 1 ' flo '400 '; s ' ' p = straight time pay s7'2'flo'r'cn'; rr"' s8'whenth'grtr's'trn'sll' pp = 1 1/2 time pay s9'h'txrrt; 'p"' o0; 'pp ' '0'; 'ppp t ppp = Double time pay slO 'use ' s21l sll's'x'rr';'p't cc = fica tax.s12 '1'flo 1'480'; 'ss' -14 '1'flo'15'; tat' ff = income tax sl3'whenth'grtr'ss'trn's63" sl5 [th'- 's' ] 'x'a'x'rr'; 'pp t' sl6 t'0o; ppp s17 tuse ' s21 ' s63'1'flo'80 t;'aa t s18'aa'x'a'x'rr'; 'pp it s19'I'1flo20 '; Iaaa' s20' ['h'-'ss' ] 'xaaa'xtrr'; tppp' t s21'tp+'pp'+'ppp'; 'tp' s22t2 flotacg'cnt; 'temp ' s23 'temp ' + 'tp; 'temp ' s24 ' 2 'unflo'temp '; ' acg ' cn " s25 '0flo '144'; 'b I s26'2'flo'aficalcn'; 'ct' s27'b'-'ct'; 'cc l s65 'when ' c ' grtr 'b trn ' s32 s76'3'flo'1l'; 'hh' whentcc 'less hh'trn's32l s28'2'flo'3'; 'd' s29'd'x'tp'; 'ddl s30 'c '+'dd'; 'ddd" s31 'when ddd'grtr'b'trn's681 s66'2'unflo'ddd'; 'afica'cn " dd'; 'cc' use5' s33.s322'unflo'b1; 'aficatcnt s67'0'; tcct s70 'use' s33 ' s68'2'unflo'b'; 'aficatcn' ' s69' ['b'-'c'] I; Icc"' E443

Industrial Data Processing Payroll Program (cont.) s33'1'flo'2'; 'f" s34'tp*'x'f '; 'ff' s75 '2'unflo' [ 'ff'+' [' 2'flo'ait 'cn' ]' ]'; 'ait 'cn'" s62'tp'-'cc'-'ff';'np'' s37'pp'+'ppp'; 'oup" s38'2'unflo' ['oup'+' ['2'flo'aco'cn'] ' ] '; 'aco'cn' 's39'2'unflo'tp'; 'tp'l s40'2'unflo 'np'; 'np' s78'2'unflo'p'; 'p'" s79'2'unflo'cc '; 'cc ' s41'2'unflo'pp '; 'pp' s43 ' 2 'unflo 'ppp '; 'ppp s45'2'unflo 'ff'; 'ff s50 'cr'cr'0 'iprnt 'cn'2.'iprnt'tp'2 'iprnt'np ' 2 'iprnt 'p'' ipr tpp 2 tppp '2' iprnt ' cc ' cr ' cr ' 0 ' iprnt'cn' 2 ' iprnt 'ff' 2!iprnttacg'cn'2'iprntlaco'cn'2'iprnt'afica'cn'2'iprntlait'cn"' use ' s3 " stop ' DATA PAYROLL PROBLEM LGP-30 COMPUTER 15' 167 '20000 '0002 '2000 '600 ' 175'150000' 2005b ' 30027' 4200' 149' 150000' 40047 34345 '5000' 122' 272900 '70194 '42692 ' 400' 605 ' 145200 '60043' 22747 '4500' 403 615049'700054'302742' 14400 ' 701' 417365 ' 150062 'U5767' 12000' 502' 212144 '37547 '42727 '14400' 110' 915167 'I07327'152745 l14400' 523' 234144' 27547 '42752' 14400' 419 '480000 '200101 '96082'2700' 221 ' 97210 '147' 2757' 1270' 521'4704'22224' 45755' 6670' 621'22244 22224'2525 '670' 431' 415472 '107275 ' 107257 '12340' 632'1' 473'2' 221'3' 456'4' 670'5' 244'6' 403'7' 400 8' 745'9' 276'10' 462 '11' 443 '12' 400'13' 856'14' 1272'15' SOLUTION: PAYROLL PROBLEM Clock No. Total Pay Net Pay St. Time 1 1/2 time 2 time FICA Pay Pay Pay Tax 1. 137.61 105.964 66.80 20,04 50.77 4.13 Clock Income Acc. Gross Acc.Over- Acc. Acc. InNo. Tax Pay time Pay FICA come Tax 1. 27.52 337.61 70.53 10.13 47.52 e O89516- 6&86 70.00 719 -007 2qi7 a. 17.85 1589,16 219.72 44.67 318.10 221'3' 3. 32.93 25.36 32.93.00.00.99 E -444

Example Problem No. 38 PAYROLL PROBLEM (cont.) 3. 6.59 1532.93 4oo.47 50.99 350.04 456'4' 4. 59.05 45.47 48.80 10.25.00 1.77 4. 11.81 2788.05 712.19 85.77 440.73 670'5' 5. 544.50 419.27 242.0 0 7229.90 16.34 5. 108.90 1996.50 902.93 61.34 336.37 244' 6' 6. 98.33 78.67 98.33.00.00.00 6. 19.67 6248.82 7000.54 144.00 3047.09 403'7' 7. 283.55 218.34 280.40 3.15.00 8.51 7. 56.71 4457.20 1503.77 128.51 914.38 400' 8' 8. 200.80 160.64 200.80.00.00.00 8. 40.16 2322.24 375.47 144.00 467.43 745'9' 9. 115.50 92.40 44.00 13.20 58.30.00 9. 23.10 9267.17 1144.77 144.00 1550.55 276'10' 10. 144.35 115.48 144.535.00.00.00 10. 28.87 2485.79 275.47 144.00 456.39 462 ' ll ' 11. 206.57 159.06 167.60 38.97.00 6.20 11. 41.31 5006.57 2039.98 33.20 1002.13 443'12' 12. 102.65 79.04 88.40 14.25.00 3.08 12. 20.53 1074.75 15.72 15.78 48.10 400'13' 13. 208.40 160.47 208.40.00.00 6.25 13. 41.68 255.44 222.24 72.95 499.23 856'14' 14. 789.91 608.23 248.40 74.52 466.99 23.70 14. 157.98 1012.55 763.75 30.40 183.23 1272' 15' 15. 906.82 704.86 172.40 51.72 682.70 20.60 15. 181.36 5061.54 1807.17 144.00 1253.94 Note: Heading is not part of program. E445

Industrial Data Processing READ Delivery Time Reorder Quantity Reorder Point Available Quantity ZERO: EINTA AD Issued Quantity vO 100 CONDITIONS dn ~STPART V Orders Requisitioned 10 ^ -------- / ^ Date ^**^lOo of100 Ord er Number...OO Quantity Ordered^ r - A A () -n*n-k Ss= yg -= E - 0y nC/.. -- n -— ~ THROUGH Fn- =^ 0 88+Ss — z VQ )z ^BETATA = sn-= n-V+Z FAR\ n = BT = 0 n mm 0 PRINT Date, Order No,,Orders Req. Quantity Ordered,, Reset O Orders Req. n =0 Available, Issued as <J2 = I ' — Orders Requisitione n E446Tio^-,-. quant. ordere, available: Orders Req.F _ available = orders req, n n + Del. issued - available r eavailable>r F V orders req. + Time f 2 F2 quantity quantity - tae yon = I T reorder quant reorderet...... - ------ /" I Date, Order NoI_, n V^"-11^ n __+ e-1 -^v~a nq F V-^ Quantity Ordered,, _^ A F \^/^ delivery time ^n I Available, Issued l Orders Requisiti FLOW CHART OF INVENTORY PROBLEM E446

Example Problem No. 38 INVENTORY PROGRAM IN ACT IA COMPILER LANGUAGE FOR THE LGP-30 COMPUTER dim' comp ' 512 ' dim 'v'200 " dim'e '200'" dim'f'200''11 dim' yy ' 200 ' dim'yy'200" n - = index index'n' n index read'k'' k = search period read't " t = delivery time read'm"'' m = reorder point reada'rq" rq = reorder quantity (PURCHASED) read'av' ' read'ci'' tav = available read'i I read'or' i = issued read'd'' or = order requisitioned (PURCHASED) read'n" d = date readt'qm' n = order number n; mm't q = order quantity 0'; 'n' s26'0'; 'f'n' 0'; 'v'n' o'; 'e'n'" 0'; tf'n' s25'iter'n' 1100's26' n'; Imml ' use 's9 sl'read'd' read'n' s29'n'; 'mm' s31'n'-'k'; 'n' s3 'when'n'equal ' 1 'trn's281 s34'when'n'grt 'l'trn' s28' ' s27'1l; t'n' s28'0'; w'y 0'; 'ss' '. s0'0' 'i'' 0'; 'z''* 0'; 'gg''.s19'e'n'+'y'; ty' ' s35b6fn'+'ss'; 'ss'' s37'v'n'+'z'; 'z" s38'yy'n'+'gg'; 'gg'' 0'; 'e'n' 0'; 'f'n' 0'; 'v'n" 0'; 'yy'n'' s21'itern'1'nmm'sl9'' s39'when'y'1ess'l'trn'sl3'' s10'z'; 'i' sll'or'-'z'; 'or'' 0'; 'n'' sl2'cr'0 'print 'd'0 'print'n'0 'print 'q'0 'print 'av'0 'print'i '0 'print 'or'cr ' 0'; 'i' 's42'mm'; 'n't sl3 'when'ss'less'2'trn'sl5 '' sl4'av'+'gg'; 'av'' s45'or'- 'gg'; 'or' s15 'mm'; 'n' read'q'' s47 'when'q 'equal'av'trn 's4"' s48'when'q'less 'av'trn' s4 ' s2'0'; 'i'' s49'or'+'q';'or' ' s50'n'+'t'; 'n"' E447

Industrial Data Processing INVENTORY PROGRAM (cont.) l';'e'n" q'; tv'n', s3'mm';'n'' use 's9 - s4'q'; 'i' s5'av'- *q; 'av'" s8'when'av'grt'm'trn's9 ' s24'or'+'rq'; 'or'' n'+'t'; 'n' rq; yy'n"' 2'; 'f'n' mm'; tn" s9'cr0 '0'print'n'print'd'0 'printl'a'0'print'q'O'print'av' 0 'print'i'0'print'or ' s22 'use ' sl' s23 'stop '' DATA:. INVENTORY PROBLEM data inventory problem date order no quantity available issued acc reorders 20'3t650 1222'7210t'l0 '0 O' 2'2'20' 717*30' l'l10 '400' 12 ' 12'20' 15'15'50' 27 '27'700' 35'35 '900 40 'o40 '20' 41'45 ' 50' 45'44'20' 48'45'400oo 50 4712684' 56'48'30' 60'49'22' 61' 56 ' 333' 70;65 '11' 71'75L'4000' 75 '80 '350' PRINT OUT: INVENTORY PROBLEM.0000325 data inventory problem date order no quantity available issued acc reorders 20'3'650'1222'720'0'0' 1'0'0' 1. 101.. 720. 2'2'20' 2. 2. 20. 700. 20. 7'7'30' 7. 7. 30. 670. 30. 10' 10'400' 10. 10. 400. 270. 400. 1222. 12' 12 '20' 12. 12. 20. 250. 20. 2444. 15'15' 50' 15. 15. 50. 2644. 50. 27'27'700' 27. 27. 700. 1944. 700. 35'35'900' 55. 55. 900. 1044. 900. 40'40'20' 40. 40. 20. 1024. 20. 41'43' 50' 41. 43. 50. 974. 50. E448

Example Problem No. 38 INVEZTORY PRINT OUT (cont.) 45'44'20' 45. 44. 20. 954. 20. 48'45'400' 48. 45. 400. 554. 4o0. 2. 50'47'2684' 50. 47. 2684. 554... 3906.. 56'48'30' 56. 48. 30. 1746. 30. 2684. 60t49'22' 60. 49. 22. 1724. 22. 2684. 61'56' 61.. 22. 1724. 268... 333' 61. 56. 333. 1391. 333. 70'65' 11' 70. 65. ll. 1380. ll. 71'75'4000' 71. 75. 4000. 1380.. 4000. 75'80' 75.. 4000. 1380. 4000. 350' 75. 80. 350. 1030. 350.. w S TANDARDS FLOW JIAGRAM ]c c f 1MRTL 2 19 * GLM e1...GLMR 10 NRi, GM /N / CCRUNJ...CCRUN^ I -N f^(~ SMR=G + CCERb+ LNR H~(GLRUN /NUP)*NR I=STRIPH J~CCRU1b*I K-I3UNa*J j3 R=I - H M=J - I N=K - J CR=K + SMR P=H - NR/NUP ( SRUN=K - NR/NUP TOTS=SNR + SRUN TOTS NUP,2 S 25R SRUN, GR, A, LM#a N, B, CCMRbR M, C, GL4LM4, P, D, R E449

Industrial Data Processing ACT IA PROGRAM FOR DATA FOR STANDARDS PROBLEM STANDARDS PROBLEM FOR LGP-30 COMPUTER dim' comp' 1664 ' ' dim'lmr'18' '425 10204' dim' lrun'18' 340 '10154' dim'ccmr' 9' 180 '10142' dim' ccrun'9' 90 10111 dim'glmr'18 ' 56'10050' dim' glrun '18' 80 '10142' dim' strip'9' 300 '10526' index ' a'b' c ' d ' 220'10406 ' sl1'1'; 'a'' 150 '1028d' s2'ireadtlmr'a ' 70 '10204' s3'iread'lrun' a" 100 '10142 s4'0'flo'lmr'a'; 'lmr'a'" 150'10246' s5'4'flo'lrun'a'; 'lrun'a' ' 90'10020t s6'iter'a'1' 12's2l 20 '10010' s7'1'; 'b' 00 '10000 ' *s207 iread'.strip ' d"~16~t O lOOOO 0 s8 'iread' ccmr'b'' 00'0000' s9' iread'ccrun'b" 150'10050' slO ' flo'ccmr'b; ' ccrr'b 150 ' 10070 ' sll'4flo'ccrun'b'; 'ccrun'b" 200'1 oo' sl2'iter'b'1'4's8 ' c 200'10 lOO ' S13t1';1" '''100 '10030' s4' iread'glm. c' 0 ' 10000' sl5 ' iread' glrun'c'' 0 '10000 ' s16'0'flo'glnmr'nc'; 'glmr'c'' 0 '10000' s7'4'flo' glrun'c '; glrun'c" 00 '10000 sl8' iter'c 'l'l 's4 100 '10000 s19'01'uf 'to 10020'1000 0' s20'iread'strip'd 16' 000000 '072 ' 1' '' s21 ' flo' strip'd'; 'stripd' 25'2000000'0 '1'5 ' s267'O'flo nup';'np 1'4000000 '04 'b'2'4 '1 s27'read'nr' 5'3000000'05'7'3'6'2' s29'iread'a' ' 20000000 '05'5 'l'2'1' s50'iread'b' 4'200000004'5'12 'll ' s31' iread'c'' 72' 1400000'05 '4'l'6'l' s2'iread'd'' 120'1000000'05 '3 '1'9 '1 s33'55glmr'c'/'nup; 'g' 140 '221b700 '07 '13 ''9'2' s34' lmr'a'+'ccmr'b'+'g'; 'smr 130 '402000 '012''9'2 s35' ['glrun'c/'nup']'x'nr';'h'' 10'3096000'07'4'2'4'1' s36' strip'd'x'h';i ' ' ' s37'ccrun'b'x' i'; 'j' s38'lrun'a'x' j'; 'k'' s39'i'-'h';'r'' s4oI0' j'-'i'; 'm' s41'k'-'j';'n' s42'k'+' smr'; 'gr"' s43'h'-'nrI'/'nupI';'p" s44'k'-'['nr'/'nup']';'srun'" s28'0'unflo'nup'; 'Iff'' s 58' smr' +'sun'; 'tots' s59'0'unflo'tots'; 'tots'r s45'0'unflo'smr'; 'smr' ' s46'0 ' unflo' srunx'; 'srunI'' s47'tounflo'gr';'gr'' s48'O'unflo'lmr'a'; 'aa' s49'0'unflo'ccmr'b'; 'bb'' s50'0tunflo'glmr'c';'cc'' s5l'0'unflo'n'; 'n'l' s52'0'unflo'Im';'m' ' s53'0'unflo'r; 'tr'' s54'0'unflo'p'; 'p'' s55'cr'0'iprnt'tots'0o'iprnt'iff'O'iprnt'smr' 0' iprnt srun0' ' iprnt' gr' cr'O'iprnt'a'0'iprnt'aa'0'iprnt'n' cr'0' iprnt'b'0' iprnt'bb'0'iprnt'm' cr ' 0'iprnt 'c '0' iprnt 'cc'O' iprnt 'p' cr'O' iprnt' d' 0'iprnt' r'' s56'use's25'' s57'stop''' E450

Example Problem No. 38 SOLUTION OF STANDARDS PROBLEM 16' 1000000' 07'21'3' 2169. 16. 443. 1726. 64669. 2. 340. 974. 1. 90. 126. 3. 200. 500w 1. 126. 25'2000000'081'1' 5'1' 22566. 25. 519. 22047. 822567. 1. 425. 16434. 1. 90. 1608. 5. 100. 2400. 1. 1605. 3240000tOOOOO 7'4'2'1'1 2516. 32. 115. 2401. 127516. 4. 90. 1399. 2. 20. 126. ~1. 150. 625. 1. 251. 10'o4000000'o04' 6'2 '11' 131. 10. 120. 11. 531. 6. 80. 6. 2. 20. 4. 200. 4. 1. 1. 5'3000000'05'7'3'6'2' 616. 5. 300. 316. 6616. 7, 300. 316. 3. 6. 2. 20'100000005' 51 '2'1' 162. 20. 154. 8. 662. 5. 56. 3. 1. 90. 1. 2. 150. 4. 1. 1. 4'2000000t 04'5t''2'1' 192. 4. 184. 8. 692. 5. 56. 3. 1. 90. 1. 2. 150. 4. 1. 1. 72' 1400000' 05'4'1'6'1' 183. 72. 180. 3. 377. 4. 90. 2. 1. 90. ~ 6~. ~ 1. 20'1000000' 05'3' 1' 9'1' 272. 120. 270. 2. 355. 3. 180. 1. 1. 90. 9. 1. 140'2216700'07'11'3'9'2' 325. 140. 100. 225. 16158. 11. 100. 225. 3.. 9.. 2. 130'1402000' 08'12'3' 9'2' 2803. 130. 150. 2653. 110649. 12. 150. 2653. 3. 9... 10'3096000' 07'4'2'4' 1' 7960. 10. 130. 7830. 317560. 4. 90. 3485. 2, 20. 314. 4. 200. 3406. 1. 626. E451

Industrial Data Processing VII. Comment on Effort Required by Instructor The effort required by the instructor can be split into two parts, that effort required to write the initial program which is presented in this report and the effort required to assist the students in repro_gramming the problems to provide for more realistic solutions. The following estimate of programming and running the original problems are based upon the use of the Act 1A compiling system of the LGP-30 computer. 1. For the payroll problem - 2 hours to program the problem and 4 hours to run and debug the problem. 2. For the inventory problem - 5 hours to program the problem and 8 hours to run and debug the problem. 3. The standards problem- 3 hours to program the problem and 5 hours to run and debug the problem. The amount of time required by the instructor to aid the students in reprogramming the problems is primarily a function of the facility of the students in using the Act 1A programming language. Assuming that none of the students originally know how to program in the Act 1A language, it is estimated that it will take approximately 3 lecture hours to provide the students with enough information so that they can proceed on their own. For the students who have had another compiler language such as MAD, or FORTRAN, the transition from these languages to the Act 1A compiler system should be a matter of reading the publications and a one hour question period. In order to keep to a minimum the amount of time taken in the course to teach a computer language, it is planned to divide the class into groups of two or three students, including in each group a student with previous experience in either MAD or FORTRAN., These students can then teach the others and only the less evident questions will get to the instructor. E452

Example Problem No. 39 A PROBLEM IN ORBITAL FLIGHT MECHANICS by J.G. Eisley Introduction The subject of orbital mechanics offers many opportunities for the use of high-speed electronic computers. Extraction of the roots of complicated algebraic and transcendental functions forms one class of problems which often occur in orbital mechanics for which the computer is invaluable. An example problem of this type which concerns the specific impulse required for orbital transfer is presented here. This problem is presently treated in a three credit hour, senior elective course, Aero. Eng. 146, Performance of High-Speed Vehicles, given at the University of Michigan. The mathematical background of the students in the course includes ordinary differential equations. Objectives The calculation of the roots of the equation presented here is not now required of the students because of the long and tedious nature of such hand calculations. A major objective in assigning the problem to be done by the students on a computer would be to impress upon the student the degree to which the computer can free him from boring and laborious work. The study of the various numerical analysis techniques needed for this problem and in other parts of the course would be enhanced by assignments on the computer also. Statement of the Problem Let us consider a voyage between two planets which are assumed to have circular coplanar orbits around the sun at radii R, and R. Let us further assume that during the major part of the trip neither planet exercises a force on our spaceship and that it therefore is in a true Keplerian trajectory, i. e., a conic with the sun as a focus. The planet to which we are traveling is at R2. If R <R the trip is to an inner planet, if R2 > R1 we go to an outer planet. Each trip will have a characteristic number which is the ratio R /R1 = n. In what follows n < 1; i.e., the trip is to an inner planet. A detailed analysis of the possible trajectories and the impulse required to achieve orbital transfer is given in Ref. 1. The following equation results for the specific impulse required in terms of the parameters of the trajectory: I = -e - 2 + 1-e (2) V 1 p n p n n where A I = impulse per unit mass V = local circular orbit veloc ity (inital orbit) A e = eccentricity of trajectory p =:/R1,e = latus rectum of trajectory Geometrical considerations impose the following restrictions on the possible trajectories: For l+n e (2) For p> 2n, n l+n n E453

A Problem in Orbital Flight Mechanics The problem may be stated: Given a specific impulse, what trajectories are possible? A proposed method of solution is discussed below. Method of Solution The region of interest as defined by (2) is the area above the line ABC shown in Fig. 1. Calculations will be arbitrarily be restricted to values of e, pK2. C a.0 e e= n 1.01 e=1-p B 1.0 2.0 Fig. 1 Within this region we will plot lines of constant I/VA. First define the function A!-e 1 -e 2 f (e,p) = 3- - - 2/ + -- - C (3),p = n p n n where C = I/VA For any given values of n, C, and p the above equation becomes a function of e only. The program written for the computer specifies a value for n; for each n several C's are given; for each C several values for p between 0 and 2 are selected; and for each p a real root is found for (3), if one exists. The root is found by the interval halving technique. The flow chart, MAD program and printed results are attached. The particular data introduced in the example sets n = 0. 723 which corresponds to orbital transfer from Earth to Venus. The minimum interval size is denoted by ~. Comments on Programming If it is assumed that the student knows the elements of programming and has some background in numerical analysis (and a MAD manual with Example 4 - Finding Root in Interval by Halving) the time consumed in carrying the problem through to a successful conclusion should not exceed 2 to 5 hours. Since it is not anticipated that the above conditions will be met by the students in the course for some time to come, the problem could not be assigned without teaching programming in the course itself. This would seriously interfere with the intended purpose of the course; therefore, if it is presented at all, it will be in the form of an example of what can be done with a computer. REFERENCES I. Vertregt, M.: "Interplanetary Orbits," Journal of the British Interplanetary Society, Vol. 16, No. 6, March-April, 1958. E454

Example Problem No. 39 FLOW DIAGRAM \,A, e, 6, |1/~ 7 \ < ~I^TAl, {, \ H 4 /ALPAP, e ' 4 Q 7 P. Pvir |) \ IC. ---i ---, / 6~T AWK\ v-T /H1 "x A IX /-,'RIL (C'rAIo (i, +?. + - --. - MAD PROGRAM.,! G:0 F T 'it'!-:!:' -!-01;. (//A *_f(l <1 r l -0 vF' F: ] i, T F' r'. ':.!!.::i, T H, E ': -::, -!, —;:.". I:., i-! ' '-i, -r:....!A /:. Cacn:.:, E.... ~......... -......: S.. C..E.. E455

A Problem in Orbital Flight Mechanics Mad Program (cont.) P, L;7F H!-1.: _ __ i.... TI Ht-'.ifSi-i- ij ' i:.,,jTHROUGH E -— i —f --- —-- 7 - O!.." i.i — '.:.,: i- TT:, ENHD OF F:I i -—:t, D T I,'.:!i. "-" -::!..'*:: 2. 2:.. '- i:::: 'T H R (.:!UG!h H!3 E" T P:: F 0 R E - p -.-i H. E::. G:' '" " ~7. ', F:.' E..]., E '.. E" Rl. ". ' ';.".,":-_.-:, T 0 —. Z.: —;F F..": 7-r-..1 4 If y C R yqL E::,,..... T r U 31" 1j: S. 4 - $ --- —-. I.. '-",,T N:= 0.723I ID 0 4- E T-i 1.0 T.I - i " ji! -iI TE t-.I. F!.,"i:TT!]'.!:.-...".,, —.j'', --. 1.. 0. L I. 1 7.': 0 - 0 0 0, 0 JF U 0.:: I 0 l. 0 0 0 "- I i. I5i- 0 0- _ 1 1 *1 i-.i000 i. f-iO O IDt 2 0 f ~i. i 1 0.50- 0 O 1.6000 0.0 E, ',' f ' O (30 0. 0 011O Q. u 1^n l 1 ni- n1 n..:'..00.6i''i......! 00 ' 0 00'0 -- O.'0 ' ' — -'-1' —f-i:T i~r1. i- 0000- 1.00001.'e. 0.., 1.'..!-!:. 1." o o o '. i". C:i.i! -'I 1 1 i.:00 0 1-i 3 0 0 0 r 0 0000 _:; -. 0 0 0 n1 i - l i-. 't 1:;-l1 -l. l "1 ]! 2- -"1 i " 1.0000 "2.'C'iriin -" ' U. U 0 0 0.3. o 0. 0......... 50 0 0 0 1. 2 "1:1. 5Ci!_I000 1 I."'!!_] I"' 1 f.000E 0 2!. 623.00!! '-. 4 1.5000 1.4 0 0 I 1.0 8 J ' E456~~~~~~~~~~O.3..!:.]!4'

Example Problem No. 40 ANALYSIS OF NON-SINUSOIDAL VOLTAGE WAVE- FORMS by Edward Szymanski Problem Statement Write and test a program in the MAD language which analyzes a given wave shape for its harmonic components to obtain the first n terms of its Fourier Series representation. The program should compute the magnitude of each component and then develop each component as a percentage of the fundamental frequency component. Also the percent distortion is to be calculated as a measure of the departure from a simple sine-wave form. Finally the program should compute and print a calculated wave shape from the computed harmonic components anid compare these with a selection of those given as data. Data for the particular wave form analysis desired is as follows: Parameter Suggested MAD Symbol Value 1. Range in radians RADIAN 3. 1415927 2. Range in degrees DEGREE 180. 3. Even number of equally spaced intervals NEVEN 36. 4. Symmetry code l:no symmetry INCR 2. 2:f(x) = -f(x+Tr) 5. Maximum order of harmonic component M MAX 15. (harmonic number to be computed) 6. Ordinate values of the wave form at Y. i=0, 1,..., NEVEN 0 21.8 37.4 76.4 118. 5 51.1 NEVEN + 1 points ~~~~~NEVEN + I points 5. 9 23. 6 42. 0 86.5 114.2 40.0 10.0 25.9 46.7 95.5 104.9 29.4 13,4 28.1 52.8 105.1 91.4 21.3 16.4 30.7 60.0 112.8 78.3 14.0 19.4 33.9 67.7 117.4 65. 0 7. 0 ^ kY~ ^ ~ ^ ~ ' ~ o0. 0 The program should be written to analyze any number of wave shapes described in this manner. Theory After students have encountered and solved A. C. network problems on a single-frequency, pure sinewave basis, the analysis is generalized by the introduction to non-sinusoidal or complex wave shapes similar to that of this sample problem. The students are assumed to have no previous background in the mathematics of Fourier Series. The characteristics of the Series representation, y(x) = B + B cos x+ B2cos 2x+...+ B cos Mx +... o 1 2 M + Alsin x+ A2sin 2x+...+ AMsin Mx +... (1) E457

Analysis of Non-Sinusoidal Voltage Wave-Forms or y(x) = B + Clsin(x+c1) + C2sin(2x+c2) +... + CMsin(Mx+cM) +... (2) are discussed, where C A + +B (3) and cM = arctan (BM/AM ) (4) The integral equations, 2w BM= 1/w y(x) cos(Mx)dx (5) 0 2w and AM= l/w y(x) sin(Mx)dx (6) 0 where M = 1, 2,... M For M = 0, 2w B = 1/Zw 2 y(x)dx (7) 0 for the coefficients are derived. The simplifications, which are afforded by the symmetries that may be present in the wave-form, are examined. Since the wave-form is presented in oscillographic form, without a functional representation, the integration must be performed in a numerical manner by hand, or as suggested in this sample, by application of the digital computer to determining the coefficients by the application of Simpsonts method for numerical integration. The computer also can be programmed to solve for the per cent distortion, D = [ 100C + C3 +... +C ]/C1 (8) and to synthesize a calculated wave-form. Reference Kerchner and Corcoran, Alternating Current Circuits, Wiley. Solution 1. Read in the parameters describing the particular wave form to be analyzed. 2. Set up an iteration loop controlled by the index equal to the harmonic number M. This loop will compute all harmonic components and values derived therefrom. M is initialized at 1 and increment by INCR. If no symmetry, then INCR = 1. If symmetry exists, even numbered values for M may be ignored since these harmonic components are zero. Hence for symmetry, INCR = 2. 3. Compute the Fourier coefficients AM and BM, (equations (3), (5), (6, and CM using a Simpson's rule subroutine (external function described in example problem No. 35). E458

Example Problem No. 40 Mmax 4. Update E C. (Sum is previously initialized to zero.) M= (CM/C1) (100). 6. Print M, BM, AM, CM and per cent of fundamental. 7. After steps 3 through 6 have been repeated until M> Mmax compute and print per cent distortion D according to equation (8). 8. If the range is 360~ (no symmetry) the B term of equation (1) may not be zero, so we calculate B using equation (7)., Otherwise we set B equal to zero. 9. Compute angles and the approximate values, Y corresponding to values of n, (n = 0, 1, 2,..., NEVEN) n evaluating the sum as shown in equation (1). 10. Print the values, n, angle, Y (data) and approx Y. Flow Diagram 00_____ (READ RANGE, —p ---- PRINT THROUGH ALPH COMPUTE B(M), ( PCTRDEGREE, NEINCR p TOTSQ = 0- TITLE FOR M=1, INCR A(M) C(M)2a START MMAX v(O) (N TOTSQDMAGHAR, (O N.G. M FD, PCTH RE459 v —^ PCTHARD_ /"~.J GAMMA J COMPUTE ANGTP.\YLN) M ^ F'OR M=I, INCR, APROXY — 0 BETA

Analysis of Non-Sinusoidal Voltage Wave-Forms MAD Program* EIO EDWARD SZYMANSKI TU-9PN 001 0)02 't1I 2 *COMPILE,ADr) EXECUTF P R DETERMINATION OF THE PERCENT DISTORTION IN A NON-SINUSOIDAL R VOLTAGE WAVE-FORM DIVIDED INTO AN EVFN NUMBERRN, OF EQUAL R INTERVALS R _ DIMENSION Y(360 ),3(17),A(17) 01 START READ FORMAT CARDRADIAN,DEGREE qNEVEN, INCR, ^AX,Y ( )...(,NEVEN 02 1.) 03 VECTOR VALUES CARD=$F1O.7,415,4F1.n 2,/(7Fln.2 )*)$ 3A INTEGER NIEVEN,INCR,,M'AXDEGREFM,N,! 04 TOTSOD=-0. 05 PRINT FORMAT TITLE -5A VECTOR VALUES TITLE=$47H1THlE HARNMONIC COMPONENTS OF THE GIVEN 5B 1 WAVE-FORM1 // 45H M4 B (M) A(M).'AGNTITUDE PERC EN 5C 1T //*-$ 5D H1= ( RADIAN/NEVEN)-0.0 ^001 5E THROU!GH ALPHA,FOR M=1, I NCR, ^,.G.MA X t'.!,. X 06 B (M) 2./RADIAN-*-STDPS ( I RA IAN 9NrVEN BPROD ) 07 A( M) =2./RADIAN*SIMPS.(0.,RRDI ANNVNADRD ) N08 CSOD=B ( ) *3 (') +A (.1M) *'-A (!..) 09 TOTSOD=TOTSOD+CSOD 10 MAGHAR=SORT.(CSOD) 11 - FUND=SQRT. (B(1)*-B( 1)+A(1)-*-A( 1) )1Z PCTHAR= ( AGHAR/ FUND) -'1. 13,LPHA PRINT FORMAT OUTPUT M,, ( M),A(M ),M.AAGHAR PCTHAR 14 INTERNAL FUNCTION BPROD. ( X ) =Y ( X/H) *COS.(M*X) 15 INTERNAL FUNCTION APROD. ( X ) =Y(X/H — S I N. (.M"X ) 16 PRINT FORMAT DISTOR, (SORT.(TOTSOD-FUND.P.2.)/FUND)*100. 17: 5(0)=(.. 18 6%. WHE NEVER ) EGREE F. 360 19 B(D )=SIMsD,. (., 9RADIAN!,NEVEN NPDROD. )/6.2831853 20 PCTHAR=(( ) /FUND) 1100. 21 PRINT FO)RMAT DC,('.) PCTHAR 22 END OF CONDITIOi NAL 23. DRINT FORMAT TOP 2~3' VECTOR VAL!JES TOP=544HOCOMPARISON OF EXACT AND APPROXIMATE VA 23C 1LUES. //3i)H N ANGLE EXACT Y APPROXY *$ 23D THROUGH RTA FOR N= 2,N.G. NEVEN APROXY=B( ( 2 A ANGL F=N,-RADIAN/NEV EN 26 THROUGH GA,1MA,FOR ^=1 INCR,'.G.YMAX 27 GAMPYA APPROXY=APPROXY+R ( M ),-COS. (,-ANGLE ) +A ( ') C-.I ( N-.!.NLs ) 28 9ETA PRINT FORMAT VALUES,NANGGLE -57. 2958, Y( N)APROXY 29 VECTOR VALUES OUJTPUT= I5, 4F1.. 5*- 30 VECTOR VALUES DISTOR=$26HOTHF PERCENT DISTORTION IS F6.2-T. 33 VECTOR VALJUES DC=$23HOTHE D.C. COMPONENT IS F6.3,9H WHICH IS 34 1F6.3,28H PERCENT OF THE FUNDAMENTAL. *- 35 VECTOR VALUE7S VALIUIFS=$I 4,F6 1,2F1n 4*$ 37 TRANSFER TO START 38 END OF PROGRAM39 -ODATA 3.1415927 180 36 2 1.5 5.9 10.0 13.4 16.4 19.4 21.8 23.6 25.9 28.1 30.7 33.9 37.4 42.0 46.7 52.8 60.0 67.7 76.4 86. 95.5 105.1 112.8 117.4 118.5 114.2 104.9 91.4 78.3. 65.0 51.1 40.0 29.4 21.3 14. 0 7-. 1 0. 0 - ~ External function SIMPS. not shown here. See Program for problem 35, E460

Example Problem No. 40 RESULTS THE HORMFNiC COMPON-h ENTf S OF THE SIVEN Uin^E-FO El F.Y C:.:'h:: M.' - -. M.; i.- -- T T F E R"- 0 E T "- - _. 63 _59 S - 5. 347. _,i _ i6, -r i02 7.. 575i _ 7 -1.;262 S3 ~.9::. -'" i S 61 iS i -* ' ---' ~: ' * S;' S *.5;: 1 -. 096 7 0. 27 2. 0 2 7: 2 3..,3711 15.- 7320.24520. 30 20. 3- 51-, 2 THE P'ERCET DISTORTIONl I.S 3.-';I. 7 -i'R.:I'S —;r OF E-T - MD RP T i Ci T. - I 0.- i 0.7 iZ j 0 * i -.0. ]. i..... 4 '.-.".0!,.4000 16.-.3i:.i Z 7 4*- - -7 - 30.'0 '-.SO'?. O i i3 2 i. -, i. i9 4 S 40.0C-" 25:]. 900 2...5.6~, 761:.-: i_ _i._ i.:_i 30. 7.-:i i.: i 2 5:: *52 6T_. 37. 4 i0-i 0 i i 37.: 4.. - -; —'. i i ' - * - i ~, I. 0 * i-i i;._ i i " '_i24 1! 2:.0. ' I:-:. 5000!:_. 11 8:.5":':-:4 52 26 130.0!1-.9000 104.4763 ' -_ i. i. _: i ~ i -; i -;_i. '- i? '? i, 5 _ ' '2 1 ' i. i 2.._. 400 i? 2 i 'i. -5'-7',*' 4 i' '...i i t7. ii 000 i0 4.0_6.57 f:-' Ti -i i *._.' i-i ii i; i ' i. -- - E46 1

Example Problem No. 41 CALCULATION OF VAPOR AND LIQUID FUGACITY FOR FLUIDS OBEYING THE MARTIN-HOU EQUATION OF STATE by Paul T. Shannon Utilizing the Martin-Hou equation of state T T -k T -k A+BT A + BT + Cek T Ae (v-b)RT 2 2 2 3 3 4 (v-b) + (v-b) (v-b) (v-b) -k T A + B5T + Ce c + " (v-b) where b, k, A2, B2, C2, A3, B3, C3, A4, A5, B5, and C5 are experimentally determined constants for a given fluid, write a digital computer program for calculating the pressure, vapor fugacity and fugacity coefficient, and liquid fugacity for a given temperature over a suitable range of vapor volumes. In writing the program, assume you know the constants bf the equation of state, the volume of the saturated vapor, volume of the saturated liquid, and vapor pressure of the fluid for a given temperature. Solution In general fugacity is determined from its definition, RTd In f = VdP Since this is in the form of a derivative, it must be integrated; but in anticipation of a limit difficulty, RT d In P is first subtracted from both sides. Thus, RT d In f - RT d In P = V dP - RT d In P or RT dln - = V dP- RT d In P Integrating from 0 pressure to any given condition, P, P P 1 P RT In f- = VdP - RT InP T 0 0 At 0 pressure f/P = 1, so that RT In- VdP- RT IlnP P1 I0 An equation of state explicit in volume could be inserted directly in the V of the V dP term, but the MartinHou equation is explicit in pressure so that it is necessary to replace dP with an expression involving dV. E462

This may be done by differentiating the Martin- Hou equation to get [ RT 2 3 04 1 dP = - 3 4 5 61 dV [ (v-b)2 (V-b)3 (V-b)4 (V-b)5 (V-b)6 -kT/T kT/ T where the f2' 3 etc. are the temperature functions, A2 + B T + C2e / c, A + B T + C e / c, respectively. Since the change of independent variable requires changing the limits from pressures to corresponding volumes, the expression for fugacity becomes RT In 1= V - - RT [ - + - 3 03 40 + 1 dV O i((V-b ) (V-b) V-b) (V-b) (V-b) - RT In P Performing the indicated integration, T In -= PT[In (V-b) - ]b-2^2 -g 2 2(V-b) 2 R T 3 1 I R T 1 V + 0 2 b + b42 31 b )bl i 1 3223 4434505 4 ( ' 2(Vb)2 3(V-b) 4L 3(V-b) 4(V-b)4J 4(V-b)4 5(V -b)5 P - RT In P 0 To eliminate the difficulty with ln(V-b) at oo volume and In P at 0 pressure, RT In V is added to the first term and subtracted from the last term. This with the combination of terms involving the same powers of V-b gives f?.O? + RT 20?b 3+ 03 332b b + 344 RT In- = RT ln V + 2, - b + 2..b+- + - 2(V-b) 3(V-b) 4'4+ 505 05b V1 P, 4(V-b) (V-b) 4 o, o At V = oo the in V vanishes, also the product, PV, becomes RT, so that E463

Vapor and Liquid Fugacity for Fluids with the Martin-Hou Equation of State fl V1 202 + RTb 22b + 33 34 3b + 404 RT n p= RT n l-b V -b 3(Vi-b)3 404 + 505 5b PIV 4(V1-b) (Vl-b)5 Calling the right-hand side of this lengthy expression A, the fugacity coefficient is fl p = exp RT and the fugacity is fl = P1 exp RT In the following program 9 is designated as INTER. Also the constants in the equation of state are given as subscripted A's where Al =b A =R A3 = A (of the equation of state) A = B2 A = C2 A =k 7 c A8 = A3 (of the equation of state) A9 = B3 A =C3 10= C3 All = A4 (of the equation of state) A1 = A5 " 13 5 A14 = C5 Unfortunately, in the following program the term RT In P V1/RT was dropped from S, so the answers for the vapor fugacity coefficients are off by a factor of RT/P1V1. With this modification the program would be all right. The numbers used in the calculations are based on preliminary data for the refrigerants, "Freon-22", and "Freon-14", supplied by the Du Pont Company. The liquid fugacities for pressures less than the saturation pressure are simply hypothetical. In all cases the liquid fugacities obtained from the fugacity of the saturated vapor by integrating VdP from the vapor E464

Example Problem No. 41 pressure to any given pressure, while assuming V (of the liquid) remains constant. Because of the missing P1V1/RT term, these answers also must be corrected. The accompanying flow diagram and computer problems are written in as general a form as possible so that if necessary they could be used by the student to do the actual calculations for a wide variety of fluids and range of variables so as to develop an appreciation of method and accuracy of this type of equation of state. The Flow Diagram Source Program Listing, and a worked example problem with its printout of results are attached. Both programs listed have the same Flow Diagram; they differ only in the input data required. FLOW DIAGRAM FOR MARTIN-HOU EQUATION OF STATE v,( F^OR Z%0?,/, V:V^G~fAl -^QOMPLTE o/4PVTF,EF-e' f -= -- \ I>,F / F_ II PC I IN /TERAtPY '^..... _ E465

Vapor and Liquid Fugacity for Fluids with the Martin-Hou Equations of State MAD PROGRAM FOR CALCULATING FUGACITY FOR "FREON-22" PTS PAUL T. SHANNON! T — 9MN - N 003 0 (U 100 1- FREON 22 ',-COMPILE MAD,EXECUTE F PUNCH OBJECT R FUGACITY OF VAPOR AND LIQUID FRFONS 2 R 3. R M = NUMBER OF TEM, PERATURES BEING RUN 4 R IDENT = FREON COMPOUND DESIGNATION 5 R N = NUMBER OF VOLUME DATA POINTS PER TEMPERATURE 6 R N= 088 OR LESS 7 R PV = VAPOR PRESSURE 8 R VLS = VOLUME OF SATURATED LIQUID 9 P VRI) = V VOLUMIE OF -SATURATED VAPOR 10 R 11 R VOLUME VECTOR SPECIFIED IN PROGRA. N = 088 OR LESS 12 P 13 R__________ P_____~~~~~~~~ ~14 R FIRST VALUES OF FUGACITY AND COFF. - GAS SE.COND VALUES - 15 R LIQUID 16 R 18 GFPT,-TNT E.G --—, —TJ-...., N, I D-EN 19 DIMENSION A(15),VG(1'0:),P(l")OC,COEF(1DI),'FGV(1'OI),LCOEF(100), 20 _- ----- 2 F G L ( Tr 0 CO -v TT -) 21I VECTOR VALUES VG(1).1,._.15,0.2;.25,0.2 30,0.35,0.40,0.45, 22 2 0: 5 U. " 65,', 1.7 ' ) 1 ':;7, 0 ),,C 0' U, C o 9., 1 J.5r (:) i 3,1.20,1.3',1.4'.,l.50,1.60, 1 70,1.80,1.90,2. 20,2,20,2.40,2.60, 24 5.....0..._..'..i ii i.. 'F " — 8 f'-:.4 ', 3 ~ 6, '., 4. 4 2,4. 4,' 8, 51 0 0, Z5 55.50,6.0C,6.~ 5(0,7."'(, 7. 50,8o.00,8.50,9.00{,9.~50,10y. "', 12 ~ 0,14.0, 26........61....... - -16.0,18 1 -'I-'-,?77,C,.",28.n0 '0.0,35.0,4+C.,45.0n50.0, 27 755. 0,6 0.,6 5.,71 *,75.,8. *',85. n,9 0.0,9 5 1.,110. 10, 28 81]. 2 '- YC.~,130.~,l+4.-.,150.,1.,l /.0;, 10.; (r.)1 '1,2. Z9 START READ FORMAT SE TFI. P, 1,_ ID FNT, A(1)...A(14 3 0 VECTOR VALUES SFTIJP=$21I./(SFi'.7) " 31 PRINT FORP.MAT SFTT,:! ID)NT, A(1)...A. (14) 32 -VECTOR VA L,UE S...TT- 1 Hi,2/1 /IP.5 E 2.7) T 33 THROUGH ALPHA, 'OR J=, 1, J.G.4I 34 REIAD FORMAT ADATA, N, T, PV, VLS, VG(O0) 35 VECTOR VALU,F5 DATA=!I,3,4iF. 1*36............PRINT'T-'RA 'ATA-, N, T, PV, VLS, VGI(0) 37 VECTOR V ALUEF' iPAT.A! =.[h4~,IS,4F15.5'_-_ $ ________ 38 PRITNT.F A)iR~T TI-T' L, IDFMT 39NT VECTOR VALi.ES T I TLE=i 1 1/'2 5 1 7HFijGACITY OF FRF)N//.S23,24H I DE 40 2NTI FICAT ION NM.U:' I3 / / I 1 1 1 HTFV PERPATURTE,SO, 6HVOLIJMs ISE S, '- 1 38HPR FSSI)RE, S7, 8 HF..IACIT'Y7 ] —c- F F I C I ENT, 5 7,8H FG.. ACITY S,7, 42 4 74HLCO'?:F-F-, 57, 7C'PCO EFF'. 43 f = EXP., (-A(6) -T/A.(7)) -44........ T..............T-,- - ---..- ',' ' =J. AI G N 45 ___+V 4 VG(I ) *- /,.() A I246 2 —E)/(V.P. 3)+A 11 )/(V.P.4)+( )(.l 2)+/ (! ):T+,A 1(4) xF)/(V.P.5) 48 I.I TR= A (2).". T I 0G. ( A — '-_ (-4) / / V ) 2 - E ) ~ 4 V T + ( ( * F + A ( 2 ) - 49,.? T -,"' A ( 1 ) ) / V + ( ' ~" ( "'( o) + A T 1,o ),, " ) - 2 + -'- A ( i. ) - 3' (, (: ) + A ( 4 ) -T T + A (5 5 5n 3FF)"" ') / ( 2. -V-. A\ I + 14 9)-T A(0. (1 )+.'I,+ I)1 T 4\( 1 ) ' 1)) / 13 3.. V A A,51 4V* V) + (5. — (A(12) +A ( 1. )- +A ( )P-F )+4 *.,(11) ' (1() )/(4. -V. P.4) 52 5 + A ( 1) (A( 2 ) +A ( )''T+A( 14 ) E) ) / (V. 5) COEF(I) = EXP. (INTER/(A(2)-TI) 54 FGV(I ) = P ( ) —COFF (I ) 55 *5L..(I) = FGV( I )-x-=XP. ( (VLS-"-(P(I)) PV) ) / (A(2) 'T ) 256 LCOFF (I = FG ( I )/FGV( ) 57 -FTA PCOEF () = FL( I)/() __ _______ __I 58 T.L.I H: -A PH- -'? OR, I I ). -, A1, I.G.* * ~, 59 ALPHA. PRINT FO RVAT '\AN WE R T,VG( I ), PI )), EV I C.( I ) FF FGL( LI )F _____ 60......... 2 LC-o-'EF —T-'...."C;. --- —-."E ---'-')......... --- —.. ---.. --- -.... -.. 61.._"-_VECTOR VA'L' S ANS'.:R =S2,F1 ";.4,S% ~F1C.4,,5,F1:.4,S5,.10.4, 6-'62 258 F104, S5, F] 0,4, S ].')~ 4, S4, F1".4'$63 TRAN S FE'P TO START 64_____ ___ _______ _____ _ 64 ENID OF PROIRAM 65 E466

Example Problem No. 41 ~.,'.::' -, — (' ';** *. i*r-::" '.'.:": L'.!" "-.0; I'.... i;", '..;: C- '-'. 0", G: "! J'"': -;'7'I r'-'.... *.J c:: ":::": ': '* i:-:... '-:';":i r- ' *.=.' 0", ":: ' 10'*') *'*s:..:::i r;. ""'.. '...; *.';: "*::' "X: r",, I..-:: '. '..;: '._) ' '-d..:.:- '".......i..: '" "...- r.'. "",:".., ' 1"' " ' - - '.". r -...' 1... C,, F b~-\ C: ":.* f -- *:*) '., c: i:7:* **;*../:5" *' ': r O::'..:-..- i.'....0: 0,rXI'f.... C) C. 4~~~~~~~~~I.tl ' 5 1:i'".:..:. - - 0,...C.' -. ~ill' t'l1"'.'1. I ':' I t'''"1!'''!!:'""1!=s- - '' 't t'-O-' I '''1 C —''! ' —; '':''' Z i............................. i-I i::":::!' E ' i i:l"~.! co ':'::: *-::*:;c;*!:::::::::" r ""r- c:' ':::!!2:::'?:::.::?;. *J tr-;: —!!n r: i;;.........:l, r,,- [* (,,: 0;:;: i:.,!! b:,:,!.,. r...",":,::;, ',,; |i:,,::,::i::,,,f:,.,::i i,.,..-..:::j *:,: c.:: '..;i "':: C, r.:' o~ '.:'j-.. 0",* f'-!;")ii: r':,. ("..i ','* o:.O, 01 r::' r-.- I'.!:: if..!:i "*:i (!. ui_: ' -.....r- I *..... '..:.: '..'. b": k!',!":, k!': i1 "., Li', 1.! '.::'- *::;*....::* '-::i....::' '.::- '.::' '.::;- '.::i Qj'i'.= fO! 'COi f'O ':"' il '' i: -" f':;O f' I O -.:. f'10 i fO f'. fO"C. O I.I. NNC~j N4 M tU O r- co a,0 N 4 n N Nr 1 OOOO O O r-'0 00 m NNNN N N C\i C\j N N N N N IN N Nj N N N N NN(\j(\j N N N N N c\j N o4-i r —4 io, ~! '.... '~ ~~~~~~~~~~~~~~~*-: **:.: r.,' ~** C:) O,* 1:):' **::0.*:' ("4* '.::- '*',7- ["* '..O '..!, r'O t"J::X) 0;,, r-"~*:~ lif C..-::z:: '*::* 13 '"- *r-.=.- c '.. y: '-:?., '.::!- r** *T i:i;",> * '.=...E I ' r —,].:: - 1': 1 ~.r — o. 0...'.!* I,.' *-.-. r — *::; ' r-v::"4 r'- c:r:' I'" - o P:i.....:i'! ':| '..r 'c:.: [.:2i r" 0o c;: _.:-a r" a "*::'If: Lfi '.20 '.:." r — r - r"- ' -- " co 01 c c " ci: 1c o. n co 0 N ** C:!:: C:7c C 0: C:':: C::' * c:3 C:::iCi0 C: 0 C iCiC 00,0 + 070? 0~ ^ 40 Ci. V 07 N Ln ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~~~~~~~~~~~~~~~~~~~~~::.:7 h '-I;::) i::i r.:o ('- ' **!!.i r.,'.:. c:., I".!*- I"r-d- i* "., i' — I.i* '.::i- r'i t 1 — r,, c:3 '* 0 ON i:;,i- C*. c' i o' r" —.,- r"-. - - o.. i r-o 1:,' -- '.:' ~l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~t~~~~~~~~~~ l: - 1fL~ cn ^ Lrl ^:;=::.V... "'' 0 4 Jl 0 I J *^ ^ ^^ 0 ^ i'!~ *" r0 '!'"!o ^ ir- *:**-i! '::!-.; *l - - I l -::::: co ]: j: c ';:,::i c::. l:). J]-,. 0:1J r- - r......,:,,.i ** l: LJn 'n 'n i * J**":- jl:. C'1o L(,I. I'D N H- LnM - l m/ I lr 0D0VN07-(n N 0 71 (D r- 0 aOO.narN Ha rN a D - i - i r r D \ G \.. C,' o C _i.: r - r - 1+ IONIn. 0 / N r-/ ON N..' -,::.: ij..,:: 4.: t r' r a: * O *.:.. ' -,"! O, ' f! + 1~~~~~0 (r —m-r -c o onc \0 co i '.,,..... _9 If IF' J~, 0700 r-~~~~~~~~~~~~~~~~~~~/~: o r1 * i....... *'* Co 0o 7o N0 ON NNN 444 0 CCV) co 0r c ) l- - L.t C N M.....:" rN ft or-^o ( 0cn - t - tm -i r-)ocor, -J0\ aN no m n - * + C~ ) (C)o t-i-t- \-r-0";- \! N 0 0. 1+ I 00 0 0 00 0 0 0 0..........J [*......: l ': [.... [i' I[I:'1] ]:l J::ll:....:l:I ~:] r ~ i: 1 ]....:[....~::.... 0 0 0 C C)* * * * * * * * O.. L.O O.i: i" i:: CD: C): i: C: CI C:i I: L: i L:i I O::I C':: U' CI C:: I D ':: C: C: ^ 0 r~~..... ^j *.:j T-..,-.!"...j.::*..] i-:i r-o *.rr- **:*; in in *,:**! *.'** r" — r- ro c,-i....c.............;....:.............. C\ 0 r4 i::i u~..,. n,,,... '.. 01o 0r/ 1o ~~ 0 V ~1or ~ ~rlO,,. IO ( Y~-.,~ It It ItIt o t Lm) It M <t 0noo 'oo rl- nri- D Na 0.** * *m<r <tc lco tr v o r <ir -o (\J \ O*0 NV. noo '- 0 e7.N.-4 I I+ -+ 1 IO i- r -1 ~It1MP_\ic \C)(JS - H 10,-.! 0t1 of;n o'n C(,- r N -OV N Noco -4 Lr N Nf 40cr II ++-f 4a- NN N 4 M 0 0 C)0 0 It **** ***** * ** ***::Di,:: \oD ';.: i::i C:; C::i C:: C::i C::: C::i C;:. C.,::i,:5 0:::,,:5::.:,:,:: C!/ ~~~ ~~~ ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~........ r- o r^-0 4ic~ co 'j-Ln ~ r'7 co a~ o^ O r-0r~ cn h m o cio <* "... "~ < a i.. I.... "a. I..... a <r~0~0 00 0 000.0 0.= No l ~ o ~/ /o~ Q i1v ~ ~r- r'- '11 1-r^-r^ r- ^ r- -,~1~ ^r- 'o-'-i <0.. *000000 00 00 0 00, 0 1- ' 'n1 — m iV V- V)1~ V" V V'! * ol 0 l I 00000 C~~~l~ C~~~~l 46

Vapor -and Li uid ~F ait -for Fluids with th Martin-Iiou Fq ations of State % J~~~~~~~~~~~~~~~~~~~~I 4 ii r h i~~~~~~~~~~~~~~~~~~~~~~~~~l''. L i i i~~~~~~~~~~I: iT I:: -71 I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1 4i.i cl, I ~ j..,.~ — i-'~.F-F- 7 I J.J * ic i cc:. r;....-~~~i', i r- i c. -. i::::: Li:4eIC.4 I':-4 C f.~~~~ r". C (.Ij i.Y I ~ ~ ~ ~ ~ ~ ~ ~ ~ i...4~~~~~~~ ii ':4 c ':4..~~~~~.-... ~~i' i 7 c; 7 ii.. H m i cc I ic ic r- r: r'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ r r ~ iii~~~~~~* '... 2 ci ~~~~~~~~~~~~~c i 7 r.: 2: ci I:. i. i. rH - -.r-.f,.-r- -,.,.- r ci.&' -~~~~~~~~~~~~ r- rc' c.4r~~~~~~~~~~~~~~-.- -" I i.7:i:.., I '2 - '2 ic F-I c 'c - 2II'2 c 0. ri...... i:..~~~~~~~~~~~~C 2.. '" - rI.2:;. r: L:" c.I Li.' - - F - - 2". ~ I c ':' I":I:r iI'I.I. c Jc c T. r.;-I P1, I CAI C", 1,,:, i'T I":IC I~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~a.4~~~~~~~~~~~~~~~~~~~~~~~~~~~4........ I-J L; F- PQ -.4 Pf) 4 L:- D" ~ ~~~~~~~~~~~~~~ 24.. 7 v'.; c '. -.::i- I'T p, i'T,~ ~ ~ ~ ~ ~ ~ ~~~~lii I i ii -Ji 4 JI:,:I I.:' I.;"I I I'M!!I 1". I-, I-, IA f7%.~~~~~~~~~L '' I i' '.i i i.. i......i i i ~~~~~~~4 ~~~ ~E6

Example Problem No. 41 MAD PROGRAM FOR CALCULATING FUGACITIES OF "FREON-14" PTS PAUL T. SHANNON T09MN 7 003 0i5 100 FREONS '*COP'PILE MAD,EXFCUTIPUJNCH OBJECT R 1 R FUGACITY OF VAPOR AND LIQUID FRFONS 2 R 3 R M= NUMBER OF SETS OF DATA 4 R N = NIJMBER Oh DATA POINTS PER SET OF DATA 5 R IDENT = FREON COMPOUND DESIGNATION 6 R FIRST VALUES OF FUGACITY AND COFF. - GAS SECOND VALUES - 7 R LIQUID 8 R V(O) = VOL!.UM OF SATURATED VAPOR 9 R 10 INTEILNl 1, J, M, N, IDL J.I-1 1T DIMENSION A(15),V(100),P( 1'00),COEF( 100),FGV( 10),LCOEF(100), 12 2 FGL(100) 13 START READ FORMAT SETUP,, IDENT, A(1)...A(14) 14 VECTOR VALUES SETUP=$213/(5E13.7)*$ 15 PRINT FORMAT SET, M, IDENT, A(1)...A(14) 16 VECTOR VALUEb.S SET=1H1,23/(E13.7)* AT6 THROUGH ALPHA, FOR J=1, 1, J.G.M 17 READ FORMAT DATA, N, T, PV, VLS V(I(n)...V(N) 18 PRINT FORMAT DATA,N, T, PV, VLS, V(0)...V(N) 19 VECTOR VALUES DATA=$I3,3F10).5/(8F1O0.4)*-$ 20 PRINT FORr1AT TITLE, IDENT 21 VECTOR VALUES I IT'L_=$I1H1/S25,17HFI.IGACITY OF PFRON//S23,24H1 DE.22 2NTIFICATION NUMBER = I3///S10, 11HTEMPERATURES96,6HVOLUME,9998 23 3HPRESSURE,S8,8HFUGACITY,57,111HCOEFFICIENT,.g8,8HFUGACITY,S7, 24 4 11HCOEFFICIENT'-$ 25 E = EXP.(-A(6)*-T/A(7)) 26 THROUGH BETA, FOR I - 0, 1, I.G.N 27 V = V(I) - A41) 28 P(I)=A(2)*T/V+(A(3)+A(4)'T+A(5))*E)/(V.P.2)+(A(8)+A(9),'-T+A(10) 29 2TE) / (V.P.3)+A(11)/(V.P.4)+(A(12)+A(13)*T+A(14) *E) /(V.P.5) 30 INTER=A(2) *TELOG. ((V+A(1) )/V) +(2. *(A(3) +A(4)-,,T+A(5)*F)+A(2)* 31 2T)(-A(1) )/V+(3.*( A (8)+A(9)*-T+A(.0 )*F)+2.-A( 1 ) (A( 3 ) +A(4 )-T+A(5) 32 3*F))/(2.*V*V)+(4.*A(11)+3.'-(A(8)+A(9)*T+A(10)*E)*A(1) )/(3.*V* 33 4V'V)+(5.-'-(A(12)+A( 13)*T+A(14)*-E)+4.*A( 11 ) '-A ( 1) ) / (4.'-V. P.4). 34 5+(.A(1) )(A(12)+A(13)*T+A(14)*E))/(V.P.5) 35 COEF(I) = EXP.(INTER/(A(2)-,'-T)) 36 FGV(I) = P(I)*COEF(I) 37 FGL(I) = FGV( ) EXP. ( (VLS*( P( I )-P\/) ) / (A (2) T ) ) 38 B)ETA LCOFF(I) = FGL ( I )/FGL ( ) 39 THROUGH ALPHA, FOR I = 0, 1, I.G.N 40 ALPHA PRINT FORMAT ANSWFR, T, V(I), P(I), FGV(I), COEF(I), FGL(I), 41 2 LCOFF( I) 42 VECTOR VALUJES ANSW!ER=$S,11ll, F1O.2,S5, F10.4, S5 FCl.4,5F,, F1O4, 43. 4. 2.5,F] O.4,S5,F1.4,55,F.O.4*$ 44 TRANSFER TO START.45 END OF PROGRAM 46 *DATA 001014 5.7104970-03+1.2193501-01-3.1 553788+00+3.24 PO8704-03-2.1911976+00 A14 5.0000000+00U+4.0(95)000'()+02+5.6830627-02-5.6586787-05+5.2630252-02 B14 -3. 157573.8-04-1.52 108 36-06+6. 6533754-u9)-3. 5786565-06 C14 018 409.39 543.00 0.0256C Dl 0.02560 0.30351 0.25629 0.19830 0.08222 (0.U6171 0.(05038 0.04059 0.03061 O.02560 (.02168 0.0201 2 0() 1. 7 865 0.1t)6 690 0.015 31.5 0.014628 0.014205 0.01].3550 0.0127L16 E469

Vapor and Liquid Fugacity for Fluids with the Martiq-Hou Equation of State LJ-.I, - ( "4 O:or- r —,,".. (. O O" 0.. 0", 0 ';" ~"'iC..:c. I! if"" I' I - - r"i o.- I. - " " o T.o o I...' r.;.... ' -. c. r-. -. I C.. c C':.. I -:..: i;**" (*~i '*r-!".j **~~,-', rl'-i 7','i r-T, CY- U~-j c 17)r - T - 1 P r C," **;j ':0 ro: r, L. r — (~.I':,.",'-" L%',..:.-" r.-.."?'.I,I V::r-'**!."7* i 'M -* *'i -".m r -X co r-cY.,: o. *^'o)* '-' ".4 i~~~~~ LL z -::-,,:"1 - i,4 *r- co r"- r — in:***+ r^ c —,' i::: L.- ^-,- -- -- -r~- - *,*-7 -.n ^ 1..1.~~ ~ ~~ ~ ~ ~ ~ ~ ~ ~ ~~~~~~~ ~~~~~~~~~~.,,..... ~........ r ~( fl ~~~~ ~~~~ ~~~ID "!C D 7*" 1. ' ~ ' t ~. '. ' ' ~1!~ - **: 0 C l i i'~ n ~ h i~~~~~~~~~~~~~~i U i! —1 O"*................................ i ~..:( CO ~*::: *... -! \-...-.i("4:. CJ! -,.- C '.C-. 0}::.i")C '.. t-:,:':1*:j H! i'"l **;**> *<- if"' ~~.,",:"., *>" -" '.:?i ''*i, i"r:,,::,::, '*' —:*:*' ~.;-** *o ", "". " ~-5; | |.~~~~ ~ ~ ~~~~i.':.E L:-. i.'. '-.':-.4 TI' ' <-::' iF *")::(':,- * *.O~. L["3 -y~~~~~~~~~~~~~~~~~~~~~: i:; i I ^ ' 1 I *;!~~~~~~' ~~~~~~~~~~,:::,: *'.,':, -:'.', CC.:;..-:'*:: **i;* C:i.. —,-,.,.::.....::':'!' O i............:'., I '"- C [l!..'";i~*! C - * *** n C i**r ~' -!"**q ''-.'.. -** C )! i"~;'f.::'".i....i '"", *;:":i,.:- i""!;,,,:::: r.':,,:..-..-',,:::::,:',,:::::,,::::', ~" 'l ':'::! C 'C 'C' ':'" *':""'...... ':!:'I ~:: ':"-.,.!.....J'i L? '^: ^ I i 1! j~~~~~ i [;", ~ ~ i'' '!; i ~ '.. 1....,.i...... j.,': -T,.,':,* r:,', i:;";:, i:;' r, ', r.,:,. r,'-,,:*, r,:', i:.;, r —,", r-,':;.,':, r,':T, r -,', r,:, r-:*; '.,':,** rI'"-', C ',::i ', Lo (~\c',c' c:';o'c:)o ': c Ciojc.c: c;";E-; **::***t C:):.-..... —.i C),:**t::.^-:, 0*4 **.- -J.*t C:)* C1-*i C:,J '. —.. C):t.=*<'i C34 *<3.) *:::.' ~:.:. '...:""U:1:fl".:' '.. i " "..1 '.' "; '..1 '.t'..J.:.".t!.' "':I d 1.=" i!:I: I UJ i!!!, i 1~~~~~~~~~i """!I L~~~E7

AN INTRODUCTION TO THE THEORY AND APPLICATION OF ANALOG COMPUTERS (Electronic Differential Analyzers) FOREWORD The electronic differential analyzer has been used as a demonstration aid and laboratory tool for courses in Aeronautical Engineering and Instrumentation Engineering at The University of Michigan since 1948. One of these courses, Applications of the Electronic Differential Analyzer I, is a senior-elective, first-year graduate course which carries 3 hours of credit (2 hours of lecture, 2 hours of laboratory contact). It teaches the principles of operation of this type of computer and draws from many areas of engineering for illustrative problems. The presentation of the course material is left largely up to the individual instructor. However, the notes which follow are quite typical of the approach used, although they represent the personal effort of the author. They start with a basic introduction to the principles of operation of the electronic differential analyzer as applied to the solution of linear differential equations. A simple mass-spring-damper system followed by a two-degree-of-freedom system is used for illustration. Then some basic considerations in the scaling of problems for the computer are treated. Discussion of the application to partial differential equations follows, after which a nonlinear equation is set up and solved. This material, some of which is treated in more detail in the actual course, represents about 12 one-hour lecture periods. The remaining 16 lecture periods (there are 28 hours of lecture altogether) are devoted to many additional illustrative problems (radioactive decay series, beam vibration, linear and nonlinear control systems, etc.) as well as more extensive discussion of multipliers and function generators as applied to nonlinear problems. In general an attempt is made not only to teach the computer application but also to teach something about the problems being solved through the use of the analog computer. The notes which follow also formed a basis for the presentation of approximately 10 hours of lecture to the summer faculty participants in the Ford Foundation Program. More detailed writings of the material on computer scaling, partial differential equations, and error-analysis are available from the Instrumentation Engineering Program, The University of Michigan R. M. Howe E471

TABLE OF CONTENTS 1. Introduction E-473 2. Differential Analyzer Computing Elements E-473 3. Computer Circuit for Solving a Differential Equation E-477 4. Two-Degree-of-Freedom System E-480 5. Scaling of Differential Equations for Electronic Differential Analyzers E-483 5.1 Introduction E-483 5.2 Example of a Second-Order System E-483 5.3 Computer Circuit with Proper Scaling E-486 5.4 Change of Time Scale E-489 5.5 Use of Dimensionless Time E-490 5.6 Example of a Two-Degree-of-Freedom System E-492 5.7 Computer Circuit Including Nonlinearities E-495 6. Solution of Partial Differential Equations E-497 6.1 The Equation for Heat Flow E-497 6.2 Separation of Variables; The Eigenvalue Problem E-499 6.3 Computer Solution of the Eigenvalue Problem E-500 6.4 Finite-Difference Method E-502 7. The van der Pol Equation E-505 APPENDIX - Basic Characteristics of Operational Amplifiers E-509 A. 1 Summing Amplifiers E-509 A. 2 Integrating Amplifiers E-511 E-472

1. B INTRODUCTION An analog computer may be defined as a physical device or system which behaves in a manner analogous to some system under study. Within this broad definition a wind tunnel is actually an analog computer. In many cases it is not necessary to know the mathematical equations describing a system to build an analog of it. Many of the passive-circuit electrical analogs fall into this category. When mathematical equations are used to represent a system, and when the analog computer is considered to simulate the system by direct solution of these equations, then we call such an analog computer a differential analyzer. To simulate dynamic systems, both linear and nonlinear, a differential analyzer must have components capable of performing operations analogous to summation, integration, multiplication, and function generation. The earliest suggestion of a differential analyzer device was made by Lord Raleigh. In the early 1930's Dr. V. Bush conceived and built a mechanical differential analyzer, where machine inputs and outputs were in the form of shaft rotations. Ball and disc integrators were used, gear differentials allowed addition 1 and subtraction, etc. Later versions of this machine were capable of accuracies up to 0. 01%, but the chief disadvantage of the mechanical differential analyzer was slow speed. Nevertheless many useful problems were solved prior to 1948 by this type of machine. The first electronic differential analyzer was developed by the Bell Telephone Laboratories around 1942 for use with an anti-aircraft fire control director system. Voltages represented the inputs and outputs for this machine, and the computations which were performed mechanically in the Bush machine were performed electrically in the Bell machine. After World War II it was realized that electronic differential analyzers had tremendous potentiality for aiding in engineering design of new and complicated systems, and for simulation of those systems after conception. Over 10 years ago the first commercial electronic differential analyzers (electronic analog computers) were made available, and today a wide variety of such computers can be purchased, with basic component computing accuracies up to 0. 01%. Many very large installations exist around the country, particularly in the aircraft industry. 2. INTRODUCTION TO DIFFERENTIAL ANALYZER COMPUTING ELEMENTS The basic computing element of the electronic differential analyzer is the operational amplifier. It consists of a high-gain dc amplifier along with input impedance Zi and feedback impedance Zf as shown in Figure 2. 1. If the current into the dc amplifier proper is negligible (this amounts to neglecting the grid current in the first stage of vacuum-tube amplification) the current il through the input impedance is equal to the current iZ through the feedback impedance. Thus i1 = i- (2. 1) 1 Caldwell, S. H. and Bush, V. "A New Type of Differential Analyzer." J. Franklin Inst., (October 1945). E473

Theory and Application of Analog Computers and from ohms law el - e' e' - e2 Zi Zf (2. 2) where el = input voltage and e2 = output voltage of the operational amplifier, and where e' is the input voltage to the dc amplifier proper. Figure 2. 1. Operational Amplifier If 1.is the gain of the dc amplifier, we have - -Ae' (2.3) Eliminating e' from Equations (2. 2) and (2. 3) and solving for e2, we obtain Zf 1 1 Zf If the amplifier gain /. is very much larger than 1 +, then Zi — Zf Zf e = - el,>/ 1 + —_ (2. 5) i 1zi which is the fundamental equation governing the behavior of operational amplifiers. It states that the output voltage e2 is equal to the ratio of feedback to input impedance times the input voltage el, with a sign reversal. Thus a voltage el can be multiplied by a constant K using resistors for impedances and by letting the ratio of feedback to input resistance be equal to K. Next consider the operational amplifier shown in Figure 2. 2. Here E474

Ra ia Rf if eo iRb ib+ b OUTPUT Reb Rb e2 -f iRedt (2.8) ec Figure 2. 2. Operational Amplifier for Summation neglecting input current to the dc amplifier proper, it follows that. e., the sum of the input currents equals th(2. 9) we feedback current. If we assume as before that the amplifier gain is much greater than one plus the rational to thfeedback integral with respec to time of thive input resistance, we havertionality being RC 32 = -(~ea + eb +R ec (2. 7) Ra a b RC Thus by employing several input resistors we can sum input voltages. In Figure 2. 3 the operational amplifier circuit for integration is shown. Here an input resistance R and a feedback capacitance C are used. Neglecting the voltage these operations to as small compared with el oa linear (this isferequivalent to the assumption that?4 >> 1 + Zf/Zi), we have for the output voltage ez e9 = -1 (2. 8) But if the input current to the dc amplifier proper is negligible, iz = il, and is given by i2 = il = - (2.9) Eliminating i from Equations (2.coefficie8) and (. 9) we have e e ' ib~ id (2.10) i. e., the output voltage e2 is proportional to the integral with respect to time of the input voltage eI, the constant of proportionality being 1/RC. summation, and integration. In the next section we will combine these operations to solve a linear differE475

Theory and Application of Analog Computers i, C INPUT R i__ OUTPUT Figure 2. 3. Operational Amplifier for Integration To solve nonlinear problems it is necessary to have multipliers and function-generators. One type of multiplier widely used is shown in Figure 2. 4. It consists of a servo which drives a potentiometer wiper arm in accordance with an input voltage X. With + Y volts applied across the potentiometer the wiper-arm voltage is clearly proportional to the product XY. X - N Servo Figure 2. 4. Servo Multiplier f(x) b/ Figure 2. 5. Straight-Line Approximation Obtained From a Diode Function Generator All-electronic multiplying devices are also available. The most common device used currently to generate arbitrary functions is the diode function generator, which, by means of a number of parallel, biased-diode input circuits to an amplifier, produces an E476

amplifier output voltage which is a straight-line approximation to the desired function, as shown in Figure 2. 5. For a more detailed description of this and other analog-computer components the reader is referred to text books on the subject. 2 3. COMPUTER CIRCUIT FOR SOLVING A DIFFERENTIAL EQUATION As a simple illustration of the solution of a physical problem, consider the mass-spring-damper shown in Figure 3. 1, C m t y(t) f(t) Figure 3. 1. Mass-Spring-Damper System Let the mass be m, the spring constant k, and viscous damping constant c, and consider only vertical displacement y of the mass. Summing all the forces acting on the mass, we have My + cy + ky = f(t) (3. 1) where f(t) is the applied force. The problem is to find the differential analyzer circuit which will give an output voltage proportional to y for a given input voltage proportional to f(t). To do this it is more convenient to rewrite Equation (3. 1) as my = -cy - ky + f(t) The differential analyzer circuit is built up by assuming that at some place in the circuit there is a voltage my. This can be converted to the voltage -y by passing it through an integrator with an RC time constant equal to m, as shown in Figure (3. 2). This voltage is passed through a unit time-constant integrator, which then has the output y. Next the voltages representing y, -y, and f(t) are summed to give a voltage proportional 2 Korn, G. A. and Korn, T. M. "Electronic Analog Computers." McGraw-Hill, 1956. E477

Theory and Application of Analog Computers to the right-hand side <MY cj- ky Py+ f(t) All Resistor Values are Megohms All Capacitor Values are Microfarads Ground Connections, Omitted for Clarity -f( f ' -- -{, 'Lt/Cf(t) Figure 3. 2. Synthesis of the Differential Equation by Means of Operational Amplifiers of Equation (3.2), namely -cy - ky + f(t), as shown in Figure 3.2. But the equation states that this voltage must equal myj; the connection of the output of amplifier A3 in Figure 3. 2 to the input my of amplifier A1 then causes the equation to be satisfied. In order to obtain a solution to our mass-spring-damper problem it is necessary to specify the initial displacement y(0) and velocity y(0). These initial conditions on Equation (3. 2) for time t = 0 are imposed by charging the integrating capacitors to the appropriate voltages, as shown in Figure 3. 3. When the initialcondition switches are released simultaneously, the computer proceeds to generate the solution y as a timevarying voltage. A somewhat different technique than that shown in Figure 3. 3 is used to impose initial conditions in actual analyzer circuits. j I L —VI__ _ JtV_' —J 1/I 11 ct-f(t) my Figure 3. 3. Analyzer Circuit for Mass-Spring-Damper System E478

The circuit shown in Figure 3. 4 is equivalent to that in Figure 3. 3 except that it uses only three amplifiers. The reader can confirm the equivalence of the circuits. Voltage-recordings made with a Sandborn Model 60 1300 Galvanometer are shown in Figure 3. 5 for a step input f(t). The latter is applied by switching a voltage onto the f(t) terminal. Note that for zero damping the response is a pure sinusoidal oscillation of frequency <.k/m radians per second. m/c f(t) INITIAL CONDITION CIRCUITS OMITTED FOR CLARITY Figure 3.4. Three-Amplifier Circuit Equivalent to Figure 3. 3. --:...... —.|.,-_.'.I —' ' ---.-.'; — ' ' Lfr.....for Various Damping Constants E4 79 I! ' ~ ~ i '::!.. ' I ' ";.!! i -. ' i t~! ~ I i t,!

Theory and Application of Analog Computers '+ { i t-1- L LI1 —I::: —1t!!! -. _'.t. _' -i:I.. -- - - --- _.......-..l-t-I - — | ---- -l-. -' —!- - ' _ _.. _ _i. I= =_ I: t j I.......!':.:::'.:.:i —7 ---.- — ~ ------— i-1:-i' --- --—: --- —-' ' -tt ' i -:_,]::::....:::.:.t:t:~ -: ---.:: —: —::1:ev 3-7.5:1.C i1 -7 Figure 3 5. Continued -- 4. TWO-DEGREE OF FREEDOM SYSTEM The differential analyzer is not limited to the solution of problems where only one dependent variable is present. In Figure 4. 1 the vertical displacements yl and Y2 of masses ml and m2 respectively are considered. By summing forces of each of the masses the following two equations are obtained. mlyl + (kl + k3)yl - k3Y2 = 0 (4. 1) m2y2 + (k2 + k3)Y2 - k3Y1 = 0 (4. 2) The computer circuit which solves these equations is also shown in Figure 4. 1. The circuit is synthesized in exactly the same way as for the one-degree-of-freedom system discussed in Section 3 except that here two equations, including the cross-coupling term, are satisfied instead of one. >K,:1 -— m +(k,+k3)y-ky2- 0 m2y2+(k+i4w)y2-Iey,: 0 ~K2 ////////////////// Figure 4. 1. Two-Degree-of-Freedom System E480

Lyk,+kdy m 1AA ks i I - I.(~,Uy -~,, y, Figure 4. 1 Continued -- Figure 4. 2. Two-Degree-of-Freedom System with Equal Initial Displacements As a sample computer problem, let ml = m? = 1, kl = k2= 1, and k3 = 0. 2. InFigure 4. 2 recordings of the displacements Yl and Y2 with zero initial velocity conditions and equal initial displacements are shown. Note that the masses oscillate with pure sinusoidal motion at a frequency of 1 radian per second, as expected. This is one of the normal modes of the two-degree-of-freedom system. The other normal mode of oscillation is shown in Figure 4. 3, where the masses have been started with equal but opposite initial displacement. Here the frequency is \y or 1. 18 radians per second. E481

Theory and Application of Analog Computers Finally, in Figure 4.4 one mass has been started with a finite, the other with zero, displacement. Energy is transferred back and forth between the masses as shown in the recording. The motion is actually a superposition of the two normal modes, and the half-difference frequency of 0. 18/2 radians per second is evident in Figure 4. 4. Without using any additional amplifiers it i s apparent that viscous damping effects or externally applied forces can be considered in solving the two-degree-of-freedom problem. __-_g_^:._._^^ W 0W 0.1'2XX'1 -7, 1:1;a, i Figure 4.3 Two Degree of Freedom System with Opposite Initial Displacements Figure 4 4 Two-Degree-of-Freedom System Showing Exchange of Energy Figure 4 o 4 E482

5. SCALING OF DIFFERENTIAL EQUATIONS FOR ELECTRONIC DIFFERENTIAL ANALYZERS 5. 1 Introduction One of the most important problems in successful utilization of electronic differential analyzers involves the scaling of the computer, i. e., the proper choice of dependent and independent variable changes from original problem to computer problem. This scaling procedure is necessary for both analog and digital computers, but it is particularly important that it be done reasonably well in an analog computer because of the limited range of variables over which accurate computing is possible. This section contains a discussion of methods for scaling mathematical problems for the electronic differential analyzer (analog computer). This is accomplished by considering two example problems, the mass-spring-damper system and a two-degree-of-freedom system representing an automobile suspension system with both a linear and a nonlinear shock absorber. The scaling problem generally involves the consideration of two basic categories: 1. Scaling of the dependent variables (e. g., the problem output variables). 2. Scaling of the independent variables (e. g., the time scale in a dynamic problem). This second category must be considered in both linear and nonlinear problems; the approach for dynamic problems depends on whether or not it is necessary to solve the problem in real time. The first catagory must also be considered in both linear and nonlinear problems, but the degree of consideration is much different for linear as opposed to nonlinear problems. In linear problems it is the scaling of dependent variables relative to each other that is important while in non-linear problems the absolute scaling of each variable is important. 5. 2 Example of a Second-Order System As a first example, consider the mass-spring-damper system discussed in Section 3. In general, variable potentiometers rather than the fixed resistors of Figures 3. 2, 3. 3, and 3. 4 are used to set the parameters m, c, and k in the differential equation. Thus the potentiometer shown in Figure 5. 1 with wiper arm set at the relative position k can be used to multiply the voltage y by the constant k, where k < 1, thereby producing the voltage ky. The abbreviated symbol for the potentiometer circuit is also shown in Figure 5. 1. Using potentiometers for setting parameter values, we obtain the circuit shown in Figure 5. la for the solution of the mass-spring-damper problem described by Equation (3. 2). E483

Theory and Application of Analog Computers IN y OUT k y POT I 3-\ Oky - \ Figure 5. 1. Equivalent Potentiometer Setting Schematics. The voltage my is first multiplied by 1/m by sending it through an attenuating potentiometer set at 1/m. The resulting signal y is integrated in amplifier 1 to obtain -y, which is in turn integrated with amplifier 2 to obtain y. These voltages, multiplied by the appropriate constants through potentiometers 2 and 3, are summed with f(t) at the output of amplifier 4. This voltage represents the right side of Equation (3. 2) which, according to the equation, must equal the left side my. This is assured by completing the connection shown by the dashed line in Figure 5. la. Following the release of initial-condition voltages on integrators 1 and 2, the output voltages -y and y will represent the dynamic solution to the problem, which will, of course, depend upon the forcing-function voltage f(t). I I I I my l Ir-~I -cy-ky+f(t)Acy-f (t) f(t) oVe All Resistor Values are Megohms All Capacitor Values are Microfarads Figure 5. la. Synthesis of the Differential Equation by Means of Operational Amplifiers One advantage of the circuit in Figure 5. la is that there is a one-to-one correspondence between potentiometer settings on the computer and parameters in the physical problem; thus the setting of potentiometer 1 represents 1/m, while potentiometers 2 and 3 represent c and k respectively. But for almost any combination of m, c, and k normally encountered, the circuit of Figure 5. la is almost certain to cause E484

scaling difficulty. Consider the following example: m = 600 slugs, c = 2500 lb. sec/ft., k = 50, 000 lb./ft. According to the circuit of Figure 5. la, the settings on potentiometers 1, 2 and 3 would be 1/600, 2500, and 50, 000. Since one cannot obtain gains of greater than unity through a potentiometer, amplifiers 3 and 4 would need to have larger gains than the unity gains shown. For example, we might obtain a gain of 10,000 with amplifier 3 by means of a 0. 01 megohm input resistor and a 100 megohm feedback resistor. Potentiometer 2 would then be set at c/10, 000 or 0.25. Similarly, amplifier 4 might be given a gain of 100,000 by using a 0. 01 megohm input resistor and a 1000 megohm feedback resistor. Potentiometer 3 would then be set at k/100,000 or 0.5. The resulting circuit is shown in Figure 5.2. I I 1000 1/60 05 0.01 600yY -2500y -50000 y+f(t) 1000 100' "- |^2500y - f (t)!00 f(t) Figure 5. 2 Poorly Scaled Circuit for an Underdamped Second-Order System This circuit is an example of very bad scaling for the following reasons: 1. Summing amplifiers should never be used with gains very much larger than unity except in some unique special circuits which require it (there is no such unique requirement here). This is because amplifier noise and zero drift at the output is essentially magnified by the closed-loop gain of the amplifier, which here is 10,000 for amplifier 3 and 100,000 for amplifier 4. Also at these large gains the wide-open gain of the amplifiers (i. e., the gain before feedback) is not sufficient to insure an accurate closed loop gain. For example, if amplifier 4 has an open-loop gain of 500, 000 (this is the gain from summing junction to output), then the gain with a 1000 meg feedback and a 0. 01 meg input resistor will be 100,000/(1 + 100,000/500,000) or 83,300 instead of 100,000. Mathematical derivation of this relationship is given in the Appendix. E485

Theory and Application of Analog Computers Although there is no example here, it can also be stated that summing amplifiers should never be used at gains very much smaller than unity if they are part of a main computing loop. This is because no matter how small the amplifier gain, there is a certain minimum noise and drift level at the amplifier output (see the Appendix). Thus decreasing an amplifier gain to well below unity at one point in the circuit will not decrease the noise or drift appreciably at that amplifier output, but the corresp onding increase in amplifier gain to many times above unity at some other point in the circuit will increase the noise or drift at that amplifier output by the factor of the amplifier gain. Thus it is best to keep all summing amplifier gains near unity when they are in a main computing loop. 2, When two or more amplifiers are used as integrators, they should never be used at time constants which are extremely different from each other if they are part of a main computing loop. The time constant of an integrator with an input resistor R and a feedback capacitor C is equal to RC seconds. Thus an amplifier with a 0. 1 microfarad feedback capacitor and a 0. 1 megohm input resistor should be considered as having a time constant of 0. 01 seconds. In the circuit of Figure 5. 2.integrator 1 has a time constant of 1./600 second if potentiometer 1 is considered part of the integrator, while integrator 2 has a time constant of 1 second. This is bad because in general this will mean very unequal voltage levels at the outputs of the integrators. 3. Potentiometers cannot be set accurately at values which are very small compared with unity. Thus it would be difficult to set potentiometer 1 at 1/600 to closer than 10 or 20% accuracy. 4. Amplifier output voltages are limited to maximum positive and negative values. For most computers this limit is the order of + 100 volts. Thus the output of amplifier 4 should not exceed + 100 volts which means that the output y of amplifier 2 must not exceed + 1/500 volt. Hence the maximum amplitude of solution we could hope to obtain with the circuit of Figure 5. 2 is + 1/500 volt for y. This would not only be inaccurate due to noise and drift effects, but it would also be difficult to record. 5. 3 Computer Circuit With Proper Scaling Our statements of the previous section said that all summers in a main computing loop should have a gain somewhere near unity, while all integrators should have about the same time constant. In the circuit of Figure 5. 2 it should then be apparent that the output of amplifier 4 must be the order of -cy -ky + f(t)] X 10-5 in order to have a gain of unity and a potentiometer setting of 0.5 for potentiometer 3. Thus the input to potentiometer 1 becomes my X 10 5 With potentiometer 1 set at E486

500/m or 5/6 the input to integrator 1 becomes y/200Z This is shown in Figure 5. 3. |500/mn 0i 0.05 i0 I I0'?ny 4^ -y/20 l~ y \-/; I 1 2 3 4 ([-c-ky+f(t)O]lCU 105 f (t) Figure 5. 3 Correctly Scaled Circuit for an Underdamped Second Order System We should now choose the time scales of the integrators 1 and 2 to be roughly equal and such that we pick up a gain of 200 in going from y/200 to y. In Figure 5o 3. this has been done by using a time constant of 0, 1 seconds for integrator 1 and 0. 05 seconds for integrator 2. The time constants shown could equally well have been obtained by using 0. 1 mfd feedback capacitors instead of 1 mfd, in which case the input resistors to integrators 1 and 2 would have been 1 and 0. 5 megohms respectively. The output of integrator 1 is now -y/20, and potentiometer 2 is set at c/5000 or 0. 5 in order to produce an output of [cy - f(t)] )( 10-5 at amplifier 3. Note that the input to amplifier 3 is now f(t) X10-5. The circuit of Figure 5. 3 has achieved the objective of near unity gain for the summers and time constants about equally distributed among the integrators. All potentiometer settings are reasonably close to unity. Since the problem considered here is linear, the choice of relationship between problem units and computer units for the dependent variable, y, is rather arbitrary. If the maximum expected mass displacement y is one foot, then we might let one foot = 100 volts, or full scale output at amplifier 2. A 100 volt output of amplifier 2 would then represent a displacement of one foot; a 100 volt output of amplifier 1 would represent a velocity y of -20 ft. /sec. A 100 volt output of amplifiers 3 or 4 would represent a force of 105lbs. A step function input force f(t) of 104 lbs. would consist of a step voltage of 10 volts applied to the input of amplifier 3. E487

Theory and Application of Analog Computers Several times we have referred to the "main computing loop. " By this we mean the chain of amplifiers which has the primary influence on the solution to the problem. In more complicated problems the main loop or loops are often difficult to recognize, particularly if the general nature of the solution is not known. In the simple mass spring-damper problem of Figure 5. 3 the main loop consists of amplifiers 1, 2, and 4 for an underdamped system ( 0S = 0.228 in the example considered, where $ is the fraction of critical damping). If, on the other hand, c = 50,000 lb. sec. /ft. instead of 2500 lb. sec. /ft., as given earlier, the system is overdamped (S = 4. 57) and amplifiers 1, 3 and 4 constitute the main computing loop. We might then denote the output of amplifier 1 as -y, in which case, potentiometer 2 would be set at c X 10 as 0. 5; this would maintain the output of amplifier 3 at [cy - f(t)] X 10 as before, and the output of amplifier 4 at [-cy -ky + f(t)] X10 5 as before. (See Figure 5. 4). The input to potentiometer 1 is my X 10-5. If we set potentiometer 1 at 500/m as before, the time constant of integrator 1 must be 1/200 in order to provide an output of y. This can be achieved with a 0. 05 megohm input resistor and a 0. 1 mfd feedback capacitor as shown in the figure. 0.1 I I 500/rn 0.05 I 105k I 2C [C~-f(t)] 15s i0'5 f(t) 0 --- Figure 5.4 Correctly Scaled Circuit for an Overdamped Second-Order System In the steady state following a constant input force f(t), the velocity y will be negligible, as will the acceleration '. Hence the input voltages to amplifier 4, one coming from y, one coming from f(t), must be equal and opposite. Thus we expect y values the same order as 10- f(t), so that we shall let the output of amplifier 2 by y as before, rather than some constant factor times y. E488

Reference to Figure 5.4 shows that this is a case where the integrator time constants are nowhere nearly equal for a property scaled circuit. The important point is that amplifier 2 is not part of the main computing loop, at least as far as the initial transient operation is concerned. The main loop consists of amplifiers 1, 3 and 4, as explained earlier. Had we used the circuit shown in Figure 5. 3 for the case considered here, namely, C = 50,000 lb. sec./ft., amplifier 3 would have needed a gain of at least 10, and we would have been amplifying a small signal -y/20 from amplifier 2 by a large gain in amplifier 3 in order to produce a nominal output cy X 10-5. The superiority of the circuit in Figure 5.4 is evident. Here all amplifier voltage levels will be the same order of magnitude. 5. 4 Change of Time Scale We saw in Figure 5. 3 for the case where m = 600, c = 2500, and k = 50, 000 that integrators 1 and 2 have time constants of 1/10 and 1/20 second respectively. The resulting dynamic solutions will exhibit damped oscillatory transients of about 1 - 1/2 cps because ( n' the undamped natural frequency, equals k/m = 9. 12 radians/second. Although such solutions will not tax the bandwidth capabilities of the operational amplifiers, they may be too fast for some recorders, e. g., X - Y type recorders. If the problem had one or more nonlinearities for which servo-driven multiplying potentiometers or function generators were used, oscillations at 1. 5 cps might also be too fast. Then, too, some dynamic systems may have oscillatory transients which are so high in frequency that they are too fast for the operational amplifiers themselves. Or they may be so low in frequency that low-frequency limitations such as amplifier drift or the patience of the computer operator become a factor to consider. In any case it is frequently desirable to either speed up or slow down the computer time scale relative to the original problem time scale. About the only situation where this cannot be done is when a "real time" simulation is necessary because of the tie-in of physical hardware with the computer. Probably the simplest argument to explain the method of time scale change for the circuit in Figure 5. 3 begins with the following realization. In discussing the circuit shown it was assumed that 1 second of computer time equaled one second of problem time. Thus an integrator with a 0. 1 megohm input resistor and a 1 microfarad feedback capacitor has a time constant of 0O 1 second in problem time. But if we assume that 10 seconds of computer time equals one second of problem time, then an integrator with a 1 megohm input resistor and a 1 microfarad feedback capacitor still has a time constant of 0. 1 second in problem time, i. e., the computer will run ten times as slow as the actual problem. Thus by increasing the input resistors of integrators 1 and 2 in Figure 5. 3 from 0.1 and 0. 05 to 1 Aand 0 5 megohms respectively, we can slow the problem down by a factor of 10. This might then allow us to use a slower responding recorder. On the recorder trace 10 seconds along the abscissa would equal one second for the actual problem, E489

Theory and Application of Analog Computers Thus the computer can be slowed down or speeded up relative to "real time" simply by changing the input resistor or feedback capacitor of all integrators by the same factor. For the case discussed in the previous paragraph we slowed the computer down by a factor of 10. It is equivalent to introducing a new time variable 'P given by T = 10 t (5.4. 1) from which d T a - = d I = 10 d (5.4. 2) dt dT dt dT and d2 100 d (5.4.3) dt2 dT2 Written in terms of the new time variable 'r, Equation (3. 1) becomes 100 m d2- + lOc dy + ky = f(t) (5.4.4) dT2 dT or 00 m d2y =- 10 - ky + f(t) (5 4.5) The computer circuit for solving Equation (5,4, 5) is shown in Figure 5. 5. It is precisely the circuit suggested in the previous paragraph in order to slow the problem down by a factor of 10, but here it was arrived at formally be rewriting the equation with a change of time variable, whereas before we simply took the circuit of Figure 5. 3 and increased all input resistors to integrators by a factor of 10. Either method is suitable, and it becomes more a matter of personal preference as to which way one prefers to look at the problem of time scale change. 5. 5 Use of Dimensionless Time Another approach to the time-scale problem, and probably the most preferable approach in many cases, is to introduce a dimensionless time in the differential equation to be solved. Consider again Equation (3. 1). By dividing through by k we can write + = f(t) (5. 5. 1) This equation can be rewritten in terms of the undamped natural frequency W n and the damping ratio. Thus 1- y+- y+y=- f(t) (5.5.2) cu n on k E490

500/rn 0.5 10k dom e 2dry [-l d c -ky+f(r)] |o0 [10C oY -f (T)] 0C8 I0 Cr f() Figure 5. 5 Slow-Time Circuit for Underdamped Second-Order System where w e ' (5. 5. 3) m g = c- (5.5.4) 2 Nfk Let us now introduce a dimensionless time variable T given by Tr = cnt (5. 5. 5) from which d = c.d a d2 2 d2 dt adT at n (5.5o 6) Equation (5. 5. 2) then becomes + 2 d + y = 1 f (t) 5 dT2 dT k ' ' 7 The analyzer circuit for solving this equation is shown in Figure 5. 6a. Note that the time constant for each integrator is RC seconds. Our choice of RC will dicate the number of seconds of computer time equivalent to one unit of dimensionless time 'T. If R = 1 megohm and C = 1 microfarad, then 1 second of computer time equals one unit of dimensionless time ". The advantage of introducing the dimensionless time IT - ~nt for this problem is obvious; the scaling problem for reasonable more or less solved itself, and the change of computer time scale is particularly easy to visualize. Note also that the forcing function is actually a displacement, -- f(T) so that all voltage inputs and outputs represent displacements. Hence a single choice of relationship between volts and feet is adequate. E491

Theory and Application of Analog Computers A three amplifier circuit equivalent to the circuit of Figure 5. 6a is shown in Figure 5. 6b. C C I R R d2y da2C-y+ - f(r) dr -C o d y __) (r) k f (T t)) 0 R Figure 5. 6a Circuit for Underdamped Second Order System Using Dimensionless Time Using Dimensionless Time 5.6 Example of a Two-Degree-of-Freedom System We have already examined the many scaling problems which arise in determining the electronic differential analyzer circuit for solving a mass-spring-damper system. A variety of solutions to these scaling problems was discussed. In this section we turn to a two-degree-of-freedom system. Here we have all the scaling problems of a one-degree of freedom system with a few more thrown in. E492

M I X I.... K < i jC m jY2 S t x(t) ////////////7/777 / Figure 5. 7 Simplified Automobile Suspension System Consider the system shown in Figure 5. 7 which represents a simplified automobile suspension system. The upper mass M exhibits a vertical displacement y1, with respect to a fixed equilibrium reference, and represents the sprung mass. It is coupled to the lower-unsprung wheel of mass m with a spring constant K and viscous damping constant C (shock absorber). Displacement of the lower mass is denoted by yZ, and k represents the spring constant of the tire. Finally, x(t) is the vertical displacement of the support (road). The following constants represent approximately one-half the front end of a 1956 Chevrolet. M = 22 slugs, C = 100 lbs. sec. /ft., K = 1600 lbs. /ft. The wheel mass and tire spring constant are given by m = 3 slugs, k = 12,000 lbs. /ft, The equations of motion describing the system are obtained by summing the forces acting on the upper mass and on the lower mass. My1 + C (1 - Z) + K (y1 - Y' ) = 0 (5.6.1) M2 - C (Y1 - 2) - K (y1 - Y2) + k (Y2 - x) = 0 (5. 6. 2) Before attempting to formulate the computer circuit, including scaling, it is well to make some preliminary calculations concerning the expected behavior of the system. This will often aid in such decisions as time scale, relative magnitude of displacements, etc. First let us calculate the natural frequency of each of the mass systems assuming that the other is held fixed. For the upper mass M an1 = = 8.52 rad/sec. E493

Theory and Application of Analog Computers For the lower mass m %2 - - = 67.3 rad/sec. On the basis of these frequencies, we would guess that the time constants of the two integrators which will be part of the upper-mass system should be the order of 0. 1 seconds (this will give a natural frequency of about 10 rad/sec), while the time constants of the two integrators for the lower system should average about 0. 02 seconds (this would give a 50 rad/sec. frequency in conjunction with a unity gain summer). These integrator time-constants are, of course, based on the assumption that we wish to solve the problem in real time. Let us proceed on this basis; later we can easily slow the problem down by changing all four integrator time constants by the same factor. We might also note that although the displacements y1, y2 and x will be the same order of magnitude, the relative displacement y2 - x will be much smaller (this represents the compression of the tire). This means that even though y1, Y? and x are scaled to cover the full-scale voltage range, y2 - x can be followed by a gain factor of 4 or 5 without danger of amplifier saturation. The circuit for solving Equations (5. 6. 1) and (5. 6. 2) on a one-to-one or real time scale is shown in Figure 5.8. It was arrived at by keeping in mind the preliminary considerations of the previous paragraphs and by applying the basic method of approach presented in Section 5. 3. Note that all potentiometers in Figure 5.8 have settings between about 1/3 and unity. The time constant of the different integrators is the same order of magnitude as the predictions of the previous section. Even though the output -y2 of amplifier 4 is scaled so that 100 volts (full scale) equals the full excursion of Y2 (say 0. 5 ft. ), and amplifier 8 has a gain of 4, its output 4(y2 - x) is not likely to saturate. Note also that we have solved for +y, and for -yZ. The opposite signs allow us to take the necessary differences yl - Y2 and 1l - yZ without additional inverters. By taking these differences we require only a single potentiometer to set K, and a single potentiometer for C. If we had collected terms in y2 in Equation (5. 6. 2) and computed (K + k)y2, this would not have been possible. As the size of the problems considered becomes larger, it is always more difficult to perform a near-optimum job of scaling before the problem is set up on the computer. What one tries to do is to make reasonable estimates of the scaling based on prior knowledge of the problem. It will often be necessary to readjust the scaling once the problem has been set up and run. Frequently one finds that one or more amplifiers saturate, or that the output level of one or more amplifiers is too low. When this is the case, the modification of gains necessary to correct the situation is apparent. E494

We have already pointed out that if the time scale of the circuit in Figure 5.8 is too fast, the problem can easily be slowed down by changing all of the integrator time constants by the same factor. For example, by increasing all feedback capacitors from 0. 1 mfd to 1 mfd, 10 seconds of computer time will equal 1 second of problem time. 5. 7 Computer Circuit Including Nonlinearities Up to now we have discussed only linear problems. Actually, one of the chief advantages of the electronic differential analyzer (or any high-speed computer) lies in its ability to solve nonlinear differential equations. For example, in the automobile ride problem we might wish to represent the viscous damping constant C as a nonlinear function of the velocity (r1 - YZ)~ This can be accomplished on the computer by the use of a diode function generator (other methods are also available but will not be considered here). l4 k I k 0.21 0. 1 - I i0..2525IO II kX( Figure 51 8 400 0 Circuit Diagram for Real Time Simulation 4000 of a Simplified Automobile Suspension The diode function generator can be set up to provide a series of segmented straight line approximations to the function under consideration, where the break point between segments can be set anywhere over the full voltage range of + 100 volts, and where the slope of each segment can be set so that the output voltage of the function generator falls anywhere within + 100 volts. Because of limited function-generator accuracy E495 0.25 M Y, 100 40 0.25 X(t}

Theory and Application of Analog Computers it is best to use as much as possible of the + 100 volt range for both the abscissa and ordinate. C (-y2) (LBS) +100~ ~ - - - _ + I YY2 (ft/sec) /1 +, Figure 5.9 Nonlinear Shock Absorber Characteristic To deal with a specific example, let us assume that the shock absorber saturates at 100 lbs. when the relative velocity is 1 ft. /sec. In Figure 5. 9 is shown the resulting plot of viscous damping force C (Yl - rz) versus I - z. If we let 0. 5 ft. a 100 volts for our basic scaling in the problem, this allows a maximum excursion for yl and Y2 of + 0. 5 ft. or 1 ft. total. Since the output of amplifier 7 in Figure 5.8 is -c(y! - Y2)/4000, it will represent viscous - damping force in lbs. x 4000. Assuming that 0. 5 lbs. = 100 volts, a viscous force of 2000 lbs. will produce 100 volts at the output of amplifier 7. Let us now assume that the diode function generator is inserted following amplifier 7. From Figure 5, 9 it is evident that we want the function generator to pass the viscous damping force output without attenuation until it reaches + 100 lbs., at which point the output must saturate. From the previous paragraph we see that this will correspond to a + 5 volt output, since 2000 lbs. 100 volts from amplifier 7. Hence the diode function generator must be set up as shown in Figure 5. 10. VOLTS OUTPUT -5 / FUNCTION / INPUT TO AMPLIFIERS I AND 3 Figure 5o 10 Diode Function Generator Simulation of Nonlinear Shock Absorber E496

Actually, it would be better to utilize more of the full-scale output of the function generator than + 5 volts. For example, if the function generator output were fed into amplifiers 1 and 3 through 1. 0 meg resistors instead of 0. 25 meg resistors, the function would need to be magnified by a factor of 4, and the characteristic of Figure 5. 11 would apply. This would use more of the full-scale output range of the function generator. 6. SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS 6. 1 The Equation for Heat Flow Since the electronic differential analyzer can integrate only with respect to time, it can solve only ordinary differential equations. In order to solve partial differential equations, we must first convert them to one or more ordinary differential equations. This can be done either by separation of variables, in which case an eigenvalue problem results, or by finite-difference techniques. VOLTS OUTPUT + 20 +5 VOLTS INPUT — 20 Figure 5. 11 Improved Diode Function Generator Simulation of Nonlinear Shock Absorber As a simple example of a well-known partial differential eqation, let us consider the heat flow problem shown in Figure 6. 1. Here we wish to find the temperature u in an infinite conducting slab as a function of distance x through the slab and time t. The left boundary at x = 0 is held at constant temperature u0, while the right boundary is an insulator. If C is the heat capacity per unit volume of the slab, and K is the thermal conductivity, then the equation of heat flow balance is C au= aKMu (6.1.1) E497

Theory and Application of Analog Computers with boundary conditions (o,t) = o, (Lt) = d~~~~~x-~~~~ ~(6.1.2) In solving partial differential equations it is almost always wise to introduce dimensionless time and space coordinates. First consider a dimensionless space coordinate x given by DUB N 0 0 TEMPERATURE L^ N. = ~/ CONSTANT INSULT. / ' ~ Figure 6. 1. Heat Flow Through a Slab x = - (6.1.3) Then ~ =x d x (61.4) ca ax d3F L ax (6. 1. 4) In general the heat capacity C and thermal conductivity K may be functions of x. Let C(x) = Co0c (x) (6. 1. 5) and K(x) = KoOk (x) (6. 1.6) where Co and le represent the maximum values of C and K, and where 0 c(x) and OK(x) are dimensionless functions which represent the variation of heat capacity and conductivity with x, and which have a maximum value of unity. In terms of (6. l 4), (6. 1. 5), and (6. 1,6) Equation (6. 1. 1) becomes C2A0(x) _ L=- [i(x) u] (6.1.7) Ko dt ~ dx dx Next we introduce a dimensionless time variable t given by Kot t= CoL2 (6.1. 8) E498

In terms of t Equation (6~ 1o 7) becomes (6. 1. 9) 0c(x) t a [=(x) _ u] with boundary conditions u(0,t) = O, |(i,t) = 0 (6.1.10) Let the initial temperature distribution be denoted by u(x,o) = U(x) (6.1. 11) Equation (6. 1. 9) with boundary conditions of (6. 1. 10) and the initial condition of (6. 1. 11) defines out heatflow problem. 6. 2 Separation of Variables; The Eigenvalue Problem To solve Equation (6. 1. 9) by separation of variables we assume that u(x,t) = X(x) T(t) (6.2.1) Substituting (6. 2. 1) into (6. 1. 9) we have X(x) 0 (x) dT(t) = T(t) d k(X dX() ] dt ' dx d(X) or 1 dT(t) 1 d dX(x) (6.2) T(t) dt O c(x) X(x) k(X) dx kJ(6.2.2) Since the left side of (6. 2. 2) is a function only of time t while the right side is a function only of distance x, to be equal for all t and x they must both equal a constant, say -6, Thus 1 dT = - Ror dt +T T 0 (6. 2.3) T dt dt In the same way x [0k(x) dx ] + c(X) X = 0 (6. 2. 4) The solution of Equation (6. 2. 3) is simply the exponential decay T =Ae"-t (6.2.5) where A is an arbitrary constant. The boundary conditions (6. 1. 10) of the original problem will be satisfied only if X(o) = 0k(1) dx() = 0 (6.2.6) dx Equation (6. 2. 4) can be solved with the boundary conditions of (6. 2. 6) only for discrete values of the constant. These discrete values, On, are called eigenvalues, and the corresponding solutions Xn(x), are called eigenfunctions or normal modes. Once the on and Xn are computed, the complete solution can be written as the infinite series of functions. 00 u(xt) = AnXn (x)e-Pnt (6.2 7) n=l where the constants An are determined by the initial temperature distribution U(x)e E499

Theory and Application of Analog Computers 6. 3 Computer Solution of the Eigenvalue Problem We will now consider the computer circuit for solving Equation (6.2.4). To simplify the problem, assume that the thermal conductivity is constant throughout the slab, so that OK(x) = 1. Then Equation (6. 2. 4) becomes dx + +0c(x) X = (6. 3. 1) with boundary conditions dX X(o) = dx (1)= 0 (6.3.2) Since the electronic differential analyzer can integrate only with respect to time, we must let x correspond to time on the computer. Thus (6. 3. 1) is analogous to a mass-spring problem with a time-variable spring constant. The boundary conditions become initial and final conditions; we must find a computer solution which, starting with zero initial X, have zero X' one unit of computer time later. We will, of course, find such computer solutions only for discrete values of the parameter. The lowest such value of we call 1, the next lowest 2', etc. In determining the computer circuit we must try to make the time constants of the two integrators about equal and the gain of any summers about unity. With this thought in mind the circuit of Figure 6. 2 has been drawn. In this circuit RC seconds equals one unit of computer time and hence unity in x. Thus if we wish the problem to run for 5 seconds, corresponding to x running from 0 to 1, we might let R = 5 megohms, C = 1 mfd. Since potentiometer 1 cannot exceed unity in its setting but should not be too low in value, the additional factor CK is incorporated with $, so that the potentiometer is actually set at 0(., In this way we can always choose od such that potentiometer 1 is reasonable in value. The method of solution is as follows: We select a convenient time length for the problem, say 5 seconds. This sets RC for the integrators at 5 seconds. We then guess at a value for 6 and hence a reasonable setting for o(. Starting with zero initial X and arbitrary dX/dx (initially the output of amplifier 1 should be close to 100 volts to use up full scale) we run the problem and by means of a recorder determine whether the output of amplifier 1 (i. e., dX/dx) vanishes 5 seconds later. If it doesn't (and it never will the first time), we try a new value of 6 and repeat the run. After a moderate number of trials it is possible to converge on the correct 6 necessary for an exact solution which satisfies the end condition, During the convergence process it may be necessary to change the setting of o in order to keep potentiometer 1 at a reasonable setting. E500

C C I ~I/5a R/5- R/5<**c MULTIPLIER c 6 R/5 ' I dx X- a':6cX k C -100 VOLTS 1/5 R/5 "-'^^ FUNCTION ( x )WGENERATOR (x) Figure 6. 2. Circuit for Determining Eigenvalues A sketch of some typical solutions along with the and 0( settings is shown in Figure 6. 3. For each solution the initial condition on amplifier 1 should be adjusted as necessary tO make X, the output of amplifier 2, reach a maximum of near 100 volts. This will allow accurate use of the multiplier. Note also that the input x to the function generator is obtained from an integrator with the same time constant as integrators 1 and 2 and with a -100 volt input. This generates an output starting at zero and sweeping in RC seconds to 100 volts. This represents the input necessary for the function generator to use up its full scale. Since Oc(x) was designed to have a maximum value of unity, this will correspond to a maximum output voltage of 100 volts from the function generator. ~= 0.12 a= 2 P 0.91 a X2 / 2.20 a = 0.5 Figure 6. 3. Typical Computer Determinations of Eigenvalues. E501

Theory and Application of Analog Computers When using nonlinear equipment it is particularly important to scale inputs and outputs so that they use up nearly the full available voltage range, in most cases + 100 volts. This is because the nonlinear equipment, either function generators or multipliers, is the weakest link with regard to accuracy, particularly zero drift. This is not quite such a problem when servo-type nonlinear equipment is used, however. 6. 4 Finite-Difference Method It was pointed out at the beginning of Section 6. 1 that partial differential equations must be converted to ordinary differential equations before they can be solved with the electronic differential analyzer. In Section 60.2 this was accomplished by separation of variables, resulting in an eigenvalue problem. In this section it will be accomplished by replacing derivatives with respect to the distance variable by finite differences. As in the previous section, the problem of heat flow in a slab will be used to illustrate the solution of a partial differential equation by difference techniques, and, in particular, the scaling of such a problem. Consider the problem illustrated in Figure 6. 1. After introducing a dimensionless distance variable x=xI/L 2 and a dimensionless time variable t = (Ko/CoL )t, we have for the equation describing the temperature U in the slab 0c(x)l dt ax [( x] (6.1.9) with boundary conditions u,(o,t) = 0, uxx (l,t) = 0 (6.1.10) and initial condition u(x,o) = U(x) (6.1.11) Instead of considering the temperature u at all values of x, let us consider u only at certain discrete stations in x, as shown in Figure 6. 4. Figure 6.4. Slab Divided Into Discrete Stations E502

Let the separation Ax between stations be a constant, and let uo denote the value of u at x = 0, ul denote the value of u at x = Ax, uz denote the value of u at x = 2Ax, un denote u at x = nAx. Then clearly a good approximation to the heat flux 0K u/0x at the n-1/2 station is K u = (n - nl) (6.3. 1) Kx In-1/2 Ax Here 0Kn /2 is the value of the dimensionless heat-conduction parameter OK at x = (n-1/2)Ax. In the same way we can approximate a [O0K au] at the nth station as [xOK xr] n Ax x n +/2- [ x n /2 (6.3.2) Thus the equation for heat flow balance at the nth station becomes )Cn dt () [OKn + 1/2 (n+1 - un) - OKn _ 1/2 (Un - un-1)] (6. 3. 3) Note that since un is the temperature at a fixed value of x (e. g., x = nAx), 'un/~t becomes the total derivative dun/dt with respect to time. Equation (6. 3. 3) is iterated for each of the stations across the slab. If there are N stations in all, then a set of N simultaneous first-order equations results. The boundary condition at the left edge which says that u(o,t) = 0 is replaced by Uo = 0 (6.3.4) and the boundary condition at the right edge which says that -iu (l,t) = 0 is replaced by uN = UN+1 (6.3.5) The initial condition u(x,o) = U(x) becomes an initial condition on each of the station temperatures un. From the discussion of the boundary conditions in the previous paragraph it should be clear that for N active temperature stations, there are actually N + 1/2 distance increments Ax making up the slab thickness of unity, i. e., the right boundary occurs at the N + 1/2 station, and &x = 1/(N + 1/2). For reasonable values of N, say N = 10, the coefficient l/(.4x) in Equation (6. 3. 3) will be very large. This will make scaling of the computer circuit more difficult, so the (Ax) term is often incorporated into the time variable, Thus let a new time-variable ' be given by 2 = (N + 1/2) t (6.3.6) Equation (6. 4. 3) then becomes ^Cn d = )Kn + 1/2 (un+1 - un) - Kn - 1/2 (un - u1) (6.3.7) where the 0c or 0 /2 are the order of unity. Thus the scaling of Equation (6.3. 7) is particularly simple. The electronic differential analyzer circuit is shown in Figure 6. 5. Note that RC seconds equals unity in T. Often RC = 0. 1 second is chosen for the integrator time constants when solving heat-flow proE503

Theory and Application of Analog Computers blems. This is because for large N the dimensionless time variable 1must take on large values to represent reasonable excursions in the original dimensionless time variable t (see Equation (6. 3. 6)). Hence it is convenient to speed up the computer by at least a factor of 10 in relation to the variable It. To summarize, in scaling a partial differential equation for the electronic differential analyzer when using difference techniques, the original Equation (6. 1. 1) was simplified by introducing dimensionless distance x and dimensionless time t. After writing the difference Equation (6. 3. 3) we eliminated the A-x from the equation by introducing a new dimensionless time variable T. The resulting Equation (6. 3. 7) was then in such a form that the computer circuit of Figure 6. 5 satisfied the basic aims of scaling, i. e., sumnmers with unity or near unity gain, integrators with equal time scales, and potentiometer settings near unity. A typical computer solution for N = 6 with unit initial temperature across the slab is shown in Figure 6. 6. Note the much more rapid initial decay of temperature ul near the left wall (uo = 0). Uo(T) k (= 0 here) L^U4>< ^M^^1^1I I R 1 ~~~~~~~~~~du2 -ug dT Figure 6. 5. Circuit for One Dimensional Heat Flow E504

w~~~~~~~~~~~~~~~~~~~~~~~~~~~ w w ~IFigure 6.6 Analyzer Solution for Heat Flow in a Uniform Slab with Unit Initial Temperature Distribution 7. THE VAN DER POL EQUATION An example of a famous nonlinear differential equation which represents an interesting scaling problem is the van der Pol equation which represents the behavior of certain electronic oscillator circuits. 3 After choice of a dimensionless time variable, the van der Pol equation results: '- | (1- + x = 0 (7.1) where,g is a constant. This can be thought of as a mass-spring-damper equation with unit mass and spring constants and a damping constant which is negative for L xt #1 and positive for l xi > 1. It turns out that regardless of the initial conditions the solution x reaches a stable limit cycle of amplitude approximately 2. By a stable limit cycle in this case we mean a periodic solution which is always approached regardless of the initial conditions. This is evident in the curves of Figure 7. 1, which show differential analyzer solutions for 3 J. J. Stoker, Nonlinear Vibrations, Interscience Publishers, Inc., New York, 1950;pp. 247-252. E505

Theory and Application of Analog Computers = 0,1, and 5. This problem is an example of one where prior knowledge of the general nature of the solution is extremely helpful in scaling the problem. If such knowledge is not available, then one must make some reasonable guesses. Since we know in this case that the solution x will not normally exceed + 2 in magnitude, 2.0 x 1. -1.?. = 1 t — i -1 Figure 7.1. Solutions to van der Pol's Equation we can make a choice in voltage scale for x. One procedure which can be followed is to let unity in x be one volt. Then 50x should be the quantity we compute, since x = + 2 would correspond to + 100 volts. E506

However, in this section let us use a slightly different scaling technique. Let x be the quantity we compute rather than 50 x. To have x = + 2 correspond to + 100 volts, then, we should let unity in x be 50 volts. Reference to Equation (7. 1) shows that all terms are linear except the term /x2 x. This can be obtained by multiplying x by x and the resulting product by x again. Almost all analog-computer multipliers, whether electronic or servo-type, produce 100 volts output when the two inputs are each 100 volts. Thus a multiplier with inputs x = + 100 volts and x = + 100 volts produces an output of 100 volts. But if unity in x = 50 volts (similarly in x), the product x x should in this case by 2 x 2 = 4, which corresponds to 200 volts if 50 volts equals unity. Thus the actual analog multiplier output of 100 volts corresponds to x x/2. In general, if unity in each of the problem variables equals V volts, then the output Z of an analog multiplier V with inputs X and Y is Z = XY -i-. This assumes the computer reference voltage is + 100 volts. This is illustrated in Figure 7. 2, which is the circuit for solving van der Pol's equation. Multiplier no. 1 has inputs of -x/5 and x, and since unity = 50 volts, the output is -xx/10. Similarly, the output of multiplier no. 2 is -x2x/20. The scaling of this equation is made particularly difficult for large values of because the velocity x and acceleration x go through much larger peak values than for a simple-harmonic oscillator (/M=0). This is evident in Figure 7. 1. This is the reason x/10 and -x/5 are computed in Figure 7.2 rather than x and -:x, respectively, which would have been more reasonable were it not for the (1( - x )x term. Actually, when u=5 the circuit of Figure 7. 2 is fairly close to being scaled in an optimum fashion, i. e., the outputs of all amplifiers exhibit near full-scale voltage excursion during the solution. For higher values oft the gains of integrators 2 and 3 must be increased even further, with an accompanying reduction in gain of amplifier 1 for the x input. Had we not known the nature of the solution to van der Pol's equation we would probably have scaled the circuit with unity gain in amplifier 1 for the x input and equal gains (time constants) in amplifiers 2 and 3. For large / we would have observed overloads in amplifiers 1, 2, and 5, and would have had to rescale the problem in a manner similar to Figure 7. 2. Note that pot 4 is placed in the feedback loop of amplifier 5 and is set at 1/2 A. This gives amplifier 5 a gain of 2Z. An alternative approach would have been to place pot 4 between the output of amplifier 5 and the 0. 1 meg input resistor to amplifier 1. However this would limit / to a maximum value of 0. 5. By giving amplifier 5 a gain of 10, the maximum value of/I could be raised to 5 (pot 4 would be set at I/5); however, by placing pot 4 in the feedback loop of amplifier 5, we can set f.t at any value above 0.e 5, being limited only by the possible voltage saturation at the amplifier output. For the = 0 case, the output of amplifier 5 into amplifier 1 is disconnected. E507

Theory and Application of Analog Computers 0.5 0.25 0.5 01 A | MULTIPLIER ^ —N. N - x(/20 X/5 I ()0.25 Unity - 50 volts Figure 7. 2 Computer Circuit for van der Pol's Equation x'/4(1 - x ) X + x = 0 If the multipliers used for this problem are of the servo type, then the high velocity and acceleration in x for large /L (see Figure 7. 1) may exceed the servo capability. Under these conditions the computer time scale can be slowed by decreasing pots 1 and 2 by the same factor. In fact, if these pots are available ganged together on a common shaft (a servo multiplier with multiple ganged pots works well for this purpose), then the time-scale pots always move together and we can slow computer time down or speed it up right in the middle of a solution. If an XY recorder is used with an integrator output on the x axis to give a time sweep, then a third ganged time-scale pot at the integrator input slows down or speeds up the recorder sweep simultaneously with problem time-scale changes. Thus we can slow the problem down in the areas where x changes rapidly and speed it up in other areas so as not to exceed the dynamic capabilities of multipliers 1 and 2, if they are servo driven. E508

APPENDIX Basic Characteristics of Operational Amplifiers A. 1 Summing Amplifiers The basic building block of the electronic differential analyzer is the operational amplifier. This consists of a high-gain d-c amplifier with a feedback impedance and one or more input impedances. For summation and impedances are all resistors, as shown in Figure A. 1. 1 Ra ia eaRf if INPUT VOLTAGES eb-f - VOLTAGE R \ IC 4 \ H:IGH GAIN DC AMPLIFIER, GAIN =-/U Figure A. 1. 1. Operational Amplifier as a Summer Here ea, eb, and ec are the input voltages, and eo is the output voltage. If we neglect any current into the amplifier itself (this neglects the grid current in the first stage of vacuum-tube amplification and is normally justifiable), then the sum of the input-currents equals the feedback current or ia + ib + ic = i (A. 1. 1) But from Ohm's law, = ea - e' a = a Ra where e' is the input voltage to the amplifier proper. Using similar expressions for ib, ic, and if, we have ea - e + eb - e' - e (A1.2) Ra Rb Rc Rf But eo = -MAe', where? is the gain of the amplifier (the minus sign takes care of the phase reversal). Thus e' = -eo/A and Equation (A. 1. 2) can be solved for eo, obtaining (Ra ea + bb eb + Rc ec) ~o = - - -(A. 1. 3) L (+Ra Rb Rc E509

Theory and Application of Analog Computers Normally the amplifier gain A- is quite large (between 30,000 and 100,000,000) and hence,U > 1 + Rf/R + Rf/RAc for a properly scaled summer. Thus the denominator in (A. 1.3) is essentially unity, and the summer output is seen to be proportional to the sum of the input voltages, the constant of proportionality in each case being equal to the ratio of feedback to input resistance. Next let us consider the effect of noise in the amplifier. If the noise is very low in frequency, we refer to it as drift. In any case it is convenient to designate the noise as the equivalent voltage en which would need to exist at the amplifier input in order to produce the same effect on the output as does the noise. If this is the case, then, the equation relating e' to eo is eo = -/A(e' + en) (A. 1.4) We can eliminate e' between Equations (A. 1. 2) and (A. 1.4), obtaining eo - [Rf ea + Rf eb + Rf ej - [1 + + + (A. 1.5) Ra Rb Re Ra Rb RC n Here we have assumed /A>> 1 + Rf/Ra + Rf/Rb + Rf/R The second term is the output due to the noise en referred to input. Clearly the higher the gain of the summer, the larger the noise component in the output. For example, for a summer with three inputs representing a gain of 10 each, the output noise = 31 en. For en = 10 volts offset due to drift, the output drift will be 31 x 10 or 0. 03 volt. For en = 5 x 10-3 volts rms of high-frequency noise, the rms noise in the output will be 0. 15 volts rms. On the other hand, no matter how low the summer gain is made, the output noise will always be at least en. This may be seen by setting Ra = Rb = Rc = in (A. 1. 5). Finally, let us consider the dynamic error of a summer resulting from the limited bandwidth of the dc amplifier. This is best illustrated by calculating the phase shift of the summer for sinusoidal inputs of frequency Ws. One might realize, of course, that the d-c amplifier gain/4 is actually a function of frequency, and for reasons of stability will fall off approximately as 1/C) for large frequencies (). In general let a(co) = i (co) eJ0l(a) where / 1 is the magnitude of the amplifier transfer function and 01 is the phase shift of the amplifier transfer function. Then from (A. 1. 3) it is apparent that the summer output voltage due to the input voltage ea = Eejwt is given by - Rf Ee Ra 1 + + (1 +- +-+ Ra Rb Rc (A. 1.6) Often the amplifier phase shift 01 is the order of -90~ or - IT/2 radians. If the gain Rf _ Rf. Rf Ra Rb Rc which is in general still a good assumption, then the summer output eo for the sinusoidal input ea can be written as E510

e= -Rf E [1 - J- (1 + E + ) + e (A. 1.e7) Ra l1 Ra Rb Rc - J Ee2(ct + C) (A. 1.8) Ra where the summer phase shift ot is given by Ca = - 1 (1 + f + Rx + R+ A l 9 j1 R a Rb Rc (A. 1.9) As in the case of the noise or drift effects, the summer phase shift becomes proportional to one plus the summation of the summer gains. Thus the larger the gains, the more the phase shift. However, even for zero gain the phase shift is 1//l. Thus the maximum bandwidth is obtained by distributing gains evenly through summers. A. 2 Integrating Amplifiers When the feedback resistor Rf in Figure A. 1. 1 is replaced by capacitor C, the operational amplifier becomes an integrator. Since the capacitor has an impedance 1/Cp, where p is the operator d/dt, Equation (A. 1. 3) becomes - (RCp ea + RC eb + RCp ec) en = - -l + p + R-p + KRcCp (A. 2.1) if >>~ [1+ + -- l + + _] RaC P RbCp RCp then R aC ea + R-C eb + R-C ec] dt (A. 2.2) where 1/p has been replaced by the integral. Thus the output is proportional to the integral of the sum of the input voltages. Next let us consider the effect of noise or drift voltage en referred to the integrator input. Replacing Rf by 1/Cp in Equation (A. 1. 5) we have eo RaC ea + R- eb + e + ec] dt [en + JR C RbC R.C endt] (A..2.3) Here the second term in the brackets is the output resulting from the noise en. It not only appears directly but is also integrated, as if en applied to each of the input resistors. This second error can become quite serious for open ended integrations when en represents a drift voltage. For example, if en = 10-3 volts and 1 +k+ 1 _ 3 - 30 sec- 1, RaC RbC RcC 0.1 E511

Theory and Application of Analog Computers after 20 seconds the integrator output would be 20 (30) 10-3 = 0o 6 volt. Up to now we have neglected the grid current i flowing into the amplifier. This may sorm times not be possible for integrators. One can show that grid current produces an integrator output voltage given by f(ig/C)dt which, of course, is added to any other integrator outputs. Note that the effect of grid current is independent of the input resistors. For example, if ig = 100 amps and C = 0. 1 microfarads, the output of an open -ended integrator will increase at 10 volts per second due to grid current. Finally, consider the bandwidth problem with integrators. We have seen that the ideal integration given in Equation (A. 2. 2) is achieved only if the amplifier gain >> [1 + -R~ + Rbp + RcCp RaCp +Rbp RCCP At very high frequencies /4 will fall off until this approximation no longer holds. In general the additional integrator phase shift at a high frequency C is approximately -1//i, where /1 is the amplifier gain at that frequency. Generally this is not a severe limitation compared with summer phase shifts. At very low frequencies (1 + 1 + 1 becomes (k + 1 + ) L Ra Rb Rc jcc which can become quite large, so that again the approximation t~ [1 + (Ra + Rb + rc) ] is no longer valid. Also, leakage resistance of the feedback capacitor is a limiting factor at low frequencies. Thus integrators cannot be operated at too low a frequency. However, since the leakage resistance of the capacitors is generally 1012 ohms or higher, and since / may be 10 or greater for drift stabilized amplifiers, this low-frequency limitation is seldom met in practice. E512

Example Problem No. 42 THE SOLUTION OF NON LINEAR ELECTRIC CIRCUITS ON THE ANALOGUE COMPUTER by Demos Eitzer Analogue computers are already incorporated in the electrical engineering curriculum at the City College of New York. Their application is taught in at least two courses and they are used in two laboratory courses, one of which uses a direct analogue while the other uses the differential analyzer. The application which is investigated in this problem is, however, for use in still another course, Magnetic Circuits, (sophomore-junior) as a demonstration of the fact that in a nonlinear circuit the possibility of the generation of harmonics and subharmonics exists. Students generally will accept the fact that harmonics are generated but it is generally more difficult to impress on them the concept of subharmonics. This experiment is intended to impress this concept on the students. The circuit to be considered is as follows: The equation governing this circuit is: d*/dt + Ri + 1/Cfidt = v(t) where / = the total flux linckages and v(t) is a square wave of amplitude E. The characteristics of the inductance are in the sketch which follows. 4l E513

Non Linear Electric Circuits on the Analogue Computer Solution: The mechanization diagram for the Applied Dynamics computer is shown below. This problem is intended as a demonstration problem rather than a class problem because the elements of the circuit are very highly idealized. Under normal operating conditions one ought be able to show fundamental, 1/3, 1/5, and 1/7 harmonics (only odd harmonics are possible) and with a little bit of luck, the 9th subharmonic (1/9 harmonic). The interesting thing is that all these subharmonics appear as a function of amplitude E only. If there were an easy way of including the effect of hysteresis, including minor loops, then the even order subharmonics would also be observed. SUBHARMONIC RESPONSES Each record contains the input v(t) as well as the output i(t). -" -f... '-, ~AAA..!,ent | of t input Fundamental 1/3 harmonic E514 input.-. A E514

Example Problem No. 42 _'..... -'!.'.... ---.-'- -. ', -- output Jtfl VELAND. OHIO PR INTED IN U.S.A. f- _ --- F -— t --- —_input 1/5 harmonic 1/7 harmonic

Example Problem No. 43 TRANSIENT ANALYSIS OF AN R-L-C CIRCUIT WITH SINUSOIDAL EXCITATION by Edward Szymanski General Area: This problem is part of the introductory material on Network Analysis in the electrical engineering curriculum. Course: The particular course is entitled "Network Analysis II" and is required of all electrical engineering students in their Junior year. The course credit is three semester hours. This course is the second one in a three-course sequence on network analysis which is required of E. E. 's.. Objective: This problem is one of simple proportions which still embodies the various introductory concepts which cause difficulty for the student in his study of electrical transients. The problem is relatively easy to analyze and to obtain explicit solutions. The computers, both analog and digital, permit studying more cases and afford a basis for introduction to computer techniques; however, this problem does not begin to show the power of computers. Problem Statement: The problem is to determine the instantaneous values of circuit current and capacitor charge in a simple series circuit with a resistor, inductor, and capacitor connected in series to a sinusoidal voltage generator through a switch. The solution is to be sufficiently general to provide for varying the initial values of the current and charge and the voltage phase-angle at the time of switching. As an extension, the undamped natural frequency and the damping ratio could also be parameters for possible change. Theory: The circuit diagram and equation are given below: R L C Undamped radian frequency, / I 1 rad. ~00 35h-ad d..V --- -= =3770. - globm 0O0035h. 2mfd. n ~ 3770 sec. e(t) = 131 sin(377t + ) Damping Ratio, ZETA = I= ' L = 0.0378 F or Voltage equilibrium,0 For Voltage equilibrium, di q dq Ri + L-+ - = e(t) where i =-d dt C dt and LC~ + [-] LC -+ q = Ce(t) (A) dt L E516

o 2 2 or q" + 2 co q + wq = w CE sin(ot +oC) (B) Electronic Differential Analyzer Solution.,.,. W =- = 3770 d-= O0 X w 1n. C sec. aR 1 = Z =26 = 0.0378 Base damping ratio, i.e., for R = ohm 2 //j26.4 In equation (A), let?= lOOOt or t=- ' ' 1000 Then 10*LC q (?+ 2LC10' q (V + q (T) = CE sin ( T-WT+ a) Substituting numerical values, 0.07 q + 0.02 q + q = 2.62 (10)-3 sin (0.377 T-+ 2) Rearranging and taking scale factor, a=14,200 1000 q = 37.4 sin (0. 377tC-284 q- 14,200 q 32C H o.a->yr, oc) X3.C).4 Iiil e, i0 = ni c tial vlage es,. The banalyt solution, r n for ceqmatinriesonlish apox 7td /e talhargq(0) = 0.00265[c = (377. t/se1 tcos377et Initial crn i(0) = c <rc 0 ~ ^s 13. Initial voltage phase angle, o= 90 ~378 The analytical solution, presented for comparison, is approximately, Wq t. [cosC.142.5t q(t) = 0.00265[cos (377t) -e' e 5c os (3770t)] o= caqr(t) = 132.5 [cos (377t) -e-425t ( ] E517

Transient Analysis of an R-L-C Circuit with Sinusoidal Excitation. — f-....... t _Z:! -- t- r, ibt) =-e -1.0 sin (37t) + ~ s4in(770t) 1j — ~-~- -- r 6, X t- -- ---- 4 1 i W t -^_L \ \ \ \ \ \ \ -\ -\ \... \.,.....:.V-;.:^...'t ---.:'....... 8H. IT S H IX SI R.IU VI) L T Su.VISION OF CLEV TE CORPORAT;ON cLEPfvANO OHiO OR!NTED IN U S A CASE II. Damping ratio, -.10 times larger than base value,i -: — i.:-:.:-...... -. - -i - -.-' ---.. —'-" —: t ------ ---- - O. ', -' " ---__.:, ~.............~~~~~~~- CASE II. Damping ratio, 7, 10 times larger than base value:-.t::L::i'::.,:.-::~Z:' i ":'-i..i-::-F:'T:: -:i::"'i —?: 'i:-'..i:.:::?:: L.::::::::::::::::::::::::::::::::::::::::::::: '.i.! ~'x...~ ~~ - ~~...;,~::.:-:::_::..'-F —:,'.::.-.::~:_ —.::'::.:":-.. ~:.-::-ik:-:k.:.:k.-.:::..-::..:-:r ----_z::: ---_::-7::

Example Problem No. 43 CASE III. Damping ratio,, 1/10 as large as base value. CASE IV. Same as base case except v (o) is set at 132 v. Illustrates absence of transient component. -_...-~.::...,:. _.,.::.-.:::......... -t.'..I': i.':.:'.'.'. - ' --— I-'~-: - - t -_. —: - t t -- --- t t —" --- —-~ — '-'- ' ~ - 4 '-.-.....-: -:-: --- -t- i... ---- -..-. -.- -:.. '-':' -.....-............. -. t-I-:- -. 1-E1EL ANOR:%O ED I - N U S A.A.!. -: "' / - jJ- - A ~ t —:- ' - 't -: i/ —/: — ~ i......... —:/-:f - i. —.j..-...-.....1:_ -............-t. —........ —:.:::-:~:-:-: - CASE V. Same as base case except nitial phase angle, o(, of applied voltage, of= O- -— H --- l8 tii-tt 1i1 -t-H —. — f-:. ----^. - — t.............. _....f '-.............t-.__; 1... t f 4 t..'-, t... — ':":: L —, ----E1................................:................... '................t --- ——: -: —: —:: —':":"::':.-.':-:" —:' —:'I:-:-:::'....':':: '........t.......,::::: i. -... " '::"E.....5...''':......:::-: ---:'-'.....-r.....t_:_.:L —_-.. -:- t ~ ~~~~~~~~~~~~~~~~~-.'..4. --- — ~..-...J.' ----?.': —: -::::A.................~...~.__..:....................-m:-_........... i:-'...CASE~~~~~~~~~~~' V.'.Sa-:: as.: bas cas excep initial'_ phase:: anl,__-. ':-:-:. of:: applied::: -—::::!..::_.:~.:-': —'~:..'..::.'- "-.'..-e, —:'. -. —.. -...:...:.. —. i:: ~ '.'~:-.':/:-:/'-'::':. '-::~';-:'-..-'!:-'.:',:-::-:?: —:.::.::-:'~':.'-': —'........'-"::'::"-'-"-' -.......................................7'.. —:: -::::::::::::::::::::::::::::::::::.::?

Transient Analysis of an R-L-C Circuit with Sinusoidal Excitation FLOW DIAGRAM FOR R-L-C CIRCUIT ANALYSIS U 7- r HeI 5 ^r Ct y5r4#A MAD PR OGRAM RTRANSENT ANALYSIS OF AN R-L-C CIRCUIT WHOSE UND'AMPED RADIAN R FREQUENCY SQUARED LC AND WHOSE DAMPING RATIO SQUARED IS R R(SQD)/4L/C. DIMENSION Y(2),F(2),Q(3) INTEGER N,RKSUB.,M 01 CS~TART X=O. 3 READ FORMAT CARD,Y(1),Y(2),WNZ,CFMAX,W,A,H,XMAX _ 04 PRINT FORMAT DATA,Y(l),Y(2),WN,Z,CEMAX,W,A,H,XMAX 05 C3=WN*WN 6 C2=2.*Z*~WN 07 C1I=CEMAX*C3 MAD PROGRAM CALL TRANSFER TO ALPHA(RKSUB AN RL (2,Y,F,,X,H)) 09 ALPHA(1) F(l)=Y(2) 11 F(2)=C SIN.(QUW*X+ARED L)-C2*Y AND WHOSE D(2)-C3*Y(AMPING1.) 12 R R(SOD)/4L/C. DIMENSION Y(2)tF(2)~0Q(3) _ INTEGER M~9RKSUB99MM_ 01 START X=0. 3 TRANSFER TO CALRDlY 13 FMAX04 ALPHA(2 PRINT FORMAT OUTPA(T)X,Y(1), ZY(2) 14XMAX 0 C3=WN*WN 6 C2=2.*Z*1WN 07 C1=CEMAX*C3 8 WHENESFER X.G.XMAXTRANSFER TO USTART 15 1F7.4,14H AMPERES IN L. / 50HOTH. CIRCUIT HAS AN UNDAMPED ANGU 20 1LAR FREOUENCY OF F7.2, 44H RADIANY/SEC.,WITH A DAMPING RATIO 21 10F ZETA = F7.5, / 54HUA SINUSOIDAL VOLTAGE IS APPLIED SUCH TH 23 1AT C X EMAX = F7.6, 27H COULOMBS OF RADIAN FREQ,= F5.1, 24H R 24 1ADIANS/SEC,AND INITIAL / 16HOPHASE ANGLE OF F7.4, 27H RADIANS 25 1. THE STEP''SIZE IS F6.5, 34H SEC.WITH A MAXIMUM TIME LIMIT OF 26 1 F5.4, 9H SECONDS. //S15,4HTIMES21,6HCHARGES19,7HCURRFNT//*$ 27 VECTOR VALUES OUTPUT=$3F25.8*$ _ 28 END OF PROGRAM 29 E520

Example Problem No. 43 44 N MI 0 G 4.) 0 o u 0 u 0 ~~~ 0 j 4J@ $j ( 0 ~~~ o o ~~W d!_A ~ ~ ~ ~ ~ 12 ~ ~ $ w~t )4;4) $4, C - CC*4.4.. I..~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(. 1:. ~~~~~~~~~~~eI~~~~~~~~~~~~~~~~~~ r.. r...: D V. ~~~~~~~~~~~~~~~~~~~~~~~~~~,4 r,. I:-J (12~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~! F 31 4 iri ri:I":,,- i 44 Li 331111141~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- liii'~~~~~~~~~~~~L::: - - C4' 0~~~~~~ 3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4- 1 X i iOU * 0 0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~r: -:- 'AbI-..3..1.,3~~~~~,i331333,, ~~~~F.,.f......*.................r......i ri.... (12~~~~~~~~~~~~~~~~~~~~~~~~~~......................... U~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.. (12 3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~............ 1-iJ;:J. I I IE52

Transient Analysis of an R-L-C Circuit with Sinusoidal Excitation..J.. LU:::: LA. ~ ~ I.I L!',::::" L.J r"-.....:' [........,...V.:............0 " 0~~~~~~~~~~~~0 i (" U~~~~~~~~~~~~~~~~U:::-:: = in i.=4 Il (....... jj:- 1.-4 I T, 1.... I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ U7......re.22 ~-:....::";r.,..... "..I ', '..... ("-.I (:::, ('..I rT.',!'.'-: i::,:::*::j.....'......... i..J"~ L.. - 0~~~~~.: > *:i:(.I: c I i |.! —1 I'"- rf..... i i —!*-* i-O S.......... o; 3 5 i^5^. ' *I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~j~ — jI (...)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~..... j~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I..I j..j J.:. I~~~~~~~~~~~~~~~~~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~..:.: Jr' C'" ':...". "...........' L..................'.....i::l:'::.. [:;;::;:: 0:1 *****- '**^ i- ""i ID:..........I'"....i.,.: 1:. 1: "1!: ' i i: -' ' ' ' *1 " ";; *;! ' "!; i *: r '" '..* i a: i.'j r -1:! * * - - i ' " - **:j - * o 8.^ **:i - s -: - '.^ i -::; \, ".;.;; ** *,o.:...i.s...i.:...r...r..r "..........!:.......... *..:............. I~ ~~~ ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~................... I""':* **:* i;.:;^ ' *:.:i ***'! **!^ "*:: I:^,:: - I;;! ':: i:;::- C:":: \i;" i':**:: (:: i" C", (! t i i 1 ' '"i i I i I I.i I ~~~~~~~~~~~~~~~..................f'.................. i~.............,..,. ~,::::;:,..,.::::;,::;,:::.;:::;,.. C.)....1.....!?; I g [;p " 0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~::.I"IjII i i::::i i: J i::::i i... ':::' *...''..:! *...J Ll.....:Q::::,::..........!...:: i:::.:::I.::.:::::i i:::::. i::::::::*..::; i;:; i::::::i:...:::::I i:::;: I:::...: i::i *:::::: i::i i::::::!..'.. LL 1 I.."!~~~~~~~~~~~~~~~~~~~~..............I:::::D GI~~~~~~~~~~~~~~~~~IfY~::1:!::" i:.. *** 1:::;i C; -:; *:::i.:. ~; * C. i; i*:;: n!,; " "r --: i i: 5 i; -;:::, i:, G. r - E i i::: *- C. C! c " ^ 1:' i: ' ': *. G, c -'i: ^: ~ *o i:.i... 1........ ** i.....';. ~::: i ^: ~: *:;:, r i i:::;*. C::::' *::'.;.:.-:;:! i::::' * *:;:::;;,.:*. i: i i::' i:E522. C ~:::;' ~ **:: i -

Example Problem No. 43.......... ' I '2? {j' "..:,!;1-1 |-L1 i" 1 '' )- ':-' i- ' r- " 3 |::.,; *.Ei';' I'- Li") ': )!:"! i -..-....i_.!...j ij i:.... i..... -.. ' i.....! i.:!:j- -i i: i i -i:; i i -.......'.::::: i.!.. *:i-....; i.;: '- r..,.: *::'. i i; r...-! i i,] i, i i......i:..........:.!;**!**!*ii*..............! *. i.; 1..... r-.-'i ' '.,: I......;,.. i, * i.... i. i.: o c i ' i.::,::::: i ij i::::, o C:!',:::, '; -- J. i;.::-..::'...! ' '! ~:....... ~ *....................... r.............'........ri:, -1 i -'. -.: i-!!"::::'-:., i,::;;..j::! i,:..,:::: f.,' *::::!..':....::1!|...i.i...!..... i i i......!~~~~~~~~~~~~~~~~S> i3:!i|1, i:.~i.!Z!i.|!|l;i.

Example Problem No. 44 TRANSIENT BEHAVIOR OF BATCH REACTOR SYSTEMS by Paul T. Shannon Problem: Prepare a digital computer program to solve the following reaction equations occurring in a batch reactor at isothermal constant volume conditions. The initial concentration of reactants and the reaction velocity coefficients are to be considered as constants. Use the program to evaluate the effect of different initial concentrations on the transient behavior of the reactor system for several selected values of the reaction rate constants. The specific systems to be used as examples are as follows: 1) A=B 2) A-B C 3) A + B=C + D 4) A=B-C and A + B-D + E In general, we will restrict ourselves to systems involving at most five reactants in which at most second order reactions are possible. Feel free to choose other reactions if you desire after discussing your choice with the instructor. Develop analog computer circuits for solving the above set of reaction equations and use the Electronic Differential Analyzer to study the reactor systems over a range of initial concentrations of the various components. The scaled reaction velocity constants are to be assumed to range from zero to 1. 0. Solution - Digital Computer The rate of change of concentration of any component of a reaction mixture depends upon the different reactions that may cause the formation or disappearance of that component. Limiting the system under consideration to five components and to reactions that are either first or second order, the most general expression for the rate of change of concentration of component A is dCA dt A, I A A, 2CB + kA 3 + A, 4CD + A,5 2 +Ak C +k C C +k C C +k C C +k C C A+ A, 7 A B A,8 A C A,9 A D A, 10 A E +A, 11 CB+ k A C C +k C C+ k C C A,ll1 B A,2BC A,13 B D A, 14 B E + k C2+ k C C +k C C+k C2 A, 15 C A, 16 CCD + A17CCCE,+ 18D + kA, 19CDCE + kA,20 E Exactly the same form of equations with different rate constants, k, may be written for each of the other components, B, C, D, and E, so that a total of 100 k's might be involved. Of course, it would be a most unusual situation for all possible reactions to be important, so that in the usual case only a few of the 100 possible rate constants would be significantly different from 0. The program which has been written, however, has been generalized to include the complete set of rate constants. E524

A more compact and more general formulation can be made employing triple subscripts. If one defines the N components as C 1 C,2..., CN, and a dummy component C a 1, the rate constants can be designated as k = coefficient of C C in equation for dC /dt. Then the entire set of rate equations bepqr q r p comes d kpqrCr ' p = 1 2...., N. q=o r=q The integration of a rate equation such as that for dC A/dt may be done for a time interval At by simple multiplication. Thus, A CA d A A t A dt or C =C + A C= 4 + AdC At A =cA + ^A A \dt where dCA /dt is evaluated at the concentrations which apply at the beginning of a time interval. The method of Runge and Kutta modifies this technique by allowing for the variation of dC /dt from the beginning to the A end of a time interval. The first of four constants for each of the five components is evaluated as KA1 = DA (C A, CB, C, CD, C E) is the derivative dCA/dt evaluated at the initial concentrations. This step is repeated to obtain KB, Kc 1KDl, and KE1, using DBS D, DD, and D. Next a second BI Cl DI El B C D E with the step being repeated to obtain KB2 02 KKD2, and KE. The third set of constants are obtained in The fourth is calculated as e=D m nC +r C +KKK C +K C +. A + B + B3' C + C3' D D3 E E3 t The new concentration at the end of the time interval At for component A is Ct + = CAt + AK + 2KA2 +2K + K )EA In the same way C C ' CD and CE are obtained. Thus, one is then ready to proceed to t+A-t t +At t++t t+ t the next time increment and repeat the process. Fhe fout the above operations. It is calcunoted that subscripts and E similarlye replaced by numbers, and that the rate constants are upper case K s while the Runge-Kutta constants are endesignated by KO. Some simple first-order equations are assumed (meaning that most of the rate constants are taken as ), C, andC results calculatobtained for differThus, one i thent sizeady to proceime inter-d to vals. The effect of taking too large an interval is to give poorer results in the earlier steps.. E525

Transient Behavior of Batch Reactor Systems FLOW DIAGRAM -ITA R L) I2 'JrA | KOI - 4 OER/YGI i/)| I -34A D/ An, -A I T A e )' TKOKO -A"~ Kz e \f~.AD Ho r / X \K T ' - ' +4_o~ iu) A)7i \ \#, A I 7d 7 ' - / A x l A _ U A! T' T1____ __e L,_ P_ 8 _E5726 /Q3-A ---A --- - --- &C)6 tUZ —Cr+^rK I'lzL, (

Example Problem No. 44 MAD PROGRAM EIO PAUL T. SHANNON TO9MN 8 002 00-5 020 2 10.0 *COMPILE MAD,EXECUTEPUNCH OBJECT R R RUNGA-KUTTA SOLUTION OF N SIMULTANEOUS RATE ElQUATIONS R N.LE.5, CONSTANT VOLUME AND TEMPERATURE, FIRST AND SECOND R ORDER R R DELT = TIME INCREMENT R TBASE = INITIAL VALLUE OF TIME R TMAX = FINAL \/ALUF OF TIME R 4 R C(1)...C(N) = VALU!F OF REA'CTANT CONCENTRATIONS R K(1,1)*..K(N,20) = REACTION RATE CONSTANTS R N = NUMBER OF COMPONENTS = NUMBFR OF REACTION EQUATIONS R P = PRI INTING INDEX - RESULTS PRI NTED EVERY P INCREMENTS R 3 INTEGER I, N, P, R, J 5 DIMENSION K( 100,DIM(0 ) ),DIM(2),C(5),UJ( 5),V(5 ),.S M(5),KO(5) 6 VECTOR VALUES DIM(f:) =,2 1, 20 7 INTERNAL FUNCTION DERIV.(J,A,B,C, E)=K (J,1 )-A+K (J,2) -,B+K(J,3 33 2 )*C+K ( J, 4 ) *D+K ( )J, 5 ) E+K ( J 9 6 ) -A-A+K ( J,7 ) ' -A +K ( J, 8 ) - A *C+K ( J 9 ) 9 3*A*3D+K ( J, 10 ) *-A -E+K (J J 1 1. ) *B 2 —+K ( J,12 ) - - ''C+K ( J 13 ) " " "-*D+K ( J,14 ) * ]10 4B-*E+K ( J 15 ) *CC+K ( J, 16 ) *-C D+K ( J,17 ) - C' 'E+K ( J, 18 ) "-;- rD+K (J,19 ) -D 11 5*E+K (J, 20 )* E-,-E 12 START READ FORMAT DATA, DELT, T3BASE T^,AX, N, P, C(1)...C(N 13 VECTOR VALUES DATA=$3F10. 52I1,5F6~5. 14 READ FORMAT KVEC, K(1(1)...K(N,2n ) 15 VECTOR VALUES KVEC=.S ( 10F8 4 ) - 16 PRINT FORMAT TITLE, DELT, Ti-3ASE TMAX, N, P. C(1)...C(N) 17 VECTOR VALUJES TITLE=$HS1H]S!4c58JHRJUNGE-KUTTA SOLUTION OF FIRST 18 2 ORDER DIFFERE NTIAL ECUI.ATIONS///S155,1-HINPUT DATA//3F10.5,S5 19 3 I 1, S3 I 1., 5F1(. 5, -$. 20 PRINT FORMAT KVEC, K(1,1)...K(N,20) 21 PRINT FORMAT HEAD 22 VECTOR VALIUES HFAD=. 1H49S2; 9 1 T S1 2F1HA,S].4 1.H;:,.5. 14, 1HC,.914, 23 2 1HDS14,1HF///*S A23 PRINT FORMAT ANSWER, TBASEF C( 1)...C N) 24 VECTOR VALUES AN.S W ER= 15 F1 —,. 3 9 5, F 1SF..5,S5,F1 C,, S5 F 1 5 9 25 2S5 F10. 5 5,5, F1(. 5*5 26 R = 0 27 THROUGH BETA, FOR T = T:ASE + DELT, DErLT, T.G.TMAX 28 THROUGH RETA1, FOR I=1l 1, I.G.~N 29 KO(I)=DELT*DERIV.(IC(1), C(2), C(3), C(4), C(5)) 30 SUM(I )= C I ) + <O( I )/6. 31 BETA1 ( I)= C( I) + u.5.)KO)(I) 32 THROUGH ]ETA2, FOR I=1, 1, I~.GN 33 KO(I)= DiLT'-DERIV.(I U(1), U(2), U(3), l U(4) U(5)) 34 SUM(I )= SUM( I ) + KO() / /3. 35 BETA2 V(I) = C(I) + U.50KOI ) 36 THROUGH BETA39 FOR I=1l 1,. I.G.N 37 KO(I) = DELT DERIV. ( I V( 1) V(2) V(3), V (4) (5)) 38 SJM I) SU ( I ) M(I) + K (I ) /3. 39 BETA3 (I) = C(I ) + KO( I) 40 THROUGH RFTA4, FOR I =1, 1, I.G.Nt 41 KO(I) = Dr LT-DERIV. ( I 1. 1) 11(2),.1J(3) U(4 ) U(5)) 42 EFTA4 C I) = SU( I ) + KO( I)/6. 43 R = R + 1 44 W",HENEVERR.E P 45 PRINT FORMAT ANSWER, T, C(1)...C(N) 46 R = O 47 OTHERWISE 48 TRANSFER TO BETA5 49 END OF CONDITIONAL 50 BETA5 THROUGH BETA, FOR I=19 1, I.G.N 51 BETA WHENEVER C I)+U.05.L.., TRANSFER TO START 52 TRANSFER TO START 53 END OF PROGRAM 54 E527

Transient Behavior of Batch Reactor Systems RESULTS R Li H GE-KLITTfR S 0L LiUT IN c OF F IR ST ORDER DI F FERENT I i L E, t _i f T I H INPUIT DR.TAt cr.TZif'OT'j"O-O ----CI, —FO. Ii -iro' 10. 0IM MOC!00001 o -1 0i00 100 1 0 O F F O. OO i 1.0 1.000 0000 0.00- 0000 0.0f000 1.I0 0. "'0000 ". i000 0 Ii. 0 'O. 0 _-. 00i. 0 i. i00i 0I 0 0 I00 0. 0000 1.0000 -1.00i 0 0 00 0.00 0..00.000. 00000 0. 000 0. 0000 0. 0 0. 0000 0i 000i 0.IiI 0 i. ci 0. 0000 0A 0000. 0i 0I 0 i. I0 i i. c 0. I 4.400""I 0 0 0.4999 _________________ _____ _ 4. 00c........... 4......... I '.i r' i i- '. I04 9 '-:9 9 0.20 0.8.. 014 —4 7fi i0. 50002i 0. 1. 0 " 'i 1 1.27533- ii i". O i 0. n 0 0. 9 9 O C.4f!~~~~~~ii~~~~~~~~ i' ': '0.50 0 0 7. 0 0 U O5 0.3 0 50 4 "9:.1 9: Oi. 71, 0: [:. 6 3 '.3 f 1. I "'1.500 IDC. I 4 9: 1 l..:-i 80, ~1 0-5 FI 0 5-, 1.U 001- I. 5_1iii. '.4 1Ci I, 7 ID! i', ':. ID J I. -.. 1i.i -i - l-'~'.llI:3 I I '" 2 5" 'l 0 I-I Ii i I 0.9000 58265 __ 0...... 41 735._... —. —. 1.100l_______ 0 _5-l. 554_I. 4 46 5 [0I[D0 1 5' _"]. I 0 0 1 2 0 0 C0.5 4 5 O 6 C.-4 6 4 60 0. C i [ - 4. 30-0' 5l 04 _ _6,I.5C0000.:0.500,0 i -i " J 1- I...... -'-': — r'',...!I -.. iii i"0. 5 _ - i 0475 1 6. 3:00 50'000 1 00 r"l.: _'.'2 5 — ' 0, 4.004 0 01 77 D 0 C 0 0..50000 17 51 66 I_ 4J. E-:3.3 48331 16 500 __ A-I _. 5000l I" 0 O..C 0 Ii'0 CL 1 IA: 900 0 I 5 1 iD 11 9 4 I'_: 0 6 ' 700 0. 0000 C __5-0-I 000 2. 000 0 ".4-9084- ~ 6I I " — O -- 5 '. 0.500 2 i.5-."3i. 4:j 5 O 7 -.4. 5 O 0 I D 0. 00. I-I - i '.~!:i- f'l.4 II,: [~ f:. C-iIC ilt " 2. 7 0 0 C. 5 0 3 73 5p ~ — 600 0. 5027 6"~ - - ~ u7 ^ 7^247._400! — "- " "' ""^ ^mjifu"" ~ ~ -~^! 34 1 2 ~,5. i7-I I_0I 0 l 0i. 5 3 2 2 1 0. —9774 I " 7,? 5: 01 I 0"2 I_"0 I-I.-ll 5 0 f0i 0 0I-I ___ i- 5 I"0 t'" 0.5.00 2 ~.~'J 800 0;l J"~. 50 1:"4 85 'N;J C i ~ 4 7 ' 5 1 1 J 2' 7I 600 IEi" —I I " — i. 5 0 I'Jl f'- I f —IiF 0 A ID 1 A 61 A 2'............ C;I -.9.'' 0 0J l_ 0. ~ 501 f1 " J0. 49849......i"": 7,- 04l 0;"Jl l"J.......iOi. 5- I0 -0 50000 3.000 '..5 1 2.......... I 0 0 0 0 3.100 0. 5011 0:.4899..9-00 0.50 0 0. 5 0.0 3.2 00 0.500 3 f —J.......I*'49~ 'l J^l:"': i7 ll 8.000li C'.Z'' I'4. C.750,:.... 0"'' 0__0 6 8...9.9.3.2... 8.10 '05 00 l I 0.5 ID O"......... _ ~... ~..^.^ __......_ ^ ^^ ^0.:_4 I.0 5 U3.80 0. C',] 6it "- I "-t.~ I1i "):'O ~.! 5 3.9 0 0 0.5 0 0 21 0,4 9 *? 80 8.7 0 0 0.500 0 0_ _ _ 0!5 0 i0 00.1.. '2 0. ' i. 5 0 r0 '1 0,.4 ', 91 8:. '"f.'O, 5 0- 0. 0" -i. 5 0 0 0 I.......'...II IIII....E 528....

Example Problem No. 44 Results (Cont'd.) LR U i f E -- KUTT:: T - I - EL E LI; -.: L N I. IHFtIPUT DATi 0.50000 0.0-000 10. _0000 1 1.0!000 1.0! I - 1. 000 1. 01 0 0 _i 0. C i 1 I I _i 0. 0 I_ 0 _1 0 i. i!I 0 l i. I 1 7, i 0 -. - I 0 0 0. 01 0I 0_ 0 0. 0 0 i00. 0 00 0. 0 0 i 0. 0 0. 0 Ii i. 0.. 00 C0 0. H_00.0 C-! i-. 0i 00 0. 10 c 1 0]00 0_- - I 0 0 0.000 1 '. I C! 0 0. Ii 0 0 0 0. 0 01 - - 0 0.0.0. 0 0-1 0 0. - 10 0 — 1. ci ii:i c l - 1. ili ci ci i. ci ci ci c. c. i1i ili ci ci: c. i i i ci ci. ci ci ci cI cii. ci c 1. i iiii 17. ci ci ci 1_1. c 1i3 c i. l-Ii — -i-. — i iC-i 'l —i -Ii. i-i 0 - 'i 0i.-I. cI0 i 0. Il_ 0c i. i. i0i i 0 i. i 0000 0 i. r_ 0 0iIi F I. 0 i0. 0 i0 *T B C D i0.000 1. 00!. 000: _ I 5. 00 - -0 -.68750 00.31 2 5?0 1.000 f 0. 57031 0.4 -,29 1.5i. 5__.5 '.-,.3 7!0. 47 t '3,.3 2.000 0.5019:3"1 0.49 '- 01 1 2.. 0 llli ii. 503 7L.' 31 1 1. 49,', 29_., 3. i 0 I i. 4 9'i ' 1 -,. 5 i 1_1i0_l!.5Q I li.52._l-1_0. 4 994'_ —i '!4 '4. 5! 0.::[. ' _c 'cIc.c 1-11-11-1 i lnn0.! IJ 3 0. S4 9 7 -......-,- I l]i I I 1 C,. 4 ' -,i, -,,;.Ini H c. i. 0. 6. 500 C0 0. 5C 0 O 0 0 I-I 6" 0 _-i.. 1_1 i -I IC,_I IC'1 '. '_i' -- '-1 ii-I_ _. ~ - - -._ i..i;3., — i, 5 i Ni c i ci c7.500 i _. __ 0 0!i ')-i 5 "1 ' Ii. 50! C1i 10 0 ':'. =! rI -!_. ri "1 Ii 1 51 II Io oo 1. I7 Ic-i. 'OICil i:i. Si-I i-1- c *.... CI. 500!_....10 1 i. 5001.000 _l-i 10!l - r. - - -i 0.-i. L 0 0 0- l ]-_ E5Z9

Transient Behavior of Batch Reactor Systems RESULTS(cont.) I N U D::Tc'ccir -1 0: 0. F. '_Io.4cc c f1!I " J 11I., 5 091 cl -iI. -. 403 11 c c,5. CO C 0 -7, c --- D O I-J.12 0 'I 1C C ' -I.~ ~i1'- O' Fflu- 110. 1 CIOuu I - 1i I.0C - - 1 '0i f1 0f ( I I I'-. I'' 0. 5000 -0. 1 ": —'51-1 -~~~~~~~i 1 -'L cf Ci 0 'D I -I I- F1 A0 F 1' 0 O1D 1! I-i — IfO 4.OO I H- 'C411,Cf00 4- 7I11'- GS-) f. 21 7- 1 0.~ - 'i 0C I 5- i-i.2 -i0 4''''' - 7 Ot 1 0,:~-: - '4 f~~~~ I -~ F'' "C' l 4 I D 1-48C A FI 1-1 2I 18 '-i 4 7 I SIII~'-j 7 1 ii I~~~~~~~~~~~~~~~ C-I- F 3 1 7'-' 1 ii ~~~~~ ~ ~~~~~~~~~~14-`5'J I'D 1O G ''I Ii ii- ' ~~~FI. -14!-i. 1.4 LI C~~~~~~~~~~~~~~~~~ If.. — 1 -fl I~~~~~~Z4 0 1 1 j"D I 5_ _ __2 I. if. I -~~~~~~~~~~~~~~~~~~I ' -7, O I 42630 55 70

Example Problem No. 44 Solution - Analog Computer On the next two pages are shown the circuits set up on the electronic differential analyzer to solve two of the simpler first-order rate equation schemes. The graphs taken from the output of these circuits show clearly the way the reactions level off with time leading to fixed concentrations of the various components. The equations are shown with y' s for the concentrations instead of C' s as used in the digital solutions. ELECTRONIC DIFFERENTIAL ANALYZER CIRCUITS FOR THE REACTION SYSTEM A B YA~~YA~~kZY8 k I A k / ' kz L A A A^A+~y <k. 11/ E531( — i —s^AA-, -^ r^ /^/ 6 J,>J ---- (. "T -— / - ^ -k

Transient Behavior of Batch Reactor Systems ELECTRONIC DIFFERENTIAL ANALYZER CIRCUIT FOR THE REACTION SYSTEM ^ t^~~-k ~YA k Y k^Y3 0 /y 6 key- -^ — kjyc ^ l -V AA- Y A4 E5 32 Va vI-^AA^/^ ^/ d -yC 4.

Example Problem No. 44 ELECTRONIC DIFFERENTIAL ANALYZER RESULTS NOTE: 100 volts = 1.0 concentration 5 volts/line from center of paper which = 0 volts Lower pen mechanically displaced from upper pen on chart paper. Basic reaction system studied: k k3 A 1- B __ C k2 k4 Fig. -A CAO 1 k- k - - Chart Speed =5 mm/sec CBO 0 ~ 2 _^_________C HART NO. RA.2921-3R____ B SH S_ RUMEI - Fig. lB C A 1 k1 I 1 Chart Speed = 25 mm/sec CB0 = 1 k2 = _H O __= [ ~.::..:.-:..:../ —..!:,'-i:/. \0::-.... -:.../..:\/..-. ''"'".'..:. '..., Fig _,......1B,.................,._:!,, /! '.'.:-'-:."..'=''-.....'. —'.''....' " '.l '= a -.-''. —'.."'-. —....'...'..-." —.'-.' ---.-..':.......'... -... Speed = 25 mm/sec."''=.1 k2.= ~1~:.. ' ~":'.':. E533'.'....'..'... —...

Transient Behavior of Batch Reactor Systems Fig. 2A BO 1 Chart Speed = 5 mm/sec CB=0 k =0.1 *T^ '~'i' _____ 0 0 ^ 1 -A| i \ \ \t. ~..:!.::C:>.:>:i::.: ---i.::...:':-":.::~~~-',-.-.A ti:... -._......................._. ___._ 1__ _7.*^ J*t,. Fig. 2B C O=1 k =0.5 Chart Speed = 25 mm/sec CBO=0 k= 0.1 E534 A~~~~~ ~~~ ~~~ ":..... -~ IN........~- 'l,:D! V...:...................:-: A..........:::.: --: —: ---:,-A........ C..., — C.... "'-T.. -.-4- -4-,4.~ —,..: —.. ---.::.:: -"-'-.::-::::-:-:-:Vw?-:~::::~:... ' —:-...?"~ —...-t-''..:":.'':-....: '?'? ':?-::i....'-:"'...::I........,....~.....'-'.i~.::...-:::..-.::_?:.........'.J....I.............g........... '.... L........B......... ' AO.:::..1..:.........k.........:,..... — - -: ---0..._........ -:-::-I.........5........::::::::::::.....Chart Speed 25~~~~~~~~~~~~~.....:'::..i..'.-.'.:C BO. " 2 0.. I ".~,::"'"' ''' ~~..r:~I: ":'::[:':':i:::::::~:.:~:::::::::::::::::::::-:::-'::::::::::::::...

Example Problem No. 44 Fig. 3 C,0 1 k 1 0= 1. k3 =50 Chart Speed = 25 mm/sec C C0 = k = k 125 4_ Ift^Rfftt^Y^^mr ~ —~A-, /ZT, A* CLECON- 0 k-=.25 k/./ 4- -- L-4......... _._.....,::':,,,:,:_,,.. -..~_ ------ ' --- —~-j.:....,...............1-I......... ----- - _. _ L_ i I ~....: - \ f...:E.535.............. V.- -, 4 — ---...... ~......~~~_LVs~ ~ ~,,. 1 ~-' —,-...~ —,,-~....~..i.... —................ 1............................!..............I,..... t,!,,..,,,.,, _,_ f.,,,S I '~~~~~~. I......-r,,,.~,,

Example Problem No. 45 OXYGEN DEPLETION IN STREAMS by E. F. Gloyna This problem formulates the predicted course of the oxygen assets of a stream under the combined influence of deoxygenation, resulting from pollution and reaeration following the establishment of an oxygen deficit. Mathematical Formulation of Oxygen Sag Curve: The differential equations that relate oxygen utilization and oxygen addition to a stream are typical of equations describing decay and growth rates. The combined equation that relates the action of deoxygenation rdD 1 and reaeration states that the net rate of change in the dissolved oxygenation deficit d — is the sum of the rDdy+ d dz oxygenation depletion- and the rate of oxygenation absorption in absence of pollution}. dt a dz = -CD dt dD - dy + dz dt dt dt subject to the initial conditions D = D and y = 0 at time t = 0, a where K rate constant, primarily dependent on temperature (units - per day). The mean value at 20~C is about 0.40 but this value may vary considerably. L = initial first-stage (organic) biochemical oxygen demand of the water after some form of pollution has been added to the water (units - Mg. /L.)(denoted L in program) y = oxygen demand exerted in time "t" (units - Mg,/L.) C = rate constant, primarily a function of temperature and hydraulic characteristics (units - per day). The magnitude of the ratio of - may vary from 0. 5 to 4. 0 D = oxygen deficit at any point after elapsed time "t" from the reference time (units - Mg./L. ) D = initial oxygen deficit at point of pollution (units - Mg. /L.) (denoted 0 in program) The solutions of the differential equations are y =L (l-eKt) KL FKLl-Ct a -Kt D - a e D '^ 6e + aC -'C -K a -Kt+ aKLa -Ct - a KE 36 E536

Name of Course: This problem is discussed in a junior civil engineering course C.E. 341, "Water and Waste-Water Treatment". This is a required course for civil and sanitary engineering students. Students will have had at least 6 credit hours (semester basis) of calculus and possibly differential equations. Objectives: This problem demonstrates typical exponential equations and shows the development of a dissolved oxygen profile. The problem demonstrates the interrelationship between temperature, availability of microbiological food on oxygen supply, and stream flow characteristics. It is believed that this problem might help to stimulate interest in high-speed computers. At present the plan is to demonstrate the Analog during class period. In this manner the student may watch the effect of certain induced changes in the values of the constants. A simplified or possibly a "canned" problem will be given to the student so that direct solutions may be obtained using the digital computer. The solution of the differential equations by the Runge-Kutta method is also presented but this method will not be discussed until the oxygen sag relationships again discussed in a graduate stream pollution and water resources course. Extimated Time Requirements (a) Analog - 4 hours first time, 10 minutes second time (b) Digital - 4 hours first time, 30 minutes second time Type of Solutions 1. Analog - 1 set of values for 4 variables. 2. Digital - 3 sets of values for 4 variables - Solution by direct use of algebraic equations. 3. Digital - 3 sets of values for 4 variables - Solution by Runge-Kutta method of solving two differential equations. Maximum D Mxmf D Sag Curve x / \ < *.^ Oxygen Depletion TIME GENERAL OXYGEN SAG CURVE E537

Oxygen Depletion in Streams I '/ 'ANALOG CIRCUIT K =0.143 L = 20 ~ -t- --....... ---- -' —: --- -, ----- -..... ==T^ _^ Oft=_._-t --- t + -- (^ -4 — ^ c...-........I = 'r-oo:'.. '.._.-_./~.. -- Z__... -........ > - _ _^ _ ^ - ^ _ ---- r tai - ---- ANALOG SOLUTION FLOW DIAGRAM FOR EVALUATION OF ANALYTICAL SOLUTION |!7br 1 '1~44 &0J \ i9.Pb 4o \!Tl,oe \ 77ME, ko, )e - - -e o,.,o.,o,./ Cc. /- ~ E538

Example Problem No. 45 FLOW DIAGRAM FOR NUMERICAL SOLUTION OF DIFFERENTIAL EQUATIONS ____ / THRWoi&r\ /rr/V'OO\ freoUjI\ / HWG- \ PROGRA M F OR NUMERICAL SOLUTION OF DIFFERENTIAL EQUATIONS r ' H -' " -\i ' ii.:"':"-". r"' "\ I, j, t"' i" IV I CL E"'"N -'" '!. E i:: 1 r'..:.,. ' L. U | j |... I '"I '7 -:~ i F:'. I,, ' -.F:'. F';L T.?' T F gF Z.-iT ZL PROGRAM FOR NUMERICAL SOLUTION OF DIFFERENTIAL EQUATIONS; Z-____;-., 3***! E N g 10 Z — ':::- —.-rZ3': ' '..-:; T 'i -- ';: = ',;*F ":...' _ Z. r' — i:3::.::'.,. a [: '.: i F -::: T i Z i — r ';:::! T i -: r 3;..:! -:: './ [:r:- -.g._. -;: J — J i T R ypLUES IN 81._"i'3 N G": E Fi I,:: r i IrD.I 3 l F E; R.'::...-* 5 4 8 * H ' r::::! ""'i! j. ]: F *;: -::.: ': i, r ~ r r, r.:, ' *;?: * * |."r L-. -... i.. i "': ":.. I; I Ldi r F _ ~'i H R: 0 L! rGI ~- H; P:: i. —i, F i'!._. 1;: t::! L. U[ k:i';: - 1L! '-" L-..9. ", ",:" 1 ]:, -' -:! ': = r-, T H id, E!-; t.?. G t. rIL i i ', T;-':r..' i- i_ -I r::' -iiP i" i- F 3 L: T F TS, I. *,.,' E r T?: ~ IE 'Z.fi'. i:" 1-.I Li!! ' '-'1 F.. r,-,-^. '::,' —r.' i,!-.'.i-i.'-:' i..... T - '1F i 1'-, 1_7.F — ' 2' C::,! 'i 1_... F U"" ~:U "'": aI. H, 11 U H I I, i. - i:-. 1 f!:.... -..!, i 1 i: ". _ _~: I ' 3 F E' lo..L l: ' _,,.. F:-:.-,, 22, '-.. 3 ' D i.,......::7::.::.r3'2.:S!:;., S.:,:":: F,: 1..: F: L.: -.,:: L,,: 2: 1:;.. 1. ' 2* 6 -,,:! - *. TFSE., T. f!!:-i I~S 1 '-i,, '- Ft ' - rT~! 'iE -39 E539

Oxygen Depletion in Steams PROGRAM FOR EVALUATION OF ANALYTICAL SOLUTION I MENSI O K 3:. L 3- 3: C -. -: IJ F F 3) PRfiT FOR::RT TIE, i:T: vT..-:, ~-ECTOR - LU: ni R A i', F THROUG.' RLPH., FOR: EO.'" L L2-: -F.- L, L:, - T ~ G ' F OR Vi:' L U EPS O- F 00F:::". ":.- 0..:i:3:, ______P R T.T F P iT P T., k,.. Fr-, CF"Tzi 1F i LL..1 1T210 -.,.- F -:_ —:. '..':,..": THROUGH RLPF:i. FR. i - i.1 TG.. T P 4, C-T ': L F'HR F'R i.ET F.,R;T FII.S.,.3 " ~T -.. i 6:2 _____________TRONiSFE. TO '-...' -:E T - 3 Dj= 5._,7953 T=.5 D - 3..354 T- 1 'D= I.'2 T- 1 D. 34i D-_-i T=23 D - 13, 4 T=24 ':.')D - I. D: )045 2 E540

Example Problem No. 45 I I if I H H I I I I I HI I f H I I I If I 1 1 II ~ i II If II I IfI ifII.4-.Z *,%r r -, i '- 1 —.F _o c tp ra P4 r, r-o %. - 4-. t 44s - -~~~~~~~~~~~~~U irl r- 4- 0 (xsu-t c ccF t ' -r-U —.,r- Lorsr' (4-4 6- ccc - r 'I IL I II II 11 I~~~~~~~~~HI 'I I I~I i'IH 'I 'il 1 H I: it I if II _J -J _j -J -1 -.J -1~~~,-J -J,-J IJ o LL i iL-U Li LL LL LL. L IL L-aLLLL-I LLiLL I LL Li, LL LL LL L -W L U dL L-L L LILL La.. UII L. I.L. Li!- L...,..Lj L al.. LAI, J.J, E~~f CD C-J E- L-LIJIl LI L LJL i0CLD aaMC Li La7 ij1 LJJ cj-C I- C~~~~~~~~-4. a4 -tC.i Ci 4..44- C~i4 44''' I-4C4 -CC1 - H ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~II iH I If1i If 11 IIH fIIf II H1 JI i" I i I 1444 144 j 441 L'4 V4 Ijl I-': V,,, 14 41- Lt- U) Li- L L L L L414 LQ- Li ' 1 Li. 0L r L:f o L LIL L L. 4LI1.4- 4.- - ri r — k_: I': r_ r: r' 0 IJ -.J1- -J _ 1 -J4 J _ - _ CL. M~~L. U 'L O W~~~~~~~~~ ~~~~~~~~~~~~~~~~~i-LL- LlLi- ua! LL LL L Li-l LU iLL LULaIl LaIi.L. U- L.. U_ j jULL L-aL J il..L. 4-I 4Th Li. ~~~~~~~~ ~~ ~ ~~~~~~~~~~~~~Li.aL '. LL. u Li.U LU -U Li. I. LII Li-fLL. Li. L.L.J L A Li..;L.D j LU, L.L.a LI F- LdF -rF F - 4 —ahrfr- C FrI4rirF- 1 — H 1I4414' 'III 111111 Iii 1411111111~~~~~~~~~~~~~~~........11 _ (442 144.~~~~~~~~~~~~~~~~~~~~~C C C C4 C 444 CC C,04 CC*44I= C4444 44 44 44 C 44I4444 444 TE 4 -14 4 z i- 4 -- 44 44 4 44 14 144, 444 1= C I"'-'4C -. tI ' Ii I0 a I L.I. I I I CDI..,....L..L. LL. CDi. - L: 1 I CL L- CV C. C'I CI C C' UJ I.! I II Il II II Il II i f II I I I I I I I 11 I I if IIIIl II II I I Il II II I I Ifif i I iI II 11 i II iI I 44444 4 F~r 4~44 4 —Il 4 4444C, 44244...44Z442442441D`Z4L,..444IJ1 44444 U. LU LI 4 4 4 44 4 4 4 44 4 4 4 44 4 4 4 44 i 4 r 4 HH4 LIL II II II II LI II II ~~~~~~~~~~~~~~~~~I= CI 1 I lI I I IDIl LI C, C, ID C = II - CC 0C1I I I I IIC riC 0C 7I IJ CD C ' C-. 1C CDC4,*C','7 44,0 C;4, C CC 0, 4.-C, C:E 4T,.j.J~~~~~~~~~~~~~~~~~~~~~~~~~~t VjU-LFUJUj U V 0 J' t- ii-JJJ.I...,...4 j171W Ii I1.J 17V V.I."E -,J Ii-iJ U' C4 C...~..-.... - IL4 JOI LL CLI.L LLLLIIlIII LLfLLI:T-jiT III -1 —44T 41CtL,.~~~~~~~C C CD144 0C II)00 0 00 4J11444IIIUC'4'CE LI' 4J4TJI, ilCrGC4 U.- LL C I II, I IIII jI4II I J II IJ II j IIiJI - I S 'J. II-. ifJf-.J.-JfH.-J-J.JI.-J1 IJ J.J. H..J,,If If,1i 0 0 M - - - - - - - - - - 5-

UNIVERSITY OF MICHIGAN 3 9015 03024 4456I 3 9015 03024 4456