THE USE OF COMPUTERS IN CHEMICAL ENGINEERING EDUCATION Dale E. Briggs Brice Carif an Brymer Williams Department of Chemical and Metallurgical Engineering The University of Michigan January 1, 1963 This material is distributed by The Ford Foundation Project on the Use of Computers in Engineering Education at The University of Michigan. This report appears in the library edition of the Final Report of the Project and is also issued as a separate booklet. Similar "Curriculum Reports" for other engineering disciplines are also available on request.

"t a L i q z

ABSTRACT For many years the Chemical Engineering Department of The University of Michigan has been employing electronic computers in its various research and educational programs. During the past three years, in particular, the Department has made a special effort to integrate the use of analog and digital computers throughout the required undergraduate curriculum. This report describes some of the characteristics of these machines which make them useful not only as problem solving tools but also as purely educational devices, and relates the faculty's experiences with computers in both the undergraduate and graduate programs. The Department's curriculum is discussed with special emphasis on courses in which computers have been used extensively. Twelve computer-oriented example engineering problems with complete analog or digital computer solutions are also included. This Bet of problems may be considered as a supplement to the 111 example engineering problems, including several of interest to chemical engineers, which have been published previously by the Project on the Use of Computers in Engineering Education at The University of Michigan. -I1

Table of Contents Page I. Introduction I3 II. The Chemical Engineering Department and its Curriculum I3 III. Computers and the Engineering Sciences I6 IV. Educational Aspects of Computers I8 V. The Analog Computer I10 VI. Computer Application in the Department I10 a. Required Courses Ill b. Elective Professional Courses I13 c. Graduate Courses I14 d. Research I15 VII. Example Problems 115 112 Temperatures and Heat Flux in a Radiant Thermal Circuit I17 113 Minimum Cost of Reactor Operation I21 114 Adiabatic Reactor I25 115 Successive and Simultaneous First Order Chemical Reactions I32 116 Pyrolysis of Ethane in a Tubular Reactor I39 117 Adiabatic Flame Temperature for Carbon Monoxide Oxidation I49 118 Vapor-Liquid Equilibrium I65 119 Solvent Allocation in Multi-Stage Cross-Current Extraction I75 120 Dynamic Heat Exchange I84 121 Use of Computers in an Undergraduate Chemical Engineering I96 Design Course 122 Economic Design of a Condenser I117 VIII. References I16 Tables I-1 Departmental Participants in Faculty Computer I4 Training Programs I-2 Undergraduate Elective Courses Related to Computer Areas I6 I-3 Example Problems I16 Figure I-1 BSE Program in the Chemical Engineering Department I5 -I2

USE OF COMPUTERS IN CHEMICAL ENGINEERING EDUCATION I. INTRODUCTION As early as 1948, in what may have been a pioneering venture, graduate students in the Department of Chemical and Metallurgical Engineering at The University of Michigan began to use the digital computer in their doctoral research. During subsequent years, digital computer work was introduced into graduate courses, first at the doctoral level in 1952 and later at the master's level in 1955. Analog computer work in both graduate and undergraduate courses was initiated in 1952. By 1958 the University had acquired a large-scale digital computer with an easy-to-use procedure-oriented language. A pilot program was implemented to experiment with and to study digital computer applications in several undergraduate courses. The success and promise of the early programs, and the results of the Department's pilot program in particular, led to the submission of the original proposal of the Engineering College to The Ford Foundation for support of a demonstration project on the "TJse of Computers in Engineering Education." During the past three years, the Department has intensified its efforts to integrate the use of both analog and digital electronic computers throughout its undergraduate and graduate programs. The current extensive use of these machines, in undergraduate courses in particular, came about as the result of several factors: (1) The University has a large and accessible digital computing facility and a sizable amount of analog computing equipment. (2) There has been extensive support of faculty computer training by the Ford Foundation Project on the Use of Computers in Engineering Education. (3) Every chemical engineering student is now required to take a one-hour sophomorelevel computing course which introduces him to digital computing concepts and teaches him the procedure-oriented language (MAD) used on the University's computer. With adequate facilities, and a computer-cognizant faculty and student body, it is possible to use computers extensively in junior and senior level engineering courses. Details of the faculty and student training programs may be found elsewhere.1'2 MAD (Michigan Algorithm Decoder), whose elements are a mixture of English vocabulary and mathematical notation, is a formal language especially designed to make as simple as presently possible, the communication of scientific computation procedures (sometimes called algorithms) to the digital computer (currently an IBM 7090). The language is similar to the more familiar ALGOL and FORTRAN languages. Students write their programs in this language, but do not operate the machine. Details of language structure and grammar can be found in Reference 3. This report presents a viewpoint based upon the chemical engineering faculty's experience with computers in the undergraduate curriculum and of the characteristics of computers which make them useful as problem-solving tools and as purely educational devices. This report describes the curriculum and current methods of introducing computers into the chemical engineering program and includes several completely solved chemical engineering problems suitable for educational use. -13

II. THE CHEMICAL ENGINEERING DEPARTMENT AND ITS CURRICULUM Since chemical engineering is offered in a department which also includes three other programs, Metallurgical, Materials,and Science Engineering, the faculty represents a wide variety of research and professional interests. An extensive array of courses is available to implement elective programs. The chemical engineering student group is well balanced between graduates and undergraduates, with about 60 baccalaureate degrees, 30 master's degrees and 15 doctorates awarded annually. The junior class is larger than the sophomore class because of the relatively high transfer rate from other universities and community colleges after the second year. Undergraduates have the customary diversity of interests while the doctoral students show strong inclinations toward research and teaching. Development of facility in computer application seems to follow the individual student's preference. There is no sharp demarcation between the metallurgical and the chemical engineering faculty. Those departmental faculty members who have taken part in one or more of the training programs of the Michigan Computer Project are listed in Table Il. As might be expected with the relatively large graduate enrollment, faculty and students are productive in the research area. About seventy-five publications per year have resulted from the research program in recent years. The effect of computer availability is readily apparent in these publications. Those interested in a more detailed description of staff and student research activities may request a booklet published by the Department of Chemical and Metallurgical Engineering by writing the Departmental office. TABLE Il Chemical and Metallurgical Engineering Faculty Members Who Have Participated in Programs of the Computer Project Name Rank Name Rank R. E. Balzhiser Assistant Professor R. D. Pehlke Assistant Professor W. C. Bigelow Professor D. F. Rudd* Assistant Professor L. E. Brownell Professor M. R. Tek Associate Professor S. W. Churchill Professor, Dept. Chairman L. H. Van Vlack Professor K. F. Gordon Associate Professor Brymer Williams Professor L. L. Kempe Professor J. L. York Professor Now at The University of Wisconsin Figure 1 shows the sequence of courses in the baccalaureate program in chemical engineering at The University of Michigan. The program has an unusually high degree of freedom for a student. Over forty percent of the total credit hours required for graduation are elective; over sixty percent of the courses beyond the "common core" are elective. Each student has the privilege of choosing a program to develop his own interests and abilities. With such individuality possible, a student may concentrate in courses in computer-related fields or he may avoid such courses entirely except for the required minimum. An undergraduate interested in computers would find the courses shown in Table I2 available. (A graduate student has even greater opportunity to concentrate in computer-related areas). -I4

Chemical Engineering BSE Program The University of Michigan Languages Engineering Humanities Mathematics Physical Science Chemical Engineering Science Social Sciences Physics Chemistry Calculus IGeneral English General CThermodomposy iti on (4)# (5) () (14) Calculus II Eng. Ca*Structure English (4)# Physics Phnalytsical I Processes of solids (4) (4 or 5) (4) (4o) (3) Organicr5)oc s E tCompositioni (5 or 10) (4) (3)~ ~ ~(3) ~~~~Advanced Math Electives ElEective Introductionor Science Chem. Engr. itE 1 t1o1< Digital Sci. (l? Calculus IIE Sequences in fo llowing princiPhysics II Physical II ngeometry, *cs Process n equations, and statAnalysistics. H (14) — Calculus TV *Rate *Structure # Analytical Processes of solids W Separations Materials Processes 10 or lo> (4) (3) Advanced Math Electives Electives or Science Chem. Engr. iterature (4) Electives ( Professi~onal ) aw, Econ.,etc. (6). (10) (13) ocial Sci. (1 ( ) Semester hours required. Blocks are in vertical order of semesters in which courses are taken. Includes: * Courses in which computers are being used. # The four-course mathematics sequence covers the *Engineering Operations Laboratory (3) following principal topics: analytic geometry, *Design of Process Equipment (3) differential and integral calculus, differential Figure Il *Chemical Process Design (3) equations, and statistics.

TABLE 12 Philosophy 414, 415. Mathematical Logic I and II Introduction and application to computer theory, switches and artificial intelligence. Philosophy 418. Philosophy of Mathematics. Philosophy 428. Philosophy of Science. Communication Sciences Introduction to Communication Sciences I and II. Concepts 400, 401. of communication and processing of information. Business Administration Electronic Data Processing Systems I and II. Statistics 450, 550. Electrical Engr. 465. Electronic Computers. Electrical Engr. 467. Switching Circuits and Logical Design. Electrical Engr. 565. Analog and Digital Computer Technology. Instrumentation Application of the Electronic Differential Analyzer. Engineering 510. *Mathematics 373: Introduction to Digital Computing. Mathematics 473. Methods of High Speed Computation. Industrial Engr. 373. Data Processing. The introductory computer course required of all undergraduate chemical engineering students. III. COMPUTERS AND THE ENGINEERING SCIENCES In considering the significant impact which the high-speed electronic computer will have on our future technological development, several questions arise concerning the role of computers in engineering education. There seems little doubt that a good fraction of today's engineering graduates (who may well be working as engineers in the year 2000) will see computers used in their technical work. This probable involvement of computers in engineering work requires that the engineer know more about.computers than he can learn from the "giant brain" articles in the Sunday supplements. Two pertinent questions are: "Where should he learn about computers - on the job or in the engineering school?'t, and "What is the minimum computer experience necessary?" The maximum depth of ability and experience will be limited, of course, only by individual capacity and desire. In planning a university program in any branch of engineering, the faculty must always consider present engineering technology and the probable course of science and engineering in the future. That is, students must be prepared not only for today's work, but must have the fundamental training to adapt to tomorrow's challenges. What is best learned in school and what should be taught by industry must always be resolved. The responsibility is acute for universities'because they must accomplish their work in a brief few years, no more than the first tenth of a man's professional or technical career. -I6

Use of Computers in Chemical Engineering Education The development, growth, and acceptance of large electronic computers, particularly the high-speed digital machine, have been so dramatic and rapid that most schools have not been permitted time to study and to experiment with their use. Obviously we cannot ignore these powerful new tools, but as yet are not certain of the best methods of using them in the curriculum. It is certain that we do not always foresee the future correctly and consequently may make errors in curriculum planning. The Department now believes that the minimum computer experience necessary for graduation should be the successful solution of at least one comprehensive and several simple engineering problems. Since it is most desirable to have the student learn the basic logic and mathematics of computing, all undergraduates are required to take an introductory course in digital computing. In this introductory course the student solves four simple problems, (usually some elementary numerical problems involving interpolation, approximation, root finding, and so forth) which serve to teach the MAD language used extensively throughout the University. The student is taught some useful numerical mathematics as well. Thus the student comes to his engineering problem courses with sufficient background to use computers to solve his engineering problems without the need for time-consuming training. Properly done, computer use should not necessitate removal of any essential material and should enhance the value of material covered in the course. Needless to say, it is essential that an instructor requiring computer use in his course must have a greater depth of programming experience than he expects of his students. Faculty preparation is without question the most important factor in successful computer integration into the engineering classroom. The most successful cases of classroom computer use in the Department have been by instructors willing to spend extra non-class time on computer work. Certainly the instructor should program any proposed problem himself before assigning it to his students. This permits him to gauge the amount of student effort which will be needed and also to foresee any omissions or inconsistencies in the problem statement or in the solution procedure. The intent of this effort is not to produce computer programmers (although many engineers will certainly be programming their own engineering problems after graduation), but rather to produce engineers with an appreciation for and the ability to use these new engineering tools. If the history of American science and industry is a guide, it is probable that specialization will develop in the use of computers as in most other technical areas. That is, although we are certain that nearly all engineering work forty years hence will in some way involve computers, it is reasonable to assume that not all engineers will actually be involved in programming their computer problems. To forecast otherwise would be to ignore differences in individual preferences and abilities. -I7

However, it is safe to predict continued development in the means of communication with computers. The engineers who wish to do so will find that the writing of programs will be a much simpler task in the future. Arbitrary and meaningless jargon, special and obscure forms will hopefully be eliminated. Programming languages are likely to be improved to the point where the statement of the problem and a simple unambiguous outline of its solution (perhaps in a flow diagram form only) will suffice. However, regardless of the advances in methods of presenting problems to the computer, engineers will find limitations in their mathematical ability. That is, there are the engineering and scientific aspects of problems and the mathematical aspects. It is clear that many engineers and engineering students will become interested and thoroughly competent in the use of the new mathematical techniques for solving their development and research problems. Others, perhaps a majority, will be primarily interested in work such as development, experimentation, and problem formulation, and will be willing to accept major assistance in mathematics and computer usage as they now accept expert advice in electronics and the sciences. It is essential that the students' computer experience emphasize pitfalls and possible abuses of computer use as well as the more obvious advantages. Good practices can probably be best instilled by example; the teacher's judgement in selection of problems, the solution approach, explanation of errors, etc., are very important for the student if he is to appreciate fully the value of a computer in his work. IV. EDUCATIONAL ASPECTS OF COMPUTERS For engineers, the purposes of computing will continue to be the obtaining of usable answers and insight into problems. For engineering teachers the computer can also supply valuable assistance in the learning process. Of the purely educational aspects of a computer (as distinguished from its use as a machine which supplies answers to engineering problems) the following should be considered: a. Precise Definition. The computer is a rather rigid taskmaster which requires precision in the statement of the problem and its method of solution. Preparation of procedures for computer solution introduces the student to a precise formal language (usually a mixture of English and algebraic notation). Because of the nature of such languages, the student's communication skill should be enhanced, he should tend to be more accurate, and he should achieve added understanding of mathematical notation and manipulation. b. Logical Organization. Complex engineering problems require both an analytical ability (to subdivide the overall problem into simpler ones which can be handled more easily) and an ability to synthesize (bring together solutions of individual parts of the whole). The preparation of algorithms (problem solving procedures, flow diagrams) for a computer requires just such analysis and synthesis abilities. -I8

Use of Computers in Chemical Engineering Education This training in logical organization should be of value to the student in all of his work. The instructor may also benefit from such computer experiences, resulting in better organization of material and a better presentation of problem solutions, even when the computer is not involved. The engineering teacher must, of course, be aware that logical organization of a problem solution is not equivalent to correct formulation of the problem in the first place. Thus, one can produce a perfectly logical solution to a set of equations which, in fact, do not represent the physical situation under study. Certainly computer training does not lessen the importance of engineering fundamentals. c. Minimize Ambiguity. Because a computer solution requires the preparation of an orderly and detailed step-by-step procedure, the approach to the solution must be an unambiguous one (formal languages used by computers allow no ambiguity). No gaps in the logic are permitted. d. Recognition of Assumptions. During preparation of organized detailed procedures, assumptions which may be overlooked in a hand computation are frequently brought to the forefront. Of course, a bad assumption in a computer program has just as deleterious an effect as in a hand solution; however, because of the great computational speed, assumptions necessary to permit hand computation may often be removed entirely. e. Solution of the General Problem. Because of the nature of the digital computer, i.e., its ability to read parameter values as data, it is usually possible (with little extra effort) to produce a general program which will solve a whole class of problems rather than one specific problem with a single set of parameter values. This necessitates an essentially symbolic approach to problem solving and is rather different from the customary solution technique involving mostly numbers. Such an approach requires a more abstract analysis which focuses on problem structure, rather than on "slide rule" details. f. Problem Complexity. Because of high computational speed, the computer permits solution of significantly more complex (and hence, frequently more realistic) problems than can be "hand" solved. The drudgery of tedious repetitive calculations is removed. Unfortunately, it is usually wise, and indeed essential, to work at least one example problem in detail by hand for checkout purposes. However, for iterative procedures it may only be necessary to hand compute through the first two or three iterations to establish correctness of the algorithm. g. Numerical Solutions. The high speed computer solution permits numerical approximation of problems which are intractable analytically. h. Logical Non-Numeric Problems. Since the digital computer is in fact a symbol manipulator rather than a mere number manipulator, it can solve a large class of essentially nonnumeric logical problems. -I9

V. THE ANALOG COMPUTER For reasons of speed, economy, capacity and ability to solve an almost unlimited spectrum of problems, the digital computer has in recent years tended to overshadow the analog (differential analyzer) computer. The analog computer is a more specialized machine, particularly well suited for solving differential equations. Because differential equations can be used to describe so many chemical engineering phenomena and processes, its use should be included in any undergraduate chemical engineering program. Consider the advantage of the differential analyzer for teaching purposes. It is an inexpensive device which may be operated directly by the student; programming of simple problems is very easy to learn, requiring a few hours at most; the output is presented instantly in graphical form. Mistakes may be promptly identified and corrected without the currently unavoidable turnaround delay time for large digital facilities; variations of parameters of the problem may be studied easily with suitable programming. In addition to teaching advantages there are certain types of problems in which the analog computer may always be superior. Process simulation is the important one for chemical engineers. It is ideal for the illustration and study of control modes and process control, and for the study of process stability and the factors which affect it. In the Michigan curriculum the best course for analog use seems to be the process design course (CME 481). Another successful use has been in the senior laboratory course in which the experimental determination of unsteady-state fixed bed ion-exchange rates were correlated and the ion exchange process simulated by both analog and digital methods. It is recognized that increasing complexity of problems tends to favor digital computation, and that the complicated and non-linear behavior of most chemical systems may require unrealistic simplifications in order to fit problems to analog equipment which we can afford, whereas the price paid in a digital solution may be primarily in computer time. Nevertheless, any chemical engineering department would do well to have and use at least one of the several small differential analyzers. Under the sponsorship of the National Science Foundation, Bernet Swanson and James Stice of the Illinois Institute of Technology have prepared an excellent report on the use of analog equipment in chemical engineering.4 VI. COMPUTER APPLICATIONS IN THE DEPARTMENT Chemical engineering is such an all-embracing subject that departments of chemical engineering can develop individual characteristics and personalities. The program at The University of Michigan might be described as a physical-chemical engineering program. Strong faculty interests have developed for research applications and engineering problems in physical chemistry, thermodynamics, and fluid dynamics. The use of computers in course work is largely in the application to solution or evaluation of analytical functions or equations, frequently by numerical -I10

Use of Computers in Chemical Engineering Education techniques. There has been little work involving either stochastic processes, or processes in which discrete operations or objects as opposed to continua are treated. However, there is growing interest, (and a new graduate course) in such subjects as queueing theory, searching, optimization, scheduling, linear programming, and disjoint processes which are susceptible to the concept of dynamic programming. These subjects, too, are beginning to appear in process design and increased awareness of these fields is expected. The following is an account to date of the use of computers in the chemical engineering program. Required Courses 1. Introduction to Engineering Calculations (CME 200 - 3 credit hours) This course may be elected as early as the second semester in the freshman year, at a time when students cannot yet be expected to have any computer programming ability. The student learns to analyze engineering problems and to solve them with the application of a few principles - the conservation principles and the first law of thermodynamics, stated formally. The problems are necessarily relatively short and the students learn to solve them under fairly close supervision. The combination of short problems and the need for immediate answers emphasizes the need for hand calculations rather than computer solutions. In one early attempt to introduce computer work into the course the students were required to write the algorithm for computing the theoretical flame temperature of a combustion process with various fuel to air ratios, after attending four two-hour non-credit lectures on programming in the MAD language. Perhaps one-tenth of the class developed some proficiency in about fifteen hours of study. This experiment showed the desirability of separating the teaching of computer programming from engineering instruction. Since Math. 373, the computer course, is scheduled after this course, the introductory engineering course does not currently include problems for which computer solutions are required. 2. Thermodynamics I (CME 230 - 5 credit hours including a laboratory) This course is usually elected when the student has had sufficient preparation in mathematics to elect the introductory computer course (Math. 373) at least concurrently. Thermodynamics is a subject in which machine computation has been used and can be instructive. It seems advisable in some cases to supply workable programs to the students in order to reduce their time to that required for preparation of data and interpretation of results. Experience so far suggests that the best computer problems are those which require tedious, repetitive operations such as the calculation and tabulation of the thermodynamic properties from equations of state or from tabulations of generalized characteristics. Two of the example problems shown later have been used in this course. No. 117, "Adiabatic Flame Temperature for Carbon Monoxide Oxidation," involves computation of adiabatic flame temperatures for various fuel to air ratios, and determination of the fuel-air mixture which produces the maximum flame temperature. No. 118, "Vapor-Liquid Equilibrium," involves the calculation of the complete vapor-liquid equilibrium composition diagram and of the temperature-composition diagram (at constant pressure) for the acetone-methanol -Ill

system based on three experimental vapor-liquid equilibrium concentration measurements taken in the laboratory part of the course. The complete composition diagrams are determined by computing the activity coefficients and using the Gibbs-Duhem and Margules equations. A trial and error (one of the root finding methods) procedure is required. 3. Rate Processes (CME 340 - 5 credit hours including a laboratory) Much of the Rate Processes course deals with establishing and solving differential equations governing specific problems in the fields of momentum, heat and mass transfer, and reaction kinetics. Also, the associated laboratory is primarily concerned with the taking and correlating of rate data. Consequently, there is a wide variety of choice in the selection of computer problems for this course. One problem is assigned each semester, and the students may work individually or in pairs. Typical problems deal with longitudinal reactor calculations, unsteady and steady state heat conduction, and the processing of experimental data which would otherwise require tedious hand calculation. The problem being used this semester is shown as example problem No. 116,'tPyrolysis of Ethane in a Tubular Reactor." It is solved by two different methods, one using a straightforward stepping procedure to solve the difference forms of the differential equations;the other uses the Runge-Kutta library subroutine to do the numerical integration. Example problem 120, "Dynamic Heat Exchange," has also been used in this course. It involves the unsteady state behavior of a single-tube, single-shell heat exchanger subjected to a time dependent inlet temperature function. It is in this course that numerical methods of solution are first introduced into the sequence of courses offered by the Chemical Engineering Department. Whenever possible, numerical solutions are treated alongside the analytical solution to the same problem. The advantage of numerical methods is emphasized for those problems in which analytical solutions are either unknown or very complicated. 4. Separations Processes. (CME 339 - 3 credit hours including a laboratory) There are numerous and obvious examples of the possibility for use of machine computation. in this course. All of th~ equilibrium stage processes are taught with the awareness of the existence of the many generalized programs for solving problems in this area. However, the digital computer has not yet been used directly in this course. The election of the course by both chemical and metallurgical engineering students requires the inclusion of a wider scope (and hence a briefer treatment) of topics than customarily given to chemical engineers alone; the time available for classroom discussion and problems has been severely reduced by emphasis upon the laboratory. The course has been in existence for only one year. In each semester, one short analog computer problem related to the separation achieved by the zone melting process has been assigned. The course has recently been changed by the addition of one credit hour and by limiting it to chemical engineering students. Use of the computer can be expected when these changes are effected. Example problem number 119, "Solvent Allocation in MultiState Cross Current Extraction," is illustrative of the kind of problem which could be considered applicable to this area. -112

Use of Computers in Chemical Engineering Education Elective Professional Courses The elective courses are all in the area of engineering synthesis whereas the required courses are in the category of engineering analysis or science. The work in the professional group of courses includes recognition and formulation of the problem as well as its solution and presentation in a report form. The student, by now in his senior year, is presumed to be competent in the use of the principles of the pure and engineering sciences. He now practices application of the principles in practical engineering problems. As a consequence, problems tend to be unique and each is attacked by a student in his own fashion. Use of the computer, either digital or analog, is permitted at all times. The extent of use by students varies; in some courses a specific assignment is made to insure that each student will have solved at least one comprehensive problem on the computer before his graduation. Most of the senior level students who have solved several simple and at least one such comprehensive problems feel that they are as competent in computer use as they are in any other specific area of their engineering training. There is little doubt that most students regard their computer work as useful; job interviewers are now familiar with such questions as "What kind of computer do you have?", "Are engineers permitted to do their own programming?t, "What kind and how much expert assistance is available for computer work?", and so forth. There are too many elective courses available to discuss in detail. The following discussion treats those in which machine computation has been successfully used. 1. Engineering Operations Laboratory (CME 460 - 3 credit hours) The course is developing from the older unit operations laboratory into one with projects which require some originality by the student. Since the emphasis has been upon the value of direct experimental information, the computer has not been used extensively. However, a fixed-bed ion exchange experiment has been used in conjunction with solution of the equations for the unsteady-state process by digital, analog and hand methods. 2. Design of Process Equipment (CME 480 - 3 credit hours) The problem which is fully described as example problem No. 122, "Economic Design of a Heat Exchanger," is used in this course. To allow students to examine thoroughly the parameters involved in creating an optimum design, the instructor has written several subroutines to do some of the tedious calculations. These routines produce results which are necessary for successful design but which would otherwise require an inordinately large amount of the student's time and divert his attention from the main design problem. The students seem to have a genuine feeling of satisfaction and accomplishment upon completion of the assignment. 3. Chemical Process Design (CME 481 - 3 credit hours) Since the digital computer is used extensively in the equipment design course, an effort is made to show the utility of the analog computer in process analysis. The most suitable problems are in the field of process dynamics and control. The operation and control of a continuous stirred-tank reactor is a good example. It can be used to show such factors as the difficulties in the formulation of a mathematical model, the evaluation of errors -M13

which arise from the assumptions necessary to fit the process to the available analog equipment, the different modes of control, and so forth. A two-hour lecture-demonstration with the computer and the descriptive pamphlet are usually sufficient to prepare a student for individual work in the formulation and solution of process models which can be expressed by linear differential equations with constant coefficients. Example problem No. 121,'tUse of Computers in an Undergraduate Engineering Design Course," describes student solutions to two problems associated with the design of a benzene nitration process. A digital program was written to determine the equipment costs for the plant. A simulation of the nitrator under various control modes was investigated on the analog computer. The computer can also be helpful in illustrating the use of some of the more powerful mathematical tools such as linear and dynamic programming. Graduate Instruction Many students enter graduate school from other universities with no previous computer experience. They are expected to learn programming either by attending the extra-curricular eighthour lecture series, by self-teaching, or by taking one of the courses. Since graduate students usually have well-developed interests and abilities focused on purely technical and scientific subjects, they learn computer programming readily and some become extremely proficient. Only two courses are specifically required of graduate students: Rate Operations and Thermodynamics. In the former, at least two computer problems, one digital and one analog, are required. In the latter, usually one digital problem is assigned. A wide variety of problems is, of course, possible at the graduate level. One problem which has been used, tAdiabatic Reaction to Produce Methanol from Hydrogen and Carbon Monoxide," is shown as Example problem no. 114. It is not uncommon for instructors to be presented with complete computer solutions to problems in which use of the computer was not requested or even suggested. The Heat Transfer Seminar (CM 840), in which usually only candidates for the doctorate are enrolled, has probably involved the computer solution of a larger number of different problems than any other course in the Department. During the semester, every student is required to present four papers to the class, each of which discusses in some depth a particular topic of interest in the field of heat transfer. Although it has not been the main purpose of the seminar to generate a series of computer problems, these papers have frequently dealt with situations whose governing equations are capable only of numerical solution. Consequently, the computer has made a significant contribution to the success of the seminar. In the last two years, the following topics have been among those leading to problems requiring numerical solution: radiant transfer in gas between parallel plates (integral equation), unsteady state conduction (involving moving freezing fronts), cross-flow heat exchanger, computation of view factors for radiant transfer, and the finite difference computation of natural convection at a vertical heated plate. -I14

Use of Computers in Chemical Engineering Education A new graduate-senior level course covering numerical and computer oriented solutions to chemical engineering problems will be given for the first time in the spring semester, 1963. The problems, to be taken from any appropriate chemical engineering area, will illustrate the use of such techniques as numerical interpolation and approximation, numerical integration, elementary operations involving matrices, and numerical solution of linear and non-linear equations, ordinary and partial differential equations. Statistical and optimization procedures will also be discussed. Particular emphasis will be placed on the development and numerical solution of partial differential equations. Announcement of the course produced a substantial student response; twenty-five students have already elected to take the course. Research The effect of large high-speed computers is most noticeable in graduate research. It is a rare doctoral thesis which does not have at least a regression analysis of the data. Any form of assistance has always resulted in the willingness of students to enlarge this scope of research effort, and computers are making as large a contribution to doctoral research as have methods of instrumental analysis. The experience with the graduate students and the computer is revealing. The essential factor seems to be the presentation of the computer as an opportunity. There follows a development of individual capacities and interests. The individual responses vary from those who become so facile and competent that they are destined for a career as computer specialists to those who, having used. machines, prefer to work in fields such as experimental research where the computer may be only a minor adjunct. Several recent experimental theses have involved considerable computer use, not only for data processing, but also to compare experimental results with those computed on the basis of assumed theoretical models. VII. EXAMPLE PROBLEMS Several complete example problems solved on electronic computers have been prepared by departmental faculty and by chemical engineering faculty from other universities who have participated in the faculty training programs of the Project on the Use of Computers in Engineering Education at The University of Michigan. Table I3 lists the problem titles and authors of those problems which are included here. Both digital and analog solutions are presented. Most of the digital programs are written in the MAD (Michigan Algorithm Decoder) language3, and have been solved on the IBM 704, 709, or 7090 computers; one is written in the ACT III language for the LGP-30 digital computer. -I15

Problems 114, 116, 117, 118, 120, 121, and 122 have been used for homework assignments in Departmental courses at The University of Michigan. The others have not been used at Michigan, but are thought to be suitable for classroom assignments. These problems may be considered as a supplement to the 111 example engineering problems previously published by the Project. Others which may be of special interest are problems 1, 6, 7, 12, 18, 19, 20, 41, and 44, in the First Annual Report and numbers 52 and 54 in the Second Annual Report. TABLE I3 List of Example Problems Number Title Author Page 112 Temperatures and Heat Flux in a Radiant W. C. Phelps I17 Thermal Circuit 113 Minimum Cost of Reactor Operation A. I. Johnson I21 114 Adiabatic Reactor R. E. Balzhiser I25 115 Successive and Simultaneous First Order R. N. Pease I32 Chemical Reactions 116 Pyrolysis of Ethane in a Tubular Reactor J. 0. Wilkes I39 117 Adiabatic Flame Temperature for Carbon Monoxide B. Carnahan and I49 Oxidation J. J. Martin 118 Vapor-Liquid Equilibrium R. Bonnecaze I65 119 Solvent Allocation in Multi-Stage Cross- A. 0. Converse I75 Current Extraction 120 Dynamic Heat Exchange J. Famularo I84 121 Use of Computers in an Undergraduate Chemical D. F. Rudd I96 Engineering Design Course 122 Economic Design of a Condenser D. E. Briggs I117 VIII. REFERENCES 1. Electronic Computers in Engineering Education, First Annual Report of Project on Use of Computers in Engineering Education, The Univ. of Micho, Ann Arbor, August 26, 1960. 2. Use of Computers in Engineering Education, Second Annual Report of Project on Use of Computers in Engineering Education, The Univ. of Mich., Ann Arbor, December 15, 1961. 3. A Computer Primer for the MAD Language, Organick, E. I., 1962. 4. Theory and Applications of Electronic Analog Computers, Stice, James A., and Bernet F. Swanson, Dept. of Chem. Engr., Illinois Inst. of Technology, 1961. -I16

Example Problem No. 112 TEMPERATURES AND HEAT FLUX IN A RADIANT THERMAL CIRCUIT by W. C. Phelps School of Metallurgical Engineering Purdue University Course: Heat Transfer and Fluid Flow Credit hours: 2 Level: Sophomore Statement of Problem Write a MAD program which determines the heat flux and temperatures of radiation shields in a thermal circuit in which heat transfer is by radiation alone. The source of heat is separated from the heat sink by a series of parallel radiation shields which are thin and closely spaced. Data to be used include temperatures of the heat source and heat sink, properties of the materials and surface condition of the thermal elements, i.e., the total thermal emissivity of each. The program should be written to deal with up to ten radiation shields of not necessarily the same emissivity. The program should be tested using the following data. Number of Shields: 5 Composition of Source: Graphite (emissivity 0.850) Composition of Shields 1, 2, and 3: Platinum (emissivity 0.126) Composition of Shields 4 and 5: Aluminum (emissivity 0.050) Composition of Sink: Rolled Sheet Steel (emisslvity 0.660) Temperature of Source: 26000 R. Temperature of Sink: 500~ R. Solution The radiant heat flux between two adjacent thermal elements (elements k and k-l) is given by A = 0.175 Fk-l, k [100 ) l100 ) ] (1) where Fk1k is a factor which represents the geometrical relationship between the two surfaces k-l,k and the effect of their thermal emissivities and absorptivities. In this case, F 1 (2) k-l,k 1 +1 - ek-l k Since the heat flux must be the same between each successive pair of elements, it can be shown that -117

Temperatures and Heat Flux in a Radiant Thermal Circuit 0173 n+l q 100 100 1 + + 2 + + C2 + - n-) Q + -1-...3- 1 n-i E1 2 n n+l Once the heat flux is obtained, the temperature of the k th radiation shield can be calculated by rearranging Equation 1: T k-l 1/A Tk =100 1 ( 1 4) k =100 0 173) ( (k-l E 0.17 By starting with the known temperature of the heat source (the zeroth thermal element), this equation can be used to determine the temperatures of sucessive radiation shields. In any procedure of this type it is advisable to compute the temperature of the heat sink (the (n+l)st e lement as a check. This check has been included in the program. A discussion of the theory is given in Reference 1. List of Symbols Problem MAD Program Definition and Units variable variable n N Number of radiation shields, up to ten. q RADFLX Heat flux, BTU per hour per sq. ft. Tc T(O) Temperature of the heat source, OR. Tk T(K) Temperature of k th radiation shield, ~R. Tn+1 T(N+l) Temperature of the heat sink, ~R. CG E(O) Total thermal emissivity of the heat source. Ek E(K) Total thermal emissivity of the k th radiation shield. Cn+l E(N+l) Total thermal emissivity of the heat sink. Flow Diagram CHGCK JDENT DEN' K To I Tn+, pINT N, / TOU' H R.- I I I ALPHA suM-+; -, —18 -I18

Example Problem No. 112 Flow Diagram (continued) LPHA I=s-'=, I A SUM /00 > ~., MAD Program and Data WILLIAM PHELPS D041N O 2 002 020 RAD 000 WILLIAM PHELPS DO41N 0 2 002 020 RAD 000 $COMPILE MAD, PRINT OBJECT, EXECUTE, DUMP R R THIS PROGRAM COMPUTES THE TEMPERATURES OF INDIVIDUAL RRADIATION SHIELDS AND THE HEAT FLUX IN A THERMAL CIRCUIT...~. D DIMENSION T(20), E(20) INTEGER I,K,N START THROUGH CHECK, FOR I-,1*1I..G3 READ FORMAT IDENT CHECK PRINT FORMAT IDENT VECTOR VALUES IDENT =S72H 1 *$ READ FORMAT DA TA,NT(O),T(N+1),E(O). *E(N+1) VECTOR VALUES DATA=$I2,S2,2F61,F10FS3/12F5.3*$ PRINT FORMAT ECHO,NT(O),TCN+1),E(,0:..E(N+1) VECTOR VALUES ECHO$1HO,1I52,2F61,s2,F6. 1,12(S11F4.3)*$ SUM-1./E (0)+1./E(N+1)-N-1. THROUGH ALPHA, FOR Kl,1,K.G.N ALPHA SUM-SUM+2 /E( K ) RADFLX=O. 173 (T'(O)/100. ).P,4,-(T(N+i)/1001 J P,4 ) /SUM THROUGH BETAFOR K1llKeG.N+1 BETA T( K) =100.*SQRT. (SQRT. ( ( T (K-1 )/100. ).P.4. -RADFLX/O.173*{ 1./ 1E(K-1)+1./E(K)-1.})) PRINT FORMAT RESULT,RADFLXTbO)...TCN+1) VECTOR VALUES RESULT=$1H,18HRADIANT HEAT FLUXF1O0.2,$S2 15HBTU PER HR-SQFT//68HOABSQLUTE TEMPERATURES OF THE THERMAL 2ELEMENTS, FROM THE HEAT SOURCE,/40H THROUGH THE HEAT SIN4K, RE 35PECTIVELY*..,/1HO,12 ( F6. 1 S2)*$ TRANSFER TO START END OF PROGRAM $DATA 1 W C PHELPS AUG 15, 1961 RADIANT HEAT TRANSFER FROM A GRAPHITE HEAT SOURCE, THROUGH THREE PLATINUM AND TWO ALUMINUM RADIATION SHIELDS, TO A ROLLED SHEET STEEL HEAT SINK. 5 2600. 500..850 *126.126 *126.050.050 *660 -I19

Temperatures and Heat Flux in a Radiant Thermal Circuit Computer Output W C PHELPS AUG 159 1961 RADIANT HEAT TRANSFER FROM A GRAPHITE HEAT SOURCE, THROUGH THREE PLATINUM AND TWO ALUMINUM RADIATION SHIELDS, TO A ROLLED SHEET STEEL HEAT SINK# 5 2600.0 500.0.850 *126,126.126.050.050.660 RADIANT HEAT FLUX= 635.09 BTU PER HR-SQFT ABSOLUTE TEMPERATURES OF THE THERMAL ELEMENTS, FROM THE HEAT SOURCE THROUGH THE HEAT SINK. RESPECTIVELY....,2600.0 2556.6 2470.6 2374,7 2163.5 1660.0 499.9 Discussion of Results Note that for the particular set of data chosen the temperature of the hottest aluminum radiation shield is above its melting point. Critique This problem is a very simple one and is easily programmed. It should serve as a good introductory problem for students learning to use the computer. Since the problem can be solved by hand, it is not difficult to check the computer program. Reference 1. Schuhmann, Metallurgical Engineering, Volume I, Principles, Addison-Wesley. (1952) Chapter 7. -I20

Example Problem No. 113 MINIMUM COST OF REACTOR OPERATION by A. I. Johnson Department of Chemical Engineering McMaster University Course: Introductory Chemical Engineering Credit Hours: 3 Level: Sophomore Statement of Problem c C02, H20, 02 Ethylene is converted to ethylene oxide using pure oxygen by the scheme shown Recycle at the right. The number of moles, M, of Ethylene (RRC) ethylene oxide produced per 100 moles of Feed ethylene fed to the reactor as a function Ethylen e ctor of feed concentration, C (mole percent (FETH) Oxygen Ethylene Oxide ethylene in the feed to the reactor), and temperature, T, is given by: M(C,T) = (30.4 + 0.2025C - 0.007375C )(-3.56 + 0.0357T -0.00007T2) (1) In addition, it is found that the activity of the reactor is decreased by the presence of impurity in the recycle and values of M given by equation (1) should be multiplied by CF = 1 - 20,000 (2) where RRC is the moles of recycle per day. The cost of oxygen is $1.00 per lb.mole, of feed ethylene is$2.00 per mole and of recycle ethylene, $1.00 per mole. You are to determine the most suitable recycle rate, mole percent ethylene in the feed, and reactor temperature for a plant producing 20 tons of ethylene oxide per day. Notes: 1. This problem has been adapted from one in.Money and the Chemical Engineer, by Osborn and Kammermeyer. 2. This problem would be more realistic and interesting if the information given by equations (1) and (2) were supplied to the students in tabular form. Solution The flow diagram below outlines a method for searching for a minimum cost starting from arbitrary values of recycle rate, composition of feed to the reactor, and temperature. Using a random number generator (the subroutine RAM2B.) to produce three random numbers, the three variables are changed simultaneously ten times, and costs for each set are tabulated; -I21

Minimum Cost of Reactor Operation this table also includes the cost at the starting point. The values of the variables at the minimum cost in this table are then used as the starting values for the next set of ten trials. This is repeated until there is essentially no further improvement in minimum cost (determined by tolerance EPSI). Table of Symbols C Mole percent ethylene in feed (dummy variable for COST. subroutine). COST. Subroutine to determine cost, given arguments RRC, C, T. CCOST Array for storing the minimum cost for the Kth trial set. DM* Maximum possible variation in MPCER during the Kth trial set. DR* Maximum possible variation in RETH during the Kth trial set. DT* Maximum possible variation in TEMP during the Kth trial set. EPSI A tolerance. Used for terminating the optimization procedure. When the improvement in minimum cost between the Kth and the K-l th trial set is less than EPSI. FETH New ethylene feed rate. FO Oxygen feed rate (moles). J Subscript corresponding to the set of parameter values associated with MIN, i.e., RRETH(J), etc. K A counter on the number of trial sets. M. Internal function to determine the moles of ethylene oxide produced per hundred moles of ethylene feed, given arguments C and T. MIN The minimum of the generated set of ten NCOST values. NCOST Array for storing cost values for the ten sets of trial parameter values in the arrays RRETH, MMPCER, TTEMP. MMPCER Array for ten trial values of MPCER. MPCER Best mole percent ethylene in feed (main program), during Kth trial set. R A random number. 0.0 <R <1.0 RAM2B. Subroutine which generates random numbers. RETH Best recycle ethylene rate (main program), during Kth trial set. RRC Recycle ethylene rate (dummy variable for COST. subroutine). RRETH Array for ten trial values of RETH. T Reactor temperature (durmmy variable for COST. subroutine). TEMP Best reactor temperature (main program), during Kth trial set. TTEMP Array for ten trial values of TEMP. * Actual variation is determined by the random number, R. -I22

Example Problem No. 113 Flow Diagram R r THoMCs l IHP OEA M t-c toU I - c co',(K ( ccoE.,) ()- R= sr(' 2 9 1E:PT, E-'-t ( Pr (A e,)0 MAD Program and Data PRINT FORMAT TITLE DIMENSION CCOST(5C0),RRETH( 1C ),MMPCER( 10o), TTEMP(10), iNCEST (10) INTEGER lIJK, MA READ DATA READ FORMAT DATARETHi,MPCERTEMP,CR,CMD)TEPS1 PRINT FORMAT UDATA,RETF,MPCER,TEMP,DR,MDUTEPSl K=3 CCOST(K)=CCS.RETH,MPCER, TEMP) START RRETH(O) = RETH MMPCER(') = MPCER TTEMP(O) = TEMP THROUGH ALPHA,FOR I=l1,,I.G.10 R=RAM 2B. (0) RRETH( I )=RETH+(R-2.5)*DR R=RAM2B. (0) VMPCER( I )=MPCER+(R-O.5)*DM R=RA 2. O ) TTEMP( I )=fEMP+(R-vo.5)*DT ALPHA NCOST(I)=CCSI. (RRETH(I),MMPCER(I),TTEMP(I)) NCOST ()=CCOST K) N I N =1. E 38 1 HRKOUGH EFA FCR = 0,1,I.G. W HfENEVER NCCST(I).L. IN MIN=NCOST (I) J=I HETA ENI CF COUNITICNAL CCOST (K+l) =NCCST (J) RE tl=RRETH ( J ) MPCER=MMPCERi J) TEMP= TTEMP (J) WHENEVER *ABS.(CCOST(K+)-CCOST(K) )*L*EPS1 PRINT FORMAT OUT#CCOST(K+1)PRETH9MPCER#TEMP PRINT FORMAT NUMK TRANSFER TO END OTHERWI SE K=K+1 TRANSFER TO START END OF CONDITIONAL -I23

Minimum Cost of Reactor Operation MAD Program and Data (continued) VECTOR VALUES TITLE=$1H1l24H OPTIMIZATION OF REACTOR*$ VECTOR VALUES DATA=$7FlO.2*$ VECTOR VALUES DDATA=$1HO,7F10.2*S VECTOR VALUES OUT=$1HO,16H MINIMUM COST OF#F1O.2t/28H OCCURRE 1D AT RECYCLE RATE OF9F10O2./22H FEED CONCENTRATION OF.F10.2:/ 219H AND TEMPERATURE OF,F10.2*$ VECTOR VALUES NUM=$1H0,21H NUMBER OF TRIALS WASI2*$ END END OF PROGRAM sCOMPILE MAD. PRINT OBJECT EXTERNAL FUNCTION(RRCC.T) ENTRY TO COST. INTERNAL FUNCTION M*(C,T)=(30e4+0.2025*C 1-0.007375*CP.2 )*(-3X56+ ~0357*T-OOQO7*T*P.2 ) CF=1.- RRC/20000. TETH=91000/tM. (CT)*CF) FOTETH*( 100*-C)/C FETH=TETH-RRC COSTT=1iO*FO+2.O*FETH+il *RRC FUNCTION RETURN COSTT END OF FUNCTION $DATA 2000. 40. 240. 50. 5. 20. 50. Computer Output OPTIMIZATION OF REACTOR 2000.00 40.00 240.00 50.00 5.00 20.00 50.00 MINIMUM CCST OF 11293.55 (OCCURRED AT RECYCLE RATE OF 2059.74 FEED CCNCENTRATICN OF 42.37 ANC TEVPERATURE OF 254.c,6 NiUM'ER CF TRIALS INAS51 Critique The technique suggested in this problem is easily programmed and does not require much machine time. It should be applicable to a large number of independent variables. It is unfortunate that there was not more time available to make a thorough investigation of the method. In particular the value of EPSI = $50 should be reduced. Editor's Note: It would probably be wise to decrease the magnitudes of DR, DM, and DT as the procedure continues, i.e., to narrow the band of permitted variations as the estimates of RETH, MPCER and TEMP are improved. The criterion for termination, namely that the lowest cost value found at the randomly selected 10 operating points inside the space DRDM-DT with geometric center at RETH, MPCER, TEMP show only minimal improvement (EPSI) over the previous best value is probably inadequate, particularly if DR, DM, and DT are still significant fractions of RETH, MPCER, and TEMP. As with most extrema-finding procedures there is no guarantee that the minimum will be found, only that the method will find successive improvements while heading toward a local minimum. (B.C.) -I24

Example Problem No. 114 ADIABATIC REACTOR by R. E. Balzhiser Department of Chemical Engineering The University of Michigan Course: Engineering Thermodynamics Credit hours: 3 Level: Graduate Statement of Problem A plant produces methanol from hydrogen and carbon monoxide. In the process, stoichiometric proportions of CO and H2 are compressed isothermally and reversibly at 250C from 1 atmosphere to 310 atmospheres. The compressor discharges the gas continuously to a well-insulated catalytic reactor where the following reaction takes place: CO(g) + 2H2(g) _cat. CH30H(gl The methanol leaving the reactor is in equilibrium with the CO and H2 in the stream. There is negligible pressure drop across the reactor. The process is illustrated in the diagram below. Q Isothermal Adiabatic Catalytic Compressor Reactor 1. Calculate Isotrmal Adiabathe compressor in calories per gram-mole of carbon monoxide fed. Also determine on the same basis the amount of heat transferred to the surroundings from the compressor. (Not required as part of computer solution.) 2. What is the per cent conversion of carbon monoxide to methanol? 3. What is the temperature of the exit stream from the reactor? The following information is to be used. For methanol at P = 3.94 (P = 310 atm.) -I25

Adiabatic Reactor in TCH = 3.15 - 0.7 Tr2 ln (f) = - o.43 + 2.46 3.36 In P Tr Tr2 C at 1 atmosphere cal/gm-mole-~K CO(g) 6.60 +.0012 T H2(g) 6.62 +.00081 T CH30H(g) 3.53 +.0256 T AH0 (Heat of formation from the elements; standard state of 1 atmosphere and 25~0C) CO(g) -26,420 cal/gm-mole CH 30H(g) -48,080 cal/gm-mole AG~ (Free energy of formation from the elements; standard state of 1 atmosphere and 25~0C) CO(g) -32,808 cal/gm-mole CH30OH(g) -38,620 cal/gm-mole T K P atm. Critical Constants Tc c CO 134 35 HII2 33 12.8 CH20OH 513 78.7 Solution CO + 2H2 - > CH30H at 310 atm. Find conversion and final temperature if reaction proceeds adiabatically. CH OH [y4)C K__ == CH3OH a a co a2 HCO 2 Ly( LPoH-I26-126

Example Problem No. 114 ADIABATIC REACTOR by R. E. Balzhiser Department of Chemical Engineering The University of Michigan Course: Engineering Thermodynamics Credit hours: 3 Level: Graduate Statement of Problem A plant produces methanol from hydrogen and carbon monoxide. In the process, stoichiometric proportions of CO and H2 are compressed isothermally and reversibly at 250C from 1 atmosphere to 310 atmospheres. The compressor discharges the gas continuously to a well-insulated catalytic reactor where the following reaction takes place: CO(g) + 2H2(g) cat. CH30H(gl The methanol leaving the reactor is in equilibrium with the CO and H2 in the stream. There is negligible pressure drop across the reactor. The process is illustrated in the diagram below. Q CH OH + CO + H CO +H2 3110 atm. 1 Isoat250 C ic Catalytic310 atm Isothermal Adiabatic Catalytic Compressor Reactor 1. Calculate the work done by the compressor in calories per gram-mole of carbon monoxide fed. Also determine on the same basis the amount of heat transferred to the surroundings from the compressor. (Not required as part of computer solution.) 2. What is the per cent conversion of carbon monoxide to methanol? 3. What is the temperature of the exit stream from the reactor? The following information is to be used. For methanol at P = 3.94 (P = 310 atm.) -I25

Adiabatic Reactor In HC = 3.15 - 0.7 Tr2 in (f) = - 0.43 + 2.46 3.36 P Tr TrTr C at 1 atmosphere cal/gm-mole- ~K CO(g) 6.60 +.0012 T H2(g) 6.62 +.00081 T CH30H(g) 3.53 +.0256 T AH~ (Heat of formation from the elements; standard state of 1 atmosphere and 250C) CO(g) -26,420 cal/gm-mole CH 3OH(g) -48,080 cal/gm-mole AG~ (Free energy of formation from the elements; standard state of 1 atmosphere and 250C) CO(g) -32,808 cal/gm-mole CH30OH(g) -538,620 cal/gm-mole Critical Constants Tc K Pc atm. CO 134 35 H2 33 12.8 CH20H 513 78.7 Solution CO + 2H2 - CH30H at 310 atm. Find conversion and final temperature if reaction proceeds adiabatically. aCH OH Y(pf)]CH OH Ka = a 2 2 CO H 2 Ey ( PIEY (7 ) PI HC where standard statesare the pure gases at 1 atmosphere and equilibrium temperature. At 1310 atmospheres (f) for H2 and CO 1.0. -I26

Example Problem No. 114 For CH OH at 310 atmospheres the following relationship expresses (f) as a function of Tr: In (f) = 0. 43 + 2.46 336 (1) P Tr ( 2 r Tr Incorporating the reaction stoichiometry to eliminate the mole fractions in the above expression for Ka,yields the following values in terms of the conversion, x. Considering 1 mole CO and 2 moles H2 entering IN OUT y CO 1 l-x (l-x)/(3-2x) H2 2-2x (2-2x)/(3-2x) CH30OH 1 x x/(3-2x) 3-2x where x = moles CH30H produced/mole CO fed. x(~) - (3-2x) CH OH: Ka = 2 (2) (l-x) 3 4 P In Ka T s TKaT dnKa = dT RT2 ln K 298 a298 T AHT = -21,660 + [- 16.31 + 0.0226 T] dT 298 = 0.0113 T2 - 16.3 T - 17,805 ln K 0.00568T - 8.2 lnT + 8,970 + 24.8 (3) aT T(3) For adiabatic reaction, Q = 0..,AH = 0 or H Hr products reactants (a) AHa for reactants at 298~K in going from 310 atm. to 1 atm. equals approximately zero. (b) AHb for reaction at 1 atm. and 2980K is equal to -21,660 x per mole of CO fed. (c) AHcfor isobaric increase of temperature fromi 2980K to equilibrium temperature T: T Tn AHc= x (5.53 + O.0256T)dT + (l-x) (6.60 + O.0012T)dT 298 298 T8 + (2-2x) (6.62 + 0.00081 T) dT 29 8-27-I27 -

Adiabatic Reactor AH = (19.84 - 16.31x)T + (0.0113 x + 0.0014)T2 - 298 (19.84 - 16.31 x) - (0.0113 x+0.0014)2982 (d) AHdfor increasing pressure from 1 atm. to 310 atm. at temp erature T: Enthalpy corrections for both CO and H2 with pressure changes are negligible. For CH30OH at 310 atm. in H-H = 3.15 - 0.7 Tr (4) / H*-H \ A Hd = x TC TC AH = O = - 21,660 x -16.31 x T + 0.0113 x T2 + (298)(16.31)x -(0.0113)(298)2 x H (-H) TC x + 19.84 T + 0.0014 T2- 298(19.84)-(0.0014) (298) 2 0.0014 T2 + 19.84T - 6.o44 17,800 + 16.31 T - 0.0113 T2 + (HTH) TC Table of Symbols MAD Program Problem Meaning Description Cp Heat capacity at constant pressure. COMP +1.0, determines the sign of DELT DELT AT Increment in assumed temperature. ENTH (H*-H)/TC Enthalpy function. f Fugacity. FUG (f/P) Fugacity coefficient. AG0 Free energy of formation, @ 1 atm., 250C. H Enthalpy at pressure P and temperature T. H* Enthalpy at pressure P=O and temperature T. AH~ Heat of formation, @ 1 atm., 250C. I Counter on the number of iterations. KT Ka Equilibrium constant at assumed temperature T. IKX Equilibrium constant based on conversion, x, computed from heat balance. -I28

Example Problem No. 114 Table of Symbols, Continued Problem MAD Program Description Meaning P P Pressure. Pr Reduced pressure, P/Pce T T Assumed temperature. TC TC Critical temperature. TO Assumed value for T in the first iteration. X x Moles of CH30H produced per mole of CO fed. Flow Diagram ~PRINT TITLE / ~THROUGHQ T=TO, READ DATA PRINT TITAT, I.TI < 1. 0o S~~~TART~ "ADIABATIC.." COMP=O or PRN SULT, TC, P I KT10 f )' I=I+1 — ( )=Exp(-O. 43+2. 46TC - 3.36TC 2 H*-H -~C TExp.(3 15- O0 72 TT T C T' 3KT=Exp (0 00568 T-(82)lnT + 8,970 +248 X= O0014T2+19' 84T-6,024 TIc -KTc PRINT RESULTS, TX, KT'

Adiabatic Reactor MAD Program and Data R. E. BALZHISER T26-N 2 0 5 010 030 $COMPILE MAD. PRINT OBJECT. EXECUTE* DUMP START READ FORMAT DATA*TODELT#:TCP PRINT FORMAT TITLE.TO*DELT*TC*P PRINT COMMENT $ $ INTEGER I I=0O COMP=O THROUGH BETA, FOR T=TO, DELT9.A8S.DELTeL.1.OR. I.GI10 I=1+1 FUG=EXP (-0.43+ (2.46*TC) /T-( 3*36*TCP2 ) /T*P2 ) ENTH=EXP. (3& 15-(07*T*P2. )/TC*P*2*) KT=EXP.(0 00568*T-8*2*ELOG( T )+8970/T+24.8 ) X=O0.0014*T.P2.+1984*TT- 604. ) / (17800.+1631*T-0. 0113*TP.2. 1+ENTH*TC) KX=(FUG*X*(3.0-2.0*X)P*2 J / ((1O0-X).P.3*4O0*Pe.P2*) WHENEVER *ABS.(COMP+((KT-KX)/.ABS.(KT-KX))).*G 0.5, 1TRANSFER TO ALPHA DELT=-(DELT/2 ) I=0 ALPHA COMP =(KT-KX) /ABS* (KT-KX) BETA PRINT FORMAT RESULT*T*X TRANSFER TO START VECTOR VALUES DATA=$4F10*4*$ VECTOR VALUES TITLE=$1HlS1O,017HADIABATIC REACTORs,S6t6HCM 211 1//1H s4F10*4*$ VECTOR VALUES RESULT =$S5t6HTEMP =F10.49S10*12HCONVERSION =F9 1*6*$ END OF PROGRAM $DATA 298.0 100*0 513*0 310.0 Computer Output ADIABATIC REACTOR CM 211 298.0000 100.0000 513.0000 310*0000 TEMP = 298.0000 CONVERSION =-0.000236 TEMP = 398.0000 CONVERSION = 0.068324 TEMP = 498.0000 CONVERSION = 0.142736 TEMP = 598*0000 CONVERSION = 0.224651 TEMP = 698*0000 CONVERSION = 0.314837 TEMP = 648.0000 CONVERSION = 0.268686 TEMP = 673.0000 CONVERSION = 0.291495 TEMP = 698.0000 CONVERSION = 0.314837 TEMP = 685.5000 CONVERSION = 0.303099 TEMP = 673*0000 CONVERSION = 0.291495 TEMP = 679*2500 CONVERSION = 0*297280 TEMP = 685.5000 CONVERSION = 0,303099 TEMP = 682*3750 CONVERSION = 0.300185 TEMP = 683*9375 CONVERSION = 0.301641 -130

Example Problem No. 114 Discussion of Results At the end of each iteration the assumed temperature, in degrees,and the conversion of CO to CH3OH were printed. Temperature was the variable incremented in the iterative process. It was initialized to the inlet temperature of the reactants and increased in steps of 1000K until the desired temperature was exceeded as determined by a reversal in the sign of KT-KX. The increment was then halved in magnitude and reversed in sign and the procedure repeated until the absolute temperature increment was less than one degree. The only difficulty anticipated with this program would arise if the temperature assumed initially were too high or if the first increment were too large. Under either of these conditions the sign change in KT-KX would not occur and the assumed temperature would continue to increase by the initialized increment. Critique A) The problem meshed well with the course material. It had been assigned in previous semesters but the exact solution had not been obtained because of the lengthy trial and error procedure involved. B) The problem was not extremely difficult to program. It necessitated the use of iterative procedures and demonstrated a practical application for computers in chemical equilibrium problems. C) The students reacted very favorably; they were eager to start the problem and most retained their enthusiasm until their program operated satisfactorily. D) The last three weeks of the course were devoted to statistical thermodynamics with very little homework assigned. The computer problem was assigned at the end of the classical treatment of thermodynamics and just before the statistical phase began. Additional home assignments during the final three weeks were few and ample time was available in recitation for discussing difficulties. Consequently no interference with the normal course routine was observed. E) Both the MAD language and the IBM 704 were quite adequate for the problem. F) The problem was extremely worthwhile to both students and instructor. -I31

Example Problem No. 115 SUCCESSIVE AND SIMULTANEOUS FIRST ORDER CHEMICAL REACTIONS by Robert N. Pease Department of Chemical Engineering The University Michigan Course: Rate Operations Credit hours: 5 Level: Junior Statement of Problem Given the reaction shown at the right for which -13 k1 = 0.40 hr 1 k4 = o.o8 hr k5 =0.10 hr1 D Assume that all reactions follow first order kinetics. r1 = rate of formation of A r2 = rate of formation of B r3 = rate of formation of C r*4 = rate of formation of D The number of moles of the various components present in the initial reaction mixture are as follows: A: 7.00 pound moles per cubic foot B: 2.00 pound moles per cubic foot C: 0.00 pound moles per cubic foot D: 0.50 pound moles per cubic foot Write a computer program to calculate the number of moles of all the components present as function of time. Solution A program was written in the ACT III compiler language and compiled and executed on the LGP-30 digital computer. The problem was solved by step-wise integration. For each time interval, an iteration method was used in which the final concentrations were calculated from rates based on the average concentrations for the interval and then new average concentrations were computed as the arithmetic averages of the initial and final concentrations. The iteration was continued until successive estimates of the final concentrations agreed within a specified convergence limit. -I32

For the first iteration of the first time interval, the starting concentrations were used as the average concentrations. For the first iteration of each subsequent time interval, the average concentrations were estimated from the concentration changes of the previous interval. The computation was stopped by the operator when a sufficient number of steps had been computed. The following symbols were used in the ACT III Program. ao,bo,co,do concentrations of components A, B, C, D, respectively, at the beginning of the run; pound moles per cubic foot a,b,c,d average concentrations during an interval af,bf, cf,df currently computed final concentrations for an interval paf,pbf,pcf,pdf = previously computed final concentrations for the same interval dela,delb,delc,deld = changes in concentrations during an interval. t = time, hours delt = time interval, hours n = number of trials for an interval conv = concentration convergence limit for an interval The appropriate equations used were dela = [-kla + k5'b ]'delt delb = [kl-a - k6'b + k4.d ]'delt delc = k2. b.delt deld = [k3'b - k4.d ] -delt where k6 = k2 + k3 + k5 af = ai + dela bf = bi + delb of = ci + delc df = di + deld -I33

Successive and Simultaneous First Order Chemical Reactions a = (ai + af)/2 b = (bi + bf)/2 c = (ci + cf)/2 d = (di + df)/2 Flow Diagram START 4, IQr3 5 bo Ao d o|) PRiMT A3 M Ix~nlr 4A I,. delt TAB LE' HEAWiNG c- - bA, Sl= (a j bi: + ae/t, - 4 — ) / L 1 4 pio c+= 0 t10 (Ai c <0/L T91 pAA = dCA r d = ct t + dI)/ _ ~A-3 Co)~af - po+ | > pMTehI-F I 3 r t1 df-r - Pd f > tcm A30 iC b4 I9: - fJ I-ei-C - (L' Ev Ycle lc - (K3 b d 11d.) — lts t, d+ q-a)dd+, ExiT C - lo34 CeP-r

Example Problem No. 115 ACT III Program and Data s,' cr e. "' xead'' read't2'' read' k.'' read' k4'' readd' k5'' k2'+';3'-'' 151;' k6'' s2' re"d' ao':' read'bo''read' co''read' do'' s3' >read' COnv' s4' read e3 l' I' s5' cr' cr' cpr''' I'',tab I( daprt I I n I' yab) t' da' pj. t' a " tab' I''ahO' d pb'b I' i'la)''c'' ttt b'dap rt''d't so t t' e''' py t''rev';' (3dla'':.('ea~d. rt d l'dE b predl;' del ld' s'ao t;'a''-Lbo'' b' tco' l' cf "do';'d'' use' S30 s110111 i+',!' 3'n'' si2' a' 3'pa:2''tb' "'lp:b-tf c pftdf'' f d'pdf' slt t' i'+-I'a. Ix~ "e'O'b I I 1'Cl~~'C ~'X"' -I5 et') I I" 5,'diX _'d''-.51e'0';'d' sl6T'ett s90 tuse' s91' s20' i l'abs't'f'-'pal'''conv' po s't s0' i','abs''bflr'pb~'. tony' n'pos'slO',i' labs','c~-'pcp t.'-lconv'.'pos'slO' _ a b s Ipo I. - conyt. 1pos s0'' s30' cr'703'dprt''t' tab2'ip2'00' ipt'n' tab' 1603' dpPrt' 3' t'tab 603t'dprt'bf' *tab'0O3 t dprt' cf' tab' O03' (prt df' s32'0';'n' t't-' delt; t't t s34' af';'ai'oprev'+ delat'x'.51' e'O';' a' bf';'bi' prev'+'tdelo'x'.5'" e'0''b'" cf;'.ci''prev'+'dec'x 5'e'' t;'cl' t'';'di'?prev'+' deld'x'.5t' e'O';'td'' s40r'Tret' s9 Olusets91 use'slO"' s91' x'Ix' lX' a'.'x'Idelt';'dela'' prev' +' ai';' t t s'D2'1,1 b I -i I 1 _4 t. t: x I. I de it II deelb " s93'I2'x'b'x' delt I I delc I t sO4t'tk3xtb'-'k4'x'd'.'3.el-t''led''re' +1i'; I 1 i mt s90'go to sO'' Data 0o Rut1! +4o' +0o T+! " I0 +1' +0' +'' +' -.2'+tt2'' -I35

0r'x L"''\,.O c-C-O N CO-t LC\X CO OHCO H-0 - C-H r'-t d I C OO\HO 0.), 0 0 C 0, \ LCCOH N-,O — O 0 0,", xLCCC CO L.'r)0 G-D~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~L L[_.-4-. _t —. 0 C) O \LLOO OC-LN 0L-\V- 010':\0 t0 O C\OrIC\NC N-ON~i -- 00000 L\;- HO kC9NC I-tf\CC>H O.'0 10-0II- C-l ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~~~~~~~~~~~. ~. ~ ~ ~ ~ ~ ~~............. ~. rd ~ ~~~~~- r —- r-" -— I r-t r-t ~ —!I-tO Ckl o,1 0i O,10 O.10 Cl Od Cd C dj O OJ Ckl 0II N N Cdj O C'Q Odl al CxI OdJ O CM Od Ol Odj cd 0o oj CIO CU!, 0 \O r'x? -cO 0..z O -',. J — O.- C —CO O — 0 -C- -' C-CC CO H U'-Z 110 CU r)0 r q.. — 0r''.- C, --, —-I r —I Hr —-I ~1-I,-. — Od OJ 0 O,. C\l C\d Od I, Nh ~~ K,"'"\ r c,,,,,'-,.'N Nr t _z..J..?.. -..+..z -Z..-~.."..z" r-rx:,' Lt.r, lr,r.' _ -V:,.'. 0 r-"' 0 ON\OO OCOCOXO C -- 0 H CO CO C,\.10o- C',,,C-z'x 0 CO CH -C-C - C0\C(DO H-I r- L\ r-I C 2 C,00AC C CllOi \ \0 t-H 00-010-COON CM ONCO) C COG.0 L0 0-6O 0 0 C,- oCO L) H N 0\ c COH 00-HCYNOC 0.00>00- LCNCO 0-0-1000 11>0~~~~~~~~-\0 HO. ONCO,~ C-CO IO10 0>0 H 0OC)OC —O 0N-0 or00 g00~~~~~~~~~~~~~~~~~~' 8"~ -.,0c 100CJ0 OCD\) L-\ C-)CC)C 0 HDCQ 0100 H COC)\O -—'r- Hr O- 0 C-CO NCVO C-H 0CO CO O'OCO 00-0-00C~ riCOj 0' 00>) 0) 0-0- -:j-CO 0 CO -C0 HCO I, L0 —-0 COC) -- C. L,-'\ COO 0 " —T L H,c —,, - 0] &.\ r'-.C'O'-0 CO) %01 HO,- C.\ 0)0 C- C\ CO C — LC0OH0.0.C C....\ "'C-00-0O \. ",... \.... -.- \ N,7',." C) O0 H- + + o + + o C HO 00) 0 2010 COO 1C,) HC-I' 0 0 10C CO 10 CC) H0 C)CD0 0C1001 0CC, H0 C00C 0 0 0 C)0 10C H0 C )-D0 ~~~~~~C0 0;' H.H 0 q - ++ +++ - - 0 -p~ ~ ~ ~ ~ ~~~~~~~~I 0 0,'~. x~dLxO~~~ —.'x ",O ~C 1- b-."'OOxO ~O -I.'Ohl. CO.,Ot~~0,q.?C~O.'C' ~~0.. k+!k....................' 0~~~~~~~~,.x0 - -. - - - - L dCJI:",l,"x'~,.~,z].. _J r, rXLr'. L..O[-?~ —OC O0'' -lr' -iC, dCIOl~~.~:I... r

Example Problem No. 115 Computer Output (continued) Run 2 cony = 0.002 delt = 0.15.0000302' +40 +0 +!6' +0 +13'+0'+8 -1' +10' +0' +7' +1'+2+1' +0'+0'+5'+0' +2' -2'+15'+0' t n a b c d.000 0 7.000 2.000.000.500.150 2 6.523 2.289.051 536.300 1 5.273 2.542.109.576.450 1 5.946 2.761.173.621.600 1 5.641 2.949.242.668.750 1 5.357 3.110.314.719.goo900 1 5.091 3.247.390.772 1.050 1 4.842 3.361.470.827 1.200 1 4.610 3.455.552.883 Run 3 cony = 0.0005 delt = 0.30.0000302 +40' +0 1 +16 1 +0 1 +7'+1'+2'- +' 0' +0'+0'+5'+0' +5'-3' +31+01 t n a b c d.000 0 7.000 2.000.000.500.300 4 6.272 2.543.109.576.00 3 5.640 2.952.241.668.900 3 5.089 3.250.390.772 1.200 3 4.608 3.459.551.883 1.500 3 4.186 3.596.720.998 1.800 3 3.815 3.676.895 1.114 2.100 3 3.488 3.711 1.072 1.230 Discussion of Results The concentrations of each component are plotted as a function of time in the figure on the following page. -I37

Successive and Simultaneous First Order Chemical Reactions 7.0 6.0 A, *c=9. 25 C -~ c+9. 50 at time -ao 5.0 Time. H o u "0,' 13.0 _ _._..... 0 ~ ov.. acur..acy. Comparison d=o, 2.0 1.0...:.. DF-i~~~~~~~~~~~~~~~ b-=O 0.0 -.. 0.0 2 4 6 8 10 12 14 16 Time - Hours Comparison of Runs 1 and 2 shows that reducing the time interval by half gives a slight improvement in accuracy. Comparison of Run 1 and 3 shows that reducing the convergence limit increases the number of interations but does not change the results within the accuracy of printout. Therefore, one can conclude that the parameters used in Run 1 were reasonable. Critique This problem is a good example of one which can be solved on a small computer. The method of solution, however, is applicable for use on a larger computer using any compiler language such as MAD or FORTRAN. While an analytical solution to the problem is possible, it would be very tedious. -I38

Example Problem No. 116 PYROLYSIS OF ETHANE IN A TUBULAR REACTOR by J. 0. Wilkes Department of Chemical and Metallurgical Engineering The University of Michigan Course: Rate Operations Credit Hours: 5 Level: Junior Statement of the Problem The pyrolysis of ethane in the temperature range 1200-1700 OF is represented essentially by the irreversible first order reaction C2H6 ---- C2H4 + H2 1800 lb./hr. of pure ethane are fed at 1200 OF to a 3 in. I.D. tube contained in an ethane pyrolysis furnace. Heat is supplied to the tube at a rate of 5000 B.T.U./hr.ft2 (of inside tube area). The pressure drop along the tube is small and a mean pressure of 30 psia. may be taken. Assuming plug flow, calculate the length of tube required to produce 75% decomposition of the ethane. The program should include provision for printing length (ft.), temperature (OR), and conversion after each increment of tube length. Data (In the following, T is in OK) AHf at 2980K C p (cal./gm.mole) {cal./gm.mole. OK) C2H6 (g) -20,236 3.75 + 35.7 x 10-3T - 10.12 x 10-6T2 C2H4 (g) 12,496 5.25 + 24.2 x 10-3T - 6.88 x -62 H2He~~~~ (9) 0 7.00 - 0.385X10-3T + 0.6 x 10-6T2 - 41,310 16 T -l Velocity constant: k = 5.764 x 1016 e T secMolecular Weights: C = 12, H = 1 Gas Constant: R = 10.73 psia.ft3/lb.mole.OR Nomenclature The problem is stated in mixed units. It is here decided to work in B.T.U., lb.mole, OR, ft. and hr. units. Let the following notation be adopted: nO = inlet molal feed rate of ethane, lb.moles/hr. nC2I6 = molal flow rate of ethane at any point in the reactor. z = fractional conversion. P = total pressure, psia. T = absolute temperature, ~R. -139

Pyrolysis of Ethane in a Tubular Reactor Nomenclature, Continued -1 k = velocity constant, sec. j = specific reaction rate,(lb.moles ethane/ft3hr.) c = concentration of ethane, lb.moles/ft3. A = cross-sectional area of tube, ft2. q = heat input from furnace, B.T.U./hr.ft(of tube). AHR = heat of reaction, B.T.U./lb.mole. Cp = specific heat, B.T.U./lb.mole.~R. x = mole fraction of ethane. L = length from reactor inlet, ft. V = reactor volume, ft3. Solution We have, for the reaction. C2H6 = C2H4 + H2 Inlet molal flow rate: n 0O 0 Molal flow rate when conversion is z: n0(l-z) n0z n0z Hence the total moles flowing at any point in the reactor are no(l+z), and the corresponding mole fraction of ethane is x = (l-z)/(l+z). The problem is now approached by establishing steady state material and thermal balances over a differential element dL of reactor length, as shown in the figure below: dV n0 go nC 2H6 - > 2H6 + dnC2H6 dL Differential Element of Tubular Reactor Material Balance (for moles ^f ethane) In From Reaction = Out n + jdV =n dn C2H6 nC2H6 + dnC2H6 whence d Hn0(-z) __ nO dz (1) dV AdL A But, for the present irreversible first order reaction, the specific reaction rate is given by xP 1-z P j = -kc = -kT =-k (2) RT l+z RT Hence, from (1) and (2), the differential increase dz in conversion over a differential element of length dL is -I40

Example Problem No. 116 dz A= AP (k)(+) dL (3) Heat Balance For a change dz in conversion: Heat liberated due to reaction = nodz(-AHR) Gain in enthalpy of flowing stream = (FniCpi)dT, where the summation is over the three components ethane, ethylene and hydrogen. A heat balance on the element of length dL then gives: nOdz(-AHR) + qdL = no [(1-z)C + z(Cp + Cp ) dT C2K6 C26H4 H2 Hence the differential rise in temperature over the element is dT QdL + (-AHR)dz (lz)Cp +z(Cp + Cp (4) C2H6 C2H4 H2 where Q = q/nO. The problem may now be solved by a stepwise procedure along the length of the reactor, employing the finite difference approximations of equations (3) and (4) (which will then have dT, dL and dz replaced by AT, AL, and Az). At the start of any increment AL, everything will be known. The increase Az in conversion may be estimated from equation (3) which then enables the corresponding temperature increase AT to be obtained from equation (4). The computation is then repeated for successive elements of length. It is assumed that the elements are sufficiently short so that the values of k, T, z and Cp at the start of each element may be employed in equations (3) and (4). Strictly speaking, some sort of average values should be taken across each element instead. However, the procedure used here is amply justified by the fact that the computed results are almost invariant over a wide range of values selected for the length increment. Computation of Various Numerical Constants and Conversion Factors The computations will be made in B.T.U., lb.mole, OR, ft. and hr. units. The following should be noted: a. It is convenient to define a Kelvin temperature TK — T/1.8. b. Cal./gm.mole.~K are numerically the same as B.T.U./lb.mole.~R. c. In equation (3), the units of AP/nOR will have to be adjusted to sec.OR/ft., in order to cancel with kdL/T. i.e., AP _ (7/4) X (0.25)2 X 30.0 X 3600 -= X 225 sec.~R noR - (1800/30) X 10.73 8 x 10.73 ft. d. Heat of reaction varies with temperature according to d(AHR) dT = ACp Hence it may be shown that the heat of reaction at any temperature is given by -I41

Pyrolysis of Ethane in a Tubular Reactor (AHR) /1.8 = 32,732 + 8.50 (TK-298) - 5.942X10-3 (TK2-2982) + 1.28X10-6 (TK3-2983) B.T.U./lb.mole.~R. e. Q = q 5000 x w/4 _ 125w B.T.U.hr. e. n 1800730 T ft.lb.mole List of Principal Variables MAD Symbol Definition T Temperature (0R) TK Temperature (~K) L Length (ft.) Z Conversion DT,DL,DZ Increments in temperature, length, and conversion K Velocity constant (sec.-l) DH Heat of reaction B AP/nOR CP (l-z) Cp + z (CpC + Cpa) C6 PC 2H4 P2 q/no Flow Diagram - Ihe~'~'"S" I,-.Ola / ST'. ~'m L o bS'='i C i if-.- CT P- T- + _-O 4p-n~t~ ) IT(L) bT — D =~~, (TIC) MAD Program DECOMPOSITION OF ETHANE IN A TUBULAR REACTOR, WITH A HEAM INPUT AT THE WALL. MATERIAL AND THERMAL BALANCES ON A DIFFERENTIAL ELEMENT OF LENGTH (DL) LEAD TO TWO SIMULTANEOUS ORDINARY DIFFERENTIAL EQUATIONS WHICH IVE THE INCREASE IN CONVERSION (I)Z) AND TEMPERATURE {C}) OVER THE ELEMENT. SOLUTION IS BY STEPWISE COMPUTATION ALONG THE REACTOR LENGIH. TEMPERATURE (T) AND CONVERSION (Z) ARE PRINTED AFTER EACH INCREMENT UNTIL THE CONVERSION REACHES Z = 0.75. -I42

Example Problem No. 116 MAD Program, Continued START READ DATA DL PRINT COMMENT $1 RESULTS FOR ETHANE PYROLYSIS WITH LENGTH 1 INCREMENTS PRINT RESULTS DL. T 16 0.' INITIALISE T, Z, L AND COMPUTE CONSTANTS B ANU) Q. T = 1660.0 Z = 0.0 L = 0.0 B = (3.14159*225.0)/(8.0*10.73) Q = 125.0*3.14159/6.0..... PERFORM MATERIAL AND THERMAL BALANCES OVER SUCCESSIVE INCREMENTS OF REACTOR LENGTH. ONE TK = T/1.8 DH = 1.8*(32732.0 + 8.50*(TK - 298.0) - 5.942E-3*(TK*TK - 1298.0*298.0) + 1.28E-6*(TK*TK*TK - 298.0*298.0*298.0)) CP = (1.0 - Z)*(3.75 + 35.7E-3*TK - 10.12E-6*TK*TK) + 1Z*(12.25 + 23.815E-3*TK - 6.28E-6*TK*TK) K = 5.764EI6*EXP.(-41310.0/TK) DZ = B*K*(1.0 - Z)DL/(T*(1.O + Z)) DT = (Q*DL - DH*UZ)/CP Z = Z + DZ T = T + DT L = L + DL PRINT RESULTS L, T, Z WHENEVER Z.L.O.75, TRANSFER ro ONE TRANSFER TO START END OF PROGRAM Computer Output RESULTS FOR ETHANE PYROLYSIS WITH LENGTH INCREMENI OL = 50.000000 L = 50.000000, T = 1775.486313, 2 = 5.028653E-04 L = 100.000000, T = 1869.406479, Z = 9.156017E-03 L = 150.000000, T = 1841.127579, 2 =.075388 L = 200.000000, T = 1884.386444, Z =.1i07355 L = 250.000000, T = 1840.153625, L =.181362 L = 300.000000, T = 1897.448914, Z =.206595 L = 350.000000, T = 1843.791946, Z =.285262 L = 400.000000, T = 19C7.940247, Z =.307149 L = 450.000000, T = 1855.355682, L =.3b5377 L = 500.000000, T = 1918.359863, Z =.407688 L = 550.000000, T = 1869.832809, Z =.484011 L = 600.000000, T = 1929.752441, Z =.507614 L = 650.000000, T = 1886.067993, 2 =. 81698 L = 700.000000, T = 1942.690582, Z =.606825) L = 750.00000, T = 1904.852020, 2 =.678043 L = 800.000000, T = 1958.121475, Z =.704669 L = 850.000000, r = 1927.666519, =.712308 -I43

Pyrolysis of Ethane in a Tubular Reactor Discussion of Results The computed results are shown above for only one value of length increment, viz, DL=50.0 feet. However, runs were also made for several other choices of DL and the results for all runs are summarized in Table 1. which shows the computed reactor lengths in each case corresponding to 75% conversion. Table 1. Computed Reactor Length Corresponding to 75% Conversion, for Various Values of DTL Length Increment DL (ft.): 1 5 10 20 50 100 Total Length (ft.): 842.6 842.5 842.3 842.0 833.5 584.5 Exit Temperature (OR): 1949.6 1949.5 1949.5 1949.4 1944.4 1428.7 The results are almost identical for DL = 1, 5 or 10 feet, and the extremely large increment of 100 feet is required before there is serious error introduced. The results for DL = 50 feet are slightly in error but are reproduced above for reasons of economy of space. Observe that little reaction occurs during the first 100 feet of reactor length. This is a region in which the gas temperature is rising but the velocity constant is still small and only a small amount of ethane decomposes. Thereafter, the longitudinal temperature profile becomes less steep, due to the fact that the reaction is endothermic. Solution Using the Runge-Kutta Procedure The differential equations (3) and (4) dz AP k 1l -z dL nR (T (liz 3 Q - HR dz dT _ R dL dL (l-z)C zC + Cp ) C2H6 C2H4 H2 can also be solved numerically by using the Runge-Kutta integration procedure. This procedure, programmed to solve systems of first-order ordinary differential equations, is available as a library subroutine in the Michigan Executive System and can be called upon directly in a MAD program. Briefly, the subroutine has two entries, an initialization entry SETRKD. and an integration entry RKDEQ. SETRKD. is executed only once and its only function is to supply the names of all pertinent parameters as follows: * Hildebrand, Introduction to Numerical Analysis, p. 237, McGraw-Hill, 1956. -I44

Example Problem No. 116 EXECUTE SETRKD. (N,Y(1), DERIV(1), DUMMY(1), L, DL) where N is the number of differential equations, an integer. Y(1) the first location in an array of length N into which RKDEQ. will put the integrated solution values for the N dependent variables. DERIV(l) the first location in an array of length N. RKDEQ. expects the main program to evaluate all derivatives of the Y's and putthe values into the corresponding elements, e.g., DERIV(1) = dY(1) DERIV(I) dY(I) dL dL DUMMY(i) the first location in an array of length N which is used by RKDEQ.for working storage. L the independent variable. DL the step size for the integration procedure. RKDEQ.(O) is the entry which is called when the subroutine is to integrate numerically to produce solution values Y(1)...Y(N) for the value of the independent variable equal to L + DL, i.e., when the solutions for the equations at the end of the next integration step are wanted. Since the "fourth-order' Runge-Kutta procedure is used (see Hildebrand), the subroutine needs to have all derivative values computed four times per integration step. The routine indicates that all derivatives are to be evaluated by returning with a value 1.0. After each set of four evaluations, the calling program must return to RKDEQ.(O). After four successive derivative evaluations (all necessary incrementing of L is done automatically by the subroutine) the subroutine returns with a value 2.0 to indicate that the solution values for the N dependent variables at the end of the integration step are available in Y(l) to Y(N). At this point the program can print the results if desired. If integration is to continue across another increment in L, the program calls on RKDEQ.(0) again and the process described above is repeated. The user determines when to stop the integration by testing appropriate dependent or independent variable values. A rough flow diagram of the Runge-Kutta calling procedure is shown below.,), r ITi | ATPRI ar STeT PAIAmefEes U ETm#' ALLo IIT lrA -L L h - E1 wh i 7. DE Y n) -V45

Pyrolysis of Ethane in a Tubular Reactor The program which follows is somewhat more general than the earlier one, in that the following parameters are read as data: TF Inlet ethane temperature, OF P Pressure in tube, psia. MASRAT Mass rate of ethylene feed, lb./hr. ID Internal diameter of tube, in. QPE1SF Heat input from furnace, B.T.U./hr.ft2 of tube (inside tube area) CONV Maximum desired conversion DL Step size for the integration, ft. FREQ Frequency of printout, i.e., results will be printed after every FREQ integration steps. Most of the MAD symbols with the meanings and units shown on page I42 are used here also. In addition, the following variables are used. FACTORY no R X constant part of K. n0R LABEL Value returned by RKDEQ.(O). This is either a 1.0 or 2.0 as indicated above. DZDL dz dL dT DTDL dT Because of the array nature of some of the subroutine arguments, the following have been made equivalent names for the same values. Problem Variable Equivalent MAD Symbols z z, Y(1) T T, Y(2) dz dz DZDL, DERIV(1) dT dT DTDL, DERIV(2) 3.459()2 * P ~ 3600 ~ 5.764X1016 SR _ *10.73 30. -I46

Example Problem No. 116 Flow Diagram I TEKT Z. I. D.TDL C: ( Et) CLo A ( z gA(Z )T4, M( Cc - D'T G T+ -4L o c-P MAD Program DIMENSION Y(2), DERIV(2), DUMMtY(2) EQUIVALENCE (L,Y( 1) ), (T,Y(2)), (DZDL,DERIV(l) ), (DTDL,DERIV(2)) INTEGER I, FREW START PRINT COMMENT $1ETHANE PYROLYSIS IN A TUBULAR REACTOR $ READ AND PRINT DATA TF, P, MASRAT, ID, QPERSF, CONV, DL, FREQ Q = QPERSF*30./MASRA[*3. 14159*ID/12. FACTOR =2.07504E20*3.14159*ID*ID*P*30./(144.*4.*1I.73*MASRAT) iNITIALIZE PARAMETERS FOR RUJNGE KUTTA SETUP EXECUTE SETRKD. (2,Y (1),DERI V( 1),DUJMMY (1),L,DL) L = 0.0 Z = 0.0 T = T F + 460. PRINT RESULTS L, TF, Z RUNGE KUTTA PROCEDURE CALCULATES T AND Z AT L + DL. PARAMETER I COUNTS THE NUMBER OF STEPS BETWEEN PRINTOUTS AGAIN THROUGH LOOP, FOR 1=1, 1, I.G.FREQ RETURN LABEL = RKDEq.(O) WHENEVER LABEL.E.1. COMPUTE THE DERIVATIVES DZDL AND OTDL AND RETURN [0 RKDEQ. 1K = T/1.8 OH = 1.8*(32732. + 8.50*(TK-298.) - 5.942E-3*(TK*TK-298.*298. 1) +1.28E-6*( K*TK*TK-298. *298. *298. ) ) CP = (1.0-Z)*(3.75+35.7E-3*TK-10.12E-6*[K*TK)+Z*(12.25+23.815 1E-3*TK-6. 28E-6*TK*TK) DZDL = FACTOR*EXP.(-41310./TK)*(1.-Z)/(T*(1.+Z)) PRINT RESULTS L, [F, Z WHENEVER Z.L.CONV, T TRANSFER TO AGAIN TRANSFER TO START END OF PROGRAM -I47

Pyrolysis of Ethane in a Tubular Reactor Computer Output ETHANE PYROLYLSSIN_ A TUBULAR REACTOR TF = 1200., P = 30., MASRAT = 1800., ID = 3., QPERSF = 5000., CONV =.75,._.. DL_ =____5Q_._,__EREQ = 1 * L =.0000000, F = i200,000000. Z =. 000000 L...... =.50.CQOOOO, TF -....1_30_8, 547867, Z = 2.760554E-03....___ _,____. __..... L_= l......100,_OOO0, TF = 137.6.,_72186, Z =.c23198 L -= _20__-~, QD_.C0 f._ _T.E_. -..E. 1392.900711 _ L _. 068156 L_ = 200. 00 CO00, TF = 14_2._233643 Z__.116318 L = 250.C000000, TF = 1409._39Q9326, _ - =.165544 L___.0_-. } 000.-nQQt..... _......0...TIE.-......__L4!5LF5405.n,? = 1_41_5257.. _ _350._QQ0000Q, TF = 142.0964020_,Z-_. —---....265172 -.................... L - _ 4Q._Qo0_,OQo00,... TF = t14 2_6_4.46148_7 _________.........._._ —. 4.__6.315135 Le_.. Q O000,...............TF =._3_1432 927344 Z = 6.5.05.9 L = 500._00000Q. 0T —-__-,...IF_.__.. - 143_7_.7_396_,.__ _____________ -_414889 L__ = _5__500_. __. TF _ 443.785889 Z=.464584....L_-_. _L 6Qi0._000000,...........IF __ — _ L145Q,143QQ5, _ Z = _,5 _14. L _= 650. OOCQ000, TF 1 45Q6,9_35Q..-..- -_53__ 6406 L = 700.C00OOO00 TF = 1_46Z7210_.... _- -.612433.......L _. 750._O0000, TF = - L412_.28462: Z.66114.. L = 800.000000, TF = 148.1.2167_6 _..... __- _____. L = 85C.OOCOOO, TF = 1491.312805,.........Z__..756991 Discussion of Results Computed results for the stepsize DL = 50.0 feet are shown above. The program was also run for values of DL = 1.0, 5.0, 10.0, 25.0, and 100.0. - Interpolated results for the tube length necessary for 75% conversion are shown in Table 2. TABLE 2. Computed Reactor Length Corresponding to 75% Conversion, for Various Values of DL Length Increment DL (ft.): 1 5 10 25 50 100 Total Length (ft.): 842.6 842.6 842.6 842.6 842.6 - Exit Temperature (OF): 1489.6 1489.6 1489.6 1489.6 1489.8 - Comparison of the results in Table 2 shows that for all stepsizes used, the method produces essentially the same answers. The procedure failed for a DL of 100 ft.; the solution "blew up" after the first integration step, apparently because the temperature computed at the end of the first step was too high. Comparison with the values computed using the simple finite difference stepping procedure (see Table 1.) shows that for this problem the Runge-Kutta procedure produces approximately the same answers for the smaller increments but is more accurate for the larger stepsizes. When comparing the two methods from the standpoint of computing time it should be remembered that the Runge-Kutta method requires at least four (and probably more) times as many machine instructions per integration step as the simple stepping procedure. This difference tends to be offset somewhat, however, by the increased stepsize permitted for the Runge-Kutta method. -I48

Example Problem No. 117 ADIABATIC FLAME TEMPERATURE FOR CARBON MONOXIDE OXIDATION by Joseph J. Martin and Brice Carnahan Department of Chemical and Metallurgical Engineering The University of Michigan Course: Thermodynamics Credit Hours: 5 Level: Sophomore-Junior Statement of the Problem Carbon monoxide from a water gas plant is burned with air in an adiabatic reactor. Both the carbon monoxide and air are being fed to the reactor at 70 F and atmospheric pressure. Ten percent more air is used than theoretically required by the stoichiometry of the reaction. For the reaction CO + 1/22 = C0 2 (1) the following standard free energy change (250C) has been determined: AG~ = -111,600 B.T.Uo The standard enthalpy change at 25 C has been measured as: AHO = -121,700 B.T.Uo The standard states for all components are the pure gases at one atmosphere pressure. The constant pressure heat capacities for the various constituents in calories/(0K.gm.mole) with TK in oK are all of the form CPi = Ai + BiTK + CiT2 (2) For the gases involved here, the constants are as follows: Gas A B C CO 6.25 2.091x10-3 -O.459x10-6 02 6.13 2.990X10-3 -0.806x10-6 C02 6.85 8.533X10-3 -2.475x10-6 N2 6.30 1.819x10-3 -0.345X10-6 The ideal gas law may be assumed for this low pressure reaction. If the products from the reactor are at atmospheric pressure: a. What is the maximum temperature which the gases may attain, i.e., the adiabatic flame temperature for the ten percent excess air case described above? b. Show quantitatively what will happen to the flame temperature if the amount of air used is varied from 0.6 to 1.8 times the stoichiometric amount in steps of 0.1. e. How much air should be used to obtain the highest possible flame temperature? -I49

Adiabatic Flame Temperature for Carbon Monoxide Oxidation Solution Method 1. Nomenclature * A = constant in the heat capacity equation for ith gas. * Bi Ci = constant in the heat capacity equation for ith gas. i *C. = constant in the heat capacity equation for ith gas. CPi = heat capacity of ith component gas, cal./(gm.mole~K). ACp = heat capacity difference (products minus reactants) for reaction, cal./(gm.mole~K). AG0 = standard free energy change for the reaction at temperature T, cal./gm.mole CO. AHp = enthalpy change for product gases between Tr and T, cal./gm.mole CO in feed. AHR = enthalpy change of reaction at Tr for conversion of z gram moles of CO, cal. AHT = standard enthalpy change for the reaction at temperature T, cal./gm.mole CO. Ka = thermodynamic equilibrium constant. Kp = pressure-based equilibrium constant. N = total moles of gases in product per mole of CO in feed. nO = moles of oxygen per mole of CO in feed. n. = number of gram moles of ith component gas in product. P = total pressure, atm. PC = partial pressure of CO at equilibrium conditions, atm. PC02 = partial pressure of C02 at equilibrium conditions, atm. P02 = partial pressure of 02 at equilibrium conditions, atm. T = temperature of product gases, 0K. To = reference temperature for which AGT and AHT are known, K. TK = temperature in ~K. Tr temperature of feed gases, ~K. xCO = mole fraction of CO at equilibrium conditions. XC02 = mole fraction of C02 at equilibrium conditions. X0 2= mole fraction of 02 at equilibrium conditions. z = fractional conversion of CO to C02 at equilibrium temperature T. * i Component 1 CO 2 02 3'C~2 4L~ ~ N2 -I50

Example Problem No. 117 2. Material Balance The problem will be worked where possible in Metric units, basing all calculations on one gram mole of CO in the feed gases. Let nO be the number of moles of 02 per mole of CO in the feed stream and z be the fractional conversion of CO to C02. Then the moles of the various constituents of the feed and product gases are given by: CO 02 CO2 N2 Feed (700F) 1 nO 0.0 79 n' 21 (4) z 79 Product (T) l-z no 2 z 3. Heat Balance For an adiabatic reaction, the reacting system exchanges no heat with its surroundings. The enthalpy change for the overall process (Hproducts - Hreactants) must therefore equal zero. The process can be viewed as taking place in two stages: 1) Reaction of the entering gases at the inlet temperature Tr, and 2) Elevation of the temperature of the products (including any unreacted starting materials) from reaction temperature Tr to the final adiabatic flame temperature, T. The enthalpy change of reaction AHR at temperature Tr per mole of CO in the feed at conversion fraction z is given by AH = z*H. (5) R(Tr) r The enthalpy change for the products AHp between temperature Tr and temperature T is given by i=l di H i-l i ni Cp j' (6) Tr where Cp is the heat capacity and ni the number of gram moles of the ith component gas in the product mixture. The subscript i assumes a different value for each of the component gases, i.e., i=l for CO, 2 for 02, and so forth. Since the heat capacity equations are in terms of OK, Tr and T must be in OK. Both AHR and AHp are in calories per mole of CO in the inlet gases. In terms of the heat capacity equations given, the integral of equation 6 is given by: ~~T T Cp dTK Ai+ BiTK+ CiTK dTK (7) K i K r r Bi(T2_T2) Ci(T3 -T3) Ai(T-T) + + 2 3 Combining equations (5) and (7) to produce an enthalpy balance for the overall process, AHoverall process = AHR() + AH =0 -I51

Adiabatic Flame Temperature for Carbon Monoxide Oxidation orr 3 zor AH = i( Z ni Ai(TTr) + C + (T - ] (8) Trz in=l T) 2 3+ 4. Equilibrium Considerations Let us define a "pressure-based" equilibrium constant by PCO Kp = 1/2 (9) CO 0o2 or, in terms of mole fractions (assuming ideal solution behavior), XCo P p x 2 p-(x P)2 (10) x CO.p (xO p)? Xco ~ x02 Since, at equilibrium, the total number of moles of gas from 4 is given by N = 1 - z + n -+ z + nO 1 + 100 (11) the appropriate equilibrium mole fractions are given by: 1 - z:CO z 100 1- 1 + 1-2 n x z 100 (12) c02 1- Z + 100 Substitution into equation 10 yields z 100 12 (13) z 1- + n KP (13) The thermodynamic equilibrium constant Ka is given by -AGT Ka =e RT (14) where AGT is the standard free energy change at temperature T, and R is the gas constant, 1.987 in units of(calories/~K.gm.mole). The quantity AGOT can be determined for any temperature T, if its value at one temperature To is known, by integrating the thermodynamic relationship G _AH + ACPdT(15) a T A T-0 To-152-I52

Example Problem No. 117 where ACp = Cpc02- Cp - 1/2 CpO. In terms of the constants from (3), ACp = -2.465 + 4.947X10-3 TK 1.613x10 T (16) ACP K - P~~~TK (6) The expression for AH0 as a function of temperature is then given by T AH0 AHo t | AC dT or 0 H = AH0 - 2.465(T-To) + 2.473X10 3(T2-To) - 0.5376x10 6(T3-T). (17) Equation 17 can be rewritten in the form AHT -2.465T + 2.473X0l3T2 - 0.5376XlO6T3 + INT1, (18) where the integration constant INT1 is given by INT1 = AHT + 2.465T - 2.473X10-3 2 + 5376 6T (19 LI~~~.TO+.65T60 0 (19) To find AGT, integrate both sides of equation 15 between temperatures TO and T. 0~T 0 AG0 TAGT ART d 0 (20) T - T dT + 2T dO Substitution of AHT from equation 18 yields, for the value of the integral in 20, AHT INTl T dT INT + 2.465 In T - 2.473X10-3T + 0.2688X10-6T2 + INT2 (21) 2 T T2 where the integration constant INT2 is given by INT2 I= NT _ 2.465 in To + 2.473X10- 3T 02688x106 T2 (22) INT2 0 0 T0.o(22) Equation 20 can now be evaluated as AGT 22.473 3T 0.2688 -6 -T = INTl/T ~ 2.465 ln T - 2.473X10-3T + 0.2688xo T + INT3 (23) T where the integration constant INT3 is given by INT3 = INT2 + AGO /T0. (24) Since AG0 at temperature To = 298.15~K (25~C) is given as -111,600 B.T.U./(lb.mole of CO) or -62,000 cal./gm.mole of CO) and AH0 at the same temperature is given as -121,700 B.T.U.Xlb.mole of CO) or -67,611 cal./(gm.mole of CO), all the information necessary to compute the equilibrium constant Ka at any temperature T is available. 5. The Equations to be Solved: It can be shown that Ka of equation 14 is also given by Ka = (25) 12

Adiabatic Flame Temperature for Carbon Monoxide Oxidation where the a's are thermodynamic activities. For each constituent, a = f/fo, where f is the fugacity of the component and fo is the fugacity of the component in the standard state. Since the standard state for each gas is given as one atmosphere, and since the gases are to be assumed ideal, f o=l1. and f=p (partial pressure of the component). Therefore, K from equation 14 and Kp from equation 13 are identical, i.e. the chemical equilibrium relationship is given by: K - K = 0 p a AG0 100 1/2 GT z - z + no0R or - e =0 (26) (1 - z) (no - 2)'P The final equation resulting from the enthalpy balance was derived earlier (equation 8) and is reproduced here for convenience. 4 z. HT +r [ni [Ai(T-T r) + Bj(T2-T2)/2 + Ci(T3-T3)/3]] 0. (8) Note that once values for the parameters TO, Tr, AHT, AHT, AGT, P, and n0 have 0 To Tr T0 been supplied, these two equations (26 and 8) contain only the unknowns z and T. The problem then is to solve this set of two simultaneous equations for z and T, given the following values from the problem statement: To = 298.15~K (250C) Tr = 294.3 OK (70~F) AHT = -67611. cal/gm.mole CO AG = -62000. cal/gm.mole CO P = 1. atm. AHTr can be computed from equation 17 with T=Tr. nO the 02/CO ratio, is a variable but assumes a fixed value for any one solution. 6. Mechanism of Solution: Since the ni (see 4) are linear in z, equation 8 is also linear in z. It is therefore possible to solve for z as follows: _[IC + noIC + n4IC - C + Cp2 Cp4 (27) LAHT - I - 1/2. I + IC] Tr 1 Cp2 where IC = Ai(T-T) + Bi(T2-T2)/2 + Ci(T3-T)/3 (28) Cpi n4 is the number of moles of nitrogen per mole of CO fed. The reason for leaving n4 in the equation is that it is a simple matter to generalize the computer program to compute the flame temperature for either air or pure oxygen in the feed gases. In the air case, n = 9 n0; for pure oxygen, n4 = 0.0 -I54

Example Problem No. 117 Substitution of z from equation 27 into equation 26 results in a single highly nonlinear equation in the variable T of the form g(T) = 0. (29) The problem is now reduced to finding the value of T, i.e. the root, which satisfies (29). Since it is not possible to solve for T analytically, some numerical or trial-and-error solution technique must be employed. The method used in the computer program which follows is similar to Lin's root-finding procedure. This method involves the evaluation of the function g(T) for two different values of T, say T1 and T2 (see figure) and then extrapolating (or, as the case may be, interpolating) linearly to find a new, and hopefully better, estimate of the root, T3. After evaluation of g(T3), the procedure is repeated, using the straight line determined by the points (T2,g(T2)) and (T3,g(T3)). This cycle is continued using the simple algorithm g(Tnl)X Tn - g(Tn)X Tn-l (3 n+l (30) n+l g(T_1) - g(Tn) until either jg(T n) | C1 or ITn+1-TlI 2 (31)2 where E1 and E2 are small positive tolerance values used as criteria for terminating the iteration process. Since the method may not converge, it is also wise to put an upper limit on the number of iterations performed. g(T) g(Tl) g(T2)|I P4 T2 T1 g(T)(T g(T3) Schematic of the Iterative Procedure -I55

Adiabatic Flame Temperature for Carbon Monoxide Oxidation The qualitative behavior of Kp, Ka, and g as functions of temperature T are shown in the figure below. Tmax is the value of T for which equation (8) yields a value z = 2'n0 or z = 1. Since the factors (nO-z/2)0*5 and (l.-z) appear in the denominator of the expression for Kp (see equation 13), Kp becomes infinite when either z = 2'n0 or z= 1. In addition, for T>Tmax, Kp must not be computed,since this situation corresponds to the physically meaningless cases z> 2no (over 100% oxygen consumption) or z> 1.0 over 100% carbon monoxide consumption ). Because of the highly nonlinear character of the function g(T) for values of T not near the root Troot, it is possible that a linear extrapolation through two points (Ti, g(Ti)) and (Ti+l, g(Ti+l)) will produce a new iterate Ti+2 Tmax (or even that the first two values,T1 and/or T25 which are needed to start the iterative procedure, may be in the forbidden region). A special test must be made on the value of z computed from equation (8) for the new value of T, Ti+2. When z(Ti+2)> 2 n0 or z(Ti+2)> 1, a new value of Ti+2 must be found by some other method before the extrapolation-interpolation algorithm of the previous page can be applied again. In the computer program which follows, the value of Ti+2 is simply decremented arbitrarily (and repeatedly) by an amount AT until Ti+2<Tmax. The algorithm is then resumed to find Ti+3. Once a computed pair of T values is sufficiently close to the root Troot, i.e. in the region near Troot where g(T) is approximately linear, the procedure converges to the answer quite rapidly. To illustrate the procedure, consider the situation shown in the figure. Two initial -assumptions for temperature are T1 and T2. Since both are in the permitted temperature region, g(T1) and g(T2) can both be computed. Extrapolating linearly produces a new iterate T' > Tmax* Decrementing T' by an amount AT produces a new temperature T which is still larger than Tma 3 3 which is still larger than 3max After decrementing by AT again, a temperature T3 is found. Since the new value is less than Tmax, g(T3) is computed, A linear interpolation produces a new temperature estimate T4, etc. 00 >(T3) region where,Ka / Kp cannot be / / computed, T > Tmax = Kp ~(- max TT T=T max ~~O _* eTY1 Tp /X~T T - _T g(T1) t (2) T AT - T decrease first estimate of T3 / >-g - K - K in steps of AT until T <Tmax -156

Example Problem No. 117 7. The Computer Program In the computer program which follows, the following symbols are used for the problem variables described in the table of nomenclature, page I50. MAD Symbol Problem Variable MAD Symbol Problem Variable A(I) Ai NITRO n4 B(I) Bi NZERO no C(I) Ci P P DGTZ AG~ T T TO DHTR AHTr TR Tr DHTZ AH 0 TZ TO KA Ka Z z KP K p The computer program is written to construct two tables. The first is a table of JMAX+i line entries. Each line contains four items,RATIO(J), CONV(J), TF(J), and TC(J) where 0 (J (JMAX. RATIO is a value of NZER0 and CONV(J), TF(J) and TC(J) are the corresponding values of conversion z, and flame temperature T in OF and 0C. The table is prepared starting with a minimum value of NZERO, MIN, which is placed in RATIO(O). NZERO is incremented by an amount DELTA=BIGD for successive lines; these values of NZERO are stored in successive entries RATIO(1), RATI0(2),... etc., until NZER0> MAX. The value of NZERO=MAX is stored in RATIO(JMAX). After preparation of this first-pass table which has the flame temperature and conversion information for all values of NZER0=MIN, MIN+BIGD, MIN+2*BIGD,...,MAX, the table is searched to find the largest value of TF (i.e., the highest computed flame temperature),TBIG. A second table is then prepared using a smaller increment, DELTA=SMALLD, such that RATI0(0)=TBIG-BIGD, RATIO(1)=TBIG-BIGD+SMALLD, RATI0(3)=TBIG-BIGD+2*SMALLD, etc. This table will then have entries for values of NZERO which differ by no more than an amount BIGD from the value of NZER0 at the highest temperature in the first-pass table. The table increment in this case is equal to SMALLD. The completed table is then searched again for the largest value of TF, which is the maximum possible flame temperature ( within a tolerance on NZER0 equal to SMALLD). The same program segment is used to generate both tables. The parameters are adjusted accordingly after preparation of the first-pass table. This program also allows the option of feeding pure oxygen as well as air by reading as data a value for the variable AIR, AIR=l for the air case; AIR#1 for the oxygen case. The program is written in a rather general way, and would not require major structural changes to allow the computation of similar tables for any adiabatic-isobaric process. -157

Adiabatic Flame Temperature for Carbon Monoxide Oxidation Other symbols not previously defined which are used in the program are: MAD Symbol Meaning AIR AIR=1, feed gas is air; AZl, feed gas is pure oxygen. BIGD Large increment in NZERO for first —pass table. BIGT Highest temperature found in first- and second-pass tables. BIGSUB Subscript of highest temperature in first- and second-pass tables. CONV(J) Conversion (Z) for Jth table entry. DELTA Increment in NZERO for tables: =SMALLD on second-pass table, = BIGD on first-pass table. EPS1 Convergence criterion (See 31). EPS2 Convergence criterion (See 31). G Function of ith value of T whose root is the flame temperature. I Counting variable. IMAX Maximum number of components in product: 4 when AIR=1; 3 when AIRkl. INT1 Integration constant (See 19). INT2 Integration constant (See 22). INT3 Integration constant (See 24). ITER Counter for the number of iterations to find T. ITMAX Maximum number of iterations permitted. J Counting variable. JMAX Maximum subscript on table entries, 0 (J (JMAX.. MAX Maximum value of NZERO in table. MIN Minimum value of NZERO in table. NITRO 79 NITR n4, gm.moles of nitrogen: = 0 when AIR=O; = 21NZERO when AIR=l. OLDG i-lth value of function G generated in iterative procedure. OLDT i-lth value of temperatureT generated in iterative procedure. RATIO(J) 02/CO ratio (NZERO) for Jth table entry. SMALLD Small increment in NZERO for second-pass table. TC(J) Flame temperature for Jth table entry, ~C. TF(J) Flame temperature for Jth table entry, OF. TNEW i+lth value of temperature T generated in iteration procedure. DT Decrement in temperature AT when Ti+1> Tmax (see figure). -I58

Example Problem No. 117 Flow Diagram ~T~rs@t ~ |NTJ.N eiiAX' pi, X 5'|0 I5M~'10, A If i~'a ='~l zz IAJ.;4z ~ -- ], B16,,, TA*, - 16p,'r, P, LI iJ- AX, Epsl, EPS2,f I TM O/, EPsI, TCLV, r v} = PfoWrRO ok.A=~lT T - T _ iME7OLDTT= T- b.,T=r'7-)' 4o'o- LT)= T,,4, fr {X-X~fi:i@@^ r- "sr4X /. ~'~U'f [16T= 7 rEWA> i. 6 -TF -T-).isI t -So?> T' Ir —~'~~; IA C'_ le,~oC~,~,,~,)I v -'59

Adiabatic Flame Temperature for Carbon Monoxide Oxidation MAD Program and Data $ COMPILE MAD, EXECUTE, DUMP, PRINT OBJECT, PUNCH OBJECT FLAMEOOO R DIMENSION CONV(500), TF(500), TC(500)9 RATIO(500), ICP(4) INTEGER I, J, ITER, ITMAX, IMAX, JMAX, AIR, BIGSUB R R PRESET HEAT CAPACITY CONSTANTS A(I), B(I), AND C(I), THE R REFERENCE TEMPERATURE TZ, THE STANDARD FREE ENERGE CHANGE R AT TEMPERATURE TZ, AND THE STANDARD ENTHALPY CHANGE AT R TEMPERATURE TZ. COMPUTE THE INTEGRATION CONSTANTS INT1i, R INT2, AND INT3. R VECTOR VALUES A(1) - 6.25, 6*13, 6.85, 6.30 VECTOR VALUES B(1) = 2*091E-3, 2.990E-3, 8*533E-39 1*819E-3 VECTOR VALUES C(1) =-0459E-6,-0.806E-6,-2*475E-6,-.0345E-6 VECTOR VALUES TZ = 298.15 VECTOR VALUES DHTZ = -67611. VECTOR VALUES DGTZ = -62000. INT1 = DHTZ + 2.465*TZ-2*4735E-3*TZ*TZ+ 0.5376E-6*TZ*TZ*TZ INT2 = -INT1/TZ - 2*465*ELOG.(TZ)+2.4735E-3*TZ - 0.2688E-6 1*TZ*TZ INT3 = INT2 + DGTZ/TZ R START READ AND PRINT DATA MIN, MAX, SMALLD, BIGD, AIR. TR, P, 1 ITMAX, EPS1, EPS2, DELTAT, DT, T DHTR = -2.465*TR+2.4735E-3*TR*TR - 0.5376E-6*TR*TR*TR + INT1 DELTA = BIGD JMAX = (MAX - MIN + DELTA/2.)/DELTA R.o... STATEMENTS FROM AGAIN THROUGH LOOP PREPARE TABLE.... AGAIN THROUGH LOOP, FOR J=0,1,J*G.JMAX NZERO = MIN + J*DELTA R..oo. IS THIS THE AIR OR OXYGEN CASE..*.. WHENEVER AIR.E.1 NITRO = 79./21**NZERO IMAX = 4 OTHERWISE NITRO = 0.0 IMAX a 3 END OF CONDITIONAL R..... ITERATE TO FIND T AT EQUILIBRIUM.*... THROUGH FINDT, FOR ITER=1,1, ITER*.GITMAX R... FOR ASSUMED T, COMPUTE ICP(I) VALUES AND Z.... TRY THROUGH INTCP. FOR I=1,1, I.G. IMAX INTCP ICP(I) = A(I)*(T-TR) + B(I)*(T*T-TR*TR)/2. + C(I)*(T*T*T-TR* 1 TR*TR)/3. Z = (-ICP(1) - NZERO*ICP(2) - NITRO*ICP(4))/(DHTR - ICP(1) - 1 ICP(2)/2. + ICP(3)) R...oo IS Z PHYSICALLY MEANINGFUL..... WHENEVER Z.GE-2.*NZERO.OR, Z.GE1.*0 T = T - DT TRANSFER TO TRY END OF CONDITIONAL R-.... T ESTIMATE IS LEGITIMATE, COMPUTE KA, KP. AND G..... KA = EXP.(-(INT1/T + 2.465*ELOG.(T)-2.4735E-3*T + 0.2688E-6 1 *T*T + INT3)/1.987) KP= Z/(I-.Z)*I(l1-Z/2~+NITRO,+NZERC)/((NZERO-Z/2.)*P)).P.C.5 G = KP - KA R.,**, CONVERGENCE TEST ON SIZE OF FUNCTION G..., WHENEVER *ABS*G.LE.EPS1, TRANSFER TO FOUNDT R,.... USE LINEAR EXTRAPOLATION ALGORITHM TO GET NEW T...., WHENEVER ITER*E.1 OLDT = T OLDG = G T a T + DELTAT OTHERWISE TNEW = (OLDG*T - G*OLDT)/(OLDG - G) R..oo. CONVERGENCE TEST ON SIZE OF TEMPERATURE CHANGE..-, WHENEVER.4BS.(TNEW-T).LE.EPS2.AN)oAS.G. AGLEl., TRANSFER 1 TC FCUNDr NEXT1 OLCr = T T = TNEk OLCG = G FINET EN! OF CONCII [CNAL -I6o

Example Problem No. 117 MAD Program and Data (continued) PRINT COMMENT $ PROCEDURE FAILED TO CONVERGE ON T $ PRINT RESULTS J9 NZERO, IMAX, NITROP ITER, ICP(1)...ICP(4), 1 Z, KA, G, TNEW, OLDG, OLDT TRANSFER TO PRINT FOUNDT CONV(J) = Z TF(J) = T*1*8 - 460. TC(J) a T - 273.15 LOOP RATIO(J) = NZERO PRINT WHENEVER AIR.E.1 PRINT COMMENT $1ADIABATIC FLAME TEMPERATURE FOR CO-AIR $ OTHERWISE PRINT COMMENT $1ADIABATIC FLAME TEMPERATURE FOR CO-OXYGEN$ END OF CONDITIONAL THROUGH NEXT, FOR J=0,1,J.G.JMAX NEXT PRINT RESULTS RATIO(J). CONV(J)9 TF(J), TC(J) R *.... FIND HIGHEST TEMPERATURE IN TABLE.o... BIGT = TF(O) BIGSUB = 0 THROUGH SEARCH, FOR J=1,1, Je.GJMAX WHENEVER TF(J)*G.BIGT BIGT = TF(J) BIGSUB = J SEARCH END OF CONDITIONAL WHENEVER DELTA*E.SMALLD PRINT COMMENT SOTHE HIGHEST FLAME TEMPERATURE CONDITIONS W 1ITHIN AN OXYGEN/CARBON MONOXIDE RATIO TOLERANCE SMALLD IS $ PRINT RESULTS RATIO(BIGSUB), CONV(BIGSUB), TF(BIGSUB)t 1 TC(BIGSUB) TRANSFER TO START END OF CONDITIONAL R.e... MODIFY PARAMETERS FOR SECOND-PASS TABLE..... MIN = RATIO(BIGSUB) - DELTA JMAX = (2.*DELTA+SMALLD/2.)/SMALLD T = (BIGT + 460o)/1.8 DELTA z SMALLD PRINT COMMENT $1$ TRANSFER TO AGAIN END OF PROGRAM $ DATA MIN = 0.30, MAX = 1*00, SMALLD = 0.005, BIGD = 0.05, AIR = 1, TR = 294.3 P = 1.0, ITMAX = 200, EPS1 = 1.E-4, EPS2 = 0.1, DT = 1.0, DELTAT = 10.5 T = 2400 * MIN = 0.30, MAX = 1*009 SMALLD = 0.0059 BIGD = 0.05, AIR = 09 TR = 294.3 P = 1.0, ITMAX = 200, EPS1 = 1.E-4, EPS2 = 0.1, DT = 1.0. DELTAT = 10.5 T = 3000* * MIN = 0.30, MAX = 1-00, SMALLD = 0.005. BIGD = 0.05, AIR = 1, TR = 294.3 P = 2*0, ITMAX = 200, EPS1 = 1iE-4, EPS2 = 0.1 DT' 1.0. DELTAT = 10.5 T = 2400 * MIN = 0.30, MAX = 1.00, SMALLD = 0.005. BIGD = 0.05, AIR = 0, TR = 294.3 P = 2.0, ITMAX = 200, EPSI = 1.E-4, EPS2 = 0.1, DT = 1.0. DELTAT = 10.5 T = 3000. * -I61

Adiabatic Flame Temperature for Carbon Monoxide Oxidation Computer Results The following are the computed results for CO-air feed for the first and third data sets. These two cases are identical except for the pressure P. The results have been reorganized to conserve space. The flame temperature is given in degrees Fahrenheit and the first and second pass tables have been merged to produce one overall table with smaller increments in n0 near the maximum flame temperature. P = 1 atm. P = 2 atm. noz T z T I moles 02/mole CO fraction of Flame Temp. fraction of Flame Temp. in feed CO converted OF CO converted OF I 3_SOQQ.599712 3723.942322.599854 3724.742310.35CCo0.697258 3922.688904.698554 3929.376892.40CCGO ~.784699 4_42.15741C.790389 4069.32788J.405000.792418 4048.224243.798688 4077. 940430.41CC00.799959 4053.363220.806808 4085.570068.415000.807296 4057.464722.814708 4092.055969.420000.814392 4060.392944.822382 4097.397705.425C000.821336 4062.574280.829829 - 4101.604553.43CC00.828083 4063.825134.837045 __4104.695862.435000.834635 4064.177917 x.844004 4106.577576,440CQOC.84C998 4063.675354 flame.850777 4107.588867 *temperature maximum.4450CO.847176 4C062.360046.857325 4107.583984 flame temp..450000.853175 4060.273499.863652 4106.596375.455000.859000 4057.455627.869761 4104.670898.460000.864656 4053.944458.87566C 4101.853943.465000.870147 4649.77594C.881353 4098.190918.47 C000.875477 4044.983276.886803 4G93.53595C.475000.88C651 4039.598328.892095 4088.282593.48CCCO.885673 4033. 650269.897200 4082.310181.485000.890498 4026.968445.902120 4075. 655640.490000.895218 4019.951233.906862 4068. 354431.4950C0.899795 4012.444397.911429 4060.439941.SCCCcO.904230 4044.469299.915826 4051.943665.55CC00.941312 39C3.C70129.951281 3940.947144. 6l000 C 0.966407 3772.191833.973551 3797.491 699.650CC0.981872 3625.161652.986310 3639. 885559 7 f 0 0 5 3 1 3473.495911.993 6 4 _3481.415344.75r000.995132 3325.d72559.996491 3329.895905.e8CCC.997495 3186.568G24.998210 3188.582825. SCCCO.998699 3657.110291.999075 3058.122101.C90000.999316 2931.504120.999515 2938.C16418 -I62

Example Problem No. 117 Discussion of Results 1. CO-Air: Tabulated results for the flame temperature and fraction of CO converted at pressures of 1. and 2. atmospheres are shown on the previous page for 0.3 ( nO <0.9, i.e. for 02 to CO ratios varying from 0.6 to 1.8 times the stoichiometric amount. The flame temperature,T,and fraction of CO converted,z,as functions of nO are shown in the figure below for a pressure of 1. atmosphere. Computed flame temperature values reported in Mark's Mechanical Engineers Handbook (source unspecified) and the experimental data of Lewis and von Elbe tabulated in Lange's Handbook of Chemistry are shown along with the values computed by the program. Reaction is nearly complete for 0.4 (n0 and no> 0.75, i.e. the limiting component ( oxygen for nO <0.5 and carbon monoxide for n0> 0.5 ) is essentially consumed for these conditions. For 0.4<nO <0.75 the extent of reaction is smaller than theoretically possible ( from the viewpoint of stoichiometry only), being only 0.916 at the stoichiometric ratio n = 0.5. As would be expected from the chemical equation, increased pressure (see the tabulated results) raises both the fraction of CO converted and the flame temperature for the same value of nO. Maximum flame temperatures occur at nO = 0.435 at 1 atm. pressure (T=-4064.2~F) and at nO = 0.440 at 2 atm. pressure (T=4107.60F). In both cases therefore, maximum temperature occurs in a stoichiometrically "fuel rich" (oxygen deficient) reaction mixture. I* W:X t- F..t'.t'l~~1 —:-:-i L —I' —:I-::! F...................,.i, ~'i-~-t'"I --—..:: 1!..' i': i.;l: —li i..:...:::: -.!-;7 i~::ir:: t -;; 1. t 1'..1'!. 7 | j j!:'- i i I-t..-.......... - -4- I 1< 4-. ---- -,, t'T!"'.-!" %!I-'!-:' i_ — - - -- I I::.. i: -. i ___L_ —- i. t I I 1 I f t j:: t,: I: 1 iX t:. t'. | I i t t | i 8 Iii: ii' t i., /':::,-:r:' 1:" i?i: i.|;tl:. —-0 7 —' —' 1. - -.. ti i i'. ~ 1-:-.::.-.! [i:-, t.- - ": - ~-: -::-::~i ~l -— t I -,.':,1',._.'l -i'"'- -: - i -—:4 — - 1n ~ "'".".'.... i'!~::~i'- ~:-+n- IT-'"-t-'.<:.'.i.''~-,- -, -,, - j < M'!: l -- 11 H1..,' t — "'-::::.:; -:: ".:!t.:;I:::i:.::' aigs l i 71 -T --,.....h........E4l1Q- lO- -i.::- i-i —:- ~ - i- -: f-,:: I... ii 8o o i i; i f _-:w i i - I:: - i.I I I...r II -! - - -'-T' -.... ii~ij ~ I-i < 211 -iT-tll- t —l —i- — t: - -................... C.......... 4e: i!.- r - 26-00 | t / /0.-':-'::. 1...1'1~~22OO~7 1:"7! 4 —'':'-' I ~. 1. 4 v ic i 7It t: -' I j: - 7 7 —T i' M Q, -1 —-- 63 - - 7-, 7 7F........i..: i l:' ~!.....'.:'.:1 i i,...:,:!::,:!'

Adiabatic Flame Temperature for Carbon Monoxide Oxidation 2. CO-O0: Computed results for the combustion of carbon monoxide with pure oxygen are 2 shown in the figure below, along with experimental values of Lewis and von Elbe reported in Lange's Handbook of Chemistry. In this case the fraction of CO reacted is considerably smaller than stoichiometrically possible. At the high temperatures generated, the equilibrium constant is fairly small (of order 1.) and so reaction is not nearly complete in most cases. The highest flame temperature found by the program for 1. atm. pressure was 5436.90F and occurred at nO = 0.5, i.e. at the stoichiometric ratio, and varies only slightly over the range 0.45 < n < 0.55.............' r * - I tX i i t 1 0 1 -1 1 I i~~~~ I'r~~~~~~~: ~: A r; i -'- - 1...... 77I.: i.:' 7- i | 1I:::: 7 41-: i j i j i:Aj -:1 —: — i1 T.m ~ ~ ~ ~ ~~ s i.1.._..:...-,.1bI,,t,, i.':-i:'i1i-:-. ~ ~ ~ ~..-/ —......*.... ~.:...| i;; t |: i. I..: -...., |.;. I.,.,,,,,, h _ - A_,_ _F +li[:7,,,,,. -- -:'.. - 1. -: -- - -1-'-: —I — -: -.-: —- — I.at. t....I i T (t /71-t r — 1 | i I'ik-j I _ _ _ 1 A1 L l tt 11 +: — tr —-r —-— t-4QLL_ j -- I -<404 t | 4 | 77i -':.:T....'.::I:...:....' i' -'- -:s - ":77 |-' |":,::!..:.......-i-: - - F'"::....i....": |: i i.:.. |. i j',-.'? —'-' ~-T':-[ i.-0':. j::'! -'!,.-.....-'i:,:': i-' i04'. 2.. 6; Co1ponents t; fii;0l-tt- - - -- Pressure-zrFlame Tem-per-atur COmz) -0-t-i - i — t A 1 at —im 0.43 03 )46; i'- -- s';1 —'' i.'! i' r' "1'''1'' -'- ~!' -l' CO:,0:::t —4fl-tt l- -0 -- - - m..:,!- 0.500 -.544 5...t i CO..'~~~~~~~~~~~~~~~~~~~~. 0_:2.2 at:m ~.: 0:...F j | - | F E t7+' I;' 1 _ F. —..:+- -t_-......,. —!....t- -..; - - ri- -.............'......._-'..._. -. -..:....................... _. CO - 02 1.0 tm. 0. 0. i 3.'! 7 4I6 - 17. I.1.. 1.I I -. I 1:, i | I__. *! _.' t j!-!:. |... -O - f ~~j~? v -I ii' ~ xp. if:1It e CO-i - Air 2.0 a 04 —O0 0.8508 4107.6~F CO - Air 1.0 atm. 0.350 0.8346 5436.9~F -I64_i i 1

Example Problem No. 118 VAPOR-LIQUID EQUILIBRIUM by Roger Bonnecaze Department of Chemical and Metallurgical Engineering The University of Michigan Course: Thermodynamics I Credit Hours: 5 Level: Sophomore or Junior Introduction The first course in Thermodynamics for chemical engineering undergraduates consists of two hours of lecture, two hours of recitation, and an associated four-hour laboratory session. This problem is a two-fold one involving experimental work in the laboratory and subsequent preparation of a computer program which uses the data. Statement of the Problem Given to Student The two parts of the problem are: 1) The determination of the vapor-liquid equilibrium in the acetone-methanol system, and 2) the writing of a MAD program to calculate Y-X and T-X diagrams at constant pressure for the above system. You are expected to understand the significance of equilibrium, activity coefficient, and the Gibbs-Duhem equation. In this experiment you are to determine the equilibrium relationship for the vapor-liquid system acetone-methanol. For ideal solutions the partial pressure (Pi) of the ith component in the vapor is equal to the product of the mole fraction (Xi) of the component in the liquid and its vapor pressure (Pi) at the boiling temperature of the solution, i.e., Pi = XiP~ (Raoult's Law). (1) For non-ideal solutions, a factor, i', called the activity coefficient, must be included in the above expression, i.e., P= P. (2) Pi = ~iXi. The activity coefficient is a measure of the departure from ideality and it is a function of temperature, pressure and composition. In most cases the temperature and pressure dependency may be assumed negligible. Thus the activity coefficient is primarily'a function of composition in the liquid and the problem is to determine this functional dependency. An Othmer equilibrium still is available for this purpose in the laboratory. This is a circulation still (see schematic below) in which the vapors evolved from the boiling mixture in the distilling flask, A, pass to a total condenser, B, where they are condensed and collected in a receiver, C. After filling the receiver, the condensate returns to the distilling flask A. -I65

Vapor-Liquid Equilibrium At steady state the liquid in the distilling flask and the condensate in the receiver are in equilibrium. Since the condensate in the receiver has the same composition as the vapor rising from the boiling liquid, the partial pressure of component i in the vapor can be calculated from its composition in the condensate and the known pressure exerted on the system. thermometer condenser, B thermometer well A receiver, C sampling ports Othmer Equilibrium Still I. Experimental Procedure A. Analysis of liquid samples. The composition of the binary mixture will be determined by measuring the refractive index of the unknown sample and comparing this value with a known sample. A refractometer is available in the laboratory. A standard curve may be prepared as follows: 1. Prepare three known samples containing 25, 50, and 75 wt.% acetone. Use the weighing bottles and the analytical balance available in the laboratory. 2. Measure the refractive indices of these three samples and the two pure components. Note the temperature. Make a plot of refractive index vs. composition. From this plot and the refractive index of any sample of acetone and methanol the approximate composition of the sample may be obtained. -I66

Example Problem No. 118 B. Operation of the Othmer Still. 1. Close all ports on the still except the feed port. 2. Fill the distilling flask according to the following table: Run ml. Acetone ml. Methanol 1 64 136 2 110 90 3 148 52 3. Turn on the water to the condenser. 4. Adjust the variac so that the current to the heater is 6-7 amp. 5. Note the temperature at 30 sec. intervals. 6. When the receiver is filled with liquid, turn the stopcock connecting the receiver and the distilling flask so that condensate will flow to the boiling liquid. 7. When the temperature becomes steady, start withdrawing samples of liquid and condensate every ten minutes. 8. After about 30 minutes the refractive indices of these samples should remain constant. This indicates that steady state has been obtained. Run the still for 10 more minutes and then withdraw a sample of liquid and condensate. These samples will give the equilibrium compositions of the liquid and vapor for use in later calculations. 9. Record the boiling temperature and the atmospheric pressure. II. Vapor-Liquid Equilibrium Having found the equilibrium relationships for acetone-methanol, process the data and determine whether or not it is thermodynamically consistent. Solution Adopt the following nomenclature: X1 = mole fraction of acetone in liquid. X2 = mole fraction of methanol in liquid. Y1 = mole fraction of acetone in vapor. P 1 = partial pressure of acetone in vapor, mm. Hg. 1P = vapor pressure of pure acetone at boiling temperature, mm. Hg. Po = vapor pressure of pure methanol at boiling temperature, mm. Hg. P = total pressure, mm. Hg. T = boiling temperature, OK. A1 = constant in vapor pressure equation for pure acetone (see equation 7). A2 = constant in vapor pressure equation for pure methanol (see equation 8). B1 = constant in vapor pressure equation for pure acetone (see equation 7). B2 = constant in vapor pressure equation for pure methanol (see equation 8). A = constant in Margules Equation (see equation 5). B = constant in Margules Equation (see equation 5). &1 = activity coefficient of acetone. Y2 = activity coefficient of methanol. -I67

Vapor-Liquid Equilibrium Hand Calculation The student is expected to use his experimental data in the following calculations, to be done by hand. Calculate the activity coefficients and their logarithms from the expressions: ~~~Y1P Y ~2 2P Y = Y I, o (3) X1 P122 Plot in Y1 vs. X1 and in ~2 vs. X2. From the Gibbs-Duhem equation we have: d In Y1 X2 d n 2 dx1 X dX1 ( Measure the appropriate slopes and calculate the values of the left and right side of the above equation for the compositions which have been obtained. Any discrepancies should be explained. Calculate the constants A and B in the Margules equation: 2 ln 1 = X2 [A + 2X1 (B-A)] (5) ln 2 = X2 [B + 2X2 (A-B)] This may be done by solving for A and B in terms of the activity coefficients and mole fractions. The values obtained in the experiment can be used to calculate A and B. If the three values of A and the three values of B computed from the three experimental measurements do not differ greatly, compute average values for A and B and use these constants in the computer program described below. Machine Calculation The calculation of predicted behavior for the Y-X and T-X diagrams is done as follows. The Margules equation permits calculation of activity coefficients in regions which have not been investigated experimentally. The complete Y-X or T-X diagram at constant pressure can be determined. For this purpose it is first necessary to know the boiling temperature of a given binary liquid from the equation P = X222Po + XePOe, (6) where o A1 ( in P1 T + B1 (7) n P2 T + B2 (8) Substituting the values of P0 and P0 from the equations 7 and 8 into equation 6 yields ~1 2 P' J T X2+ TB 2] (9) or = l e1 1 e Be A (10) P = X1I1 e e + 2.2 e

Example Problem No. 118 Since X1 + X2 = 1, (11) equation (10) can be written P = 0 (X1, T). (12) For a fixed value of X1 and a known pressure, equation O) is then an implicit function of T only. Al A2 P = C1 eT + C2 eT (13) where B1 B2 C1 = X11 e C2 = X22 e (14) One method of finding the value of T corresponding to a given value of X1 is to apply Newton's Method. Briefly, given a function f(z) = 0, and an initial estimate z0 of the root oc, Newton's Method is a procedure which iteratively finds a new (and if the method converges, a better) estimate of the root cC. The algorithm is given by f(zi) Zi+l = Zi -. (15) where the prime denotes the derivative with respect to z and the subscripts i and i+l are for two successive estimates in the sequence zO, zl, z2...,zi, Zi+1,.l..Zn. If the sequence converges, i.e., if z-, oC, then this represents a simple and effective procedure for solving an implicit function of one variable. Applying Newton's Method to 13 yields: Al A2 f(T) = C eT + C2 eT P = O (16) Al A2 f'(T)= -C 1 1 e C2 e T (17) f(Ti) i+l =T i (Ti (18) or Al A2 C eT + C e - P i+l = Ti 1 2 A2 (19) A1 T- A+ 2 T C.e + C ye 1 A2 2 _2 Al, A2, B1, and B2 are known constants. After hand calculating A and B for a given P, the entire X-T diagram can now be generated by the following procedure: 1. Select a value of X1. 2. Compute I1 and [2 from equations (5). 3. Compute C1 and C2 from equations (14) 4. Make an initial estimate of the root, TO. On the first pass (small X1) assume that T is the boiling temperature for X1=O, i.e., for pure methanol. On subsequent passes, simply use the temperature found on the previous pass as the first guess for the next pass. -169

Vapor-Liquid Equilibrium 5. Use equation 19 to iteratively determine Ti+l from Ti. 6. If the magnitude of f(T) for some Ti has value less than some small number 1 or if Ti+ - Tilis less than some other small number e2, then Ti or Ti+l represents a good approximation to T. Provision should also be made for the possibility that the method does not converge by limiting the number of iterations to some maximum value ITMAX. 7. Tabulate the data pair X1 - T. 8. Pick a new value of X1 and return to step 2. Repeat this process until an adequate number of X1 values have been selected. To determine values for the X-Y diagram it is necessary to compute the value of Y1 from Y X1: 1 (20) P When the appropriate value of boiling temperature T has been found using the procedure above, X1i ~i P1 and P are all known. The value of Y2 corresponding to the chosen value of X1 can then be computed directly. Since the computer program is the primary concern here, the values of A, Al, A2, B, B1, and B2 will simply be given. The student would have to hand calculate A and B. A = 0.905 B = 0.570 A1 = -3747.37 B1 = 18.0131 A2 = -4793.23 B2 = 20.8237 P = 747.0 * This second test is valid because in general ITi+l-TiI becomes small as f(T) becomes small. In the case of a function with a very steep (essentially infinite) slope far removed from the zero of the function, this criterion may fail. However, for the function involved in this problem, this situation does not arise for the range of temperatures involved. Table of Symbols Problem Symbol MAD Variable Meaning A A B B Al Al B1 Bl See Nomenclature, page I65. A2 A2 B2 B2 V1, n 11'ftfGAMMA1 2(~~2 C ~GAMMA2 -I70

Example Problem No. 118 Table of Symbols, Continued Problem Symbol MAD Variable Meaning P1 P1 Pf P1ZERO P2 P2ZERO P P See Nomenclature, Page I65. T T X1 X1 X2 X2 Y1 Y1 Cl Cl See Equation 14. C2 C2 See Equation 14. DELTA Increment in X1 for tabular calculations. f (T) DFOFT See Equation 17. El EPS1 Convergence tolerance. EPS2 Convergence tolerance. f (T) FOFT See Equation 16. ITER A counter for the number of Newton's Method iterations. ITMAX Maximum number of iterations permitted. Flow Diagram BVpJ trPS, l r B~Z, FgEP' I EPSL.., X 1- 0.. sLTk i ITr>TAA) \_/ D~sTA,TrM* X' S X-Jloq~ 7r1 CGAM Ai =-mi(i, x ) IT T I0L-zX-; S6MMA;L-e9I / ZoErvro' \'-T= AZ-!= A —~ - F)-O&,(P) eB ELD6. (P)- B - \z ~sT~~~/I xA7 -

Vapor-Liquid Equilibrium Flow Diagram, Continued ____I-l_-_C'AirC____- oFosTfk I PrI'oj, TOLD) =r' - T= T- JOPT/D F:o'1 Tt | XIJE | | Y1='(X1.-o4MMA1MAD Program PROGRAM TO COMPUTE A TABLE OF XI VS Y1 AND r FOR THE SYSTEM ACETOCNE - METHANOL IN VAPOR-LIQUID EQUILIBPRIUM AT PRESSURE P INTEGER ITER, I TNAX START PRINT COMMENT $1VAPOR-LIGUID EQUILIBRIUM FOR THE ACETONE - ME 11HAN[L SYSTEM $ P EAD AND PRINT DATA A,BAltBl,A2,B2,PEPS1,EPS2,DELTAITMAX TkROUGH LOCP, FOR Xl=C.O, DELTA, X1.G.1.0 + DELTA/2.C WHENEVER X1.E.C.C Y1.C T= A2/(ELCG.(P) - B2) TRANSFER 1C LOCP OR WHENEVER X1.G.1.O-CELTA/2.0 Y1 = 1.C T = A/ (ELCG. (P) - 1) TRANSFER IG LOOP END CF CONDITIONAL X2 = 1.0 - Xl GAMMA1 = EXP.(X2*X2*(A+2.*Xi*(B-A))) GAMMA2 = EXP. (X*X1*(B+2.*X2*(A-tB))) C1 = XI*GAMMA1*EXP.(B1) C2 = X2*GANMA2*EXP. (B2) BEGIN NEWTONS METHCC ITERATION 10 FIND T FOR GIVEN X1 THROUGH NEWTON, FOR ITER=I,1, ITER.G.ITMAX EXALT = EXP.(Al/I) EXA2T = EXP.(A2/1) FOFT = CI*EXA1T + C2*EXA2T - P WHENEVER.ABS.FOFT.L. EPS1, TRANSFER TO GETY1 DF{(FT = -(Cl*Al*EXAIT + C2*A2*EXA2T)/(T*T) iH+ENEVER.ABS.0FCFT.L.1.E-1O*.ABS.FOFT, TRANSFER 10 TRUBL TOLD = T T = T - FOFT/DGFFT NEWTON WHENEVER.ABS.(T-Of(LD).L.EPS2, TRANSFER TC GETY1 TRUHL PRINT COMMENI $ NEWTONS METHOD FAILED TO0 WORK $ PRINT RESULTS ITER TRANSFER TG STARI GETY1 Y1 = X1*GAMMA1,EXP.(A1/T + B1)/P LOOP PRINT RESULTS XL, T, Y1 TRANSFER TC START FNE OF PROGRAM -T72

Example Problem No. 118 Computer Output The program was run with the indicated data for a stepsize DELTA = 0.05 and 0.1. The results for the DELTA = 0.1 case are shown below. VAPCR-LIQUID EQUILIBRIUM FOR THE ACETONE - METHANOL SYSTEM Al = -3747.37, 81 = 18.0131, A2 = -4793.23, B2 = 20.8237, DELTA = 0.10, A = 0.905, B = C.573, P = 747., EPS1 = 1.E-6, EPS2 = 0.01, ITMAX = 20* X1 =.COOOO T = 337.370014, Y1 =.000000 X1 =.1CC000, T = 333.4C7753, Y1 =.230874 Xl =.20000C0, = 331.256516, YL =.356726 Xl =.300000, T = 329.963955, Y1 =.441312 X1 =.40CCOO, T = 329.120228, Y1 =.509109 xl =.500000, T = 328.546825, Y1 =.571920 X1.600000, T = 328.176064, Y1 =.636663 X1 =.7CC000, T = 327.996449, Y1 =.708182 X1 =.80oCOO, T = 328.024136, Y1 =.790393 X1 =.900000, T = 328.285271, Y1 =.886714 X1 = 1.000000, T = 328.802189, Y1 = 1.000000 In order to get an indication of the accuracy of the data taken in the laboratory, three experimental points were taken from the acetone-methanol data given by Hala et.al. The computed results for the hand calculated values A = 0.659, B = 0.606 and pressure Py760 mm Hg are: VAPOR-LI(,UID EQUILIBRIUM FCR THE ACETCNE - METHANOL SYSTEM Al = -3747.37, B1 = 18.C131, A2 = -4793.23, B2 = 20.8237, DELTA = 0.10, = 0.659, P = 0.606, P = 760., EPS1 = 1.E-6, EPS2 = 0.01, ITMAX = 20* X1 =.000030, I = 337.780201, YI =.CC0000 X1 =.100CCO, T = 334.736027, Y1 =.203396 X1 =.2CCCCO, T = 332.697346, Y1 =.337883 Xl =.3CC0000, T = 331.280895, Y1 =.43665C X1 =.40CCOO, T = 330.269028, Y1 =.516361 X1 =.SOC0CC, T = 329.538387, Yl =.586584 X1 =.6C0GOw' T = 329.024982, Y1 =.6,3 7C6 X1 =.70C0OC, T = 328.707443, Yl =.722830 Xl =.a800CC, r = 328.601143, Y1 =.798994 X1 =.SCC3JC, T = 328.761559, Y1 =.888353 X1 = 1.C0C003, 1 = 329.300694, Y1 = 1.'00000 * Vapour-Liquid Equilibrium by E. Hala, J. Pick, V. Fried, and 0. Vilim, Pergamon Press, 1958. -I73

Vapor-Liquid Equilibrium The X-T and X-Y diagrams for results from the first set of input parameters are shown below. 11 Hi ll I 11 111",~1iS1 11 ~ ~:~~1.7 1-~~~~~:-4 FTi ~~j~t~~f I-~il t i tl:i~~~~~~~i~l Hi.U L'~~~~~~~~~~ ~~~~~~~~ i ~,~l~ HH! i/iU!ti~ N l' itiH'i-!-t I-Y-t -i-! - t:i'~r ~! ti'ii i 01~ ~ ~ ~ ~~~- ~~~~~~~~:' f H —' I I- Ir i i-l-r f - P4IJ 1 H 44!----- - --- - L I I.I ii F i~~~ ~~~I T -!tTTR__ -r I i~~~~~~~~~~~-TIR Ull 1 I_4 I i~~~-1,11111tL1l At1111-1 J-1 tl-~ ~ ~ ~ ~~ ~ ~~ ~~~~~~~~~~~~~~~~~~~1 ii ti ~~~~~ 1I iili +H+-i if Hf +i FfH-17 I i. I I ~t I t I~~~~~~~t t H i 1~~~~~4 4 t If IHi rt I~~~~~~~~~~~ i tit j till ~ ~ ~ ~ ~ ~ Ii ll1; I,~~~~~~~~~~~~~~~~~~~~~~~~~~~ if~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ i~li ~:

Example Problem No. 119 SOLVENT ALLOCATION TN MULTI-STAGE CROSS-CURRENT EXTRACTION by Alvin 0. Converse Department of Chemical Engineering Carnegie Institute of Technology Course: Process Design Credit hours: 3 Level: Senior or Graduate Statement of Problem 1 A schematic of the process under consideration is presented in the figure below. Solvent w w WN n Feed. Raffinate XN+l XN Xn+l Xn x N n 1 YN Yn, Y, Extract Assume that the profit from each stage is proportional to Pn = aWn Yn - P Wn (1) For a three-stage process determine the optimum solvent allocation such that the overall profit is maximized. Also determine the maximum overall profit. In working the problem, assume that the flow rates (pounds/hr.) of feed or raffinate in and out of a stage are equal. Also assume individual stage efficiencies to be 100l. 1 The general solution to this problem was first reprted by R. Aris, D. Rudd and N. Amundson, Ch. E. Sci., 12, (1960) A recent paper by the author,"Computer Optimization of a Multi-Stage Allocation Problem by Means of a Non-Imbedding Technique" presented at the Dec. 21-6, 1962, meeting of the AIChE (preprint 116) describes a continuation of the material presented here. -175

Solvent Allocation in Multi-Stage Cross-Current Extraction Use the following equilibrium data. y, wt. fraction x, wt. fraction 0.000 0.000 0.027 0.010 0.050 0.020 0.073 0.030 o.094 o.040 0.119 0.050 0.138 o.o6o 0.153 0.070 0.163 0.080 0.170 0.090 0.173 0.100 0.176 0.110 0.178 0.120 0.179 0.130 0.179 0.14o o.18o 0.150 0.180 0o.160 0.182 0.170 0.186 o.18o 0.192 0.190 0.200 0.200 Other necessary data are: P/a = 0.05, x4 = 0.15, and a = $1.00/lb. The following notation is suggested: p proportional to the profit from a single stage q feed and raffinate flow rate, lbs./hr. w solvent flow rate, lbs./hr. x wt. fraction of solute in the raffinate y wt. fraction of solute in the extract a value of the solute extracted, $/lb. value of the solvent, $/lb. Subscripts n refers to a stream leaving the nth stage (also solvent stream entering nth stage) N total number of stages Solution 1 This follows the solution given by Aris, Rudd, and Amundson (loc. cit.). Consider the nth stage. A material balance yields q [xn+l - x =w (2) The extract and raffinate are assumed to be in equilibrium, hence: Yn = f(xn) (3) From the problem statement, the profit from the nt stage is proportional to: Pn = a Wn Yn - Wn () Combination of Equations (2), (3), and (4) yields 1 Much of this would be discussed with the students during class prior to the assignment. -I76

Example Problem No. 119 =n LXn+l - Xn ]1 - / f(xn) (5) where Pn =P/(aq) A = / The total profit on all N stages is therefore proportional to N N N l n=ln E Xn+l - X] [1 - / f(x)] (6) This is to be maximized by the proper choice of w1,.. wn, which is reflected in Equation (6) by x,..., xN. Note that as stated in Equation (6) PN is to be optimized by the proper, simultaneous choice of N variables. This is spoken of as an N dimensional problem since PN is a function of N variables. The concept of dynamic programming is now used to remove the simultaneous aspect of the optimization, and reduce this N dimensional problem to N onedimensional problems. Consider now a three stage process 3= [x4 - x] [l - /f(x)j + [ X - X2][1 - /f(x2)] + X2 - Xl] [1 - X)] 3 + p2 P P1 (7) Let g](x2) = maXxl P1' which is to say, once the proper choice of x1 has been made so that the profit from the 1st stage is maximum, this maximum profit is a function of x2 only. This can be seen from inspection of the term, [x2 ]- l][ 1- f(xl)]. Hence, as a first step in the computation procedure, the function gl(x2) is constructed by choosing various values for x2 and searching on x1 to find the maximum value of Pl, for each value of x2. This function, gl(x2), is thenused in the next step. Similarly the function g2(x3) = mx [ P2 + gl(x2)J and g3(x4) max [ P2 + g2(x3 x3 can be constructed. In this problem g3 is the desired maximum profit and the corresponding values of x1, x2, and x3 contain the information necessary to compute the optimum solvent distribution, w1, w2, and w3, from Equations (2) and (3). The theoretical aspects of the solution have been described above. The following section describes the implementation of this method of solution on the digital computer. Input Data: NOINCG: The maximum profit from a section of stages is to be calculated and tabulated as a function of input concentration. NOINCG is the number of increments in the tabulation. (17 in this example) NOINCS: For each value of the input concentration,the value of the output concentration from the first stage in the section that yields the maximum profit from the entire section -I77

Solvent Allocation in Multi-Stage Cross-Current Extraction is determined by calculating the profit, FUNCX, forNOINCS values of the output concentration, X, which ranges between 0 and the input concentration, GX. NOINCS,therefore,is the number of increments in this search. (40 in this example) E = a small number (0.00005) used as a criterion in the refined search for maximum profit. A = lowest value of the input concentration which is considered. DELT = size of the increment of inlet concentrations, GX. (0.01 in this example) CASES = number of different economics cases to be considered.(l in this example) LAMDA = the values of the economic parameter, X, which are to be considered. One value is needed for each case. (0.05 used) IDEN = first six letters of the name of person submitting problem.. NOINCF = number of increments in the tabulation y vs. x (EQY vs. EQX). STAGES = number of equilibrium stages in the extraction process EQY, EQX = equilibrium data GY = maximum profit for stages 1 to n+l Procedure The computation begins with stage number 1 (see the figure). Since there are no stages to the right of this one, the maximum profit on these nonexistent stages is zero; hence GY=O. To begin the computation on stage number 1, a series of values of the inlet concentration, GX, is generated. For each element of GX a series of values of the outlet concentration, X, is generated and the profit, FUNCX, calculated. This last computation requires the values of the solute concentration in the extract which is in equilibrium with the raffinate, F, and the maximum pbofit on the stages to the right, G. Both of these are obtained from a table interpolation subroutine, TAB.*, since they are both functions of X. The maximum value of FUNCX is then selected and refined by a half-interval search. On the flow diagram, this halfinterval search extends from the statement labeled START through the second TRANSFER TO START statement. The resulting maximum value of FUNCMX and the corresponding value of X are stored in the vectors GYY and XX respectively. The corresponding values of the solvent to the first stage of the section being considered, V, are then computed. Elements of GYY, XX, and V are generated and printed out for each element of GX in the THROUGH loop which is terminated at the statement labeled DELTA. The computation is then repeated for stages number 1 and 2, etc., until the final section of stages includes all stages, the maximum profit from the previous section being used in the next. Note that when the computations on a section are finished,GYY is transferred to GY for use in the next section. After each execution of this subroutine, the success of the execution is tested, transferring to BEGIN if unsuccessful. -I78

Example Problem No. 119 Flow Diagram NOINCG QXW -- -B.E3x ONCASES IDEN NOINCS, ECHO LAMD ECH NOINCF, ECHO (NOINF) IE, A, DELT PRINT l 4 )IAMDA ECHO P EIQY( )... EQ I (NOINCR) EQX(L),A I CEQY(L) LLPHA BE; I1,\ /;0TA \ GX(K)=A+K*DELT L,1, II=l, 1, k-~ K=O, 1, __r\L> NOINCF /- -\ r~ II CASES K NOINCG GY(K)=O - /DELTA / GAMMA \/ OMEGA FUNCMX= 2E BETA)-( N=1,l I=)-4 Z=0,1, -1.E36 \s__, \N> STAGES / \ I, NOINCG / \ Z > NOINCS-~ X(Z)=GX(I)*(1-(Z+O.)/NOINCS)) ME 1)/NV A J INVALID EGIN G=TAB.(X(Z),GX(), GY(O0),i,i, 3, NOINCG+1, ME1) ME2 4 ) F=TAB.(X(Z),EQX(1),EQY(1),1,l,3,NOINCF,ME2) M 2 INVALID (5= UNCX(Z)=(GX(I)-X(Z))*(1-LAMDA(II)/F)+G FUNCX(Z)> FUNCMX T - FUNCMX=FUNCX(Z) XMX=X(Z) T AR XL=XMX -GX( (I) /D NOI NCSS) ME3 FMXL=TaB. (XL 5 X (0), FUNCX (0), 1,,3,NOINCS, IME3)T' XH=XMX+GX(I)/(D*NOINCS) (FMXL-FUNCMX) > E FMXL-FN E' F F MXH=TAB.(XH,X(O),FUNCX(0),1,1,3,NOINCS, ME4) IT 9D *2 H FUNCMX=FMXL XMX=XL TA-I79

Solvent Allocation in Multi-Stage Cross-Current Extraction Flow Diagram (continued),, A 0r ~ ~GYY (I) =FUNCMXOEN XX (I) =XMX E4- FG 1 ( FMXH-FUNCMX) > E AD PI FOMAT';'JF P F=TAB. (XX(I),EQX(1)N, EQY(1)N,1,1,3,NO INCF,ME5 m E VVALO ID V E AD=DA*2 FUNCMX=FMXH I XMX=XH I RT iH F1.5V(I) =(GX(I)-XX(I))/F =0, VECTR VALUES BEGN READI FORMAT PARMNOIDG NOINCG S E A DEL VECTOR VALUES DENT = C 2(I 13*$(I MAD Program and Data READ FORMAT PARAMo NOiNCG E NOINCS C EF At DELT VECTOR VALUES PARAM = $ 2156 3F1055*$ A PRINT FORMAT PARAMOt NOINCGt NOINCSt Et A DELT VECTOR VALUES PARAMO =$44HlNO. OF INCREMENTS IN THE PROFIT FU INCTION z I3/35H NO. OF INCREMENTS IN THE SEARCH = I3/5H E = F llOUSGS1 lO 4HA = FlOR0*S10 *7HDE LT = F105*$I READ FORMAT ECO# CASESt LAMDA(l)#aeLAMDA(CASES) VECTOR VALUES ECO =$ I39 10F6*4*$ PRINT FORMAT ECOOt CASESt LAMDA( l) *LAMDA(CASES) VECTOR VALUES ECOO =$16H NOS OF CASES I3/7H LAMDASlOF543$ BEGIN READ FORMAT IDENTF IDENt NOINCFt STAGES VECTOR VALUES IDENT =$ C6, 2I3*$ PRINT FORMAT IDENTOR NOINCF STAGES VECTOR VALUES IDENTO =$27HONO. OF EQUILIBRIUM DATA = I3NS1091 16HNOU OF STAGES = I3*$ READ FORMAT EQDATA, EQX(l ) *EQX(NOINCF) READ FORMAT EQDATA3 EQY(1)*.*EQY(NOINCF) VECtOR VALUES EQDATA =$(l6F5*3)'*$ PRINT FORMAT ECHO1t IDEN VECTOR YALUES ECHO1 =$21HOEQUILIBRIUM DATA OF C6/1HOS5lHYS9o 11HX*$ THROUGH INC9 FOR L = ltlgL*G: NOINCF INC PRINT FORMAT ECH02, EQY(L), EQX(L) VECTOR VALUES ECH02 = $1H 53t F5s3*S5# F5*3*$ INTEGER Lt NOINCFt NOINCG, K, STAtGES Nt I, Zt NOINCS, II* CA 1SES IDEN DIMENSION EQY(50)9 EQX(50)t GX(40)o GY+40) X(60)t LA 1MDA( 10) FUNCX(60 ) V 60) GYY(40 ) t XX( 40 ) THROUGH ALPHAt FOR II = ltl II-G* CASES THROUGH BETAt FOR K 0t1lt K.G*NOINCG GX(K) a A + K*DELT BETA GY(K) 0 O THROUGH DELTAt FOR N = lt1 NeG STAGES THROUGH GAMMAt FOR I " Ot t I Ge NOINCG FUNCMX' I -1~E36 -I80

Example Problem No. 119 MAD Program and Data (continued) THROUGH OMEGA. FOR Z = 0,1, Z.G. NOINCS-1 X(Z) = GX(I)*(l-((Z+*,)/NOINCS)) G = TAB.(X(Z)s GX(O)o GYtO). 1,1,3,NOINCG+lPME1) WHENEVER ME1 *NE. 1, PRINT FORMAT MER1 VECTOR VALUES MER1 =$ 4H ME1*$ TRANSFER TO BEGIN END OF CONDITIONAL F = TABe(X(Z), EQX 1), EQY(1), 1.1#3* NOINCFPME2) WHENEVER ME2 *NE. 1. PRINT FORMAT MER2 VECTOR VALUES MER2 =$ 4H ME2*$ TRANSFER TO BEGIN END OF CONDITIONAL FUNCX(Z) = (GX(I) - X(Z))*(1 - LAMDA([I)/F) + G WHENEVER FUNCX(Z) oG, FUNCMX FUNCMX = FUNCX(Z) XMX = X(Z) OMEGA END OF CONDI T IONAL RREFINED SEARCH FOR THE MAXIMUM PROFIT D= 2* START XL = XMX - GX(i)/(D*NOINCS) FMXL = TAB.(XL9 X(O). FUNCX(O), 1,1,3.NOINCS,ME3) WHENEVER ME3 *NE. 1. PRINT FORMAT MER3 VECTOR VALUES MER3 =$ 4H ME3*$ TRANSFER TO BEGIN END OF CONDITIONAL WHENEVER (FMXL - FUNCMX) *G. E D = D*2 FUNCMX = FMXL XMX = XL TRANSFER TO START OTHERWISE XH = XMX + GX(I)/(D*NOINCS) FMXH = TAB*(XH.X(O),FUNCX(O),1,1,3,NOINCS tME4) WHENEVER ME4 *NE* 1l PRINT FORMAT MER4 VECTOR VALUES MER4 =$4H ME4*$ TRANSFER TO BEGIN END OF CONDITIONAL END OF CONDITIONAL WHENEVER (FMXH - FUNCMX).*G E D = D*2 FUNCMX = FMXH XMX = XH TRANSFER TO START END OF CONDITIONAL GYY(I) = FUNCMX XX(i) I XMX F = TAB.(XX(I) EQX( ) EQY(1),1 13 NOINCF ME5 ) WHENEVER ME5 *NE. 1,,PRINT FORMAT MER5 VECTOR VALUES MER5 =$4H ME5*$ GAMMA V(I) = (GX(I)-XX(I))/F PRINT FORMAT HEAD, N VECTOR VALUES HEAD =$1HOS20#4HN = 13/S3#6H X(IN)S5S1HGS1O*1HX lS10 1HV*$ THROUGH XI* FOR I = 0.1 I*.G. NOINCG PRINT FORMAT RESULTf GX(I)t GYY(I), XX(I). V(I) VECTOR VALUES RESULT =$S2,F75,3F11.5*$ XI GY(I) GYY(I) DELTA CONTINUE ALPHA CONTINUE TRANSFER TO BEGIN END OF PROGRAM $DATA 17 40 0.00005 0.03 0.01 1 0.05 CONVER 21 3 0 0O01 0.020 *0300.0400e0500*060 *0700*0800e0900.1000,1100*1200*1300.1400*150 0 1600.1700.180 *1900.200 O 0.0270.050.0730.0940.1190.138 *1530,1630,1700.1730,1760.17801790,1790,180 0 1800.1820*186.1920.200 -I81

Solvent Allocation in Multi-Stage Cross-Current Extraction Computer Output NO. OF INCREMENTS IN THE PROFIT FUNCTION = 17 NO. OF INCREMENTS IN THE SEARCH = 40 E = 0*00005 A 3 0.03000 DELT = 0,01000 NO. OF CASES 1 LAMDAS. 0500 NO* OF EQUILIBRIUM DATA 21 NO OF STAGES = 3 EQUILIBRIUM DATA OF CONVER Y X 0,000 0.000 0.027 0.010 0.050 0.020 0.073 0.030 0*094 0.040 0.119 0.050 0.138 0.060 0.153 0.070 0*163 0.080 0.170 0.090 0*173 0.100 0.176 0.110 0*178 0.120 0*179 0.130 0,179 0.140 0.180 0.150 0.180 0.160 0,182 0.170 0O18'6 0.180 0.192 0.190 0.200 0.200 N 1 X(IN) G X V 0.03000 0.00095 0.02475.08600 0*04000 0.00324 0.02800.17519 0.05000 0.00635 0.03125.24798 0.06000 0.01002 0*03450 *30970 0*07000 O'.01415 0*03675.38207 0*08000 0.01881 0.04200 *38384 0.09000 0.02390 0.04500 *42204 0 10000 0*02925 0.04750 *46492 0.11000 0*03482 0*04950.51354 0*12000 0.04052 0.05100.56960 0.13000 0*04635 0.05200.63303 0.14000 0.05228 0.05250 *70431 0*15000 0*05826 0.05250.78481 0.16000 0.06430 0.05600.79394 0.17000 0.07048 0*05525.88544 0.18000 0.o7665 0.05850.89698 0.19000 0.08293 0.05700 1.00142 0.20000 0.08928 0*06000 1.01449 N 2 XIIN) G X V 0*03000 0.00120 0.02625.05814 0*04000 0.00415 0003200.10367 0.05000 0.00803 0.0375.0 ~ 14107 0.06000 0.01272 0,04350.16050 0.07000 0.01805 0.04725 *20258 0.08000 0.02375 0.05000 *25210 0O09000 0.02962 0.05175 *31173 0.10000 0*03569 0.05500.34850 0.11000 0.04192 0.05775.38950 0.12000 - 0O4828 0.06000.43478 0.13000 0.O5477 0.06500.44501 0.14000 0.06136 0.06650.49573 0.15000 0.06801 0.06750.55118 0.16000 0.07471 0.07200.56651 0.17000 0.08150 0.07225.62815 0.18000 0.08828 0.07200.69527 0.19000 0.09514 0.07600.71486 0.20000 0O.10200 0.08000 ~73620 -I82

Example Problem No. 119 Computer Output (continued) Nu 3 XM IN) G X V 0.03000 O.00oo127 00275 0203312 0.04000 0 00457 0.03400 0. 07380 0.05000 0,00883 0.04125 0 0901:0 0.06000 0 o 1396 O.04650 0. 12226 0O07000 0 o 1962 0.05075 0 15961 0.08.000 0.0 2560 0O05400 0.20439 0.09000 0.0 0318:5 0.06075 0.21001 0.10000 00d3834 0.06500 0.23962 0.11000 0.04 98 0.06875 0.27250 0.12000 0*05172 0o07200 0.30901 0.13000 0 05851 0.074T75. 34913 0 14000 0 *0 6537 0.07700 0.39275 O* 15000 0.o 7227 0.0787:5 0.43:994 0.16000 0.0 7921 0.08400 0 45724 0 17000 0. 08620 0.08500 0.50917 0 18000 0.0 9321 0.08:550 0.56490 0.19000 0.10022 0.08550 0,62468 0.20000 0.10727 0.09000 0,64706 Discussion of Results The feed concentration was given as 0.15. Entering the table of results under the heading of N=3, at the value of X(IN) = 0.15, one finds the maximum profit function G=0.07227. Hence the maximum profit = aG=$0.072/lb. of feed. From the same table the concentration of the solute in the extract from stage no. 3 is X=0.07875; the amount of solvent, V=0.43994 lbs. of solvent/lb. of feed. Entering the next table (N=2) at X(IN)=0.07875, one finds the solvent allocated to that stage to be V-0.246, by linear interpolation. Similarly X2 ~ 0.0497. Entering the last table (N=3) at X(IN)=0.0497 one finds V!0.248 and X1 0.031. Hence the total amount of solvent used = 0.934 and is greatly different from an equal distribution. The program required 1.0 minute for compilation and 1.7 minutes for execution on the IBM 704. -I83

Example Problem No. 120 DYNAMIC HEAT EXCHANGE by Jack Famularo Department of Chemical Engineering New York University Course: Rate Operations Credit hours: 3 Level: Junior-Senior Statement of Problem It is desired to study the unsteady state behavior of a shell and tube heat exchanger (1 tube pass, 1 shell pass) which is subjected to a variable inlet fluid temperature on the tube side. To simplify the analysis consider the problem of condensing steam on the shell side with an organic liquid such as toluene on the tube side, and limit the problem to small enough inlet temperature fluctuations so that a constant overall heat transfer coefficient can be assumed. For the sake of uniformity the following nomenclature will be used: Problem variable MAD variable Definition U(x,t) U(I,J) Fluid temperature at mesh nodes, ~F Ust UST Steam-condensate temperature, ~F x X Distance into tube bundle, ft. t T Time, sec. A *A Cross-sectional area, ft.2 S S Lateral area, ft.2/ft. length m M Mass flow rate, lbmd/sec. c C Specific heat of fluid, BTU/lbm ~F D D Density of fluid, lbm/ft3 Xmax XMAX Length of tube bundle, ft. max v V Fluid velocity, ft./sec. Z Z Overall heat transfer coefficient, BTU/sec. ft2 ~F. h H Mesh size in x, ft. L Mesh size in t, sec. i I Position subscript in x. j J Position subscript in t. -I84

A schematic diagram of the heat exchanger is shown below. Condensing Steam, Temp. = Ust U (O,t)! U (Xmax, t) X max Rather than consider the flow through individual tubes, the total flow is to be treated as if it were through a single tube with cross-sectional area and lateral area equal to the sum of these terms over all of the tubes. Sdx - dx If the element of fluid shown above is followed as it moves a distance dx it is observed that the temperature changes. This change in temperature is the result of two contributing effects: 1. Movement of fluid to a region of different temperature, characterized by - U t This factor is also of importance in the steady state problem, if the inlet temperature is some constant less than USt. st' 2. The change in temperature at any given position with time, characterized by | x This factor would contribute even if the element of fluid were stationary and originally at some temperature less than Ut. The total change in temperature as the element moves dx is constructed as follows: dU = B |dx + | dt tx x t If the element of fluid experiences a change in temperature its energy content is increased by mic.dU. However, this energy must be transferred to the fluid from the condensing steam through the resistance ZtSdx -I85

Dynamic Heat Exchange Thus: dQ = ZSdx (Ust - U) dQ = mcdU = me x dx + mc U dt Equate: mc - x dx + me dt = ZSdx (Ust - U) Divide by mcdx, yielding: U + 1 2 + me (u-Ust) =o and substitute m = DAv. This results in: 1 UL ZS -V U+ +t+ cDAv (U - Us) = A more formal statement of the problem is as follows. Transform the differential equation to an appropriate difference equation and write a MAD computer program to simulate the heat exchanger for the following boundary and initial conditions. Initial Condition: U(x,o) = Ust Boundary Condition: U(O,t) is given by the figure below. 220 1 cos cycle, Sin or Cos curve, o frequency-fl cycles/sec. frequency f cycles/sec. — ) I h 110, I 0 ~ ~ ~ ~ ~I 0 o 5/f, 4 10 Time, t, sec. It is suggested that the following data be used in the computation,and that this data be read into storage from data cards. A = 0.4 ft2 S = 30 ft2/fto length c = 0.5 BTU/lbm F., D = 54 lbm/ft3 v = 4 ft/sec. Z = 0.1 BTU/sec. ft2 ~F. Ust = 220 ~F, Xmax = 10 ft. fl = 1 cycle/sec. f =.5 cycle/sec. h/t = 4 ft/sec. h =.4 ft) amp = 22 OF. -I86

Example Problem No. 120 Solution The space defined by the coordinates x in distance and t in time is partitioned into small rectangular sections of dimensions h ft. and A sec. as shown in the diagram below. 4 x 35 i=O i 1 2 3 4 5 6 j=0 t The partitioning defines a mesh whose pivotal points are defined by the equations: xi = x0 + ih t. = to + j t Thus the temperature at any of the pivotal points or nodes of the mesh may be represented as follows: U (xi,tj) = Ui,j The differential equation can now be reduced to a difference equation by substituting for the partial derivatives in the following manner: B U Uij - Ui-,j Backward difference X, -j h quotient U ij+lU - Ui, Forward difference t U i, ij+ j quotient The selection of the above difference quotients is necessary to insure convergence of the solution of the finite-difference equation to the solution of the differential equation. For example, the use of a forward difference for)U/ x results in an unstable solution.* It can also be shown* that the ratio vt /h must be equal to or less than unity. Proceeding to the conversion of the differential equation to difference form, the following is obtained. v- U + U ZS v Gx + --- cDA (U - Ust) =O Courant, Isaacson, Rees. "On the Solution of Non-Linear Hyperbolic Differential Equations by Finite Differences," Comm. Pure Appl. Math., 5, 243-255 (1952). -t87

Dynamic Heat Exchange which becomes in difference form, v h. i.. + [+ Ui Ul st = h cDA,j t This can be rearranged to yield, v~e ZS U + U R-zs i( 1-jlh cDA U j + cDA st The difference equation is employed to calculate an approximate temperature at every mesh node preceeding from i = 0 to i = xmax/h for every column j, starting at j=O. The solution is started by substituting the initial condition for the axis j=O, and the temperatures along the axis i=O are obtained from the boundary condition. Flow Diagram CpNSTU= 1-V/ 0Z-AESP | C0NST=LP*US UST, IXMAX,V, HOL,' H i 1 \= L=H/HOLL LPHA GAMMA I.G.XMAX/H UJ1(I) =CONST1*UJ(I) +CONST2*UJ(I-1) +CONST3 TO.A IF UJl(I) =UST*(.5+AMP+AMP*COS. (2*r*F*:(T-(4-.5/1)) 1T I~UJ1(I)=.5 XUST1 UJ1 (I) =UST*(. 7+. 25*COS. (2*1r*Fl*T) ) G MMA -I88

Example Problem No. 120 1 PSILN Flow Diagram (continued) L,UJ( o)... In the block diagram above: HOL = H/L UJ(I) = TEMPERATURE A TIME = J*L, I=0,1,2,..,n UJ1(I)= TEMPERATURE AT TIM, = (J+1)L, I=O, l,2,..n MAD Program and Data J. FAMULARO T29-N 0 5 400 400 HEATEXCH J. FAMULARO T29-N 0 5 400 400 HEATEXCH $COMPILE MAD, PRINT OBJECT. EXECUTE. DUMP PRINT FORMAT TITLE READ FORMAT CONSTrUST.A.SC.D.XMAX.VZ. FtAMP,F1 PRINT FORMAT CONSTHUSTAS,$gCD,XMAX,V,ZFtAMPeF1 START READ FORMAT RATIOHOL,H PRINT FORMAT MESHR.HOL,H L=H/HOL TEMP=L*Z*S/( C*D*A) CONST l1 *-V/HOL-TEMP CONST2=V/HOL CONST3:TEMP*UST THROUGH ALPHA#FOR I=O 1 I *G XMAX/H ALPHA UJ ( I ) UST COUNTtO J=O BETA THROUGH GAMMAtFOR IO=Q,,1.G.XMAX/H T=(J+1)*L WHENEVER I.G.O UJ( I )CONST *UJ( I )-+CONST2*UJ( I-1 +CONST3 OR WHENEVER I.E.O WHENEVER T.GE.O.,ANDT.LE..5/F1 UJ(I )=UST*(.75+.25*COS. (2*3.1415927*Fl*T)) OR WHENEVER T.G..5/Fl.ANDT.L.4. UJl(I )=.5*UST OTHERWISE UJl(I)=UST*(.5+AMP+P+AMP*COS.(2*3.1415927*F*(T-(4.-.5/F)))) END OF CONDITIONAL GAMMA END OF CONDItIONAL -I89

Dynamic Heat Exchange MAD Program and Data (continued) WHENEVER J.E.O PRINT FORMAT RESULTJ*L*UJ(0)...UJ(XMAX/H) TRANSFER TO EPSILN OTHERWISE WHENEVER COUNT*L.*5/L*TRANSFER TO EPSILN END OF CONDITIONAL COUNT=O PRINT FORMAT RESULT#J*LUJ(O)...UJ(XMAX/H) EPSILN COUNT=COUNT+1 J=J+1 THROUGH DELTAtFOR I=01tI.G.XMAX/H DELTA UJ(I)=UJ1( I) WHENEVER T*.L.10.TRANSFER TO BETA PRINT FORMAT RESULTJ*L,UJ({0)...UJ(XMAX/H) TRANSFER TO START INTEGER I#J*COUNT DIMENSION UJ(500) DIMENSION UJ1(500) VECTOR VALUES TITLE=$69H1 STUDY OF DYNAMIC HEAT EXCHANGE FOR IVARIABLE INLET FLUID TEMPERATURE*$ VECTOR VALUES CONST=$11F7.2*$ VECTOR VALUES CONSTH=$1H S4,3HUSTS56,1HA$56*1HS$S6.1HC,$S61H IDS3,4HXMAXS651HV56, l HZ*56,1HF,5493HAMP*55 2HF1/1H 11F7.2* 2$ VECTOR VALUES RATI0=$1F23.4,1F21.4*$ VECTOR VALUES MESHR=$17H1 MESH RATIO H/L=,F7&4,S3,12HMESH SIZ 1E H:=F7.4*S VECTOR VALUES RESULT=$40HO TEMPERATURE PROFILE IN EXCHANGER A IT T=,F5.2*27H SECS. AT X=O,H#2H,,,,XMAX/(1H,7F10.3)*$ END OF PROGRAM $42&oo 0.40 30.00 0.50 54.00 10.00 4.00 *10 0.50 0.10 1.00 4.0000.2000 Computer Output The following is an abbreviated form of the computer output obtained using the input data listed with the MAD program above. STUDY OF DYNAMIC HEAT EXCHANGE FOR VARIABLE INLET FLUID TEMPERATURE UST A S C D XMAX V Z F AMP F1 220.00 0.40 30.00 0.50 54.0 10.00 4.00 *10 0.50 0.10 0.00 MESH RATIO H/L= 4.0000 MESH SIZE H= 0*2000 TEMPERATURE PROFILE IN EXCHANGER AT T= 0.00 SECS. AT X=0,H,2H,...,XMAX 220.000 220.000 220o000 220.000 220.000 220.000 220.000 220*000 220*000 220*000 220.000 220.000 220.000 220*000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220*000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 TEMPERATURE PROFILE IN EXCHANGER AT T= 1*00 SECS- AT X=OH,2H,...,XMAX 110.000 111.507 112.993 114*459 115.905 117.331 118.737 120,124 121.492 122,842 124.173 125.485 126.780 128.057 129.317 130.558 131.799 132.726 137*500 110.000 220.000 220.000 220.000 220.000 220.000 220.000 220O000 220.000 220*000 220*000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220.000 220*000 220.000 220*000 220.000 220.000 220,Q000 220.000 TEMPERATURE PROFILE IN EXCHANGER AT T: 4.00 SECS. AT X-O,H,2H,.-,XMAX 110,000 111,507 112.993 114.459 115.905 117.331 118.737 120,124 121.492 122.842 124.173 125.485 126.780 128.057 129.317 130,559 131.784 132993 134184 135.360 136.519 137.663 138.791 139.903 141.001 142.083 143.150 144.203 145.241 146.265 147.275 148.272 149.254 150.223 151.179 152.122 153.052 153.969 154.873 155.765 156.645 157.513 158.369 159.214 160.046 160.868 161.678 162.476 163.264 164,042 1&4.808 -I90

Example Problem No. 120 Computer Output (continued) TEMPERATURE PROFILE IN EXCHANGER AT Ta10.00 SECS. AT X=0.H,2H1e....XMAX 110.000 111.763 114.006 116.689 119.765 123.178 126.864 130.7S4 134.777 138.859 142.927 146.909 150.738 154.351 157.693 1.60.713 163.374 165.644 167.502 168.938 169.952 170.552 170.756 170.593 170.096 169.308 168.275 167.049 165.683 164.235 162.760 161.312 159.945 158.708 157.644 156.793 156.187 155.851 155.803 1560055 156.608 157.458 158.593 159.996 161.640 163.496 165.531 167,705 169.979 172.6310 174.656 Discussion of Results The numerical solution of the difference equation is obtained as a series of temperature profiles at various times. The temperature scale is in degrees Fahrenheit and results are printed for x = 0, 0.2, 0.4,...,10 ft. Sample temperature profiles are plotted below. TEMPERATURE PROFILE 230 H/L =4.0 H =.2 220 tc=O sec 210 200 t=.5 sec. 0 t1.O sec. t=l 5 sec.tt=2. 0 sec. t=2.5 sec 190 180 - 1;7o 15o 14Co 130 120 110 0 1 2 se 3 14 5 6 7 8 9 10 x, ft. -I91

Dynamic Heat Exchange 230IIm!~ill!: L XTEMPERATURE PROFILE i i i i il 230 111'1 11 210 200 go1 1850 HHHH,,,,,,l,,,,,,lct,,l,,, lltl1r x, t ft. +' " H' 1701 I --- X 160 -- 150 130_~+~+H — i, i ------ 120 110 - i -i'......1. 1.. 11+1........... ---.....: ——, —-.... 100 O 1 2 3 4 5 6 7 8 9 10 230 H/L = 4 ft/sec. H =.2 ft. - 220 210 20 190 1 O 170 27 0 1 2 3 4 5 6 7 8 - — 0 I[I: I:::: I: HHHi H HIH LHii I - 1. IIIIIIIII I llII IIIIIIIIIR i~ IIII-4illllllll!111111 III

Example Problem No. 120 An estimate of the accuracy of the method is obtained by comparing the steady state solution of the difference equation with the exact solution of the steady state differential equation. The original differential equation is, -U + 1 U + Zs (U-Ust) For steady state operation, r)U/ t = 0, and the equation becomes, dU + ZS (U-Us) = o dx cDA~V t This equation may now be written in terms of C Ust U = ZS/cDAv to yield, dx + 0 which can be integrated to give In V = - ~ x + In D where D is a constant of integration. The steady state solution sought is the one corresponding to an inlet fluid temperature of 1100F, therefore the constant in f can be evaluated from the condition,? = 110~F @ x = 0 ft. Substitution into the solution yields, In 5 = in 110 and the complete solution, ln110= - x in or, T- = 110 e x Using the data suggested in the problem statement, 1 = 1.4 and x - 14.4 L- = 110 e -I93

Dynamic Heat Exchange The solutions of this equation together with computed solutions of the difference equation are tabulated below for comparison. TABLE OF STEADY STATE SOLUTION, U(x) OF X ft. STEADY STATE DIFFERENCE EQUATION DIFFERENTIAL EQUATION TEMPERATURE PROFILE 4 sec. 0 110.000 110.000 1 117.38 117.331 2 124.24 124.173 3 130.69 130.559 4 136.68 136.519 5 142.27 142.083 6 147.48 147.275 7 152.35 152.122 8 156.89 156.645 9 161.12 160.868 10 165.58 164.808 Critique The study of the dynamic behaviour of process equipment has been avoided in most undergraduate curricula primarily because of the limited mathematical background of the students. However, the rapid development of high speed computers has given impetus to the use of numerical procedures which are well within the grasp of undergraduate engineers. Application of these numerical procedures, or numerical analysis, allows the study of problems which have hitherto been reserved for graduate work. The problem discussed in this report falls into this category. In addition to exhibiting a mathematical method for solving partial differential equations, the students were exposed to the technique of replacing an actual physical situation by a simplified model which is amenable to mathematical analysis. Known physical laws were then employed to set up the partial differential equation describing the behaviour of this model. The actual programming was left to the student and no class time was devoted to this aspect of the problem. The problem was somewhat more difficult to program than previous ones which the students had solved in the required course, "Introduction to Computing Techniques", taught in the Math Department and in earlier chemical engineering courses. However, this was desirable. Programming assistance was offered to the students in the form of personal consultation with the instructor. The MAD language was used which proved to be very suitable, and, in the opinion of the author, has removed programming as an obstacle to machine utilization. -194

Example Problem No. 120 Although an honest attempt was made to prevent the computer problem from interfering with other course material, this was not entirely possible. During the period alloted to the computer problem the normal assignment of problems in the course had to be reduced. This was necessary because of the large amount of time needed by most students for programming, key punching, and debugging. Some students commented that although this problem was somewhat difficult, they appreciated the fact that this was a practical heat transfer problem. -I95

Example Problem No. 121 USE OF COMPUTERS IN AN UNDERGRADUATE CHEMICAL ENGINEERING DESIGN COURSE by Dale F. Rudd Department of Chemical and Metallurgical Engineering The University of Michigan Course: Chemical Engineering Process Design Credit Hours: 3 Level: Senior In the fall semester of 1960, problems requiring the use of both the analog and digital computer were introduced for solution in the undergraduate chemical engineering course in process design, CM 481. This section contains an analysis of the computer background of the students, a description of the problems, and the response of the students to the problems. Based on the experience gained by this and other experiments, recommendations are made concerning methods of integrating computers into a design course. The Design Course CM 481 is taught as a senior level chemical engineering design course. Several relatively.extensive design problems are assigned which call upon the student's background in unit operations, thermodynamics, rate processes, and economics, as well as upon his ability to make engineering decisions. Ordinarily two or possibly three design problems are assigned during a semester. Examples of typical problems are; the preliminary design of a butane isomerization unit, the design of a gas gathering system, or a study of helium production. The work is performed in groups of about three students and an extensive report is required when the design is complete. The class meets regularly and lectures are given related to the process under consideration, basic economic principles, report writing and any new engineering concepts which need to be introduced. All the design work is done out of class. The students are given the responsibility to allocate their time to complete the assigned task by the required due date. Background of the Students At this level the students have completed the bulk of their fundamental chemical engineering requirements (thermodynamics, unit operations, rate processes, etc.), and commonly are taking concurrently with this process design course such courses as unit operations laboratory, equipment design, or courses in cognate and elective fields. The students' exposure to digital computer methods began at or before their sophomore year. A one-credit hour course offered by the Mathematics Department (Math 373) on elementary computer methods is required of all chemical engineering students. This is followed by the use of computers in problem assignments in their normal course work. Ability in organization and programming of problems for the computer is expected on the part of the students. -196

The computer language taught is the problem-oriented MAD (Michigan Algorithm Decoder) language. In the MAD language a program is written in a pseudo-algebraic form and translation is done automatically by the MAD translator with the aid of an executive system called the Monitor. The operation of the Computing Center is closed shop with regard to actual operation of the computer. The students write the MAD program, punch it on cards, supply the command cards (often referred to as $-cards since a dollar sign is in column 1) for the executive system and deliver the package to the Computing Center. The staff submits the package to the computer and returns the results to the student. With this arrangement it is possible for the student to make use of the computer with a minimum of technical skill with computing machines. The availability of a problem-oriented language and a computer executive system makes the mass introduction of digital computer methods to the students possible. In summary, the average student has been exposed to computer programming in the MAD language for about two years, and has programmed approximately a half dozen elementary problems in his chemical engineering course work. In general, the students have had no prior experience with an electronic analog computer. Lectures were given in class on the theory of the computer, programming manuals were distributed, and the solution of an example problem was demonstrated on the computer. This provided the background necessary for the student groups to formulate their problems for the analog computer. The instructor was available to answer questions of a specific nature. An analog computer containing six integrators, and ten summers was available. The Design Problems The first design problem assigned to the students did not require the use of the computer. It was the design of a plant to produce styrene monomer. The second problem was the design of a continuous, stirred-tank, reactor-separator system for the continuous nitration of benzene. The computers were used in the last phase of this problem. The students had their choice of either optimizing the design of the nitrator-separator unit or investigating the automatic control of the nitrator on the analog computer. No specific reference was made to the use of the digital computer to perform the calculations in the optimum-design problem. Of the seven groups in the class, four chose the optimization problem. Three of these four asked permission to use the digital computer to aid in their calculations. Three groups chose to study the control system analysis. Several lectures were given on control theory and process simulation using the linearized process equations and associated control-system equations. Those who chose the control problem understood that the analog computer was to be used. -I97

Use of Computers in an Undergraduate Chemical Enginearing Design Course 1. Optimum Design Problem The process to be designed is a continuous, stirred-tank nitrator with associated productseparation and reactant-recycle equipment for the production of mononitrobenzene from benzene using mixed acid. Fresh benzene, nitric acid, and sulfuric acid are introduced into a continuous stirred-tank reactor along with a recycle stream of the same main constituents. The benzene is partially converted to nitrobenzene in the reactor and the stream leaving the reactor (containing the feed constituents plus nitrobenzene and water) is fed into a separation device from which the nitrobenzene product is removed. The unreacted material (the acids and benzene) are recycled back to the reactor. The design problem involves the selection of the reactor, heat exchange, separation, and other equipment to achieve the nitration. Once the decisions as to choice of basic equipment are made, the optimum design is obtained by sizing the equipment to achieve the most profitable operation. A comparison of optimum designs for various types of equipment was not expected. A detailed design produced by a student group is presented later. 2. The Control System Analysis The control system analysis involved the experimental determination of the response of the analog-computer-simulated-nitration-reactor to disturbances when under the control of the feedback control system. The class had no background in control theory and process simulation. Hence, it was necessary first to present the methods of process simulation, the linearized transient material and energy balance equations for a process, and the elementary concepts of feedback control theory. It was not possible to present the powerful analytical tools available for the analysis and synthesis of stable control systems. Only the concepts of proportional and integral feedback control were presented. Control parameters necessary to provide a stable and responsive control system were to be determined experimentally by the simulation experiments on the analog computer. The details of the process-control-system simulation on the analog computer are included with the student solution. The Response of the Students The response of the students to the computer problems can best be presented by the discussion of final reports submitted for each of the two problems. The reports were selected on the basis of quality. 1. Solution to the Optimization Problem The report of a group consisting of M. Lamont and David Grow follows, in greatly condensed form, with comments by the editor. The report presents the results of their investigations into the optimum design of the nitrator-separation system. Particular emphasis is placed on the use of the digital computer to perform the routine calculations. -I98

Example Problem No. 121 n. Description of the Flow Process A flow diagram of the process is shown below. Fresh Benzene Fresh Nitric Acid Fresh Sulfuric Acid Sulfuric Benzene Nitric Acid Acid Storage Storage Storage |Nitrator Acid Mixer Acid Phase Gravity Separator Organic Phase Washing Na2C3 Unit Benzene Still Nitrobenzene At the beginning of the process, there are three large storage tanks containing the raw materials: benzene, nitric acid, and sulfuric acid. The tank holding the benzene is to be constructed of plain carbon steel, and the remaining two are to be constructed of stainless steel. The two acid tanks feed into a large mixing tank which adds the stream from the acid recovery system and brings the mixed acid up to the desired composition of 39%-53%-8%. This stream is then pumped by a centrifugal pump into the nitrator where it is mixed with a similarlypumped stream of benzene. The nitration takes place almost immediately with high rates of agitation and the resulting product, containing benzene, nitrobenzene, water, nitric acid, and sulfuric acid, is pumped into a separator where the benzene and the nitrobenzene are separated from the spent acid by gravity. This method is rather crude, but still entirely satisfactory since the densities are very different. This piece of equipment, like the nitrator, should be constructed of stainless steel since the temperature will be high and nitric acid is present in the product stream. -I99

Use of Computers in an Undergraduate Chemical Engineering Design Course Two streams leave the separator, one which contains the spent acid and one which has the resulting product. The spent acid stream is recycled into a short-tube, vertical evaporator where the excess water of nitration and the residual hydrocarbons are removed. The stream leaving contains a somewhat more concentrated acid and is pumped directly into the acid mixing tank, where it will be reused. The product stream, which contains only benzene, nitrobenzene and a small amount of spent acid, is pumped into a large agitated washing tank where the acid present is neutralized with Na2C03. The actual amount of Na2CO3 required is about 20 pounds per ton of nitrobenzene. High rates of agitation are not necessary in this wash tank, so a small motor is used. The crude nitrobenzene along with the neutralized acid is then pumped into a series of three settling tanks where the crude nitrobenzene is separated from the water. Three tanks are used because the hold-up time is sufficiently long to warrant the use of three tanks rather than one large one. This also eliminates the necessity of having to shut down the process while the tank is drained. The product stream is then pumped from the settling tanks and into the still where the final separation is carried out. The still, as designed, contains only ten plates for the complete separation, which is more than enough. However, the same separation could probably be carried out satisfactorily using a steam distillation apparatus, with additional separation. A large storage tank is needed for the pure nitrobenzene and the benzene is recycled back to the benzene storage tank. b. Methods of Analysis To facilitate the analysis and the extensive amount of calculation required for a process optimization of this type, it was decided to use the IBM 704 computer. Although the complete optimization would require an extensive program and the difficult task of converting the process variables into computer language, it was felt that it would be much more satisfactory and reduce the total computational labor involved. The actual preparation of the program was somewhat simplified by the use of cost curves, previous rate data, and numerous graphs which appeared in earlier reports. Essentially, the method of analysis consisted of determining the total purchased equipment cost for a number of different possible conversion percentages. In each case the calculations consisted of evaluating the cost of several pieces of "variable" equipment (equipment which varied in cost with percentage conversion) and adding to this the cost of the pieces of equipment whose cost was independent of percent conversion. It was the computer's job to utilize the data, and then evaluate the equations giving the resulting purchased equipment cost as a percentage of conversion. A plotting subroutine (with entries PLOTi., PLOT2., PLOT3., and PLOT4.) was then used to display the curve of cost versus conversion. -I100

Example Problem No. 121 c. The Computer Program A rough flow diagram of the computer program is shown below. Read: Data, Temp, Conv; Calculate Calculate Start Reaction Rates, Material Heat Latent Heats, Balance Balance etc. Calculate Calculate Print Equipment Equipment Costs 1 - 1)Sizes Costs and ~ and Total Costs Graph To aid the reader, a detailed step-by-step explanation of the computer program is given below: 1. Read densities of nitric acid, sulfuric acid, water, benzene, and nitrobenzene DN, DS, DW DB, and DNB, respectively), latent heats of benzene and nitrobenzene HB and HNB, conversion rate in percent, CONV, rates for water, nitric acid and sulfuric acid, X(1), X(2), and (X3), and production rate of nitrobenzene, PROD, in pounds per hour. 2. Calculate the material balance from the following equations. BENZ = PROD X 1.05 x 78/(CONV x 123) = benzene feed to reactor (lb./hr. of benzene). NIT = BENZ X 1.025 X 63/78 = nitric acid feed to reactor (lb./hr.) SUL = NIT X 98 X X(1)/(X(2) X 63) = sulfuric acid feed to reactor (lb./hr.). WAT = NIT X 18 x X(3)/(X(2) x 63) = water feed to reactor (lb./hr.). * PNBENZ = PROD X 1.05 * PNIT = NIT - PNBENZ X 63/123 * PSUL = SUL * PWAT WAT + PNBENZ X 18/123 * PBENZ = BENZ - PNBENZ X 78/123 * The P preceding the above names refers to the product stream from the reactor. 3. Calculate the heat balance from the following equation. Q = 790.6 x PROD X 1.05 = total heat given off by the reaction (BTU/hr.). The heat of dilution was neglected to simplify the analysis because it is small compared with Q. 4. Calculate the reactor volume from the following equation. RV = PROD X 7.49/(123 X R) = reactor volume (gallons), where R = reaction rate (nitrobenzene/hr.ft3). 5. Determine the separator volume, SV, from the volume of product leaving the reactor, VP. A thirty minute hold up time was used. VP = PNIT/DN+PSUL/DS+PWAT/DW+PBENZ/DBtPNBENZ/DNB (cubic ft./hr.). The divisor of each product is the density of the respective compound. SV = VP X 7.49/2 (gallons). -L101

Use of Computers in an Undergraduate Chemical Engineering Design Course 6. The length of the cooling coils can be calculated from the following heat transfer equations. HI = 150 X (1.+0.11 X TW) X V0'8/DI0.2 = tube side heat transfer coefficient (BTU/hr.ft.~F). where TW = average water temperature. (An inlet water temperature of 700F was assumed.) V = water velocity (ft./sec.). (10 ft. per second was assumed.) DI = inside tube diameter (ft.). A one-inch outer diameter tube was used. HC = 0.00265 x L2 X N X RS/VIS where HC = kettle side heat transfer coefficient (BTU/hr.ft~OF). L = length of the stirring paddle (assumed 1.5 ft.) N = revolutions per hour of the stirer (assumed 7200 rph). VIS = viscosity of fluid in the kettle (lb.mass/hr.). A "dirt" factor of 0.002 was used in calculating the over-all heat transfer coefficient from the following equation. U = J/(l/HI + 1/HC + RD) where U = overall heat transfer coefficient (BTU/hr.fto~F). RD = dirt factor. The required heat transfer area can be found by the following equation. HTA = Q/(U X DTi) where HTA= required heat transfer area (ft. ). DTi= log-mean temperature difference (OF) (200F assumed). The length of the cooling coils can then be determined since a tube diameter has been specified in previous calculations. 7. The neutralization tank volume can now be found if a residence time is chosen. In this particular piece of equipment a fifteen minute hold-up time was used. PNT = (PNBENZ/DNB + PBENZ/DB) X 7.49 = feed to neutralization tank (gal./hr.). NTV = PNT/4 = neutralization tank volume (gal.). 8. The volume of the separator required to remove the water and salt solution from the organic product after neutralization is calculated using a thirty minute residence time. NSV = PNT/2 = neutralization separator volume (gal.). 9. The distillation tower size is calculated from the following equation. AT 10.7 X G TxP = required tower area (ft. ) 0.9 ( =M where T = temperature of vaporization (6200R). G = vapor flow rate (lb./sec.)=(PBENZ + PNBENZ)/3600. M = molecular weight of fluid being distilled. P = distillation pressure (psig). H = tray spacing (in.). D = (4 X AT/3.14)1/2 = tower diameter (ft.). 10. The reboiler and condenser duties are calculated. Steam was decided upon as the heating medium for the reboiler and a reflux ratio was used in determining the condenser duty. RHTA = (PBENZ X HB + PNBENZ X HNB)/4000 = reboiler heat transfer area (ft.2). HE and HNB = latent heats of vaporization of benzene and nitrobenzene, respectively (BTU/lb.). 4000 = overall U X Temperature difference (U=200 andAT=20 OF). CHTA =(PNBENZ X HNB X RR)(UO*DTLM) = condenser heat transfer area (ft. 2). where RR = Reflux ratio (assumed value = 4). UO = overall heat transfer coefficient (assumed value = 200). DTLM = log-mean temperature difference (assumed value = 30~F). -I102

Example Problem No. 121 11. The mixed acid tank volume, MATV, was calculated using a tank large enough to hold a two-hour supply of mixed acid. MATV = (NIT/CN + SUL/DS + WAT/DW) X 7.49/2 (gal.). 12. The size of the evaporator required for the acid recovery system was determined from the following equations. Q = 240 X CONV + 60 = heat required to evaporate the excess water (BTU/lb. feed to reactor). This equation was derived by calculating several heat duties required for different conversion rates and plotting a line through the points. FEED = SUL + NIT + WAT = feed to reactor (lb./hr.). EHTA = FEED X Q/7000 = evaporator heat transfer area (ft.2). where 7000 = overall heat transfer coefficient times log-mean temperature difference. 13. The storage tanks were required to hold a one-week supply. STV = 168 x 7.49 x VFR/DFR = storage tank volume of material in question (gal.). where VFR = volume of feed to reactor of material in question (lb./hr.). DFR = density of material in question (lb./ft.3). The volume of each of the following tanks was calculated by the above equation. Nitric acid tank Benzene tank Nitrobenzene tank Sulfuric acid tank 14. The costs of the various pieces of equipment were calculated as follows. The equations of the lines from plotted values of the cost of various pieces of equipment from Aries and Newton are shown. Stirred tank = 222.2 (tank volume)'447 for stainless steel. Storage tank = 15.27 (tank volume)'447 for stainless steel. Storage tank = 5.27 (tank volume)'447 for carbon steel. Tower cost = 9.20 (diameter)l1l8 X number of plates. Tubing cost = 6.0 x tube length. Condenser cost = 149 X (heat transfer area) X.453. Reboiler cost = 78 (heat transfer area)0'621. Evaporator cost = 600 (heat transfer area)0'5. Pumping cost = 1.7 X water rate/483. Water cost =.0173 x water rate (lb./hr) - yearly basis ($.02/1000 gal.). -I103

Use of Computers in an Undergraduate Chemical Engineering Design Course MAD Program DI-'. Z IE I IT 5:'.";:3:,DI M'80; rE. LITE FLOTI ~, Ii:,4~, 1 2.,5 20.' r, E:.:CUI TE PL OT'. DU'M'., 1 0 I 0.. 1 0,. REI.iD FOFR.:MAT FO.DEiH, BS,WD,.NB, EtHE:, HB,HHE:N START READ FOR',AT BATA,-C:OHVBT,':O F'R It-T FORMAT TEB, CEADcO:,,' R. = *2:. S.3 454.0 _R -F. _:.. -.0 DI - _-*75, 1 12 F-i T = " E E-'. 1. 1.fi.5 * +.. 0.. "'. 0: - U L - - I T' 9;.. * X.:' 1.'1.,:",:,' 2::-e:.', IL T i I T i.,. Li' L - 1 U i F' iii T - i T,'- P t B E " i i 1 j,:. Zl..-. 1. 2. 3 r ii,,:ii;..'". FPHT C P F'HEl',".-, D!"B + P BE -Z.....DE:::,.~-7. ~ R',.,~ -' PRODP * 7. 4': C.":I 2.:,,. Ci* R: - -------------—. - ---------- -' -------------— i' —--` I l:... I..L..., D'!.I_!r"' +F'.IRP T.. AT -".teD + BEhl..-'" D -D+F'hE;EZ..... DE;' Tt:l ='F l 7. 4"9/2. F r,.-'J "'F+C. I T' i = 2i:' +'E. 3_.... -------------- --------------------------------------------------— ______, T F:-C I L -!: lFI LI -.44'i L..P... II: T'F 1:..] - 79 O..,'F' * 1.'I:.. I-.'. H- H T 3i.....,,..A D * E_ 0.':, 1,...'T:.'-, 0.. P-.'1. i4.. Rt-. i. iT *.' _' AI...... 1.-,i I':!D _ C -T C -2 - - " = 0,i- 0 L * i:- - F' ~~ - ~~' I-i' FBEH + FP 3' ~'. N=.. P r.T " T41'.'I..... i I.rr, i: 1:,, E'- F i. F'" TC:tii. -, 1.-..|'1,"' "'.1-~*-'!* ltf:.. b.i -- - - - - - - -;..':'l' ____________t__F __i_ i 4JL** i4titut ------------------------------------- i'.:;. F'. O,!_i..

Example Problem No. 121 MAD Program, Continued A TIC - 22. * I T. F'. O. 477 iTC: =,5.,1 T. V...-.66 CC = 14'-!.*-HTA.Fi. — F.-453 IC - 14 * R i-T. F.' F.::_ -7 8..RFHTrl.. _. F 1 FEED -.;IVL +.l1IT +.1I T.'q.- 1 240. +:CO0H + I0 EHTA = FEED *.. 1 —"00-.H = I- 00-. L, +HT Fi P. E i-3 pI- 1..3; CTi W - Cj. -: +. C iT -.' --------------------- -- --------- ------- C T-: T-' T iT: + B T:+:: TC+F. _: C4 E C + i.:: + T + F.: C EF:.'iT FFi F'.-I TF 1. T.. i.,i'..,t.iT: C.iT:, F: CRT, E0,:C.,:.,: n 1 R, CT, CTOT C 0 EI C F 0 I H'., I 0-0. CTO - CTOT.."'i'000-i E XiECti E PLO FT', - i j i 1"1 L —: T i —:.,' LiN. 1 i:' IbI.!HE VE'EF' R L-C"i". E..':': TF'Ai'i'F'i' H',i H TFthi'SiFEF TO ST-i T i,:E C: T C0. I=' L IE S H E = 1 i i',-[ 1' i L ii FiF i'i:iil- T.f.".... i1s40'1 I I HE.. MET. T'I'i iT t... s,, -'V EI: T Oi V R LIES F 2 -I EF' i;. _L, 1 H T_ F_ ____ i- Ti-F -1i F 12 L 1zIi I S10,12i T' -:L iF —; i ii l2 1 ir- GI H i'E I! T F l L. i Z fi T iI' E i R ii T I i i i'i::'''' i s T'3 I H TF3iH'k T — FI" 0'"'-," I -! 0I.! r isi'SH F':iUh: i:i' i.'i(:i "..i;'i.... i F: —]:;.('';":' s'' s:"i: i si, s:-"? i i'i!'il:.'!: 1'FC TAF VI K C'S T 1 1 FS C'I'-S1F 1...,r -: ~ Il'i.. T F. 1 F"___________i. — T, A,.' "' i:." ii LI i i" i: - T. L L t i- 3. 0~ FIT' iF-i,~L~t.'j:"i:~-~'iH'TFtfiii-. CjE-iN.!!J:-, E I =, F. -'. 1 F,.....,,'1 i,. -'' i i:;, "i. i T i i i.-: 1 5: f'. i F'i'- i: i *..'"i.''' - i 5 i"' i'i:'' L'-.=''F _ F5:.,r,,'.-''- 5 r'" 0F-. Ci ~::"' I- - L I...I E F~ i'C T - -5_ I!',i-,......: i 7 ~:,' i F..."- i':;' 2: i i, H C r. -'-,.,.',: i'5' H i-'i i::i i-':. i; T T Fl T,i-r'IL;';'-, T.I F,. C 3 FCI'" F' - 0; LTFi T TM T-L Vi CE, L I F F. 3 F R I _ t'_ _ _ _ _ _ _,1_ _,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Use of Computers in an Undergraduate Chemical Engineering Design Course Computer Output A result sheet with a typical design-cost summary, and a computer plot of the equipment cost as a function of percent conversion, are shown below.. ~:vERSiv IE ___rj__._TE _l_-___...... EQU IP F'MEtT C:OSTS IN DiOLLF.RS TOWER COST= 2833.E SEPERATOR COST = 5865E. _ N_'t-IEUTRALIZRTION SEPARATOR TNK COST=.33435. MIXING TANK COST= 129816. PUMPING COST = 775. NEUTRRLIZfTION TMNK COST = 414.31. NIITRIC RCID T'NK COST = 2054.3.3. BENZENE TANK COST = 116173 CONDESSER COST = 2177. REBOILER COST = 41::'. EViPORATOR COST = 171 31. WRTER COST =.3:309.;RE.CTOR COST = 910. TUBING COST = 17913. T 0 T A L COST =,,.37977. 95 -I106

C.NVERcION RATE - 0 10.000 + -------------------------------------------------------------------------------------- I I I I II I I I I I I I C I I I I I I I I I I I II I II I I I I I I I I I I I I I I 0 I I I I I I H i I T I I 0I I I i I I I mI I I i i I II I I I I I I H Ti I I i I I z i i I I I I I I I I o H! I i I I 0 -------—' —-------------------------------------------- —.. _ + H I I +-. I I I ~ i I I I 0 -4S r! 6 I f T T os - - - - - - - - 1.-. — - - i I I I i I I H UO I r I I o i 1T- I I " o I I 1-tl ~ i.'.i~ II I 4..5.'.-. _ _ _ _ _ _ _ _,.. _. _ _ _ _........... _ _ _ _.;_ _ _............... _... _ _.+ -- _ - *- - - -- - -- - - - - *... + 1- —:-i --- 2C!.i_.0!_i;.!.:_1i o;!_'1_':, BO lOO.'I.DOt I CiOiNi II i I II -- - - - - - - - II-!! I I 4i TiI I. 4 -,:0 N::.S C&NVERSION (~)

Use of Computers in an Undergraduate Chemical Engineering Design Course 2. Solution to the Control Problem The control-system-analysis problem was preceded by two lectures and a demonstration period covering the uses of the analog computer, three lectures on the fundamentals of process linearization and simulation, and five lectures on elementary control theory. This preparation for the problem was necessary since all of these fields were new to the students. Obviously only the most elementary concepts could be presented in this limited time, but enough background was given to enable the students to understand clearly the principles and to obtain an empirical or experimental solution to the problem. The problem involves the experimental determination of the transient behavior of the nitrator when under control of certain basic feedback control systems (proportional, integral, proportional-plus-integral), and the selection of a satisfactory control system. This experimental study was performed on an analog computer simulation of the nitrator. The simulation is achieved by the use of the linearized energy and material balances. The control variable is the cooling water temperature and the measured variable is the temperature in the reactor. The exact details of the simulation and control study again are presented using the greatly edited form of one student group's report. The report is that of Peter Lamont and Wayne Allen. a. Method Control mechanisms for the production of nitrobenzene in a continuous, stirred-tank reactor were investigated by system simulation with an analog computer. The equations used were linearized differential equations based on the unsteady-state heat and mass balances. The reactor's response to small disturbances from the steady state were noted for several control combinations and for no control. Evaluation of the system with and without control was based on the time required for the system to return to steady state and the manner in which the temperature and concentration settled down. The linearized differential equations for the simulation of the nitrator shown in the figure are shown on the next page. q q A0 A To T Cooling Water T 0 -IlO8

Example Problem No. 121 Table of Symbols Ao,A = concentration of benzene (lb.mol./ft3) q = flow rate (ft3/hr.) Tc,T0,T = temperature (OF) V = reactor volume (ft3) r(A,T) = reaction rate (lb.mol./ft3.hr.) p = density (lb./ft3) u = heat transfer coefficient (BTU/hr.ft2OF) a = heat exchange area (ft2) c = specific heat (BTU/lb.~F) t = time (hr.) O = nominal holding time (hr.) -AH = heat of reaction The equations governing the transient behavior of the nitrator for small disturbances are: -d(A-A) (A-A ) + (T-T ) dt &A - ST d (A-As) sF2 &F eF.-( A-As ) + (T-Ts) + -TCS) dt PA - T c where A0-A F:1 = ~ - r(A,T) T0-T ua(T+-T) _____ 2 Vpc pc where partial derivatives are evaluated at the steady state conditions, Ts5, As Tcs These equations (properly scaled) are programmed on the analog computer, resulting in the following diagram developed by the group. Load Si E P Final Sd Element ErrorDetecting Measurement Mechanism M Si = steady state temperature Sd = temperature deviation E = error P = controller output signal Signal Flow Diagram -109

Use of Computers in an Undergraduate Chemical Engineering Design Course A circuit diagram for the analog computer solution is shown below. measured A-A measured T-Ts c -Tc > = integration plus sign inversion = summation plus sign inversion > = sign inversion Q = potentiometer The dynamic performance of the nitrator is then simulated by programming the analog computer and setting the potentiometers to values determined by the design. The feedback control system was added to the circuit by the additional subprograms which were placed between the (T-Ts) measured and the (Tc-Tcs), thus forcing (Tc-Tes), the control variable, to be a function of the measured temperature derivative (T-Ts). 1. Proportional Control Circuit: T-Ts Tc-TCs 2. Integral Control Circuit: T-Ts T-T 3. Integral Plus Proportional Control Circuit T-T V. T —T The response of these systems to an initial disturbance in the concentration A-AS was then investigated. -IllO

Example Problem No. 121 b. Results The findings of this investigation will be reported in an arbitrary sense, as the method does not lend itself to exact numerical results. The initial disturbance placed on the simulated system is to be regarded as a small displacement from steady-state conditions. After a short time lag the temperature departs from the steady state, the displacement being related to the change in concentration initially imposed. The system then responds and returns to steady state, the time required being proportional to the magnitude of the initial disturbance in concentration. But the values of the constants for proportional and integral control are independent of the magnitude of the error in concentration, i.e., no matter what magnitude is assigned to the initial disturbance in concentration, the control mechanism acts in the same manner to return the system to steady state. Therefore, the proportional and integral control constants are as specified, no matter what value is assigned to the initial disturbance in concentration. Since the object is to specify control regarding type and range of control constants, it is justifiable to report the findings in an arbitrary sense. The control arrangements were evaluated on the basis of the relative times required to return the system to steady state. Critically damped return of temperature and concentration to the steady-state value is desired. The fastest, smoothest control is desirable. It was found that the control which brought the system to steady-state most rapidly was that which produced critical damping of the temperature and concentration. On the other hand, when the concentration was under- or over-damped, there were rapid oscillations in temperature and the system took longer to settle down to steady state conditions. From these correlations it can be seen that the time required for the system to return to steady state provides an excellent means for comparison of the several combinations of control constants. For integral and proportional control evaluation with respect to combinations of the constants, regions can be differentiated based on the time required for the system to return to steady state. In the figure below, Region I is the recommended control range with relative control times of 0 through 7. Region II is the mediocre control range with relative control times of 7 through 13. Region III is the poor control range with relative control times greater than 13. Control times are given in arbitrary time units. The control in Region I either critically damps or very slightly underdamps the temperature and critically damps the concentration with no "droop" or permanent error. Fast response is experienced with the use of large proportional control constants (4<KO<10) and droop is adequately corrected with small integral control constants (3/10j P,<2). Several undesirable responses are found in Region II. For no integral control the permanent error in concentration and temperature does not give good control; for large p's, underdamped response leads to oscillations which should be avoided. Of course, these undesirable characteristics are less severe as Region I is approached. Region III is poor in that the time required for the system to return to steady state is excessive either because of slow response with no control or extreme underdamping with large control constants. Extreme underdamping is highly undesirable from the standpoint of the control mechanism in that the large and rapid oscillations overstress the control system. -Illl

Use of Computers in an Undergraduate Chemical Engineering Design Course 12 Region III 88 4cPediocre Control CRange he dtfrmhe analogcoPoor Control 0 Range 0 6 p' ~~~roportional Control Constant (K) 0 2 4 6 8 10 12 14 16 18 Regions of control for combination of integral (P) and proportional (K) control constants. The data from the analog computer are presented below. Concentration and temperature (dimensionless errors) are plotted as functions of time. Plots of dimensionless temperatureerror as a function of dimensionless concentration-error (obtained from the para'netric data) are presented where each plot is for combinations of a given integral control constant with several proportional control constants. From these plots, control constant combinations can be evaluated by noting that the length of the line is roughly proportional to the time required to bring the system to steady state. Critical damping is signified by the line staying within one quadrant and underdamping by the line oscillating from one quadrant to another. These correlations provide foundation for the control regions explained above. -I112

Example Problem No. 121 Preliminary investigation of rate control did not produce the expected rapid response. Complete results were not obtained, so further research in this regard would be in order. As rate control was not investigated in conjunction with integral or proportional control, definite statements cannot be made against or in favor of employing rate control. This, then, gives a picture of the students' performance on an analog simulation of a control situation. It should be realized that the group does not have an extensive background in control theory, and hence their analysis of the systems is of an empirical nature. Typical Computer Output Propo rtIiIo,.5i-0 -— W- -- I II'/01113 P = 1 0. P = 10.111111 Proportional K,..-1. -Ii13S m~~~~n: t~~H m~lllllllllll~llllllllllllllllllllllllllltll =-III 1IIIIII0l.llllllllllllllllll =llll 10.l-XSl~l-A,,~lllllllTI~lllllllllllllllllllllllMlK~l~ = 0U-5 K =1.011111111111111111111111iillTITIXIlIneral allllliiiiind Proportional~ulllllilllll Cotrlillliiiiiill-2g

O w ~~~~~" ~,i i iOi L t ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ U Fa VOR i im --- --- L'" o~i lttltitittitttiit~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Ji'::i,:::lll',:,~i i lilt'~'!fi'... i i 1 ti I t i~~~~~~~~~~-t ~4 I~~~f~~j~~t t i iiii iii i ir 1 i I i j- -IIIIHitH-H,,%,lll[lll.......1 H' II t'H — -i ij,, i F E. V~~~~~~~~~~~~~~~~~~~~OI..~~~~~~~~~~~~~~~ I' —"Pii 01 R 111111110. 17 4 1_- 1111,,-.i,id 44:HT~~~~~~~~~:'~: 14~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1 ~d i fil (D MMMIIMO i Tiir /F' Fj- (D d,1M tt IH i1111IVIli _: I -. ~D ~' r ii 2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~d ~ ~ ~ i Fi. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~! 11!!!.... i tj ii~~~~~~~~~~~~~~~~~~~~~~~~~~i T —' i i i i + -i i:. t i i i 4 i;i; P~ O i'...'. Ct (D (,'-'~~~~~~~~~~~~~~~~~~!i" i ~ 4_7. T T C F,-,7. f U'i:~~~~~ ~ ~ ~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ t~i~tititt!tltt~ H,:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ i__!._ii''L: Ct~~~ ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... It:'i ii't::i: iiiiii'i~ TI~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.U 1~~~~~~~~~~~~~~~~~~~~~'':. ~::i: 01- ct i.... inst............... tt: ~~I, ili l I ~~~ t~ i iij H li i!!? II t 11 1. ~~~~~~~~~~~~~~~~1 WI fu ll I t i i il I I 1 11l ill I D F 1 j il;'i it f! 1 i iii I: I l tO I t lit F - rC f~~~~~~~~~~~~~~~~~~~rj i i~~~~~~~~~~~~~~~ Ih i ~ 1 iIit. f fli t 14f r iili~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Cale 4 t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ t; 4i j il T O I l:. t i f L~~~~~~~~~~~~~~~~tC....... H il 1:' i i It i i' Iti fl ii 2;~~~~~~~~~~FsHil"tid al: ~~~~~~~~~~~~~~~~~~~~~ ~:; 11; I, T T~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~iii II -t ~~~~~~~~~~~~~jijttt~~~~IHIIT 1 i ltI......; I i i i i t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4 F Ti P t 11 ) )~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~j::i i; 1~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~n l ~:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~trf iT o~~~~~~~~~~~~~~~~~~~~~~~~IL

Example Problem No. 121!t i m - - - - - - - (Rate) Differential Control, Continued q = 0.11 Recommendations students. In a design course the problems are generally too large to be used as exercises in programming for the students. With digital computer programming, prior experience is necessary; if~ ~ suc exeiec dosnt exst i is- dobtu tha the us of compu111111ter wilugaeSh ee of such a course. Tomc ls iewl enee otahtecnet n h ehia details of programming. With the digital computer, at least, it appears that gradual introduction of computers beginning at the sophomore level is the answer. The low-level, almost trivial~~~~~~ copue prbems w h-1t.ic are11 so1111 necessary1111111e1111 at te beginningo th tdnts xeine can~~~~~~~~~ be asige in the- beinnX ring+ cheicaIIl engineellmrrringrlqlllll course wihu derctn from11 th engin-mllrll rl eering education of the students. A problem or two assigned in each course over a period of several semester wil giv xthe W studenti adequalwte experience and cofdec to tackle an1extensive problem when the need arises. language, no t a machine-oriented language. With such a language, the student's attention may be operation.Wihamcieoinelagaetetcncldtismybfrteaeaenieering student, completely overwhelming. The mass introduction of computers to an engineering class by use of a machine language would be very difficult. 411154 ft X X tw w IIIIIIIIIIIIII0~llii —------------— lilltliilllr 4 1111 T_ T r~ tt T 111 111_ 1111 TT 1111 1111 - ------------ 1111 4 T + T T1- 1111 1111 11 1 -- - ----------- I ET+II LLLLlllIIIIIIIIILLIIIII Tl llIIIIIIIIIIIII 4 W W X 4 W X X 11111111111111111111111111111111 W X —----— IIIII4+ RX2 mX li Illlllllllllllllrl 4 1iiiiiilm-> W t X t t 1W111 110111111111111llllllllllilllll —----— Illlllllllllll - - - -11 -fl 111 111 - -l -1111 Ililll - + Ilrlllll~ llllllll 1111 - - - - -1111111111 -i+ - ~ ~ t a e D i f f e e n t i a ----- -- ------- ----------- q= -0.11 — --- Certainly(ate Dhr sn usitutefrental Ctont rolramminuedkrun ntepato h students. In a design course the problems are generally too large to be used as exercises in programming f or the students. With digital computer programming, prior experience is necessary; if such experience does not exist it is doubtful that the use of computers will upgrade the level of such a course. Too much class time will be needed to teach the concepts and the technical details of programming. With the digital computer, at least., it appears that gradual introduction of computers beginning at the sophomore level is the answer. The low-level, almost trivial computer problems which are so necessary at the beginning of the student's experience, can be assigned in the beginning chemical engineering courses without detracting from the engineering education of the students. A problem or two assigned in each course over a period of several semesters will give the student adequate experience and confidence to tackle an extensive problem when the need arises. It should be noted that the experience gained in this work is with a procedure-oriented language., not a machine-oriented language. With such a language, the student's attention may be

Use of Computers in an Undergraduate Chemical Engineering Design Course Things are quite different for the electronic analog computer. The programming concepts of the analog computer are more readily assimilated by the students. It was found that it is quite possible to give the students a feel for the analog computer in two or three hours of class time. With a good programming manual, the details of elementary analog programming are well within the reach of the average student. While the digital computer, in a closed-shop situation, remains distant and detached, the analog computer can be as immediate and responsive as a conventional laboratory experiment. This may well make up for its limited problem-solving ability, and make it an educational tool of value equal to that of the digital computer. Both the analog and digital computers should be considered, since they are complimentary, and the effort expended in the introduction of both rather than just one is well rewarded. The statement is often made that the real educational value of the computer is discipline. The students are forced by the nature of the machine to formulate their problems in an orderly, precise, and logically consistent manner. This is true; but what is orderly, precise, and logically consistent to the machine may be physical nonsense. The computer solution of a formulated problem may be perfect but the physical formulation may well be erroneous. There are numerous examples of foggy thinking which has been properly programmed. For example, in the design course, one group wrote a technically perfect program which solved the equations beautifully and presented the results of the design in a most convenient format. The only trouble was that the equations they solved were not the design equations for the system they thought they were considering. No fault could be found with their computer usage, only with their engineering. Too much emphasis was spent on the details of programming and not enough on engineering fundamentals. Certainly the computer can add to the student's education, but there is no substitute for a knowledge of basic physical fundamentals. -I116

Example Problem No. 122 ECONOMIC DESIGN OF A CONDENSER by Dale E. Briggs Department of Chemical and Metallurgical Engineering The University of Michigan Course: Equipment Design Credit hours: 3 Level: Senior Statement of Problem Develop a digital computer program using the MAD language to design a horizontal-tube surface condenser. The program should be sufficiently general to treat any single-component, condensing vapor on the shell side. Water is to be used as the cooling fluid on the tube side. Subroutines are available for calculating the following: 1. Tube-side pressure drop using water (TUBEDP) 2. Shell-side pressure drop for unbaffled vapor flow (USHEDP) 3. Shell-side pressure drop for baffled vapor flow (BSHEDP) 4. Pertinent economic data (ECON) Descriptions of the subroutines are given at the end of this problem. After the program has been written, determine the condenser tube length, number of tube passes, and water velocity which will give the minimum sum of fixed and operating expense for the following conditions: 1. Condensing vapor refrigerant 22 2. Amount of condensing vapor 40,000 lb./hr. 3. Inlet vapor saturated at 105 ~F. 4. Cooling water cooling tower with treated make-up 5. Cooling water temperature 80~F. summer maximum 70~F. winter minimum 6. Tubes 3/4 in., 18 BWG, copper 7. Tube type plain or finned 8. Maximum allowable tube-side AP 10 lb./sq. in. 9. Maximum allowable shell-side AP 3 lb./sq.in. 10. Water cost $. 01/1000 gal. 11. Electric power cost $. 008/KWHR 12. Amortization rate 3 years The factorial search method is recommended for searching for the optimum set of conditions. The normal Tubular Exchanger Manufacturers Association (TEMA) standards should be followed. -1117

Economic Design of a Condenser Solution The design of a condenser (as most heat transfer equipment) involves multiple trial-and-error calculations because of the complicated nature of the equations describing heat transfer and pressure drop. Initial values are assigned to all variables, both to those which may be freely chosen and to those which will be fixed by the values assigned to the chosen variables. Iterative procedures are used until calculated values of the "fixed" variables agree with those used in making the calculations. The general scheme is as follows: 1. Estimate the overall coefficient, U0, the logarithmic mean temperature difference, LMTD, and the water velocity, vi, and calculate the required heat transfer surface. A = 0 total Uo*LMTD 2. Using the tube length, L, and the heat transfer surface per linear foot, Ao, calculate the number of tubes required. A 0total tubes =A *L 0 3. Calculate the tube-side flow area per pass using the inside tube diameter, di, and number of passes, pass. w*d *tubes A flo Aflow 4*pass*144 4. Calculate the tube-side (water) flow rate. W = P *5600 vi * Aflow 5. Calculate the exit water temperature, TWO, where the inlet temperature is TWI. TWO = TWI + W*Cp 6. Using the inlet and outlet vapor temperatures TSVI and TSVO, calculate the logarithmic temperature difference. LMTD = (TSVO-TWI) - (TSVI-TWO) ln = rSVO-TWI] LTSVI-TWOJ 7. Using an average water temperature, tw, calculate the inside heat transfer coefficient, hi, from v. 8 hi = 150 (l + O.0l 1tw) m (water) (1 O.lltw d0.2 di o.8 0.4 or Nu = 0.023 ReO Pr or Nu = 0.027 Re0'8 prl/3 (1A) -Ii18

Example Problem No. 122 8. Estimate the temperature drop across the condensing film, ATf, determine the correction factor, Cn, and calculate the condensing coefficient, hm, using the Nusselt relationship for multiple horizontal tubes. Fk p 2 g ~ I]1/4 hm = 0.725 Cn Na Do ATf ] 9. Where r and r. are the outside and inside fouling resistances, calculate the overall o 1 coefficient. 1 1 A0 A A x A Uo m + Aihi Amkmetal A calc 10. Evaluate the temperature drop across the condensing film from U *LMTD 0 ~Tf = hm calc m Return to step 8 if AT differs significantly from ATf. calc 11. Recalculate the area and number of tubes required. A =- _ __ 0total U0 *LMTD calc A 0total tubes = A *L 0 12. Whenever the required number of tubes differs by an amount greater than E from the number of tubes assumed, assign a new value and return to step ). Two design alternatives are possible once the number of tubes required is calculated. If the vapor is condensing at a low pressure, the tubes can be placed in a large enough, standard shell size so as to provide essentially unbaffled flow of the vapor. The shell side pressure drop is calculated using the pressure drop subroutine for unbaffled flow. If the pressure drop affects the condensing vapor t1mperature, the corrected value of the exit vapor temperature should be used to recalculate the LMTD which is then used to obtain a more accurate solution. Calculation of the tube-side pressure drop and economics information (which is done by subroutines) completes the required calculation for the selected input data. A second method of treatment which is applicable to higher condensing pressures involves the selection of the smallest standard shell size which will accommodate the required number of tubes on the specified pitch and layout. Usually there will be room for a few additional tubes. The shell is then completely filled with tubes and the shell-side pressure calculated using the baffled-shell pressure drop subroutine. The exit vapor pressure is used to calculate the exit vapor temperature. A new required tube-side fluid velocity is then calculated. This is required since additional flow area has been provided. After the required velocity is -1119

Economic Design of a Condenser calculated, the tube-side pressure drop and economics subroutines are executed to complete the calculations for the data specified. The four subroutines alluded to earlier were written by the instructor and provided to the students in the form of punched IBM cards. A brief description of each subroutine was given to the students. These subroutines are described in more detail at the end of the problem. Student Solution The computer program presented here was prepared by Andrew Padilla and represents a typical student approach to the problem. Mr. Padilla made use of three of the four available subroutines. His previous computer experience consisted of attending a series of evening lectures sponsored by the Ford Foundation Computer Project and solving a single computer problem in another Chemical and Metallurgical Engineering course. List of Symbols The following are symbols used in the MAD program with their definitions. AFLOW2, AFLOW water flow area per pass, sq. ft. AO1, A02, AO total outside tube area, sq. ft. AOL outside surface area per unit length of tube, sq. ft./ft. CN, CNO correction factor for Nusselt equation CN1, CN2 constants in the equation, CN = (CNl)(NA)CN2 CND = (CN1)(NA2)CN2 CPW heat capacity of tube-side fluid, Btu/lb. ~F. DOTL1, DOTL2 outer tube limit diameter, ft. DTF1, DTF2, DTF3 temperature drop across condensing film, ~F. DTLM1, DTLM2, DTLM3,DTLM4 logarithmic mean temperature difference between tube-side and shell-side fluids, ~F. DTW, DTW2 total temperature rise of tube-side fluid, OF. HL, HL2 heat transfer coefficient for tube-side fluid, Btu/hr.-sq. ft. - ~F. HO, H02 heat transfer coefficiaent for shell-side fluid, Btu/hr.-sq. ft.- ~F. ID inside tube diameter, in. IDSH standard shell size inside diameter, in. IDS shell size inside diameter, in. KWALL thermal conductivity of tube wall, Btu/sq. ft.-hr.- ~F./ft. L1 tube length, ft. -I120

Example Problem No. 122 LAMBDA heat of vaporization of shell-side fluid, Btu/lb. NA, NA2 average number of tubes in a vertical row OD outside tube diameter, in. PASST number of passes PHYGR, PHYGRP temperature dependent properties of the condensate film defined by j2g] PHYGR1, PHYGR2 constants in the equations: PHYGR = PHYGR1 + (PHYGR2)(TF1) PHYGRP = PHYGR1 + (PHYGR2)(TF2) PITCH tube pitch, in. Q total heat load, Btu/hr. RHO, RHOW1, RHOW density of tube-side fluid, lb./cu. ft. RHO1, RH02 constants in the equation RHOW = RHOl + (RH02)(TWAVG) RWALL thermal resistance of tube wall, hr.-sq.ft.-~F./Btu. SQ, SQ1, SQ2 constants in the equation NA = (SQ)(SQl) (Xl)SQ2 + (TRl)(TRIl) (xl)TRI2 TF, TF1 average temperature of the condensing film, ~F. THERM, THERMW thermal conductivity of tube-side fluid. Btu/sq.ft.-hr.-OF./ft. THERM1, THERM2 constants in the equation THERMW = THERM1 + (THERM2)(TWAVG) TRI, TRI1, TRI2 constants in the equation NA = (SQ)(SQl) (Xl)SQ2 + (TRI)(TRIl)(xl)TRI2 TSVI inlet temperature of the condensing vapor,'F. TSVO outlet temperature of the condensing vapor, ~F. TUBES number of tubes for a filled standard shell TWALL temperature of tube-side fluid at the tube wall, ~F.'TWAVG, TWAVG2 average temperature of tube-side fluid, ~F. TWI inlet temperature of tube-side fluid, ~F. TWMAX maximum allowable temperature for tube-side fluid,'F. TWO, TWO2 outlet temperature of tube-side fluid, ~F. U01, U02, UO overall heat transfer coefficient based on outside tube area, Btu/hr.-sq.ft. -~F. UODT, UODTLM product of overall coefficient and log mean temperature difference Btu/hr. -sq. ft. VFLOW, VFLOW2 tube-side fluid velocity, ft/sec. VISC, VISCW, VISCWW viscosity of tube-side fluid, lb./ft.-hr. VISC1, VISC2, VISC3, VISC4, constants in the equations to determine tube-side fluid viscosity VISC5 WC condensing load, lb./hr. WFLOW, WFLOW2 tube-side fluid mass flow rate, lb./hr. WINTER inlet tube-side fluid temperature during winter, ~F. X1, X2 number of tubes required XWALL tube wall thickness, in. z compressibility factor of vapors dimensionless -I121

Economic Design of a Condenser Flow Diagram F ( TV-~') (srDoW BET PRINT TAT READ DATA -DATA Q=WC*LAMIBDA A0l =xl= A0l U0l*DTLMW AOLL1 G MMA 3T J~~~~~~~~~~~o _ VIAFLOW=( I 002*1* WFLOW=RHOR ID*V FLOW*360A RHOW DTW- * -4-*144 1WFLOW*CPW (TSVO-TWl) -(TSVJ7Tl-TD 2 (TWT+DTW)> HM*I*Ax* DTLM2= *Xn TSVOTWT ) H =H L TWcTWI+DTW N A=*SQ. SQ1x1SQ2 + TRi.*TRi 1.x1TRi 2 HC=N NC2 1 T J i.PRINT COMMEN START F 15 TWAVG=TWI+ DTW RHOW=RH0l+RHO2*TWAVG RHW-RHOWA> 0. THERM,~I~hRMl1+THERM2*TWIAVG VISCW=,V(TWAVG) HI = 0.027*12*THERM0 ID*VFLOW*RHOW*A6LL [Wc*vLISCW (~~~~~~~~~~Io 2= UO oDL20i TWALL=TWAVG+ H*ID*HROL*Ll*X VISCW=(TWALL) [ RD-VISCW DLTA NA=SQ*SQ1*X1lo +TRI*TRI1*XlTR2 C~~*AN TF1=TSVT - DT2 8 HY02= (U GD OD25C*PYRI DT2 )H RDF2DTLI0LDTlTF DEA HO ID*HI + RWALLD + ROF WALL+D ID

Example Problem No. 122 Flow Diagram (continued) IPRINT I DOTL1=SQ*(1. 265+0. 0115*PASS1)*PITCH*X20'485 EX2-Xl,. 0, ESULTS 4-~ T l J I+TRI*( 1. 262+0. 01 67*PASS 1) *PITCH*X20 475 X1=X2BETA ZETA I ~ DOTL1 ~25.0 IDS=FIX*(1.O028*DOTLi+0 41~+FLOAT*(DOTL1+1. 13) J=l' 1 IDSH(J>IDS)!DS=FIX( 1.O028 *DOTLI+O..411)FLOAT*(DOTL+.44) 11 Z TA IDS=IDSH(J) OTL1 < 25.0 DOTL2= 1.0029 + FLOA0(IDS-13 - F i. 4 _, DOTL2-= F-x'1., 04128 + FLOAE(IDS-1.44) 1n DOTL2 1n DOTL 2L 2 iC=n (1 265+0. 115*PASS1) *PITCH n [(1. 26240b0.17*PASS1)*PITC TUBES=SQ* exp 0-485 TRI* exP L 7. T;A L TSVO-TWI) -(TSVI-TWI-D 1 (TUBES TUBES *PWMAX =L DTLM3= 1n A FOWT C32= -1*PS1 (=TWI + DTW2) 13W M AX. r Tsv0-DW. PRI-T l(~ ~A~C=MIMDNT

Economic Design of a Condenser Flow Diagram (continued) DTF3= ( DTF3- 0. 8- 0.33 IOT-OTM) 002 r O,027 *122*THERM ID*VFLOW*RHO*36o1 CPW*VISC L RH ID l 12*VISC THERM THER TA TWALL=TWAVG2+ Hi-2.iD~A-OL,.L1.TUBES, VISCWW=,C( T WAL 12=HI2 [ViSCWWJ e TWALLTWAVG2+HI2*%ID*AOL*Ll1*TIUBES 3{- WW 1~ NA2=SQ*SQ1*TUBESSQ2+TRI*TRI1*TUBESTRI2 ~ CNO=CN1*NA2CN2 TF=TSVI- DTF2_ [=H~~~~~~~~~~~.5 =~o -.DT 2=DF | OT>UDL VLW=FQ-.5 PHYGRP=,V(TF) H02=O. 725*CN0 PHIYGRP LAMBDA*N2D*DF0 [oD*A* H02 +- ID*HI2 + RWALL+RD+ RI*D -- i ( 22H EXEC~~~UTEBSED.DTLM4=13 TSVO-TWI0.1 UO|DTLMUDTLMj > 10) EA UODT UO*Dn LTSVI3 TW0 DTW23I _ D _RINT. F ~ ~ ~~~~~-T, bECR~Se~~~~ntOW*VFLOWDT2*AF >UD FLLW22VFLOW -0.2 X F T (TVOWINTER)-I)(-TsvI-TWI-DTW2) T ~~~~~~~~~~~~~~~~~( CTSV0-WInTR -[ ~SvVT-WINTER- TW 2) ) 2EUT BHDTW2WPoQ.cP= DTLM4= 1n ~ —TSV0'-TW'INT' TER)..... PRINT ~ \ WFLOW2*CPW ~ ~ ~ ~ ~ ~ ~ ~ ~' [r (TSVI-W'INTER-DTW2)] -I124

Example Problem No. 122 ~ 2 P1o Di To=~/~Agram 07- o o r LOWRO~ r o w *vont inued) 5 TWO 2=WINTER+DTW2 HWAVG2=WINTER+ H=DT( 2)W TERLM = ( T * ) 2.KAPPA~~.VFLOW2=VFLOW2+O. 01 NA2=S_*SQQ1TUBESTRITRI1TBESI2 CNO=CN*NA2CN TF=TSVI- DF2 C O + TOD RO UODT-UO*DTLM3 DTF3= UO*DTLM3 } IUDTF2=DTF3 UODT >UODT VFLOW2=VFLOW2-0M05

Economic Design of a Condenser MAD Program and Data PADILLA X113E 1 005 030 000 $ COMPILE MAD, EXECUTE, DUMP, PRINT OBJECT START PRINT COMMENT $1CONDENSER DESIGN$ READ DATA INTEGER JTUBES,PASS1,TRI,S0,HEAD,FIN,$TWPS,STWPT,KTS,KSC, 1KCFH DIMENSION IDSH(22) PRINT RESULTS WC, LAMBDACN1l CN2, PHYGR1, PHYGR2, 1TSVI, TSVO, U01, DTLM1, OTF1, 2SQ1, SQ2, TRI1, TRI2, OD, ID, XWALL, KWALL, 3L1, AOL, PASS1, RO, RI, SQO TRI, VFLOW# TWI, RHOW19 CPW, 4RHO1, RHO2, THERM1, THERM2, VISC1, VISC2, 5VISC3, VISC4, VISC5, BAFSP, FIN, TOTALL, HEAD, DEQ, Z, 6MWT, PRTEMA, PRTEMB, VISGA, VISGB, VISGC, PRDALL, 7STWPS, STWPT, KTS, KSC, KCFH, DAYS, AMORT, BASE, BASES, 8TWMAX,WINTER, 9TCSTI, CSTIND,CTGAL,INSTPCWTFTS,WTFTELECMCSTF Q = WC*LAMBDA A01 = Q/(UO1*DTLM1) X1 = AOl/(AOL*Ll) BETA AFLOW = 3.14*ID*ID*Xl/(4.0*144.0*PASS1) GAMMA WFLOW = RHOWl*VFLOW*3600.U*AFLOW DTW = Q/(WFLOW*CPW) WHENEVER (TWI+DTW).G.TWMAX PRINT COMMENT $UEXCESSIVE EXIT WATER TEMPERATURE$ TRANSFER TO START END OF CONDITIONAL DTLM2 = ((TSVO-TWI)-(TSVI-TWI-DTW))/ELOG.((TSVO-TWI)/ 1(TSVI-TWI-DTW)) TWO = TWI+DTW TWAVG = TWI+(DTW/2) RHOW = RHO1+RHO2*TWAVG WHENEVER.ABS.(RHOW-RHOWl).G.0,1 RHOW1 = RHOW TRANSFER TO GAMMA END OF CONDITIONAL THERMW = THERM1+THERM2*TWAV6 VISCW = EXP. (VISC1+VISC2/TWAVG+VISC3/TWAVG.P,2.0+ lVISC4/TWAVG.P.3.0+VISC5/TWAVGsP.4,0) HI = O.027*12.0*(THERMW/ID)*(ID*VFLOW*RHOW*3600.O/(12.0* lVISCW)).P.(),8*(CPW*VISCW/THERMW).P.0.33 TWALL = TWAVG+Q/(HI*(ID*AOL/OD)*Ll*Xl) VISCWW = EXP.(VISCl+VISC2/TWALL+VISC3/TWALLP.2,0O+ lVISC4/TWALL.oP.3O+VISC5/TWALL.P.4,0) HI = HI*(VISCW/VISCWW).P.u.14 NA = SQ*SQli*XlP.SQ2+TRI*TRII*Xl.P.TRI2 CN = CN1*NA.P.CN2 DELTA TF1 = TSVI-(DTF1/2) PHYGR = PHYGRl+PHYGR2*TFl HO = 0.725*CN*PHYGR*(LAMBDA*12.U/(OD* NA* DTFl)).P.O.25 RWALL = XWALL*OD*2.O/(KWALL*(OD+ID)) U02 = 1/(1/HO+(OD/(ID*HI))+RWALL+RO+OD*RI/ID) DTF2 = UO2*DTLM2/HO WHENEVER.ABS.(DTF2-DTFl).G.0.l1 DTF1 = DTF2 TRANSFER TO DELTA END OF CONDITIONAL A02 = Q/(UO2*DTLM2) X2 = AO2/(AOL*Ll) WHENEVER.ABS.(X2-Xl).G.0.5 -I126

Example Problem No. 122 MAD Program and Data (continued) X1 = X2 TRANSFER TO BETA END OF CONDITIONAL PRINT COMMENT $1THE REQUIRED CONDITIONS ARE$ PRINT RESULTS X2,VFLOWTWOU022HOtHIDTLM2 DOTL1 = SQ*(1.265+.il115*PASS!)*PITCH*X2.PO.0485 + 1TRI*( 1.262+U.0167*PASS1)*PITCH*X2.P.O.475 WHENEVER DOTL1oL.25.OJ IDS = FIX*(1.*0028*DOTL1+v.4,1) + FLOAT*(DOTL1+l.13) OTHERW I SE IDS = FIX*(l1o028*DOTL1+UO.411) + FLOAT*(DOTL1+1.44) END OF CONDITIONAL THROUGH ZETA, FOR J=1,1IID)Sr(J).GE.IDS ZETA CONTINUE IDS = IDSH(J) WHENEVER DOTL1.L.25.J DOTL2 = FIX*(IDS-U0,411)/1i.,J28 + FLOAT*(IDS-1.13) OTHER W I SE DOTL2 = FIX*(IDS-U.411)/l1.,vo8 + FLOAT*(IDS-1*44) END OF CONDITIONAL TUBES = SQ*EXP.((ELOG.(DOTL2/((1.265+U.115*PASS1)*PITCH)))/ 10.485) + TRI*EXP.((ELOG.(DOTL2/((1.262+uojl67*PASSl)* 2PITCH)))/j.475) TUBES = (TUBES/PASS1)*PASS1 AO = AOL*L1*TUBE5 UODTLivl = Q/AO AFLOW12 = 3.i4*ID*ID*TUBES/(4.u*144.*cPASSl) VFLOW2 = VFLOW ETA WFLOW2 = RHOW*VFLOW2*AFLOW2*3600.O DTW2 = Q/(WFLOW2*CPW) WIHENEVER (TWv I+DTW2) G* TWMAX PRINT COMMENT $uEXCESSIVE EXIT WATER TEMPERATURES TRANSFER TO START END OF CONDITIONAL DTLM3 = ((TSVO-TWI)-(TSVI-TWI-DTW2))/ELOG.((TSVO-TWI)/ 1(TSVI-TWI-DTW2)) TWO2 = TWI-+-DTW2 TWAVG2 = TW'I+(DTW2/2) RHO = RHOl+RHO2*-TWAVG2 THERM = THERM1+THERM2*TWAVG2 VISC = EXP.(VISC1+VISC2/TWAVG2+VISC3/TWAVG2.P.2.0+ lVISC4/TWAVG2.P.3.0+VISC5/TWAVG2.P.4.U) HI2 = O.027*12.0*(THERM/ID)*(ID*-VFLOW*kHO*'36U0.O/(12.0* 1 VISC))*,P.O.8*(CPW*VISC/THERM).P.O.33 TWALL = TWAVG2+Q/(HI2*(ID*AOL/OD)*Ll*TU3ES) VISCWW = EXP. (VISC1+VISC2/TWALL+VISC3/TWALL.P.2.*0+ lVISC4/TWALL.P.3.0+VISC5/TWALL.P.4,U) HI2 = HI2*(VISC/VISCWW)sP.*14 NA2 = SQ*SQl*TUBES.P.SQ2+TRI*TRIl*TUBES.PPTRI2 CNO = CN1*NA2oPoCN2 THETA TF = TSVI-(DTF2/2) PHYGRP = PHYGR1+PHYGR2*'TF H02 = O.725*CNO*PHYGRP*(LAIMBDA*12.O/(OD*-NA2*OTF2)).P.O.25 UO = 1/(1/HO2+OD/(ID*HI2)+RWALL+RO+RI*OD/ID) UODT = UO*DTLM3 DTF3 = UO*DTLM3/H02 WHENEVER oABS(DTF3-DTF2).b.*,l1 DTF2 = DTF3 TRANSFER TO THETA END OF CONDITIONAL WHENEVER.ABS*(UODT-UODTLM).G1U.O0 WHENEVER UODT.G.UODTLM VFLOW2 = VFLOW2-U.25 TRANSFER TO ETA OTHERWISE VFLOW2 = VFLOW2+O.02 TRANSFER TO ETA END OF CONDITIONAL END OF CONDITIONAL EXECUTE BSHEDP. (IDS, PASS1, OD, L1, BAFSP, TRI, TUBESFIN. lTOTALL, PITCH, HEAD, DEQ, Z, WC. MWT, TSVI, PRTEMA, PRTEMB, 2VISGA. VISGB, VISGC, TOTPD, TSVO, START) DTLM4 = ((TSVO-TWI)-(TSVI —TWI-DTW2))/ELOG.((TSVO-TWI)/ -Il27

Economic Design of a Condenser MAD Program and Data (continued) 1(TSVI-TWI-DTW2)) WHENEVER.ABS.(DTLM4-DTLM3).G.1.O TRANSFER TO ETA END OF CONDITIONAL EXECUTE TUBEDP. (L1, PASS1, VFLOW2, ID, IDS, TWAVG2,TUBES, 1PRDALL, PRDRT, GPM. POWER, START) PRINT COMMENT $8THE CONDITIONS FOR A FULL SHELL ARE$ PRINT RESULTS IDS,TUBES,VFLOW2,TWO2,UOHO2,HI2,DTLM3 EXECUTE ECON,(STWPS,STWPT,KTS,KSC,KCFH,ODLl,IDS,PASS1, 1HEAD,DAYS,GPM,AMORT,BASEBASES,CSTIND,TCSTI,CTGAL,INSTPC, 2WTFTS,WTFT.ELEC,POWERMCSTFAOL,TUBES,START) IOTA WFLOW2 = RHOW*VFLOW2*AFLOW2*3600.O DTW2 = Q/(WFLOW2*CPW) WHENEVER (WINTER+DTW2)#G.TWMAX PRINT COMMENT $8EXCESSIVE WINTER EXIT WATER TEMPERATURE$ TRANSFER TO START END OF CONDITIONAL DTLM3:((TSVO-WINTEH)-(TSVI-WINTER-DTW2))/ 1ELOG.((TSVO-WINTER)/(TSVI-WINTER-DTW2)) TWO2 = WINTER+DTW2 TWAVG2 = WINTER+(DTW2/2) RHO = RHOl+RHO2*TWAVG2 THERM = THERMl1+THERM2*TWAVb2 VISC = EXP.,(VISC1+VISC2/TWAVG2+VISC3/TWAVG2.P,2.0+ 1VISC4/TWAVG2.P.3.0+VISC5/TvwAVG2.P,4.0) HI2 = 0.027*12.0*(THERM/ID)*(ID*VFLOW*RHO*3600.0/(12.0* 1 VISC)).P.0.8*(CPW*VISC/THERM).P,0,33 TWALL = TWAVG2+Q/(HI2*(ID*AOL/OD)i*L1*TUBES) VISCWW = EXP. (VISC1+VISC2/TWALL+VISC3/TWALLoP.2,0+ 1VISC4/TWALL.P.3.0+VISC5/TWALL.P.4,0) HI2 = HI2*(VISC/VISCWW).P.JU14 NA2 = SQ*SQ1*TUBES.P.SQ2+TRI*TRIl*TUBES.P.TRI2 CNO = CN1*NA2.P.CN2 KAPPA TF = TSVI-(DTF2/2) PHYGRP = PHYGR1+PHYGR2*TF H02 = 0.725*CNO*PHYGRP*(LAMBDA*12.0/(OD*NA2*OTF2)).P.0.25 UO = 1/(1/HO2+OD/(ID*HI2)+RWALL+RO+RI*OD/ID) UODT = UO*DTLM3 DTF3 = UO*DTLM3/H02 WHENEVER.ABS.(DTF3-DTF2).Gs0.1 DTF2 = DTF3 TRANSFER TO KAPPA END OF CONDITIONAL WHENEVER.ABS.(UODT-UODTLM),G.1C.0 WHENEVER UODT.G.UODTLM VFLOW2 = VFLOW2-0.05 TRANSFER TO rOTA OTHERWISE VFLOW2 = VFLOW2+0.01 TRANSFER TO IOTA END OF CONDITIONAL END OF CONDITIONAL PRINT COMMENT $8THE WINTER CONDITIONS ARE$ PRINT RESULTS VFLOW2,TWO2,UO,HO2,HI2,DTLM3 VECTOR VALUES IDSH(1) = 5.047, 6.065, 8.071, 10.02, 12.09. 2 13.375, 15.25, 17.25, 19.25, 21.25, 23.0, 25.0, 27.0, 29.0, 3 31.0, 33.0, 35.0, 37.0, 39.0, 42.U0, 44.0, 47.0 TRANSFER TO START END OF PROGRAM $DATA WC=40000.0, LAMBDA=70.52, CN1=0.86, CN2=0.2116, PHYGR1=223.0, PHYGR2=-O.591, TSVI=105.0, TSVO=105.0OUO1=150.Ot DTLM1=20., DTF1=10.0, VFLOW=6.0, TWI=80.O, RHOW1=62.22, CPW=0.999, SQ1=0.815, SQ2=0.52, TRI1=-.481, TRI2=0.505, OD=O.750, ID=0.652, XWALL=0.049, KWALL= 217.0, PITCH=O.9375, FIX=1.U, FLOAT=OO, L1=12.0, AOL=O.1963, PASS1=2, RO=0.UC2,RI=0.001, SQ0, TRI=1, RH01=63.13, RH02=-0.017, THERM1=0o.3145, THERM2=-0.000475, BAFSP=24*0, FIN=O, TOTALL=3.0, HEAD=0, DEQ=O.750, Z=0.765, MWT=86.48, PRTEMA=12.9145, PRTEMB=-4230.0, VISGA=-3.245, VISG3=-20.04,VISGC=160.0, PRDALL=100., STWPS=300, STWPT=300, KTS=1, KSC=3, KCFH=3, DAYS=350'. AMORT=3.0, BASE=0.7188, BASES=0.360, CSTIND=1,u, TCSTI=1.0, CTGAL=O.00001, INSTPC=10.0, WTFTS=0.592, WTFT=O.418, ELEC=O.008, MCSTF=1.0, TWMAX=100.O, WINTER=70.O, VISC1=-O.21968738E01, VISC2=0.54722744E03,VISC3=-U.41363282E05, VISC4=0.16141324E07, VISC5=-0.24764542E08* L1=8.0, VFLOW=6.0, PASS1=2* L1=16.0, VFLOW=6.O, PASS1=2* L1=20.0, VFLOW=6.U, PASS1=2* L1=8.0, VFLOW:6.0, PASSi=4* L1=12.0, VFLOW=6.0, PASS1=4* L1=16.0, VFLOW=6.0, PASS1=4* L1=20.0, VFLOW=6.0, PASS1=4* -I128

_ _ = 4.._"_(._F _4, IAI[A = 7 ".5 CF. _.Ni = G-.,IN CN? = -2;II 600 P FYG l- 22. CC'QC C" PHYG~2: - 5 10Q0 _ TSVL - _=iP.iA.0 6 --- ---- 5 -------------- --------— QQQU.0__ __. 3__ L3=1_.. _1-__ — __ _ _ _ _z —2-_ —---.R. _._ _____ ___,,l~t TRT1 =.4rsICCn i2-RT7 _ U5LQI~.. nn =. 7ThOOOO ID - 3ALL_.. 6 2 =.... 217.D(Li)..............-......OO..Of.... _ ~ ~ ~ (~_ ________ _ CC. TRII:- _4l~. T9KZ2.________=_A 1_-___.._______.2,__________5n.-_L D O EOf,........._-LJ~nE-4______ ~_Ci = r.' rRI = 1, VFI 0~ -_ _ L.1(u4,,8 TIw = RO COOOnna ___ —_____ —--— l_ —__ —-J. cL c-c —-----------------— r —-- -------------- e92If -------------— RSi_ __f 1C~ ___P~_ —— __ -s11 2._O_a_G 0_t____. ____ _. _ _lt C YRT Y1 -E L f __ _ ___J R 7_=47 ncm-4 _______Vl5L_-W_~919 l7..6__ vEa2 —__-4 ('2 7 40______.... f' I<F..,F:_I._ - 6 I, _ n - 3_ZJ-L R_ C'__=_-__z. --— _C —-_-_D_~- -_VIS. -__:-......_-_ _.__~ F_-. —-_-_ O —-C-_ —:..... —. —--—,-4 — -- ---------- 3-L~LL --------------- v~ —- aC-i__ ------— 7~ ~YLG- 5-4.7.224-40_. __ _ ESA =_-7745;('........................... 0Semhi= -0.r4ncr(,...................VTS.E lE) f;ra) priz l lnnnnnno V/.SCL.-g....J.3:A')h~ C4. g iq"4 = 1 141-12F rA, VTRiCS =-2 -.7i. 4:: = =f ------------------ --------------- L —------------- IF __-_____________3 C.O_" __LQ ____ —-------— _____-____iEAU_ __-_ —----------- _________ ---------— ~ ro ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~~~ ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~r ~~~~~~~~~~KEH' F_/._.:. C,._.~_,_,_aI___i. = _ -__3.,_C.0_ Q.'~__C_O_, _ _ __CI_-ED_: _ _ _.O CGCil_,___ O.___iAE_Q - ____7_5__.0.1............O --------------------- Z -.-76 5 C.CL _L ------- - —. RI__=_.= --— _12._9QA5.W__, -------------- _P3EN& _ — H.9 I ~ -2.245(0 * V1ICH = -2QC4QQCCC, = 1ACOOCO(flPRi'AI I = innnnonn ---------- _'i —_-. -- - - -- - - 3_C~:_- - -- - -- - S_lJ&P_ I_ -- - - -- - - - 3L 4- - - - - - - - -K _C_0_. I _S= -- - -- - - -- - - L - - - - -- - - - SL_ -- - - - - - - -a. _S -__-.........'iSf: iC TkwMAX = ifCn (., nN(, i.TNTFR = 7CJC:i C)l(]. T ZST I = 1 000000 _ -- _ _iL 1. - _. __ _l. fiQ — @___ iL L k-LQ.0- D1 C, -E - - - - r LS. - __- _1 -_ l.D - _ -592-Q- - _EL- -HE R. LCQL _ I_ LEC_ —_ __._Q_ QD........E..U- - = Q0;I_,,_- -J_-OOL_ — ~~~~~~~~~.......[H E_ _,E____.:.'.C.C.C L..[.[.C:...._........................................ IHE -REQDr-IhLC CC~il ICT'iU AiE __ _______________________________________ X72 = 2_ 5 A-, 8a 2'3 4Af VFI (IN = 6.Cn nOC, Tl L = H7.11317g, tfn2 = 132.RI23gg HO = 316.455669, HI = 1181.5542911. DTLM2....__- ___._Z_202__ -e'- - - - -- --- ------ SHELL SluE PPESSUREi DuRO]P FCR B4FFLED FLCh IS.2143 PSI.....__X_!1.J TI...VAe.__ l.LQE- _T_!'.= _C',! ______L___ -------------------------- ---- ----------------------------------------

0 0 ~~Ji~~~~.~ ~~~~~~~EL~~~~kL - 3i~~~~~~~hQL~4l 2P- ii~ I m363.U~ ct J...................__ ]_i._ _ _.._':_U__ i I-.~_ _EL_ _/_Ei. _ _~- _;-, L_ __i _r.: _ -----........ —. —----- ---—: — _ — EL_ _ ----- -- — ~ —--- -- --— ___________________ — -. —. —_______________________________________________ __ L................ =_ LEsa...........__._..,.. _ZLo-' 3 3 F?:'fi,7 4fT?:~'; J-i.2.-, M3 = 11 4;c~..'~~Z7 ~~L)L1~ jJ]JL~. ~ -F2 = VA7 4ii42P~~, FT' JJ~~~9~fL~7' FlI1M': 1_6:469'~27 TU F S FLT A A r, A F F LL ATf-I L AiL )Ni.RAL A Y L_ SHELL ANL_ OE. r aT1'.\L 1-1/4 CLI 1/2 MO.I (.-.,.j 7 (HAN,-\LL AO U FLAT i.;t h_ A.G'C:,.:.-..-....-.J_-J....-......l_/_ _. SFANOI,AfD,U.RKIi., rsci, l IL LSI[. - PSI 30 0 STANLARL kPRr<Iiu PiESS-JURE SHLLLSIL._ - PSI..... _ _ 0__ TUBtE C.1. - I...........75.0 0' -.. —-5" NURbER CF FUU.FS 31o U TULF C I,, ISI;E SUF', A, A- SA FT/FT.1993 3 H 0 I'UtB LeNGTh. - f- I.......2.OC...........-,.:,G D.) UAYS C..LAfI[N PR yE1.'3YO. i AMCRT IAI IOCN R.'AI - Y "S 3.C CCST L..'). X _ 1.00. - -- -- -- -'R.E c.0; 1 iLl) E 1....C..;0 STEEL I.[E, CL.& [ - L/L -......................G. -........._........-.....-'TURE CCS1 - U/Lb'.71l L.ELECIRILITY.CUS.T.O - /.,._.........._.....- - ---------------- - MAINTENANCE OC'ST - I"/ Y -A'-S (F I 1.0000 C.IJNSTALLL b UC S.$T - P1 C. -." I......................................._ _ _........ L..i C ~...i.. _ _C_.... MECHAN ICO'L EFFICIENCY.65iC TUbESI[E. FLUIU. Cr SIS.. /SAL............-......__..... TUBESICE Ll.'l.;IC FLCIA R L - GP3 382.25 LI.. U I I U_C!.s I - L/Y.E........................................................................ POWER CLST - u/Y[-:, A1.76 MAINTENi'C,S -./Y A.i ------—. —---—....................................... - -----------— 7 - YEARLY iUPERAT'IN\ EXPErNSE - L/YEA'L 31:'-I,.76 -.- B.E.L~S. 1..... - >.. w-_ w _____............ 1 _TCTAL CCNLENSER CCST -1) 9089.-78 I N S.T.A LLA I.CN C.C S....-...iL 3 -...........- -.. _ —----------------- INSTALLEC CO' I"ENS.ER CC T - C 9998.76 Y E A R L Y F I X LD.C A P I I A _ _L__ _'.L_E_ ---------------— _333. -9 —--------------------------------------------------------------- TOTAL YE.ARLY CCSI - L/YEA:R 6523.67 __ 1 LL E_ ^ i'%! fi__~_C.5I1C X_ l ~C _! __,i"_ — --- ----------------------------------------------------------------- tw52_.-. _.l~~~~ ~lCE, TCF jP7J= ip2C,; U =!' 2'7 3S!27'* HC2 = 336 258636 _____ —____________ HL2_...iIlL&5 U_:_.I_ -- —.L ~9- 5..:.___________________________________ —--—. -_ -------------— _

Example Problem No. 122 Discussion of Results The results of a factorial search to obtain the optimum plain-tube length, tube passes, and water velocity are presented in the table below. Summary of Results for Plain Tubes Tube Tube Shell Number of Water Installed Annual Length Passes I.D. Tubes Velocity cost cost ft. in. ft./sec. $ $/year 8 2 27.00 658 2.02 14220.99 9271.151 12 2 215.00 466 2.18 12196.26 7840. 88 16 2 19.25 1518 5.00 9578.755 8480. 47 20 2 19.25 1518 2.351 9998.76 65235.67 8 4 27.00 624 6.00 14082.15 108158.11 12 4 235.00 44o 6.00 120915.14 8757. 54 16 4 21.25 1572 4.56 11149.935 7216. 18 20 4 19.25 1500 5.52 9816.60 6795. 89 The optimum plain-tube design has the following specifications: tube length 20 ft. tube passes 2 shell inside diameter 19.25 inches tubes 15/4 in., 18 BWG, copper number of tubes 1518 water velocity 2.151 ft./sec. installed cost $9998.76 annual cost $65215.67 The engineering results obtained with a digital computer are superior to those obtained by hand calculations because the weak points and assumptions indigenous to hand calculations are eliminated while utilizing the latest and most comphensive design procedures. Although a finned-tube design would be more economical,, the conclusions regarding a plain-tube design are as good as the economic data upon which they are based. The program was run on an IBM 709 digital computer. The compilation of the MAD language to machine language took 1.015 minutes. The execute time for the eight trials was 2.151 minutes. Instructors Comments and Critique In teaching a course in equipment or process design, the instructor is concerned with presenting the latest and best design methods and with presenting the economics of the process in order to effect an optimum design. The selection of an appropriate problem for the students to solve with a digital computer should, therefore, reflect the aims of the course. Furthermore, the- techn -iques --- A - A --- - andprceure-rqure to4solv the I - prole shul be, commo to a.' wide -1Aclass1

Economic Design of a Condenser To permi t the student to do a complete condenser desi-gn (a rather involved problem) in a minimum time, considerable preliminary preparation was necessary. Four subroutines were written for the student's use. These included such things as tube-side and shellside pressure drop programs which, although needed in the complete program, are sufficiently unique to be- suitable for subroutines. When treated in this way, a complete problem consists of a small main program with the appropriate peripheral programs included to make the total package complete. The students responsibility is to write the main program which computes the necessary heat transfer coefficients and which utilizes the subroutines to obtain information necessary for the final solution. This method offers the advantage of short problems for time required while offering the advantages of comprehensive and complete problems for maximum learning. Several mathematical relations and a major portion of the physical property data were also given to the students. The mathematical relations included such things as the diameter of the outer tube limit for a heat exchanger bundle as a function of the number of tubes, number of passes, tube pitch, and tube arrangement and the inside diameter of the shell as a function of the diameter of the outer tube limit and the type of heat exchanger. The physical property data were presented in most part in the form of equations directly adaptable for computer use. Two lectures were given on computer programming. These covered the logic involved in the problem and a flow diagram which represented a solution to the problem in the broadest sense. Information was also given on sorting, convergence in trial-and-error problems, and the use of subroutines. Handouts were given to the students describing how to use the subroutines. The subroutines were duplicated and given to the students in the form of IBM cards ready for use in the computer. Having given similiar problems for the past three semesters, it has been found that students with limited computer experience generally have greater success if they attempt to write a simple program at first. After the elementary program is checked out for accuracy, it is an easy task to make alterations to improve the value of the program. To encourage this approach and to offer an incentive to do additional work, the following grading procedure was employed: Task Accomplished Grade 1. Calculation of the number of tubes required for a given set of data. 60-70 2. Task 1 and the calculation of the standard shell size and the tube-side pressure drop. 70-80 D. Task 2 and calculate the inside heat transfer coefficient using the Sieder-Tate equation which involves 80-.1 (L/bw)04 4. Task 3 and the consideration of finned tubes. 90-100 -I132

Example Problem No. 122 Most of the students were able to complete task 3 successfully in approximately seven weeks. (They were also working on an extensive non-computer problem simultaneously.) The computer problem should be started early in the semester to allow the student to proceed as far as possible. There is probably as much benefit from making economic studies with the finished program as the preparation of the program itself. By providing the subroutines, various necessary relations and data, the programming time was reduced by approximately a factor of five. The advantages of using the computer in design courses are: 1. Optimization studies can be made. 2. Practice can be given in writing complex programs. 3. Introduction to industy practice can be given. 4. Organization of multiple trial-and-error problems by computer or by hand can be taught. The problem assigned had all the above advantages and was considered satisfactory. Description of Tube-side Pressure Drop Subroutine for Water The method of calling the subroutine is: EXECUTE TUBEDP. (TUBEL, PASS, TVEL, ID, IDS, TAVG, TUBES, PRDALL, PRDRT, GPM, POWER, START) The arguments required for TUBEDP. are: TUBEL tube length, ft. PASS number of tube passes (integer) TVEL tube-side velocity, ft./sec. ID tube inside diameter, in. IDS shell inside diameter, in. TAVG average water temperature, ~F. TUBES actual number of tubes used (integer) PRDALL allowable tube-side pressure drop, lb./sq,in. *PRDRT actual calculated pressure drop, lb./sq. in. *GPM calculated flow rate of water, gallons/min. *POWER calculated power required based on 65% eff., kw. START transfer location for error return The arguments marked with "integer" must be in integer mode and declared as such by an integer declaration in the main program. The subroutine takes the argument values and calculates the pressure drop in the headers due to sudden expansions, reversals, and contractions and in the tubes. The procedures outlined in McAdams, Heat Transmission 3rd Ed., McGraw-Hill, are followed. Outputs from the subroutine (in the form of arguments) are PRDRT, GPM and POWER. The values of PRDRT, GPM, and POWER need not have definite values prior to execution. Values will be calculated in the subroutine and can be used in the main program after execution of the subroutine. -I133

Economic Design of a Condenser The following variables are used in the MAD language version of the tube-side pressure drop subroutine, but are not arguments for the subroutine. AFLOW total tube-side flow area per pass, sq. ft. DENT density of water, lb./cu. ft. DPTI pressure drop due to sudden contraction from headers to tubes, lb./sq. in. DPTO pressure drop due to sudden expansion from tubes to headers, lb./sq. in. DPT pressure drop in tubes, lb./sq. in. FT tube side friction factor, dimensionless K office coefficient used in calculating DPTI, dimensionless D. G RET Reynolds number, dimensionless VHED water velocity in headers, ft./sec. VISW viscosity of water, lb./ft.-hr. WT water flow rate, lb./hr. A flow diagram of the tube-side pressure drop subroutine is shown below. ENTRY 2 HED =TUBESTVELID DPT = PASS*DDENT(TVEL -VHED 36K*TVEL ) TO >DENT (TIDSW 2*32.17*1 RET = TUBEDP. FT*TUBEL*PASS*TVEJ~ *DENTi 0.46*TUBES*ID 21 = ~~~~~~~~~~~~~~~~~~~IDS2 IDS 2 ~~~~2*32.17'144 * DPT0 PASS*DENT(TVEL2 -VHED2+(TVEL-VHED) DRT=DPT+DPTI+DPTO 2*PASS*DENT* 2*32.17*144 DRT=DPT+DPT2+DPTOI 2*32.17*144'F " 1Comment" 134 (~ ~ ~~RDRT > PRDALand - - - and -I134

Example Problem No. 122 Flow Diagram, Continued 2~ 5 AFLOW = ir*T S*ID >WT = 3600*AFLOW*DENT*TVEL e AFLOW =4*144*PSSI 144. O*PRDRT*WT 7.481*WT FUNCTION OWER DENT*O.65*2.655x10u GPM - 60.0*DENT RETURN The MAD listing of the subroutine is shown below. $COMPILE MADt EXECUTE, DUMP, PUNCH OBJECT R TUBE SIDE PRESSURE DROP ROUTINE FOR WATER EXTERNAL FUNCTION (TUBEL, PASS, TVEL* ID, IDS, TAVG, TUBES. 1 PRDALL, PRDRTp GPM, POWER, START) ENTRY TO TUBEDP. INTEGER TUBESt PASS STATEMENT LABEL START DENT = 63.13 - 0.0117*TAVG VISW = EXP.(-O.21968738E 1 + 0.54722744E03/TAVG 1 -0&41363282E05/TAVG.P.2 t.016141324EO7/TAVG.P.3 1 -0.*24764542E08/TAVGP.4) RET = ID*DENT*TVEL*3600O0/(12.0*VISW) FT = EXP.( 0.90677323E01- 0.35722616E01*ELOG.(RET) 1 + 0.39637844EO*(ELOG.(RET)).P.2 -0.20815594E-01* 1 (ELOG.(RET))*P.3 + 0.41355033E-O3*(ELOG.(RET)).P.4) DPT= (FT*TUBEL*PASS*TVEL*TVEL*DENT) / ( ID*32*17*24) K = 0.52 ((0.46*TUBES*ID*ID)/(IDS*IDS)) VHED = (TUBES*ID*ID*TVEL)/(IDS*IDS) DPTI=(PASS*DENT*(TVEL*TVEL-VHED*VHED+K*TVEL*TVEL ) / (288*32.17 1) DPTO=(PASS*DENT*(TVEL*TVEL-VHED*VHED+(TVEL-VHED).P.2))/(288*3 12,17) PRDRT=DPT+DPTI+DPTO+(2*PASS*DENT*VHED*VHED)/(288*32e17) WHENEVER.PRDRT.G. PRDALL PRINT FORMAT COMM2 PRINT FORMAT INFO, PRDRT TRANSFER TO START OTHERWISE PRINT FORMAT INFO, PRDRT END OF CONDITIONAL AFLOW = (3.1416*TUBES*ID*ID)/(576,0*PASS) WT = 36000.O*AFLOW*DENT*TVEL POWER = (144.0*PRDRT*WT)/(DENT*2*655*10.P.6*0.65) GPM = (WT*7.481)/(60. *DENT) FUNCTION RETURN VECTOR VALUES INFO = $ 28H4TUBE SIDE PRESSURE DROP IS F7.3, 1 4H PSI *$ VECTOR VALUES COMM2 = $ 86HOCALCULATION WAS TERMINATED BECAUS 1E TUBE-SIDE PRESSURE DROP EXCEEDED ALLOWABLE LIMIT *$ END OF FUNCTION -I135

Economic Design of a Condenser Description of Economics Subroutine for Calculating Heat Exchanger Fixed and Operating Expenses The method of calling the subroutine is: EXECUTE ECON. (STWPS, STWPT, KTS, KSC, KCFH, OD, TUBEL, IDS, PASS, HEAD, DAYS, GPM, AMORT, BASE, BASES, CSTIND, TCSTI, CTGAL, INSTPC, WTFTS, WTFT, ELEC, POWER, MCSTF, AO, TUBES, START) The arguments required for ECON. are: STWPS standard working pressure for shell side, lb./sq. in. (integer) STWPT standard working pressure for tube side, lb./sq. in. (integer) KTS material index for tube sheet (integer) KSC material index for shell and cover (integer) KCFH material index for channel and floating head cover (integer) OD tube outside diameter, in. TUBEL tube length, ft. IDS a standard shell inside diameter, in. PASS number of tube passes (integer) HEAD HEAD = 0 if fixed head, HEAD = 1 if floating point (integer) DAYS full days operation per year GPM tube-side flow rate, gal./min. AMORT amortization period, years BASE base cost of alloy tubes, $/lb. BASES base cost of steel tube, $/lb. CSTIND cost index for heat exchanger less tubes TCSTI cost index for tubes CTGAL tube-side liquid cost, $/gal. INSTPC installation cost as per cent of installed cost, per cent WTFTS steel tube weight, lb./ft. WTFT alloy tube weight, lb./ft. ELEC electric power cost, $/kwhr. POWER power required for tube-side pumping, kw. MCSTF maintenancecost, $/sq.-ft. AO heat transfer surface, sq. ft./ft. TUBES actual number of tubes used (integer) START transfer location for error return The TEMA class R standard working pressures are 150, 300,450, and 600 psi. Only these values can be used for STWPS and STWPT. The arguments marked with "integer" must be in the integer mode and declared as such by an integer declaration statement in the main program. The subroutine takes the argument values and computes and prints out all the economic data. NO additional print statements are required. An error return to statement labeled START occurs when a non-standard shell size is specified. KTS, KSC, and KCFH specify the materialsto be used. admiralty = 1 monel = 2 1- % chrome = 3 4-6 % chrome = 4 11-13% chrome = 5 304 stainless = 6 -1136

Example Problem No. 122 For example, if the tube sheets are admiralty, KTS = 1 If the shell and cover are 4-6% chrome, KSC = 4 If the floating head is monel KCFH = 2 The method is based on the procedure of Sieder, E. H. and Elliott, G. N., "How to Check Costs When Selecting Material for Heat Exchangers," Petroleum Refiner, Vol. 59, No. 5 (1960). A digital computer adapation was presented by Briggs, D. E., "Economic Design of Heat Transfer Equipment," A.I.Ch.E. Regional Meeting, Detroit, Michigan, April 27, 1962. The following variables are used in the MAD language version of the Economics subroutine, but are not arguments for the subroutine. AOTOT total heat transfer area, sq. ft. AOTST total area of steel tubes (based on 16 -ft. tube length), sq. ft. BACST(VTCST, U) basic cost of all-steel heat exchanger, $/sq. ft. heat transfer surface CAFH(VCFH, U) per cent extra for alloy channel and floating head CONCST heat exchanger cost, dollars CSTPSF cost of alloy constructed heat exchanger containing steel tubes, $/sq. ft. heat transfer surface DOTL diameter of outer tube limit, in. EFF mechanical efficiency of pump system, fraction FLUCST tube side fluid cost, $/year IDSH(U) inside diameter of shell, in. INCOCT installed heat exchanger cost, dollars INDEX variable used in calculating array indices INDEXA index used in array for multiplying factor for channel and floating head INDEXB index used in array for multiplying factor for shell and cover INDEXD variable used in calculating an array index for basic cost of all-steel heat exchanger INSTCT installation cost of heat exchanger, dollars MAINT maintenance cost, $/year MAXWP maximum working pressure for exchanger, lb./sq. in. METAL an array containing alphabetic names of alloy materials MUCFH(INDEXA,INDEXC) multiplying factor for channel and floating head extra cost when tube-side working pressure is less than shell-side pressure MUSAC(INDEXB,INDEXC) multiplying factor for shell and cover extra cost when shell-side working pressure is less than tube-side pressure ODS steel tube outside diameter, in. PITCHS steel tube pitch, in. POWCST electric power cost, $/year SAC(VSC, U) extra cost for alloy shell and cover, percent STUCST steel tube cost, dollars TSAB(VTS, U) extra cost for alloy tube sheets and baffles, percent TUBCST alloy tube cost, dollars TWT total weight of alloy tubes, lbs. TWTS total weight of steel tubes, lbs. U an array index which designates shell size VCFH an array index which designates channel and floating head alloy and working pressure VSC an array index which designates shell and cover alloy and working pressure VTCST an array index which designates the steel tube outside diameter and working pressure VTS an array index which designates the tube sheet and baffle alloy and working pressure XMAXS number of steel tubes that can be placed inside of shell on a specified layout YRCAP total fixed-capital expense on a yearly basis, $/year YROPER total yearly operating cost, $/year YRTOT total yearly cost (fixed and operating), $/year -I137

Economic Design of a Condenser A flow diagram of the economics subroutine is shown below. 3VTS = INEX + KTS INDEXA = STWPT/150 | (OUGH ALLP F (03) 2 VSC = INDEX + KSC INDEXB = STWPS/150 U = 1, 1 V 22 (ALT VCFH = INDEX + KCFH INDEXC = MAXWP/150 |IDS=IDSH(U 5 -138- T CO ~~~~T ~ ~ ~ ~ ~ ~ ~ ~~TART ~D 0.,50 INDEXD = 4 T AD 0 ~ DOTL= 1.0028 INDEXD= O0 T IDS < 27.0) DOTL= IDS-1. 13 DOTL = IDS-1.441 -I138

Example Problem No. 122 Flow Diagram, Continued 5 CSTPSF = BACST(VTCST,U)* 100.0TSAB LTS,U)+SAC(VSC,U)*MUSAC(INDEXB,INDXC+CAFH(VCFH,U)*MUCFH(INDEXA,INDEXC)] STUCST=- (BASES+61.0 e-0'93*TWTS)*TWTS > TWT= TUBEL*WTFT*TUBES T ST = (BASE + 61.0 e93 *TWT CONCST=CSTPSF*AOTST*CSTIND+(TUBCST-STUCST)*TCSTI COCTISP INCOCT NSTCT C * *INCOCT=CONCST+INSTCT CAP= OTOT=AO*TUBEL*TUBES 100 ~ ~ ~ ~ ~ ~ ~ u~AMORT O9 — MAINT=AOTOT*MCSTF - YROPER=POWCST+FLUCST+MAINTY YRTOT=YRCAP+YROPER PRINT FUNCTION OUTPUT RETURN The MAD listing of the subroutine is shown below. $COMPILE MAD9 EXECUTEt DUMP, PUNCH OBJECT R ECONOMICS SUBROUTINE EXTERNAL FUNCTION (STWPS* STWPT# KTS. KSC* KCFH, OD, TUBEL, 1 IDS. PASS9 HEAD, DAYS GPM. AMORTo BASE. BASES, CSTINDs 1 TCSTI. CTGAL, INSTPCt WTFTS WTFT. ELEC, POWER, MCSTFt AOt 1 TUBES. START) ENTRY TO ECON. DIMENSION IDSH(23),METAL(30) STATEMENT LABEL START INTEGER MAXWPt STWPTt STWPS VTS, VSC. VCFHt INDEX, INDEXA, 1 PASS, TUBES. DIM, DIME. 1 INDEXB# INDEXC, KTS, KSC, KCFH. XMAXSt INDEXD, Us HEADVTCST DIMENSION MUSAC(16#DIME)t MUCFH(16#DIME) VECTOR VALUES DIME = 2.194 DIMENSION TSAB(528,DIM). SAC(528,DIM), CAFH(528,DIM), lBACST( 176,DIM) VECTOR VALUES DIM = 2,1,22 POWCST- EL EC*POWER* 24*DAYS FLUCST-CT GAL*GPM*60*24*DAYS EFF - 0.65 WHENEVER STWPT.G. STWPS MAXWP - STWPT OTHERWI SE MAXWP = STWPS -1139

Economic Design of a Condenser MAD Program, Continued END OF CONDITIONAL INDEX = 6*(MAXWP/150- 1) VTS = INDEX + KTS VSC = INDEX + KSC VCFH = INDEX + KCFH INDEXA = STWPT/150 INDEXB = STWPS/150 INDEXC = MAXWP/150 THROUGH ALL, FOR U 1= 1 IDS *E. IDSH(U) WHENEVER U.G. 22 PRINT COMMENT $1SHELL SIZE TOO LARGE FOR STANDARD SIZE $ TRANSFER TO START OTHERWISE CONTINUE ALL END OF CONDITIONAL WHENEVER OD.G, 0*750 ODS = 1.00 INDEXD = 4 OTHERWISE ODS = 0.750 INDEXD = 0 END OF CONDITIONAL WHENEVER HEAD *E# 0 DOTL = (IDS-0*411)/1.0028 OR WHENEVER IDS *L. 27*0 DOTL = IDS-1*13 OTHERWISE DOTL = IDS-1*44 END OF CONDITIONAL PITCHS = ODS + 0*250 XMAXS = EXP.(ELOG.(DOTL/U11e265 + O.023)*PITCHS)1/O.485) XMAXS = (XMAXS/PASS)*PASS AOTST = ODS*3e1416*16*O*XMAXS/12.O TWTS = XMAXS*16.O*WTFTS VTCST = INDEXD + INDEXC CSTPSF = BACST(VTCSTU)*(100.O + TSAB(VTSU) + SAC(VSC.U)* JMUSAC(INDEXBtINDEXC) + CArH(VCFHU)*MUCFH(INDEXAINDEXC)); 1/100,0 STUCST = (BASES + 61. *EXP.(-0.93*TWTS))*TWTS TWT = TUBEL*WTFT*TUBES TUBCST=(BASE+61*EXP.(-0.93*TWT))*TWT CONCST = CSTPSF*AOTST*CSTIND + (TUBCST - STUCST)*TCSTI INSTCT = (CONCST*INSTPC)/100.0 INCOCT = CONCST + INSTCT YRCAP = INCOCT/AMORT AOTOT = AO*TUBEL*TUBES MAINT = AOTOT*MCSTF YROPER = POWCST + FLUCST + MAINT YRTOT = YRCAP + YROPER PRINT FORMAT TITLE PRINT FORMAT OUTA, METAL(3*KTS-2), 1METAL(3*KTS-1), METAL(3*KTS)o METAL(3*KSC-2), METAL(3*KSC-1)s 1METAL(3*KSC)t METAL(3*KCFH-2), METAL(3*KCFH-1), 1 METAL(3*KCFH), STWPT* STWPS PRINT FORMAT OUTAA. OD# TUBES# IDS5 AO# TUBEL PRINT FORMAT TITLEG PRINT FORMAT OUTF, DAYS. AMORT* CSTINDO TCSTI, BASES. BASE. lELEC9 MCSTF# INSTPC# EFF PRINT FORMAT OUTFA. CTGALP GPM* FLUCST. POWCST. MAINT. 1YROPER. TUBCST# CONCST9 INSTCT PRINT FORMAT OUTFB. INCOCT, YRCAP, YRTOT FUNCTION RETURN VECTOR VALUES TITLEG = $ 43H1CONDENSER OPTIMIZATION - OUTPUT 1CONTINUED //// *$ VECTOR VALUES OUTA = $ 32H TUBE SHEET AND BAFFLE MATERIAL 1 S12t 3C6 / 126H SHELL AND COVER MATERIAL S18, 3C6 / 133H CHANNEL AND FLOATING HEAD COVER Sll5 3C6 / 142H STANDARD WORKING PRESSURE TUBESIDE - PSI S15i *5 / 143H STANDARD WORKING PRESSURE SHELLSIDE - PSI S14, 15 //*$ VECTOR VALUES OUTAA = $ 16H TUBE 0.D0 - IN S41, F1O.4 / -I140

Example Problem No. 122 MAD Program, Continued 117H NUMBER OF TUBES S33, I12 / 128H SHELL INSIDE DIAMETER - IN S289 F10,3 / 137H TUBE OUTSIDE SURFACE AREA - SQFT/FT S20 F10*4 / 118H TUBE LENGTH - FT S37o F10*2 ///// *$ VECTOR VALUES TITLE $ 32H1CONDENSER OPTIMIZATION - OUTPUT 1 //// * $ VECTOR VALUES OUTF = $ 25H DAYS OPERATION PER YEAR 529,F10.1/ 127H AMORTIZATION RATE - YEARS S28, F10.2 / 112H COST INDEX S44, F10.3 / 117H TUBE COST INDEX S41. F10*5 / 124H STEEL TUBE COST - D/LB S34# F10O5 / 118H TUBE COST - D/LB S4 * F10.5/ 128H ELECTRICITY COSTS - D/KWHR S30, F105 / 132H MAINTENANCE COST D/YEAR-SQFT S259 F10O4 / 127H INSTALLED COST - PER CENT S30, F10.4 / 123H MECHANICAL EFFICIENCY S349 F10*4 / *$ VECTOR VALUES OUTFA = $ 30H TUBESIDE FLUID COSTS - D/GAL 1 S30. F10.7 / 132H TUBESIDE LIQUID FLOWRATE - GPM S23, F10O2 / 122H LIQUID COST - D/YEAR S33, F10O2 / 121H POWER COST - D/YEAR S34# F10,2 / 127H MAINTENANCE COST D/YEAR S28, F10.2 / 135H YEARLY OPERATING EXPENSE - D/yEAR S20. F10,2 / lISH TUBE COST - D S4, F10,2 / 126H TOTAL CONDENSER COST D S29, F10O2 / 123H INSTALLATION COST - D 532. F102 / *$ VECTOR VALUES OUTFB = $ JOH INSTALLED CONDENSER COST - D 1 S25, F10.2 / 134H YEARLY FIXED CAPITAL EXPENSE - D S21. F10,2 / 128H TOTAL YEARLY COST - D/YEAR S27, F10Q2 / *$ VECTOR VALUES BACST(1) = 24.00,20.00o16.0013.00,1000+8*05. 16.70,5.88,5.40,5O10,5.15,4.80,4.55,4.30,4.15,4.00,3.90,3*80, 13.70.3.52.3*4903#30 25O00,21.00,17.0014O00,10l70,8.63, 17T30,6e42,5*98t5.68,5S51,5*23,4.98,4*75,4*60,4,46,4*32,4.25. 14.18,4.05,4.00,3.75, 26.00,22,00,1800,15,00,11.90,9,68, 18.15,7T20,6.68,6.20,6.30,6.00,5.70,5*50,5,32,5,20e5*05,4,95, 14*90,4*72,4.65,4.40, 28.00.24.00,20.00,16e00,12.90, 110.68,9.10.8O03T7.33t6.94,6.90,6.60,6s30,6.1015.90.5,75, 15S60,5.50,5.40,S.25t5S.15,5,00 VECTOR VALUES BACST(89) = 27,00,23e00,19.00,15,40,11.90,9.30, 17*55,6.50,5e80,5*48,540,510,4.80,4,55,4.40,4.20,4e1O04.00, 13,90t3,80,3.70,3,60, 28.00,24.00,2.000.16,20,12,50, 19e85,8O08.6e95.6*30t595,5.95t5O60,5.34,5,10,4e90,4.75*4.63, 14652,4*47,4*35,4.25,4.10, 29,00,25.0Q*21,00o17.30,14O00, 11100,9.05,7.82,7.18,6.8,.6*90,6,55,6.25t600,5.80,5.62,5.50, 15.40,5.27,5.15,5.10,4.90. 30.00,26.00,22,00,18.20,15.10, 112.15,10.05,8*67,7*93,7T60,7.70,7.33,7*00,6*70,6.50,6*30, 16.18,6.00,5.86,5.70,5.60,5.50 VECTOR VALUES TSAB(1) = 5.0 7*0, 9.0. 11.0. 13.0' 15.0. 118.0, 20.0 21.0, 21., 21.0. 21.0, 21,0, 21.0, 21.0, 21,0, 121.0. 21.0. 22.0, 22.. 22.0. 22.0, 10.,13.,16.,19.,23., 131.134.,36*,37*,38e,39e,39*,93.,9.39e9.,39e,39,,38,t38.e38., 138.,38.e, 4.,5.,6*,6.,6e,6. t67..7,77,8T.8,8.,8*.89*.9..9. 19e.9e,9,9.*,9.,9., 8.,11.,14.,17.,19.,22.,24.,25.,26.,26., 126.,25.,25.,25.,25.,25.,24.,249.,24.24.,24.,24., 9.913.. 116.,19.,21.,23.,25.,26.,27.,27.,27.,27.,27.,26,,26.,26.,26.. 126.,26.,26*,26.,26., 1.,13.,16.,19.,22.,26,,28.030.t30., 131.,31.,31..30.,30..3 *.30.,29.*29.,29.929*.29,.29* VECTOR VALUES TSAB(133) = 6,q8.,10.,12.*14.,17*.19.*21.. 122.922..22..22*,22.922.,22..23.,24.,24.,24.,25.,25.s25.t 111.,14.,17.,20.,24.,31.,35*,37.,39.,39e40,,40.,40.,41.,41., 141.,41.,41 41,42.,42.,42. 4, 5.,6,6. 6.,7. 7. 7..8.,8., 18.,8,,8,,9,,9s,10,,10.,1.,10.,11,,11e,11,, 8*,11*,14*, 117..19.,22.,24.,25.,26.,26.,26.,25,925.,25.,25.,25,,26.,26., 126.*26.,26.**26., 9*,1B3.*16.,19*,21.,24.,26,27.,27..27., 127.,27.,27.,27.,27.,27. 27.,27.,27.,28*.28.,28., 10.,13*., 116.,19.,22.,27.,29.,3 *,31.31.,3,31 1,.3,31.,30.,30*.30*,30.* 131.,31,.31*.31*.31. VECTOR VALUES TSAB(265) = 6, l8.,10.,12.,14.,17.,19.,21.,22., 122.,22.,22.,23,23.,2349,24.,25.,25.,26.,27.,27,t27., 11., 114.,17.,20.,24.,31.,35.,37.39.,39.,40.*40*,41.,41.,t42.,42., 142.*42.,42*.,43.,43..43.o 4* 5*,6.t6.,6.~7,7.,7. 8t,8.t8*, 19,,9,1O,,10,o10,,11Itlltlls,12,,12e~12,, 8.,11*#14, 17*, 119.,22. 24..25. 26.,26..26.,26.25.,26.,26.,26.,26**26.,27.. 127.,27.t26. 9,I13.,16.,19,21,,24.,26 I27.,27,,27..27, 127.,2-7.,27.,27.,28.,28.,2d.,28.,29e,29.,29., 10.,13.,16., 119.,22.,27.,29.t30..31.,.31. 31.,31,l3.,3 0,30.3 30.130.,30.. 131.,31..31..31. VECTOR VALUES TSAB(397) = 6..8.,10.,12.,14.,17.,19.,21.,22.t 122.,22.,22.,22.,23.*23.,24.,25.,25.,26.,27.,27.,27,t 11.. 114.,17.,20.,23.,31.,34.,35.,36.,37.,39.,39.,40,41.,41.,42., 143..43.,43..43..43.,43..4..S..6..,6.,6.,6.,.7. 7.7..7.,7..8.. 18,,i9,,9,,10,,10,,10,~111,m12e12,12,- 8,~11.,14e,17.-19, -I14

Economic Design of a Condenser MAD Program, Continued 121.*23.*24.*24.924.25*.,25.*25*.25.,25s.25, 26.*27.,27. 28., 128..28. 8.*11.t14.,17.,19.*20s,22. *24.t25. t26.26.26. 26., 127. 27. 27. 28. 29. 29,30. *30*30. + 9.13. *16.,19. 21.* 125. 27. 29. 29. 29. 29. 29. 30.,30. 0.330o 31.,32.33. *33.* 133 33. VECTOR VALUES SAC( 23 ) = 26*,30.,34.,38.,42.,46.t49.,51., 152. 52. 51. 50. 49. 47. *44 44. 441.4O *39. 38. 38. 37.t 18.*10.,13*.*16**19.*22.,23.,25.,24.,24.23*.,22.,21.,19.,18e, 118.*17.e17..16*e16. 16.,15.. 16le18.,21.,24*,27.,30., 133. 34. t35. 34.,33. 32. t30. 29. *26. 26. 25. 24.23.23. 23.* 122., 18* 21.,24.927.*30e,33.935.,35*.36.*36.935&e34., 133. 31. 29. 27. 27. 26. 925..24.24*. 23. 21* 24. 27.,* 130.,33.,35. *36*.,37.*37.*37*.,36*.,35.*34.33*.,31.,28*,28.*28. 127..25*. 25..24. VECTOR VALUES SAC(155) = 33,36.,939.,42.,*45.*48.,51*52.,53.. 153. 52. 51. 51. 49. 47. 47. p45.,44.944. p44. 43.43 112*.,14.,16.,189.,20,22.,24.*25.*t25.,25.,24,22*20.20*.,19*., 119. 18..17. 17.l17. t16.*16s 16.19.,22.,25..28 *31.. 133. 35. 35. 35. 34.32 30. 30. o2.28.2827. 26. 26. 26.*25.125.. 17. 20.,23.,26.,29.,33*.,35.36*.,36*36.*35,34., 132*.,32.,30.,30.28.,27.,27.,27.,26*26*., 20*.23.*26., 129.,32.,34.,36.,37.,38.,38.*37.*35.*33.$33*.31*.31.,30.,29.t 128. 28. t27. 27. VECTOR VALUES SAC(287) = 37..40..*43.47..51..55.e57..57.t 156* *56. 55*.54. 54. 52. 50#,50.*48*.47. 47. 46. 46..46.* 111.,14*.,17.,20.*23.*256t26*,27.,27.*27*.,26.,23.23.,22.,21., 121.,19.,19.,19.,18. 18..18.. 19..22.,25.,28*.31..34.v 137. 38. 38. 37. 36 034. 34. 32. 30. 28. 28 *27. 27. 26. 26.. 126.. 21.2.4* 27*.3 *.33.36..37*,39. 39 t39.3,38..36. 36.* 134.31. *30*.30*,28.,28. 28. *28. *28.t 24*.27*e30 33., 136..39..41..41..41.,4.*39.,37.,37*,35. 33..31.,31*.,30.*30. 130. 30.,30. VECTOR VALUES SAC(419) = 48.0*,50,*52.,54.56.56.*55.*555., 155.,54.,54o.53o,53.,51.,49.,49.*48o,47.*47*946.*46.*46.* 29.*12,15ot.18.,21.24.25.,25.,26**25.,25**23,23.,*21.*20., 120..19.*18..18..18.*l8.,18.* 19..22.*25.*28..31.e34.,36., 137.o37..36**.,35.33.33.*31.*29.*29.,28..27,.27.*26*.26.*26.* 1 21.,24*.27.,30*.,33. 36. 37. 38.,38. 37. 36.35. t35 33*., 131. 31.,29. 28. 28. 28. *28 28.o 30.,32*.34. 36.38.. 140.42.,42.,O40.,39.*38.37.,37.,35.,*32.,*32*31.,30,*30.*30. 130..30. VECTOR VALUES CAFH(23) = 38.0,39.040.,41.o42.,41.41.o41t., 140.,38. 37..36..36* 35.34. 34.*33o,32. 32. 32.,31o.31.. 118.20.,21.**22*.,23*.24.,25..25.,24.,23o.23.,22.,22.21,,21*. 121. 21. 21. 21. 21. 21.,21.. 31.33.,35. 36. 37.,38. p37., 137. 36. 35. 33..30..3 *.,29*,27. 27*.,28.27..27. *26.26**26I 34. 35. 36. 37.,38., 38. *37.37 *36.,35. 34.,32.,32.*30. 129,29. 28. 27. 27 *27,27. 27.* 35.,36* 37, *38* #39* 38., l38. 37. 36. *35* 34. 33.,33**31.30.30#, *29. 28. *28*.218. 128..28. VECTOR VALUES CAFH(155) a 3;2.34.,36.*38.*40.*42.,42..43.* 142.,*41.*40.*37.,37.*34**.,32..32.,31.,30.30.*30.,30.*30.*t 119*.20. 21*.22. 23o.24 24 25..24..24..23* *22.,22.21..21.t 121.21.,*20,2-0.,*2G*.,2 *,20* 32e,33.,34.35. 36. 37. 38.* 138.,37.,36.,34.,31.,31. 29.*27.*27.o26.,25*,25.*24*.24o.24., 133. *34.,35. 36.,37.,38.,39. 39.,38. 37. *35*.32. t32. *30*.28*. 128.,27*.26.*26.*25.*25-,25#! 33.#34*.35.936##37.,39.9 139..39. 38..37*.,36.*33.33..31..29.,29.*28..26.,26.t26.,26.. 126. VECTOR VALUES CAFH(287) = 38*.,3:9.*40.,41.42.,42.,43.,42., 140.,39. 3:7. 36. 36.,33.,32. 32. 31.*30.O 30. 30..30..30., 121..22..23..24.,25.,26..26. *25..24..23. *23,,22.,22. *22. 21. 121.*21.*20*.,20.*20.2.*20.t 34.,35.*36. 37.,38.*39.,39.p 139. 37.,35.33*.31. 31. *29. *27. 27.26. 25 *25.,25. *25..25. 134..35.,36.,37.*38.*4.,40.*40.*37.*36.*34.,32.,32.,30.,28., 128..27.,26..26..26.26..26.* 34.35.*36. *37..39.40., 140.*39..38.**36.,35.33.33*.,31.,29.,29.,28.,27.,27.926., 126.*26. VECTOR VALUES CAFH(419) = 39.41.,42.,43.*44.,45..44,43*., 142. 41. 39. 36. *36. 34 30. 30. *29..28. 28. 28. 28. 28.. 121. 22.23.24.25. 25.,26. 26. *25.23. 23. 22.,22. 21. 20.* 120.,19..19.,19.,19.,19.,19., 34.35.,36.,37. *38.39. 39., 139.,38.,36.,34t.,31.,31.28.26*.,26.,24.,23.,23.,23.,23.,23., 136.37.,38. 39.,40.,41. 41.,40. 38.,36.,35,32.,32. 28.,26., 126. 25. 24*.24.23. 23. 23.** 36. 37. 38. 39. 40.,41.,41. 141.,39.,37.,35.,32.,32.,29.,27.,27.,26.,25.,25.,23.,23.,23. VECTOR VALUES MUSAC(1) = 1.0. 0.92. 0.81. 0.75, 0.0, 1.0, 10.89* 0.83, 0.0. 0.0, 1. 0.92, 0.0, 0.0 0.0, 1.0 VECTOR VALUES I UCFH(1) = 1.0, 0.92. 0.88, 0.78, 0.00 1I.0, 10.95, 0.86, 0.0, 0.0. 1., 0.92, 0.0, 0.0, 0.0, 1.0 VECTOR VALUES METAL(1) = $ ADMIRALTY MONIE 1L 1-1/4 CR 1/2 MO 4 6 CR 1/2 MO 11-13 CR 3 104 STAINLESS*$ VECTOR VALUES IDSH(1) = 5.047, 6.065, 8.071, 10.02, 12.09, 2 13.375, 15.25. 17.25, 19.25, 21.25. 23.0, 25.0, 27o0. 29.0, 3 31.0. 33.0, 35.0, 37.0, 39.0, 42.0, 44.0, 47.0 END OF FUNCTION -I142

Example Problem No. 122 Description of Baffled Shell-Side Pressure Drop Subroutine The method of calling the subroutine is: EXECUTE BSHEDP. (IDS, PASS, OD, TUBEL, BAFSP, TR, TUBES, FIN, TOTALL, PITCH, HEAD, DEQ, Z, W, MWT, TSVI, PRTEMA, PRTEMB, VISGA, VISGB, VISGC, TOTPD, TSVO, START) The arguments required for BSHEDP. are: IDS a standard shell inside diameter, in. PASS number of tube passes, (integer) OD tube outside diameter, in. TUBEL tube length, ft. BAFSP baffle spacing, in. TR set TR = 1 if triangular pitch; set TR = 0 if square pitch (integer) TUBES actual number of tubes used (integer) FIN set FIN = 1 if finned tubes; set FIN = 0 if plain tubes (integer) TOTALL total allowable shell-side pressure drop, lb./sq. in. PITCH tube pitch, in. HEAD set HEAD = 1 if floating head; set HEAD = 0 if fixed head (integer) DEQ equivalent diameter of tube, in. DEQ = OD for plain tubes Z compressibility factor for condensing vapor W amount of condensing vapor, lb./hr. MWT molecular weight of condensing vapor TSVI inlet vapor temperature, ~F PRTEMA constant A for saturated pressure where P = exp. (A+B/Tabs) lb./sq. in. PRTEMB constant B for saturated pressure where P = exp. (A+B/Tabs~ lb./sq. in. VISGA constant A for vapor viscosity where Pg = exp. (A+B/T+C/T) lb./ft.-hr. VISGB constant B for vapor viscosity where ~g = exp.(A+B/T+C/T2) lb./fto-hr. VISGC constant B for vapor viscosity where Pg = exp.(A+B/T+C/T ) lb./ft.-hr. VISGC constant C for vapor viscosity where LWg = exp.(A+B/T+C/T ) lb./ft.-hr. *zTOTPD calculated shell-side pressure drop, lb./sq. in. *TSV0 calculated exit vapor temperature, ~F START transfer location for error return The arguments marked with "integer" must be in integer mode and declared as such by an integer declaration in the main program. The subroutine takes the argument values and computes the shell-side pressure drop based on a modification to the method of D. A. Donohue, "Heat Transfer and Pressure Drop in Heat Exchangers," Industrial and Engineering Chemistry, Nov. 1949. In the modified version the pressure drop is calculated in increments. The tube length is divided by the baffle spacing to obtain the number of increments. For each increment the pressure drop is calculated based on the average amount of vapor flowing across the bundle. The pressure drop through each window is also calculated based on the average amount of vapor flowing through the particular window. The individual pressure drops are summed to give the total pressure drop. Using the exit vapor pressure, the exit vapor temperature is calculated. An error return to statement labeled START occurs when (1) shell size specified is not a standard size or (2) pressure drop is excessive. * The values T0TPD and TSVO need not have definite values prior to execution of BSHEDP. Values will be calculated by the subroutine and can be used in the main program after execution of the subroutine. -I143

Economic Design of a Condenser The following variables are used in the MAD language version of the baffled shell-side pressure drop subroutine, but are not arguments for the subroutine. AOTLIM area enclosed by outer tube limit, sq. in. BAFCTL baffle cut expressed as a fraction of diameter of outer tube limit, fraction BAFCUT baffle cut expressed as a fraction of shell inside diameter, fraction COSC cosine of angle C (see figure below) DELCON one-half of the amount of vapor condensed in passing across bundle between baffles, lb./hr. DENG density of condensing vapor, lb./cu. ft. DOTL diameter of outer tube limit, in. DPG pressure drop in passing across bundle between baffles, lb./sq. in. DPWIND pressure drop in passing through a baffle window, lb/sq. in. FFWA free flow area in window normal to flow, sq. ft. FSPACL free flow area at center of bundle normal to flow, sq. ft. FS friction factor for shell side, dimensionless G mass flow rate, lb/hr.-sq. ft. IDSH shell inside diamter, in. NOREST number of tube restrictions encountered in crossing bundle from centroid of window to centroid of window NOTUCL number of tubes across center of shell normal to vapor flow PAVGA calculated average pressure in any section under consideration, lb./sq. in. Pp.VG assumed average pressure in any section under consideration, lb./sq. in. PIN inlet pressure to any section under consideration, lb./sq. in. POUT outlet pressure from any part of condenser, lb./sq. in. PROTUA cross-sectional area of tubes in the baffle window, sq. in. PTOP pressure at inlet, lb./sq. in. RADC angle C in radians REG average Reynolds number of flowing vapor in any section under consideration SEGFAC segment factor used to calculate segment area SINC sine of angle C SPACES number of spaces between baffles available for vapor flow TAVG average temperature of vapor in any section under consideration TOTWIN total window area, sq. in. TWOXB normal distance from centroid of one baffle window to the centroid of an adjacent baffle window, in. U index designating shell size VISG viscosity of vapor at any point under consideration, lb./ft.-hr. WAVG average amount of vapor at any point under consideration, lb./hr. WINATU area of baffle window segment enclosed by diameter of outer tube limit, sq. in. I TWQXB /|\ PITCH + 0.2 in window centroid distance from center of circle = 2/3 r sin C rad C- cos ( sinu A flow diagram of the baffled shell-side pressure drop subroutine is shown. on next page. -I144

Example Problem No. 122 Flow Diagram TO > 22 ksD 0 DTL= 1.002o BSHETO ID=IDSH(U) 2 PRINT T C1OMMh-ENT SOTART IDS. 27.0 TL=IDS-l. 13 F DOTL=IDS-1.4 4.IDS/.IDS O'IC-. (2WAOLM ~*DOTL2 /,. _~ BAFCTLDOTL=DOT/2.0-PITCH-0.25 ( t AOTLIM4 — C BAFCTL= DOTL 0 -SEGFAC= -0.10396+0. 9933*BAFCTL ) WINATU=SEGFAC*DOTL PROTUA= *OD*TUBES*WINAT OO 7_O —*AOTLIM 144FFWA 144 TR = 0 T _ NOTUCL= 1. 414*PITCH FSPACL= (IDS-NOTUCL*DEQ)*BAFSP 144.0 NOTUCL= INORESTOC

Economic Design of a Condenser Flow Diagram, Continued 12. 0*TUBEE W BAFSP 2*SPACES 20~(TSVI) BAV PI PTOP PAG PIN WAVG=WAVG-DELCON G- TV=0(AG DENG= NWT*PAVG VIG (AG E=DEQ*G 9 DENG= Z*10.73* (TAVG+460) VISG- ~(TAVG) - EG 12.0*VISG T~~~ ~~~S e (3'684- 0.19586 *n(REG)), 1FNOREST* *FS S PAVGA= PIN- DA F F~~~ DPAGcIA-PAVG PIN= PI35DP~'SPACESD= E PAVG8 PIN 1G > 0 o.o5 T'....- -....T. _..j/ -I1~6PAVGA-PPVGAVAVG PIN= PIN-DPG PACKC L AV=I ACKA

Example Problem No. 122 Flow Diagram, Continued 62.3*DENG* ( 3600FFWA )A2 2 F PAVG= PAVGA KB TSVO= O(POUT) TOTPD=PTOP-POUT TA CINT START PRINT FUNCTION -I147

Economic Design of a Condenser A MAD listing of the subroutine is shown below. SCOMPILE MAD. EXECUTE. DUMP. PUNCH OBJECT R BAFFLED SHELL SIDE PRESSURE DROP FOR A CONDENSER EXTERNAL FUNCTION(IDS. PASS, ODt TUBELF BAFSP, TR; TUBES. 1FIN. TOTALL. PITCH, HEADt DEQ. Ze W, MWT. TSVI, 1 PRTEMA# PRTEMB# VISGA. VISGB# VISGCt TOTPD, TSVO. START) ENTRY TO BSHEDP. DIMENSION IDSH(23) STATEMENT LABEL START INTEGER HEAD. TR. SPACES. U. TUBEStFIN THROUGH ALL. FOR U = 1t 1t IDS.Es IDSH(U) WHENEVER U *G. 22 PRINT COMMENT $1SHELL SIZE TOO LARGE FOR STANDARD SIZE $ TRANSFER TO START OTHERWISE CONTINUE ALL END OF CONDITIONAL WHENEVER HEAD *E. 0 DOTL = (IDS-06411)/1.0028 OR WHENEVER IDS *L. 27,0 DOTL = IDS-1#13 OTHERWISE DOTL = IDS-1l44 END OF CONDITIONAL BAFCUT = (IDS/2*0 - PITCH - 0.25)/IDS SEGFAC = -0.10396 + 0*9933*BAFCUT TOTWIN 2 SEGFAC*IDS*IDS AOTLIM 3.1416*DOTL*DOTL/4.0 BAFCTL = (DOTL/2*0 - PITCH - 0.25)/DOTL SEGFAC -0.10396 + 0.9933*BAFCTL WINATU SEGFAC*DOTL*DOTL PROTUA = (3.1416*OD*OD*TUBES*WINATU)/(4.O*AOTLIM) FFWA = (TOTWIN - PROTUA)/144.0O WHENEVER TR *E. 0 NOTUCL = DOTL/(1.414*PITCH) OTHERWISE NOTUCL = DOTL/PITCH END OF CONDITIONAL FSPACL = (IDS - NOTUCL*DEQ)*BAFSP/144.0 COSC = (PITCH + 0s25)/(IDS/2*0) SINC =(SQRT.((IDS/2.0).P.2 - (PITCH + 0.25}sP.2))/(IDS/2.0) RADC = ATAN.(SINC/COSC) TWOXB = (2.0*IDS*(SINC)*P:3)/(3*0*(RADC - COSC*SINC)) WHENEVER TR.E. 0 NOREST = 2.0*TWOXB/(PITCH*1.414) OTHERWISE NOREST = 2.0*TWOXB/PITCH END OF CONDITIONAL SPACES = 12.O*TUBEL/BAFSP WAVG " W DELCON = W/(2*SPACES) PTOP = EXP.(PRTEMA + PRTEMB/tTSVI + 460.0)) PIN = PTOP BA(CKD PAVG = P I N WAVG = WAVG - DELCON G = WAVG/FSPACL BA:CKA TAVG = PRTEMB/(ELOGo(PAVG) - PRTEMA) - 460.0 DENG = (MWT*PAVG)/(Z*10s73*(TAVG + 460.0)) VISG = EXP.(VISGA + VISGB/TAVG + VISGC/TAVG*P.2) REG = DEQ*G/(VISG*12*0) WHENEVER FIN.E. 0 WHENEVER REG 6G. 200.0 FS = EXP ( -0.042- O.1958*ELOG.(REG)) OTHERWISE FS = EXP.( 4.04 - 0.986*ELOG.(REG)) END OF CONDITIONAL OTHERW I SE WHENEVER REG.G. 200.0 FS = EXP.( -O.45 - O.1958*ELOG.(REG}) OTHERWI SE FS = EXP.( 3.68 - 0.986*ELOG.(REG)) END OF CONDITIONAL END OF CONDITIONAL DPG = NOREST*G*G*FS/(9,35*100P.8*32.17*DENG) -I148

Example Problem No. 122 MAD Program, continued PAVGA = PIN - DPG/2*0 WHENEVER PAVGA *L. 0.0 PRINT COMMENT $4PRESSURE DROP IS EXCESSIVE WHEN MAXIMUM NUMBE 1R OF TUBES IS USED~$ TRANSFER TO START OTHERWISE CONTINUE END OF CONDITIONAL WHENEVER.ABS(4 PAVGA-PAVG) /PAVGA).G. 0.05 PAVG = PAVGA TRANSFER TO BACKA OTHERWISE PIN = PIN - DPG END OF CONDI T IONAL WHENEVER SPACES.E. 1. TRANSFER TO BACKC PAVG = PIN WAVG = WAVG - DELCON BACKB TAVG = PRTEMB/(ELOG.(PAVG) - PRTEMA) - 460.0 VISG = EXP.(VISGA + VISGB/TAVG + VISGC/TAVGaP*2) DENG = (MWT*PAVG)/(Z*10*73*(TAVG + 460.0)) DPWIND = (O.013:92/(62.3*DENG))*(WAVG/(3600*FFWA)).P~2 PAVGA = PIN -DPWIND/2.0 WHENEVER PAVGA eL~ 0.0 PRINT COMMENT $4PRESSURE DROP IS EXCESSIVE WHEN MAXIMUM NUMBE 1R OF TUBES IS USED:$ TRANSFER TO START OTHERW I SE CONT I NUE END OF CONDITIONAL WHENEVER.ABS. ((PAVGA-PAVG)/PAVGA).G. 0.05 PAVG = PAVGA TRANSFER TO BACKB OTHERWISE PIN = PIN - DPWIND END OF CONDI T IONAL SPACES = SPACES - 1 WHENEVER SPACES *G6 Ot TRANSFER TO BACKD BACKC POUT = PIN TSVO = PRTEMB/(ELOG.(POUT) - PRTEMA) - 460.0 TOTPD = PTOP -POUT WHENEVER TOTPD.G6 TOTALL PRINT COMMENT $4PRESSURE DROP IS EXCESSIVE WHEN MAXIMUM NUMBE 1R OF TUBES IS USED.$ PRINT FORMAT INFO, TOTPD. TSVO TRANSFER TO START OTHERWISE PRINT FORMAT INFO * TOTPD, TSVO END OF CONDITIONAL FUNCTION RETURN VECTOR VALUES INFO = $ 45H4SHELL SIDE PRESSURE DROP FOR BAFFL lED FLOW IS F7*4, 4H PSI/// 27H EXIT VAPOR TEMPERATURE IS 1 F8.3t 3H F *S VECTOR VALUES IDSH(1) = 5.047. 6.065, 8.071, 10.02. 12.09. 2 13.375, 15.25. 17.25. 19.25. 21.25. 23.Q0 25.0, 27.0, 29.0. 3 31.0. 33Qi0, 35.0, 37*0, 39.0. 42.0, 44/.0 47.0 END OF FUNCTION -I149

Economic Design of a Condenser Description of Unbaffled Shell-Side Pressure Drop Subroutine The method of calling the subroutine is: EXECUTE USHEDP. (HEAD, IDS, TUBEL, TUBES, TSVI, W, TOTALL, OD, TR, SQ, DEQ, MWT, Z, LATA, LATB, DENLA, DENLB VISGA, VISGB, VISGC, PRTEMA, PRTEMB, TSVO, TOTPD, PITCH, STARTS The arguments required by USHEDP. are: HEAD HEAD = 0 if fixed head; HEAD = 1 if floating head (integer) IDS a standard shell inside diameter, in. TUBEL tube length, ft. TUBES actual number of tubes (integer) TSVI temperature of the inlet vapor, ~F W amount of condensing vapor, lb./hr. TOTALL allowable shell-side pressure drop, lb./sq. in. OD tube outside diameter, in. TR TR = 1 if tubes are on a triangular pitch, otherwise TR = 0 (integer) SQ SQ = 1 if tubes are on a square pitch, otherwise SQ = 0 (integer) DEQ equivalent diameter of tube. DEQ = OD for plain tube, in. MWT molecular weight of condensing vapor Z compressibility factor for inlet vapor LATA constant A for latent heat where A = A+B*T, Btu./lb. LATB constant B for latent heat where A = A+B*T, Btu./lb. DENLA constant A for density of condensed liquid where PL = A+B*T, lb./cu.-ft. DENLB constant B for density of condensed liquid where P = A+B*T, lb./cu.-ft. VISGA constant A for vapor viscosity where pg = exp.(A+B/T+C/T2), lb./ft.-hr. VISGB constant B for vapor viscosity where pg = exp.(A+B/T+C/T2), lb./ft.-hr. 9~~~~~~ VISGC constant C for vapor viscosity where pg = exp.(A+B/T+C/T 2), lb./ft.-hr. PRTEMA constant A for saturated pressure where p=exp.(A+B/Tabs), lb./sq. in. PRTEMB constant B for saturated pressure where p=exp.(A+B/Tabs), lb./sq. in. *TSVO temperature of saturated vapor leaving, ~F *TOTPD calculated shell-side pressure drop, lb/sq. in. PITCH tube pitch, in. START transfer location for error return The arguments marked with'"integer" must be in integer mode and declared as such by an integer declaration in the main program. The subroutine takes the argument values and computes the shell-side pressure drop based on the method of J. E. Diehl, "Calculate Condenser Pressure Drop," Petroleum Refiner, Vol. 356, No. 10, 1957. The calculated shell-side pressure drop is printed out in the subroutine. An error return to statement labeled START occurs when (1) shell size is not large enough for the number of tubes specified, (2) shell size is not a standard shell size, or (3) allowable shell-side pressure drop is exceeded. The following variables are used in the MAD language version of the unbaffled shell-side pressure drop subroutine, but are not arguments for the subroutine. CL distance between outermost tube and shell wall, in. COND amount of vapor condensing on row R, lb./hr. CONDT total amount of condensate at point in question, lb./hr. DELP difference in pressure from inlet to point in question, lb./sq. in. DENG density of condensing vapor, lb./cu. ft. DENL density of condensate, lb./cu. ft. DOTL diameter of outer tube limit, in. DPG pressure drop for all-gas flow across row R, lb./sq. ft. * The values TSVO and TOTPD need not have definite values prior to execution of USHEDP. Values will be calculated by the subroutine and can be used in the main program after execution of the subroutine. -I150

Example Problem No. 122 DPTP(R) two-phase pressure drop across row R, lb./sq. in. FFA(R) free flow area normal to the vapor flow at row R, sq. ft. FS friction factor based on all-gas flow, dimensionless FUNC defined by (LVF)(DENL) (DENG)(Re0 5) GVOL gas volume flowing at point in question, cu. ft./hr. IDSH(U) inside diameter of a standard shell size, in. LAT latent heat of condensing vapor, Btu./lb. LVF liquid volume fraction, dimensionless LVOL liquid volume, cu. ft./hr. PAVG assumed average pressure at point in question, lb./sq. in. PAVGA calculated average pressure at point in question, lb./sq. in. PIN pressure above any row of tubes in question, lb./sq. in. POUT(R) pressure drop across row R., lb./sq. in. PTOP pressure at top of condenser, lb./sq. in. Q total heat load, Btu./hr. RATIO ratio of two-phase pressure drop to all-gas pressure drop defined by 0.324 or O. 00256 (FUNC) 0092 (FoUNC)M REG Reynolds number for all-gas flow past row of tubes in question, dimensionless R counter designating tube row; numbered from bottom up TAVG average temperature at point in question, ~F TIN temperature above any row of tubes in question, ~F TUBEE(R) number of tubes in row R U index which designates a standard shell size VISG viscosity of gas, lb./ft.-hr. XB number of tubes not yet placed in shell XDA(R) horizontal distance between outer tube limits at row R, in. XDB(R) horizontal distance between shell walls at row R, in. XMAXR maximum number of tubes in any row Y(R) vertical distance between bottom of shell and row R, in. A flow diagram of the unbaffled shell-side pressure drop subroutine is shown below. ErNTRY HROUGH ALL T DOTL= IDS-0.411, TO U1,1 USHEDP IDSDSH(U) _ _ 1DOTL=IDS-1.44 S _ MAXDA(R).-TUBEE.(R)=C - — (I XDI(R) O = 2 (-) - ) PIC)HM P C2 - - 2 -15-2 /(ID)2 (Y() IDS21 -I151

Economic Design of a Condenser Plow Diagram, Continued FFA(R) = )XDB(R)-TUBEE(R) * DEQ * TUBEL T 1.OL=..VOL ~ O ~i~ = 1.0 O2 GAMMA o~*1 AVGd DENG* [FFA(R)] *4.18xo10 ULTCO LV= DENL O FLTNC ~0.005 RATIO= = —DPTP(R)= RAT4*-DG DELP=DELP+DPTP(R) -~ DEN~~~oG - ~F~

Example Problem No. 122 Flow Diagram, Continued ~PTP(R)~ ~ — PA —V'GA — PAVG=PAVGA TAVG=O(PAVG) PAVGA= PIN DPTP(R PAVGA _ F POUT (R )= PIN -DPTP (R ) PIN= POUT (R ) T ( TI~N=0 (PoUT (R)) >-RR- SVO=TIN >. TOTPD=PTOP- PIN 12 GA T PRINT TOTP <TOTALL COMMVENT STR F APPLE PRINT PRINT UNCTI) J=l,-l, OUTPUT OUTPUT RETURN The MAD listing of the subroutine is shown below. $COMPILE MAD# EXECUTEs DUMP, PUNCH OBJECT R UNBAFFLED SHELL SIDE PRESSURE DROP FOR A CONDENSER EXTERNAL FUNCTION (HEADs IDS. TUBEL. TUBES, TSVI# We TOTALL. 1 OD. TR. SQ. DEQ# MWT, Zs LATA. LATB# DENLAP DENLB. VISGA. 1 VISGB, VISGC. PRTEMA* PRTEMBo TSVO. TOTPDo PITCH. START) ENTRY TO USHEDP. STATEMENT LABEL START INTEGER HEADt TUBES. It R. U, TUBESs TUBEEOXMAXR# XB. Jo 1 TR. SQ DIMENSION IDSH( 23). Y(100)o XDA(100), TUBEE(100)t FFA(100)t 1 XDB(100)s DPTP(100), POUT(100) THROUGH ALL. FOR U 1, 1 IDS *E IDSHtU) WHENEVER U *G6 22 PRINT COMMENT $1SiSHELL SIZE TOO LARGE FOR STANDARD SIZE $ TRANSFER TO START OTHERWISE CONTINUE ALL END OF CONDITIONAL WHENEVER HEAD*Ee40 DOTL=( IDS-0.411)/1.0028 OR WHENEVER IDS eL* 27*0 DOTL=IDS-1 13 OTHERWISE DOTL= IDS-144 END OF CONDITIONAL CL= (IDS-DOTL)/2 R=1 XB = TUBES Y(R)=CL+4*( PITCH-OD)+OD/2 DELTAD XDA(R)=2*SQRT. ((DOTL/2)}.P2-(Y(R)-IDS/2)..P2) XMAXR-XDA CR) /PITCH TUBEE(R)=XMAXR-(1-(-IIPeR)/2 XDB(R)=2*SQRT.t(IDS/2)~P~2-(Y(R)-IDS/2).P~2) XB=XB-TUBEE(R) WHENEVER XB.LE.0 I=R TUBEE(R) = TUBEE(R) + XB FFA(R)=((XDB( R)-TUBEE( R)*DEQ)*TUBEL)/12 TRANSFER TO INLETG OTHERWISE -I153

Economic Design of a Condenser UNIVERSITY IF MICIGAN FFA(R)= f(XDB(R)-TUBEE(R)-*DEQ)* TUBEL)/12 3 9015 02523 0221 TRANSFER TO INLETG OTHERWISE FFA(R) u (f XDB R )-TUBEE( R ):*DEQ) *TU8EL ) /12 END OF CONDI TIONAL RwR+1 Y( R ) =Y R-1)+TR*O 67*P I TCH+SQ*PITCH WHENEVER( IDS-Y( R ) )*L. ( 4*( P I TCH-OD) +OD/2 ) PRINT COMMENT $1SHELL SIZE NOT LARGE ENOUGH FOR NUMBER OF TUB 1ES SPECL:FIED. S TRANSFER TO START OTHERWISE TRANSFER TO DELTAD END OF CONDI T IONAL INLETG CONDTO DELP=O PTOP EXP.(PRTEMA + PRTEMBITSVI + 460.*0) P I NPTOP TIN=TSVI GAKMAA PAVG=PIN TAVG=T I N DELTAA VISG a EXP.(VISGA + VISGB/TAVG + VISGC/TAVG*Pe2) REG=(DEQ*W)/( 12*VISG*FFA( R ) FS = EXP.( 0.11138076E02 - 0.49929705E01*ELOGo(REG) + 1 0.72354022EO*(ELOGe(REG))eP.2 - 0,47569737E-01* 1 (ELOGe(REG:)#P.3 + 0. 11495005E-O2*(ELOG.(REG))J.P.4) DENG=(MWT*PAVG)/{Z*10. 73*( TAVG+460 ) ) DPG= ( 240*FS*W*W)/{ DENG*FFA( R )*FFA ( R) *4*.18*10*0.P8 ) LAT = LATA + LATB*TAVG O = W*LAT COND= (TUBEE( R ) *Q)/4 TUBES*LAT) CONDT=CONDT+COND DENL = DENLA + DENLB*TAVG LVOL= (CONDT-COND/2 )/DENL GVOL tW+COND/2-CONDT )/DENG WHENEVER GVOL&LE#O LVFl.O TRANSFER TO INLETH OTHERWISE LVFLVOL/:( LVOL+GVOL) END OF CONDITIONAL INtETH FUNC = (LVF*DENL ) / ( DENG*REG.P 0.5 ) W'HENEVER FUNC *LEa 0o005 RATIO 0O.324/FUNC.P. 0.092 OTHERWISE RATIO = O0256/FUNC.P. 0.98 END OF CONDITIONAL DPTPR) = ( RATIO*DPG) /144 DELP=DELP+DPTP( R) PAVGA=PIN-DPTP( R )/2 WHENEVER.ABS.IIPAVG - PAVGA)/PAVGA) eG. 0.01 PAVG=PAVGA TAVG = PRTEMB/(ELOG.(PAVG) - PRTEMA) - 460.0 TRANSFER TO DELTAA OTHERWISE POtJT-{(R) PIN-DPTP(R) END OF CONDITIONAL PIN=POU( R) TIN = PRTEMB/(ELOG. (POtTRR)) - PRTEMA) - 460.0 R=R-1 WHENEVER*R* NE *OTRANSFER TO*GAMMAA******** * TSVO = TIN TOTPD=PTOP-P I N WHENEVER TOTPD.&. TOTALL PRINT FORMAT COMM3 PRINT FORMAT INFO.TOTPD TRANSFER TO START OTHERWISE THROUGH APPLEsFOR J=I, -1, J *L. 1 APPLE PRINT FORMAT OUTE, Jo Y(J)# TUBEE(J), DPTP(J) PRINT FORMAT INFO,TOTPD END OF CONDITIONAL FUNCTION RETURN VECTOR VALUES COMt3 = $ 87HOCALCULATION WAS TERMINATED BECAUS 1E SHELL-SIDE PRESSURE DROP EXCEEDED ALLOWABLE LIMIT *$ VECTOR VALUES TITLEC = $ 40H1 ROW DIST/BOT TUBES PRESSU 1RE DROP / * $ VECTOR VALUES OUTE = $ I5, F10.4, I10. F15.7 *$ VECTOR VALUES INFO = $ 4SH4SHELL SIDE PRESSURE DROP FOR UNBAF 1FLED FL9W IS F7.e5 4H PSI *$ VECTOR "ALUES IDSH(1) = 5.047, 6.065. 8.071, 10.02, 12.09' 2 13.375, 15.253 17.25. 19.25, 21.25, 23.0, 25.0, 27.0, 29.0. 3 31.0. 33.0. 35.0, 37.0, 39.0, 42.0, 44.Qe 47.0 END OF FUNCTION $DATA