Computer program for the transient response of ablating axisymmetric bodies including the effects shape change NASA Technical Memorandum 4. Title and Subtitle 5. Report Date Lona M. Howser and Stephen S. Tompkins Hampton, Va. 23365 National Aeronautics and Space Administration 5. Supplementary Notes 6. Abstract A computer program to analyze the transient response of a n ablating axisymmetric body including the effects of shape change is presented in detail. The program, its sub- routines, and t h e i r variables a r e listed and defined. The computer input and output, in printed and plotted form, for three sample problems are presented to aid the u s e r in setting up and running a problem with the program. The governing differential equation, the boundary conditions f o r the analysis on which the computer program is based, and the method of solution of the resulting finite -difference equations are discussed. 7. Key Words (Suggested by Author(s)) I 18. Distribution Statement Ablation Unclassified - Unlimited Heat t r a n s f e r Computer program 19. Security Classif. (of this report) 20. Security Classif. (of this page) 21. NO. of Pages 22. Price* Unclassified Unclassified 81 $3.00 C TS Page ARY ....................................... 1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 SYMBOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 DESCRIPTIONOFMODEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 PhysicalModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Mathematical Model and Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 6 OPERATIONOFPROGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Boundary Conditions Along Front Surface . . . . . . . . . . . . . . . . . . . . . 9 ............ Boundary Conditions Along Back Surface and Edge of Body 11 Output Plotting Routine ............................... 11 Computing Interval ................................. 11 PROGRAMDESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 LabeledCOMMQN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Descriptions, Flow Charts, and Listings . . . . . . . . . . . . . . . . . . . . . 16 Program D2430 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Subroutine COLUMN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 SubroutineRQW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Subroutine CQLXO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Subroutine COLMN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 SubroutineCOLXL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Subroutine SQAERO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Subroutine ADJUST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Subroutine ZPRINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Subroutine SOLMAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 PROGRAM INPUT. OUTPUT. AND DIAGNOSTICS . . . . . . . . . . . . . . . . . . 48 Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 SAMPLECASES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 APPENDIX A - LANGLEY LIBRARY SUBROUTINES . . . . . . . . . . . . . . . . 59 SubroutineFTLUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Subroutine DISCOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 APPENDIX B - SAMPLE LISTINGS . . . . . . . . . . . . . . . . . . . . . . . . . 64 iii iv e By Lona owser and Stephen S, Tompkins Langley Research Center A computer program to analyze the transient response of an ablating axisymmetric body including the effects of shape change is presented in detail. The program, its sub- routines, and their variables are listed and defined. The computer input and output, in printed and plotted form, for three sample problems a r e presented to aid the user in setting up and running a problem with the program. he governing differential equation, the boundary conditions for the analysis on which the computer program is based, and the method of solution of the resulting finite-difference equations are discussed. A numerical analysis of the transient response of an ablating axisymmetric body including the effects of shape change is presented in reference 1, The present paper briefly describes the analysis in reference 1 and presents in detail the associated com- puter program (program D2430) developed at the Langley Research Center. This paper also provides the u s e r with an operating manual for the program. Some of the features of the analysis and the associated program are (1) the ablation material is considered to be orthotropic with temperature-dependent thermal properties; (2) the thermal response of the entire body is considered simultaneously; (3) the heat transfer and pressure distribution over the body are adjusted to the new geometry as ablation occurs; (4) the governing equations and several boundary -condition options are formulated in terms of generalized orthogonal coordinates for fixed points in a moving coordinate system; (5) the finite -diff erence equations are solved implicitly; and (6) other instantaneous body shapes can be displayed with a plotting routine. The computer program is written i n the FORTRAN language for the Control Data 6000 series digital computer with the SCOPE 3.0 operating system. The equations have been programed so that either the International System of Units o r the U.S. Custo- mary Units may be used.. LS constant in oxidation equation corresponding to specific reaction rate coefficients in equations (6) constant in sublimation equation constant in exponential of oxidation equation corresponding to activation energy BS constant in exponential of sublimation equation C oxygen concentration by mass cP specific heat H total enthalpy A% heat of combustion *HS heat of sublimation hl,h2’h3 coordinate scale factors (eqs. (2)) K reaction-rate constant for oxidation (eq. (lo)) k thermal conductivity L number of stations in x-direction M molecular weight of gas molecular weight of oxygen m,n integers 2 m mass loss rate mass loss rate due to combus~ion mS mass loss rate due to sublimation P exponent of pressure in sublimation equation (eq. (12)) PW wall pressure qC convective heating rate to nonablating cold wall %,net hot -wall convective heating rate corrected for transpiration (eq. (9)) qr radiant heating rate R radius of curvature of base curve Rcyl cylindrical radius from axis of symmetry to base curve R stagnation-point radius of curvature stag r exponent of radius in sublimation equation (eq. 112)); spherical coordinate S number of stations in y-direction T temperature t thickness of heat sink w,z Cartesian coordinates (sketch 2) X,Y curvilinear coordinates (sketch 1) xb length of base curve CY absorptance weighting factor for transpiration effectiveness of mass l o s s due to combustion 3 eighting factor for t r a n s p i r a t ~ oeffectiveness ~ of mass loss sublimat~ on P depending on whether transpiration o r ablation theory is used 6 material thickness E emittance 5,rl dimensionless curvilinear coordinates (eqs. (3)) 0 angle between R and R (sketch ); spherical coordinate cy1 h mass of char removed per unit m a s s of oxygen P density of material 0 Wef an -Bolt zmann constant T time @ angle between axis of symmetry and normal to surface (sketch 1) Subscripts: e edge of boundary layer W wall condition X9Y coordinates 5,rl dimensionless coordinates Superscripts: 1 condition along x = L 71 condition along y = 0 4 sc F The analysis considers an axisymmetric ablating body exposed to aerodynamic heating; this body is composed of a single orthotropic material of varying thickness with temperature -dependent thermal properties.. (See sketch *) The back surface of the body may be considered as a thin heat sink and/or radiator. Two coordinate systems are used to study the thermal and ablative response of the body. ne is a curvilinear coordinate system, with x,y coordinates (sketch l), which is used to determine internal temperature distributions. A stationary base curve located at the back surface of the body establishes the x-axis. Surface Inormal Thin h e a t sink \ and/or r a d i a t o r \ / Orthotropic m a t e r i a l Thin h e a t s i n k Y Body axis of symmetry Sketch 1 The second coordinate system (sketch 2) is used to define the exterior geometry of the body which changes with time as a result of ablation. This coordinate system, with w,z coordinates, is a Cartesian system with the origin fixed at the original stagnation point of the body. All the geometric parameters needed to compute changes in the stag- nation heating rates and the heating-rate and pressure distributions over the surface a r e defined in this system. The governing time -dependent heat -conduction equation with variable coefficients for an axisymmetric body is, in fixed coordinates, 5 where the coordinate scale factors are h2 = 1 (2b) h3 = R + y COS 6 CY1 The transient temperature response of an ablating axisymmetric'body is obtained from the solution of equation (1) with the appropriate boundary conditions, which are pre- sented in reference 1, The method of solution is discussed in the following section. I n i t i a l surface W surface a t time r wr I Sketch 2 Mathematical Model and Solution The finite-difference method was used to obtain the solution to equation (1). How- ever, if equation (1) were expressed in finite-difference form, it would describe the tem- perature variation at fixed stations in a fixed coordinate system. To maintain a fixed number of stations in a layer which changes thickness with time, it is necessary to change 6 the location of the stations and to interpolate to determine the temperatures at the new location after each time step, This procedure is time consuming and introduces a small e r r o r in each step of the calculation, his difficulty can be eliminated by transforming the equation to a coordinate system in which the stations remain fixed and the coordinates themselves move to accommodate changes in the surface location. This transformation can be made by introducing a moving coordinate system t,q, where [ = -X and q = x (3) Xb 6 In this system, the outer surface remains fixed at q = 1 and all other stations remain at fixed values of q . The governing time -dependent heat-conduction equation (eq. (1)) in this transformed moving coordinate system is (eq. (9) in ref. 1): where The unknown temperature field defined by the solution to equation (4) and its bound- a r y condition was obtained by first approximating these equations by finite -difference equations with the use of the node pattern shown in sketch 3. Then the solution to these finite-difference equations is obtained with the method used in reference 2. This method is classed as an alternating-direction implicit method which has the advantages of being implicit, stable, and amenable to rapid solution. This method involves the alternate use of two finite-difference analogs to equation (1). In the first finite- difference equation at time T the analog to one of the second derivatives - a 2 for ~ ax2 ' e a"T example, is written at the new time 7 + AT, and the analog to the other derivative BY is written at the old time T. Therefore, this equation is implicit in the x-direction (row) and explicit in the y-direction (column). 7 Sketch 3 In the second finite-difference equation, at time 7 + AT, the analog - a2T is BY2 written at the new time T + 287 and the analog to -2 is written at the old time ax T + AT, The second equation is implicit in the y-direction (column) and explicit in the x-direction (row). Using the two equations alternately results in a stable solution for any ratio of time increment to space increment as long as the same time increment is used for the successive application of the two equations. The time increment may be changed after the successive application of the equations. Equation (4) and the boundary conditions, when approximated by finite differences, lead t o L sets of S simultaneous equations for a column solution and S sets of L simultaneous equations for a row solution. These equations take the form BITl + C1T2 = DI AjTj-I + B.T. + Cj 1 3 1 (2 5 j 6 (N - I)) (6) AN-lTN-l + BNTN = DN J where N is equal to S or depending upon which finite -difference analog is applied. 8 Since the coefficients of equations (6) form a tridiagonal matrix, this set of simul- taneous equations can be quickly solved for temperatures. The method of solution based on the Gauss elimination method is discussed in reference 3. The coefficients of equations (6) are temperature dependent. Therefore, an itera- tion on these coefficients is made to obtain a temperature solution. OPERATION OF PROGRAM The physical problem to be modeled with the analysis is described by the FORTRAN input variables listed in a subsequent section. For example, the external body geometry is described in the w,z coordinates (sketch 2) which correspond to the input variables RS and ZS; material density corresponds to the input variable RO; and the stagnation cold- wall heating rate corresponds to the input variable QCTAB, which is a time-dependent array. Other input variables are required which control the solution, specify boundary conditions, and determine output from the program. These variables are listed in a subsequent section. This section describes the various boundary conditions that are available and a plotting routine that may be used with the output. The computation of the computing interval is also discussed. Boundary Conditions Along Front Surface An energy balance at the surface is where the t e r m s on the left of the equality sign represent energy input to the surface and the t e r m s on the right represent energy dissipation at the surface. The energy input may be any combination of convective heating, radiant heating, and the heat resulting from combustion. This energy input is accommodated by the heat conducted away from the surface and any combination of the heat radiated from the surface and the heat absorbed by sub- limation. The quantity of energy involved in each process is specified by the values assigned to the FORTRAN variables associated with that process. For example, the 9 variables associated with the radiant heating rate qr are all of which define the radiant heating to the body with time, The pressure and the convective and radiant heating rates are functions of the body shape and also vary over the body surface. The changes in qc and qr at the stagna- tion point and the changes in pressure, qc, and qr around the body are computed within the program by setting IADJUST to a value greater than zero and specifying values for the variables defining the flow field and the body geometry. If IADJUST equals zero, then the variation of qc, q,, and the pressure over the body a r e tabulated as QRAT, QRRAT, and PRAT, respectively. Equation (7) shows that the mass loss due to combustion mc and mass loss due to sublimation ms affect the energy balance. This effect can be specified by either trans- piration theory (P = 0) or linear ablation theory @ = 1). The rates of mass loss by both oxidation and sublimation are computed at each time step. However, only the larger of the two is used. The rate of mass loss by combustion may be specified by a half-order or a first- order oxidation equation. The input XORDER specifies which equation is used. The equation f o r a half -order oxidation reaction is (eq. (15) in ref. 1) where = qc (1 l{-)$ - (1 - 8)F.c S%( a c m c + asms)- 0.084()2 3 ((ucmc + asms) 4cu cmc +..ms)($)] (9) and K = Ace -Bc/Tw The equation for a first-order oxidation reaction is (eq. (16) in ref. 1) 10 mc = qC,netX The rate of m a s s loss by sublimation is (eq. (17) in ref. 1) Boundary Conditions Along Back Surface and Edge of Body Several boundary conditions may be specified along the surfaces at y = 0 and x = Xb. These conditions are a constant-property heat sink, radiation from these surfaces to a surface at a specified temperature, or any combination of these. A heat sink along the back of the body is specified by the inputs CPDP, RODP, TDPRIME; along the edge of the body, by CPP, ROP, and TPRIME. Radiation from these surfaces is specified by the inputs EPSONPP, EPSONEP, and TBTAB. Output Plotting Routine The plotting routine for this program is convenient for studying the results of calcu- lations. This routine is activated by setting PLOT equal to an integer greater than zero. The following plots are generated: (1) RSS versus ZS at times listed in the PLTIME table (this plot shows the body geometry), (2) MDOT versus X at each PRFREQ time, and (3) T(N) versus X at each PRFREQ time, where N is a specified row of temperatures. F o r example, to plot the temperatures of rows 2, 6, and 8, set the input NTP = 3, 2, 6, 8, where the 3 specifies the number of rows to be plotted. Other input quantities that must be specified are MDMAX, RSSMAX, ZSMAX, PTMAX, and PTMIN. These inputs specify maximum and minimum values which are used to get reasonable plotting scales. Sample plots are shown with example problems discussed in a subsequent section. The plotting routines used are from the CalComp software package. Plotter output is routed to a tape during job execution and after job completion is plotted on a CalComp digital incremental plotter Computing Interval Although the alternating-direction implicit method used for solution of the finite - difference equations has the advantage of being stable for any time increment, the choice 11 of a computing interval is impor nt, An initial and a maximum comput AU and are inputs for the program. er the application of a column and a row solution, the program computes an interval for the n two successive time steps. This is done by examining the number of iterations necessary for convergence at the pre- vious time step. If this number was (a) equal to 1, the computing interval will be doubled, but will not exceed DTM ; (b) equal to 2, the interval will not be changed; o r (c) equal to 3, the interval will be halved. This should not be confused with the input M T. If the number of iterations during a solution that is not a row solution exceeds MAXITT, the computing interval will be halved and the solution restarted. PROGRAM DESCFUPTION The computer program D2430 was written in FORTRAN IV language for the Control Data 6000 series digital computer under the SCOPE 3.0 operating system. The program requires approximately 70 000 octal locations of core storage. This section presents the program, its subroutines, and their variables. The vari- ables are grouped in labeled COMMON blocks PICK, INPUTS, and HOLD. Input data are loaded with FORTRAN IV NAMELIST. The variables in INPUTS (except the variable DUMMY) and in HOLD a r e also in the NAMELIST statement which appears in another section. Labeled COMMON The following list contains the FORTRAN variables appearing in labeled COMMON and the dimensions of the a r r a y for each variable. The notation is in the form A(m,n). COMMON FORTRAN Description label variable PICK A( 10,20) Elements in coefficient matrix for the column solution AA(20) AB( 10,20) Elements in coefficient matrix for the row solution ALP HA(20) a! B(20) Major diagonal elements in coefficient matrix 12 c N Description label variable PIC BS1(10,20) ajor diagonal elements in coefficient matrix for the column solution minus - aT t e r m a7 B S ~ Bio, ( 20) Major diagonal elements in coefficient matrix for the - row solution minus aT t e r m a7 c(10,20) Elements in coefficient matrix for the column solution CB( 10,20) Elements in coefficient matrix for the row solution CK(10) Temporary storage used to define the thermal conductivity at a half station CKETA(10,20) kq at the station CKxI(10,20) kt at the station COST(20) COS e CP(10,20) cP h2h3k,$ D(10,20) hl DC(20) Right-hand side of the matrix solution DELESQ (A111 DELETA Ar7 DELTA(20) 6 DELXI DELXISQ E( 10,20) h2 EIGHT3 Constant, 8.0/3.0 ELAM(2O) x ETA(10) 11 13 C Description PIC EXPG Computed constant used in computing new heating h2h3k57 - as F (10,20) h16 ax GG Computed constant used in computing new heating GIMACH Computed constant used in computing new pressure H 1(10,20) hl H2(10,20) h2 H3(10,20) h3 HC (20) AHS HCQMB(20) A% HE He HW(20) HW IFIRST Internal code; 0 for first time step in calculation, 1 for any time after first time step IRQCOL Internal code; 1for column solution, 2 for row solution ITC Number of iterations during the column solution ITR Number of iterations during the row solution ITT Number of iterations during a solution ITTO Total number of iterations from the initial time LM1 Computed constant (L-1) LM2 Computed constant (L-2) MCDQT(20) MDQT(22) MSDQT (20) 14 escription Constant 1.5707963268 Local wall pressure Adjusted convective heating rate qc %,net Heat due to combustion for oxidation Adjusted radiant heating rate qr Net heat input Nose radius t"p" cp"/A T ROPCPP t' p' cp'/ A T RSS(22) Coordinate used to define body geometry, w RSTO2 Computed constant, ratio of molecular weight of free stream to molecular weight of diatomic oxygen used in oxidation equation SIG Computed constant m SIGDP Computed constant m" SIGMA SIGP Computed constant (re ' SINT(20) sin 8 SM1 Computed constant (S-1) SM2 Computed constant (S-2) TAU Time at which calculation is being made TB Temperature to which back surfaces radiate T T (10,20) Estimated temperatures at T TWDELXI Computed constant 2 A( 15 babel variable escsiption Computed constant used in computing new heating V(20) Elements in coefficient matrix for column solution VB(10) Elements i n coefficient matrix for row solution X(22) Curvilinear coordinate XDXISQ Computed constant (xb A( 12 XODXI Computed constant Xb A( Y(10,20) Curvilinear coordinate Z (20) Elements in coefficient matrix f o r the column solution ZB(10) Elements in coefficient matrix for the row solution INPUTS DUMNIY Used in setting initial values of all inputs to zero All the variables in NAMELIST except TMIN also appear in INPUTS HOLD TMIN A minimum temperature value Descriptions, Flow Charts, and Listings This section identifies the main program and each subroutine in the program D2430. A brief discussion, a flow chart, and a listing for each are given. The numbers appearing in the flow charts represent a FORTRAN statement number in the program. The interpo- lation subroutines FTLUP and DISCOT a r e described in detail in appendix A. Program D2430.- Program D2430 is the control program. It reads the inputs, calls the subroutines to solve for the temperature profile, calls subroutines for plotting, and controls the iteration scheme for the temperature solution. The flow chart for pro- gram D2430 is given on the following pages: 16 Initialize conditions as function of I t I No 700 Increment iteration 1 count previous iteration 17 Q + time step 543 Increment time . 1 1:; Extrapolate t o ne% * 1 t o solve by opposite direction of previous 18 he listing for program 430 is as follows: PROGRAY 0 2 4 3 0 ( I N P U T I U U T P U T , T A P Z ~ = I N P U T I I A P E ~ = C U T P U T ~ T A P E ~ = Z O ~ ~ 1c0000 lTAPEf3.; 2 7 i 9 T A P E C - 2 0 1 1 zooooo C 3coooo C AX I S Y M V E T R I C A e L A T I C N PROGRAM 4c03cs C T H O - D I M E N S I O Q A L A B L A T I C N A N A L Y S I S FOR A X I A L L Y SYMMETRIC BODIES OF R F V O L U T I O N f;OOc;00 C AT H I G H H k A T I N G R A T E S ? C O h S X D E R I N G SHAPE CHANGE c;ou9oo C 700UOO C T H i S IS T H E V A I N PPCGRAM C - I T CONTROLS THE GENERAL FLOW CF PROGRAM BCO3CO 900UO@ CCMCON / P I C K / A ( 1 C 9 2 0 ) r A A ( 2 0 ) $ A B ( 1 0 1 2 0 1 9 A L P P A ( 2" I , B ( 20) 9 lCConOO 2 BS1(13,2C),BSLR(i~~~0)~C(~O~Z~~~CB 9 CIKl( G 1 D9 )29 0 CK)E T A ( l " Z D ) , 1100000 4 C K X I ~ ~ O ~ i 0 ~ ~ C O S T ~ 2 3 ~ ~ C P ~ l J ~ Z ~ ~ ~ D ~ 1 0 ~ 2 ~ ~ ~ 10 230 ~ c~CD2 O ~ ~ 6 D E L E S ~ ~ O E L E T A ~ O E L T A ( ~ ~ ~ ~ C ~ L X I ~ ~ E L X I S C ~ E ~ ~ C ~ ~ ~ ~ ~ E I G1 3H5 T0 V~CVl 8 E L A M ( 2 3 ) 9 E T A l I C ) t E X P G 9 F ( ~ ~ , ~ O I , G G I G I M A C H , H ~ ( r~H 2 ~ (~? C~ ,?Z O ) ) 9 14.3GOQ9 A H 3 ( 1 C l 9 ? 3 1 r H C ( 2 5 l r H C O M 8 ( 2 0 1 r ~ E ~ H W ( Z O J ~ I ~ i R S T ~ I f f IOT CC O r ILT R~, ITTq e 5CP000 C I T T O , L Y l vLM29 C C D O T ( 2 0 ) ,MCUT ( 2 2 ) q M S D O T ( 2 0 ) 9 P I 0 2 q P R E L O C ( 2 9 ) v QC ( 20)q L ~ ~ O C O O E C C 1 9 Q C i r l E T ( 2 0 1 p G C C M R ( 2 0 ) ,QK( 20 I , Q R l , Q S ( 2 C ) pffNS9RODPC 9 4 0 P C P P 9 1730C00 G RSS(ZZ)rRST02rSIG~SIGDP,SIG~Ar~IGP,SINT(2O)~SFl~S#29TAUqTBr i800003 I T T ( i 3 9 2 3 ) 9 T T F ( 1 0 9 2 3 ) r T W D E L X I 9TklOGI c V ( 201 r V B ( 1 0 ) q X ( 2 2 ) 9 X O X I S Q q 1 9 o c c co K XCDXI,Y(i5,20)rZIZO),ZBI~O) 2GCOOCO COMMON / I N P C I T S / D U M M Y ( i ) , A E X P 9 A L C T A R l 1 0 ) , T T A L C ( 1 0 ) P H A L P H C ~ N A L P H C I 2130303 , 2 A L P H A T ( 1 G I T A L P H A (10I ,MALPHA t NALPHA V A L S T A BI 10 9 T T A L S( IC 1 , Y A L P H S P ZtG0000 4 NALPHS,ASEXP,BETAIBEXP,BS€XP~CE~CKETATB(~~)~TTCKETAI~O), 2_"00L'CG , 6 E T A T A B ( 5 , h C K E T A 9 N E T A , C K X I T A B ( 50 1 9TTCKX 11 iC ) + X I T A B ( 51 ( N C K X I 24000GC 8 N X I r C 9 R D S Y 9CPDP (CPPICPTAB (10)r T T A B C P ( 1 0 1 t MCP I h C P 9 D E L T A O ( 2 0 I t 2 6.2 QG 3 1 A DFLTAUrDFLTMIhrDTMAXo( T T E L A M ( 7 ) ,PELAM(&) 9hELAMq 26JOFC2 , C N P E L A H 9 E h D T A U (EPSCNE EPSONE P t EPSCNPP,ERRORTrGAMBAR, G A M I N F t 27oaooo E ~COM%TB(i8),TTHCOMB(7)tPHCOMBl4~~NHCG~R~NPHCCCBq~CTAB~28~, 2 8000 00 G TTABHC(7lrPHC(41~NHC,NPHCrHETAB(1O),TTABHE(~C)9M~~,NH~~HUTAB(l5~, 2 9c1'0C.00 I TTABHW(15)~MHW~NHW~IAOJ~ST~IPL~TrL~MACH~D~VAXITT~VD~AXr 3P30001 J MDCTOI2O)v 31ooecc K #h@2,Y h S ? R 9 N T F ( 7 ) 9 P L T I M E I 1 5 1 9 P R A T ( 2 O I ,PRFREQ,PSEXPgPSTAGTB(iQ 1 9 32cmco M T T P S T A G ( 1 C ) 9 MPSTAG, NPSTAGePTMAX, P T M I N ,QCTAB( IC B ( T T A B Q C ( IC 9 MQCv 3300000 N NGCtQRAT(23) t 3 4 000 0J 0 GRRAT ( 2 0 )PQRTAB ( 5 0 ) 9 TTABQR( 1 0 r MQR qNQRqRI 2 0 ) r R I EXP q R N S I ,RCipRODPt 3 53cuco Q RGP 9 R S l 2 C ) 9R S SMAX 9 S r STE BCL t T I 1 3 ( 2 0 ) 9 TAUC ( T B T A R ( 1 C I9 TT A B T R I 10 1 7 36t00CO S M T R ? NTB, TDPP I C E * T H E T A ( 201 ,T PR I M E r XOI XCRDE R I Z S ( 2 0 1 r ZSYAX 37C0'3GO DI P E N S I O N O E L T (101 2 3 ) 9 ZZ ( 2 2 I r Y 3 I - t 2 3RCOGC10 R E A L MDOTCqMDOT,NCD3Tq YSDCT q Mk STR 9MW02 9 MACH~DIFDMAX 3 9 3 G O 00 IhTEGGR s v S V l v s p 2 4CLOc.00 DATA XLAB€L,YLABEL,XZL,YfLtY3L/ ~HZB~~HRSS~IHXI~~MDO~,:~HTEMPERATU 4 :C0000 IRES/ 4;co~eo NAMELIST / 0 2 4 3 0 / AEXPvALCTAB9TTALC,MALPHCrhbLPHAT( 43:GOCO 2 TALPt+A,MALPHA qNALPHA p A L S T A B v T T A L S 9 M A L P H S t N A L P H S qASEXP 9 44cc0C.o 4 B E T A , B E X F ( B S E X P ,CErCKETATB9ETATABeTTCKETAtNCKETArNETA 9 45C3GC9 6 C K X I T A B , X 1TAB.TTCKX 1, NCKX I v N X I pCORDSY , C P D P v C P P , C P T A @ t T T A B C P 9MCP9 46@0PI?0 S NCPpDSLTAO, D E l T A U I D E L T # I N , D T M A X t ELAMTB9 T T E L A M qPELAMvNELAM,NPELAMp 4730oco 3 E N D T A U q E F S C h E rEPSONEP (EPSCNPP ? ~ R R a R T , G A p B A R t G A M I N F , ~ C C ~ B T B , 48:OO 00 A TTHCOFB9 PHCOYB. NHCUMB9NPbCGHB qHCTAB,TTABHC 9PHC qhHC vkPHC ,HETAB 9 4 900 3 C.3 C TTABH_~M~E,NHEIH~TAB~TTABHW~MH~,NHW~~ADJUST,IPLOT~L~MACHNOI 5OO0001 E MAXITT9MCMAX,MCOTO9Mh~2,M~STff,~TP9PLTIME9PRAT,PRFRE~9PS~XPr 5 1 C0'100 G P S T A C T U 9 TTPSTAG qMPSTAGp NPSTAG (PTMAX t P T M I N r Q C T A R 9 T T A B Q C , YQC. 52COOOO I h Q C 9 QRAT (QRRAT, PRTAB. TTAEQR 9MQAvNQR t R p R IE XP , R N S I 9R0,RCOPqROP ,RS9 53300GO K R S SMA X S 9 STE R C L 9 T 1 T A U 0 9 T R T A B 9 T T A B T B 9 MT R r N T B 9 TOPR I ME 9 T k E TA 9 5 4 u 0 c c 13 M T M I N v TPR IME, XC, XUROER 9 Z S q Z S M A X 5 5 000 l?0 CCFFCIN / H C L D / T C I N 56coooo TV I N SO. 5 7JCOCO DC 10 I = l r F 3 4 5 eOOOOl 10 DUMMY(I)=C.C 5900000 DT MAX= 2 1 403OUCO 1 READ ( 5 9 1 C C ) 6 1 COCO'? 1 3 0 FORMAT (8CI- 6200000 1 1 53C900C I F (€OF951 293 5LOOG00 2 STOP 5 5 cog @O 3 READ ( 5 9 0 2 4 3 0 ) 6COOOCO WRITE ( 5 w C 2 4 3 3 ) 7000(300 WRITE ( S p i C C 1 7ieooco C 72CCCC0 C S E T I N I T I A L VALUES 73COOCn 19 C 7430000 NNTP= N T P ( 1 I 7500009 02 = l e 5 7 C 7 9 C 3 2 6 8 7650000 TWO G I = 2r0 /((GAMINF * 110) M A C H ~ O**2B 7700000 EXPG =(GAlr”@AR -. l r O ) / GAMBAR 1000300 GXMACH= Ir/lGAMINF* WACHNO * * 2 ) 7900000 GG= S Q R T i EXPG * * (110 + T k O G I ) (110- G I M A C H I ) 8C00000 GG= SQRT IGG) * 2.0 81 COO00 INCP=O 8200000 IRGW=3 8300OCO IDT=l 8400000 DTAUO=l.O d500000 DTAUl=DELTAU 0600000 IRGCOL =l inooooo C WILL P R I N T IJNLY A F T E R A COLI AhD RCW C C M P U T A T I O N H A S B E E N MADE 08COOCO TAUOO= TAUO+ PRFREQ 89COOOC ITTO=) 90COCOO DO 11 M = l r S 9100000 DC 1 1 N = l , L 9230300 C E L T ( Y c N )=1GO3. 9330000 11 T T ( P p N I = T ( C r N ) 9400000 DELTAU=OELTAb/2e 9500000 TAU=TAUOtCELTAU 9bC0000 IFIRST=O 9 7C 00 00 ITT=1 90GOOCO L M l = L- i 9 w e o 00 A L M l = L b’l 10000000 L M 2 = L- 5 10l00000 S M l = 5- 1 102C0000 SM2 = 5- 2 103000CQ DELXI = l a /ALMI 1odtooooo DELX = X O / A L V l 105 00 000 RST02 = YkSTR/Mk02 10600000 X(1) =3a 107300 00 DC 12 N = 2 9 L 1O0COOCCI 12 X ( N I = X ( h - 1 ) + OELX 10930000 D E L E T A = T./SMl ll0COOOO D E L X I S O = C E L X I **2 11x 00000 D E L E S Q = D F L E T A 4*2 11200000 TWDELXI = 2eO* C E L X I 11300000 E IGHT3=8.C/3. ‘3 1140OOO.O DO 1 8 M = l r S 11509000 AC=M-1 11600000 l a ETA(MI=DELETA*AW 11700000 SIGPA=STEL?CL 1183OOCO S I G = S I G C A + EPSONE 11900@00 SIGP = S I G P A * EPSGNEP 120D0000 SIGDP= SIGMA * EPSGNPP 12 1c 0000 xuoxr = xo * DELXI i2230000 RODPC = TCPRICE*RODP * CPCP / D E L T A U 1 23 3 0 0 0 0 ROPCPP = T P R I Y E * * ROP CPP/ DELTAU 12400000 RODT= R O / D E L T A U 12500000 X D X I S Q = XC**2 * DELXISQ 12600000 DC 22 N=:rL 1 2 7 C O O 00 MGOT(NI=MCGTGIhI 12800300 lr”CGCT( N ) = F G C T G I h t 2290OOOO MSDOT(N)=MDOTOIN) 13ccoc00 2 3 D E L T A ( N ) = CZLTACtN). 131COO00 THETA(Y)=eCL74532925*T~ETAIN) 132ir0000 S I N T W I = SIN(THETA(N)) 1330000C Z Z ( N ) = ZS ( h l + C E L T A O ( ~ ) * S I ~ T ( N ) 134COCGO li C O S T ( Y ) = C C S ( T I - E T A l N I I 135c0000 I F I I P L U T a E G o ? ) GO TO 23 13600000 C P L O T B A S E CURVE IF P L C T T I N G IS C A L L E D FOR 1 3 7 3 0 3 OC REWlNO 7 1380OOC70 REGrIND 3 13SC0000 REkINO 3 14C30500 20 C A L L CALCCPP 14 10 3 C 013 IPLT=L 142C0000 IPLTK='I P43000C3 I F (CORi3SYeahEaC) G O TO 2 2 5 9 1440000fl WK I T E ( 7 t ( 2 Z ( N 1 AS ( N ) ,hi = I 9 L ) 14550eco GO TO 2 3 146 C 0'100 2 2 5 3 WRITE ( 7 1 f Z S ( h I , D E L T A ( N ) e h = l t L I 14 7C OOGF C 14800000 C COMPUTE H-S 149C00 00 C 15C00100 2 3 DC 2 5 M = l q S 3 5kCOOOO DO 2 5 N = l , L 15 2C 00 30 Y ( C, N ) =ETA (P I * D E L T A ( N 152 303 00 H l l M V N l = 1-0 + E T A ( M I * D F L T A ( h I / R ( N ) 1540CC@0 HS ( C , Y ) = l * 155fOOCO 25 H 3 ( M , N l = R S ( N ) + Y ( M v A I * C O S T ( N I 15600000 9 5 DO 101 M=I.,S 157COOOC DO 101 N = I , L 158C3CC.O CALL FTLUP (TT(M,Nt,CP(M,MI,CCP,NCP9TTA8CF,CPTA~) 15900c00 C A L L DISCCT (TT(M,NI,X (NIvTTCKXI ~CKXITAAIXITAB~~~,NCKXI~NXI~ 16C000CO lCKXI(Y,RII 1 16 100000 1 3 1 C A L L D I S C C T ( ' T T ( M v N 1 r Y ( Y p h ) 9 T T C K E T A r C K E T A T B * E T A T A F t I! 9 N C K C T A q N E T A r 162 00000 E C K E T A ( "IN I 16300000 A A ( 1I = l ) r 0 164J03C0 DO 103 N = Z r L M l 16C 000 00 L 7 3 AA ( N I = ( 0 E L T A ( h+ 1 1 -DELTA ( N- 1 I I / ( T WDELX I *XO ) 1565OOC0, A A ( L 1 s t 3r [ * D E L T A ( L )-4c O*DE L T A ( L Y l I + D E L T A (LM2 1 / I TWDELX I * X C ! I 157030 oe oc 110 h = l ,L 168COOGO DO 113 M = l , S 169C 00 SO D(MvN)= b2(MpNl*H3(M,N)* CKXI(M,NI/Hl(MpNI 17030000 EIP,N)= k I ( M r N ) * H3(M,h) * CKETA(M,NJ / HZ(M,NI 17 15 0 3 OC1 * 1 1 0 F ( M r N I = D I C c N ) t T A ( M I +A A ( N 1 / D E L T A ( NI I72 3OC00 C A L L SQ4EFC 1730OQ00 GO TO (31Cq323), I R D C O L 17400000 31 9 C A L L CC?LUVtx 175000CO iTC=ITT 1760OOCO IFIRST=l 17700CCC GO TO 355 17800000 320 C A L L ROW 179300GO ITR=ITT 18000000 I F ( I R O W e E C e O I IROW=2 18! 00000 3 5 0 CCNTINUE 18 2.303 00 C I F ANY TEMPERATURES AGE N E G A T I V E STOP C A L C U L A T I O N S 183 ooooc DO 369 rJ=l ,L 1B*COCCC DO 36.3 Y=lrS 18 533nco I F ( T T F I M , h ) e L E e O l GO TO 411. 186@000@ 350 CONTIYLJE 18 730000 C T E S T TO S E E I F TEMPERATURES HAVE CONVERGED 188003CC1 C 1 8 900300 ITTO= ITTO+l 190330CO DO 400 N = l cL 19 10f l G0') DO 400 M=l,S 19200000 ABSTT-ABS! T T ( M cN I I 193COGCO ABSTTF=4BS(TTF(M,N)) 194COOPC TkST=ABS(A8STTF-A@STTI/ABSTT 1950330G rF (TEST -ERRCRT) 4cc~40c.703 196000C0 430 C C N T I N U E 19730OCO C 19800000 C COMPUTE MD'IT 19900JGC C 20c000cO C A L L SQ4EGOF" 201000C3 C COMPUTE D E L T A 202coc00 DO 410 N = I v L 20300000 DELTA~N~~CELTAClNl~~MCOTCo+MD3T~N)I*DELTAU/~~~O~RO~ 204OOCOC C R E S E T D E L T A 0 Ah-D MDCTO 205000c0 410 MDOTOI N I - P C O T 4 Fc 1 20600000 C I F D E L T A BECOPES L E S S THAN D E L T Y I N ( S D C E M I N I M U M D E L T A I N P U T ) STOP 207F0300 21 C THE C A L C U L A I I C h S 20800000 DO 4 1 2 h=?.*L 209000C0 GTo D E L T M I N ) GO TO 4 1 2 2 1000000 41 1 C A L L Z P R I h T 21I00000 STOP 21 2 0 0 0 0 0 412 C C h T I Y UE- 2 13 2 0 0 O C I F ( I N O P e E P m l I GO T 0 418 214i30000 I F ( T A U e L T s T A U G C 1 GO TO 420 2 1 500000 I F (IR3COL.EQ.l) GG TO 4 1 8 21600000 INOP=l 217 G 0 0 0 Q GO TO 4 2 0 21800000 41 8 I N G P = 3 21900000 TAUOO= TAUCC+ P P F RE Q 22000000 C 22100000 C 52200500 CALL Z P R I h T 22300000 C 224GQOCO I F ( I P L O T e E Q e J I GC TO 4 2 0 2 2 5300@0 IPLTK= IPLTK + 1 22 60 0000 WRITEIS) 1 PIDOTINJ, N = l , L J 2Z7C0000 I F ( N N T P e E G o G ) GO TO 4 2 0 22800000 OC 419 M = L r N N T P 22900000 I= N T P ( M + Z ) 2300000G 41 7 W R I T E ( 9 ) ( T T F ( I t h i ) r N = l 9 L ) 2 3 1coca0 4 2 3 I F (IROW-I 1 5 4 C t 4 9 0 . 4 8 4 23200000 4 a4 D E L T A U z D E LTAU*2.0 23300300 IROW=L 23430000 KFRE=KFRE+L 2 3 5 0 0 0 00 C 23600000 C O R T A I k D E L T A U PS A F U N C T I @ N OF I T E R A T I O N OF P R E V I O U S T I M E STEP 237 00000 499 D T A U l = D F L T A I J 23800000 I F ( I R O C O L o E Q e l I GQ TO 5 4 6 239000CO IF ( I T T - 2 ) 455954C9530 24030000 4 3 5 OELTAU=ZeC * D T A U l 24100000 I F ( D E L T A U o G T o OTMAXl DELTAU=DTMAX 24200aoo GO TO 540 243C0000 5 3 0 DE LTAU=[l TP L 1/ 2 a 24403000 IF I O E L T A U o C T r l e E - 6 ) G O TO 9 6 0 2450OOQ0 5.40 T A U 0 = T A U 24600000 C C t i E C K TO S E E IF IT IS T I M E T C P L O T 2 4 7000 00 I F ( I P L J T r ECe 3 1 GO TO 543 248000C0 I F (TAU.LTePLTIb’E(IPLT)) GO TO 5 4 3 24930000 IPLT=IPLT+1 25000%32 I F ( C Q R O S Y e N E a ? ) G O TO 5 4 2 25 Z COOGO WRITE ( 7 ) ( Z S ( h ) , R S S ( h ) v N = L , L ) 2 5 2occoa GO TO 5 4 3 253C0000 5 4 2 WRITE (71 ( Z S ( h l , D E L T A ( ~ l r N = l , L ) 2 5 4c o o m C 25500000 C I V C R E M E N T T I M E A N 0 REPEAT C Y C L E A L T E R N A T I N G ROW AND CCLUMN S C L U T I O N 256COOCO 5 4 3 T A L = TA U+D E L TA U 2 5 7000CO RGGPC = TCPRIPE+ROOP * CPDP / 3 E L T A U 25830000 POPCPP = T P R I C E * k 0 P 0: C P P l D E L T A U 259COOCO RODT= R O / C E L T A L 26000000 IF ( T A U e G T s E N D T A U I GO T C 050 26 l O O O 0 Q C 262COOQ0 C E X T R P P C L A T E T L GET NEW GUESS T E Y P t T T ) 24300ao~ C 26400000 00 4 4 6 M = Z , S 26500000 00 445 N = 1 9 L 2btC0000 D E L T (M 9 N )=10Qi). 26730000 DE L T N = T T F ( C , N l -T ( M cN) 240GCO CO T(MvNI=TTF(#vN) 26 900Q00 4 4 6 TT(MpN)=TTF(M,hl+(DELTAU/OTAUl ) * D E L T N 27060000 GO T O ( 3 3 C 9 6 5 0 ) 9 I F O C O L 2 7100000 -7 3- ’*2 IRGCOL = 2 27200000 ITT=l 27300000 GC TO 2 3 ~ ~ O O G O 22 6 5 3 IROCOL = 1 27 50 0GOO ITT=I 27eCOOCC GO TO 2 3 277C3000 C 278GOOCO C TEMPa DOES M 7 T WEET E G R O G C R I T E R I A 9 MUST I T E R A T E A G A I I \ 2753000U C Y f L I GUESS IS TEMPu C F PREVICUS I T E R A T I O N TT =TTF 280001‘00 C 28100tC3 7 3 2 I T T = I T T *l 28203CC0 IF (ITT - MAXITT) 7559765,80C 28 3 39ocL‘ 28400303 7 b 5 00 7 2 3 V = l r L DC 727 M = l t S 28530000 DELTl ABS(TTF(M,h)- TT(PqkII 286000CO I F (DELT1.LT.iOe) GU T’3 718 287~aooo IF ( O E L T 1 -DELTIM,NI) 718r75C9750 2 8 8 C,0 0C 0 71 8 D E L T ( Y e N I = C E L T 1 589OOOCC 7?9 C O N T I V U E 29OCGOCO DC 730 M=! V S 5 91ccr,cc DO 7 3 0 N=’L#C 29 25 C 300 7 3 3 TT(M,YI= T T F ( M 9 N I 293200 00 GO TO 9 3 294CCOSrJ 750 IF ( I T T . L T . 3 ) GO TO 718 295?00PO C 2960000C C PROGRAMED STOPS 297000CO C 298000CO WRlTE 45,7521 29900OOC 752 FORMAT [*CTEMPERATURE IS D I V E R G I N G ----- WHY*) 300COCOC 30 1GOGCO 758 WRITE ( 6 . 7 5 5 ) 7 5 9 FORMAT I * C T T ( M q N ) * I 30230000 DC 765 M=L,S 30 3C 03GO MY=S-( M-1 I 304500CO 7 5 5 W R I T E (5,766 E T A ( I’M) 9 ( T T ( M M I A I c N = I r L ) 3 0 5 700@O 756 FCRMAT (FC.3 , j X 1 5 F 8 . 1 / ( 1 2 X e 1 5 F 8 . 1 ) I 30ss0’)c3 WRITE 1 6 , 7 6 7 3 IROCOL 3070006C 757 FORYAT (*CIROCCL=+I3) 30 8 3OOCO CALL ZPRIhT 3309Q0000 1CSO3CO STOP 370 I F ( I R O C O L e E Q r l ) GO TO A C ? 3?.1COcIC0 URITE (6tf?flI 3 12507GC 8 3 1 FCRMAT [ * ? T H I S IS A RCW S O L U T I O N * D E L T A U C A N N 3 T CHANGE) 31330CCO GO TO 7 5 8 314COI)FC C 3 1 5 0 3 3 00 853 DTAUL- 3 E L T A U 3160COOO O E L T A U = CELTAU/Z.O 31 7GOOOC W H I T E (5,FCSI D E L T A U ( T A U 31 8307C0 9 3 5 FCRMAT (*CI D I C IT-- DELTAU=*il4.5,~TAL=~E:4.5) 319ciOi100 I F (DELTAU. L T . 1.E-6) GC T O 933 32c00000 TAU = TAU - OC A 1 5 Y=’i r S OELTAU 32130000 322COCO3 00 813 Nz1.L 32300000 DELT (Y 9 N I=1GCOr 32 4 C O C 00 91C T T ( M * Y ) = T~FLINI ?250DOOC! ITT = 1 326CCCGO GO TO 9 5 3 27c 00@5 573 W R I T E (6vQOl) 32850COO 951 FORMAT I * O T E Y P E R A T U R E I T E R A T I O Y DOES k O T CCNVERGE*) 32900COP G G T C 759 3 3 0 30000 C 3 3 1I)OCOC C PLOT Z S VS. R S S v X V S MCOT t X V S BACK SURFACE TEYPERATURE 33i3000c C 3 3 3conco 23 9 5 3 CALL E P R I R T 33400000 I F (IPLOTeEGu3) GO TO 1 33530?00 END F I L E 7 33t00C00 END F I L E E 3 3 7C.30 C5 END F I L E 33801)CCO REWIND 7 3395OiOO REWIhD 8 34000000 REWIND 9 341 5OOCO IEC = 3 34200000 D O 960 M = l v T P L T 343000C(L READ ( 7 ) ( Z Z ( N ) r RSS(b4) , N = l , L ) ?44CCrJCC: IF (MrEQeIPLT b I E C =I 3 4 5 O O C PO 95'3 C A L L I Y F D F L T ( I E C I L I Z I ~ I $ R S S v 1 , 3 r , Z S M A X , O r r R S S M A X ~ l r r ~ ~ ~ X L A B E L ~ 1 @ ~ 346C0CCO 1 YLABELqO) 3473ccco I E C =O 3 4 8 E 00 GO DO 97J M = l , I P L T K 34950000 READ(81 ( CCOT (N I 9 N = l v L 1 3 5 C 900 00 IF IMeEQrIPLTK) IECp 1 35 1 xocs 3 7 3 C A L L I N F O F L T ( I E C , L ~ X , l , M C O T ~ l r 3 r ~ ~ ~ 9 ~ ~ ~ M D M A X ~ 1 r ~ ~ ~ ~ X 2 L , ~ C3 5~ 2YC O2 OLC ~O O ) IEC =3 35.3 5@ C 00 I F ( N W T P r E C e C 1 G O TO I 354COCOC DO 5 9 3 M = ! , I P L T K 3 5 5c.o oc3 ISYM=lO 35tJOC'OC DC $83 I = r i N N T P 35750GOC RtAD ( 3 ) (ZZ(Nlrh=lrL) 35PLOtjl-3 IF ( M a E Q r I P L T K S A h D . I r E Q r N N T P ) IEC =I ?50:ocio ISYM= I S Y V + 1 3 6 P 30? 3 G 3 3 0 C A L L I N F O F L T ( I E C , L ,X 9 1, ZZ q 1.3- 90. I P T M I N ~ P T Y A X I I9 ~10 T X Z L r Z 0 9 Y 3 L 9 36 I G D C O r ) 1 ISYM) 3622GCCc3 9 7 5 COhTIhlUE 363COGCO GO TG 1 36400060 END 355i 0 p c s Subroutine COLUMN. - Subroutine COLUMN calls the appropriate routines t o com - pute the coefficient for the matrix solution and to solve the tridiagonal matrix for each column of temperatures. The flow chart for subroutine COLUMN is as follows: CALL c o x 0 Compute CALL SOLMAT Solve for TTF for column 1 24 Solve for TTF for The program listing for subroutine COLUMN is as follows: S U B R O U T I N E COLUMN 36600000 C 36700000 C S O L V E S T k E M A T R I X COLUMN BY COLUMN FOR ONE I T E R A T I U N 36800000 C SOLVES M (NO. OF R O k S ) SETS OF S I M U L T A N E O U S E P U A T I C N S N (NO. OF COLUMNS) 36900000 C TIMES T H E N RETURNS TO M A I N PROGRAM TO T E S T FOR CONVERGENCE 37050000 C 37100000 CCMMON / P I C K / b ( l C v 2 0 1 v A A ( 2 0 I r A E ( 1 0 9 2 0 ) r A L P H A I 2 0 ) 1Bf20) 9 37200000 2 BS1 ( L O 9 2 C 1 r BSl 8I 10 $20I rC( 10 920 1 * C R ( 10 920 1 r C K [ 10 ) r C K E T A l l Q 92.0 1 9 37300000 4 CKXI~l0~201~COST~20lrfP~l~~2O~rD~lO~2Ol~DC~2O~~ 3 7400000 6 DELESP~OELETA~OELTAI2O~~O~LXI~DELXIS~~E~lO~2O~~E~GHT3~ 37500001 8 E L A M ~ ~ ~ ~ ~ E T A ~ ~ ~ ~ ~ E X P G F F ~ ~ O ~ Z O ) , G G I G I M A C 37630090 H ~ ~ ~ ~ ~ O ~ ~ ~ A H 3 ( l O ~ 2 0 ~ ~ H C ~ 2 0 ~ r H C O M ~ ~ 2 C ~ ~ H E ~ ~ ~ ~ 2 O ~ ~ I f I R S T ~ I R O C O L ~ 377500GO I T C ~ I T R ~ I T T ~ C I T T O p LM1rLM2 9 MCDOT 20 J 9 MOOT ( 22) 9 MSDOT ( 20 1 9 P IO2 9 PRELOC I2 0 1 r QC ( 20 1 9 37800000 E P C ~ ~ Q C N E T ~ ~ ~ ~ F Q C O M B ~ ~ ~ ) ~ Q R ~ , B R ~ ~ Q S ( ~ ~ ~ ~ R N S ~ R O ~ P37900000 C ~ R O P C P P ~ G R S S I ~ ~ ~ ~ R S T ~ ~ , S I G ~ S I G D P ~ S I G M A V S I G P ~ S I N T ( ~ O ~ ~ S M ~ ~ S M ~ ~ T38000000 A U ~ T B ~ I T T I 10 920 ) ( T T F f 10 920 1 9 TUDE LX 1 9 TWOGI r V I 2 0 9 Vf! ( 10 1 9 X I 2 2 r XDX ISQ9 3 8100000 K X C D X I 9 Y ( 1 0 9 2 0 $ 2 ( 20 I 9 ZB f 101 38200000 COMMON / I N P U T S / DUMMY ( I 1 ~ A E X P I A L C T A B ( 10) , T T A L C ( l O t t M A L P H C v N A L P H C 9 3 8360000 2 ALPHAT(1Cl~TALPHA(lGJ~MA~PHA~NALPHA~ALSTAB~lO~~TTALS~lO~~MALPHS 38450000 ~ 4 NALPHS, ASEXPI B E T A * B E X P , BSEXPI C E * C K E T A T B ( 5 0 1 r T T C K E T A ( 101 9 38500000 6 ETATAB(~~~NCKETAINETA,CKXITAB(SO~~TTCKXI~~O)~XITAB~~~,NCKXI~ 38600000 8 N X I ~ C O R D S Y ~ C P D P ~ C P P ~ C P T A B ~ l O ~ ~ T T A B C P ~ l O ~ ~ M C P v N C P ~ D E L T A O ~ 2 O ~ ~38800001 A DELTAU,DELTMINIDTMAX,ELAMTB(~~~,T~ELAM(~~,PELAM(~~,NELAM* 38800002 C NP E L AM 9 ENDTAU 9 EPSONE 9 EPSONE P 9 EPSONPP 9 E RRORT r GAM0 AR 9 C-A M I NF 9 30 900Of30 25 E 390t0000 G 39 100 0 00 P 39200001 J 393 300 00 M 39400COO M 39500000 N 39600000 0 39700000 Q 39800000 S 3 99C 0000 REAL M O O T C q M D O T ~ M C D O T ~ M S D O T ~ M ~ S T R , M ~ O 2 q M A C H N O ~ ~ O ~ A X 40000000 INTEGER S 9 S M 1 t SM2 40100000 C COMPUTE COLUMN 1 40200000 N1 - 2 40300000 N2 =SM1 40400000 CALL coLxc ( l u i , ~ 2 ) 40 5ooc GO CALL SOLMAT ~ A ~ l ~ l ~ r B ~ C ~ l r l ) r Z t l ) ~ V ~ l l r D C ~ T T F ~ l ~ l ~ ~ S ~ 40600000 C COMPUTE COLUHh 2 THRU LM1 407COOG0 DO 300 N=Z*LMl 40 EO00 00 CALL COLMll INlrN29NI 40900000 CALL SOLMAT ( A ( ~ ~ ~ ~ ~ B ~ C ( ~ ~ N I I Z ( N ~ ~ V ~ N ) , D C I T T F ~ ~ ~ N ) ~ S ) 4100 00 00 300 CONTINUE 41100000 C COMPUTE COLUMN L 412000GO CALL COLXL(NlrN2) 4i3oaooo CALL SOLMAT ( A ( l ~ L ) , B ~ C ( l r L ) r Z ( L I I V I L l r D C i T T F ( l 9 L ~ ~ S ) 41400000 630 RETURN 41500000 END 41600aoo Subroutine ROW. - Subroutine ROW calls the appropriate routines to compute the coefficients for the matrix solution and to solve the tridiagonal matrix for each row of temperatures. The flow chart for subroutine ROW is as follows: COLMNbIN, COLXLM Compute for row I 26 Solve for thm S-1 The program listing for subroutine ROW is as follows: 4 1 7COC C O 4183CGCG 41$3OCCG 4 2C50000 4 Z I i;r)COJ 422 CO 3CF 4232CCC3 42430CCO 4 2 5 C O C C3 4 2 6 3 C C 0i 4 2 7 C O C 00 428COQCC 42 9 0 G 9 C C 4 3 G 3 OC C O 43 i C ?CCO 4 ? 2 t O C 00 433:ono3 434OO@PO 4 3 E.: of?C b 436C"CCC 4 37CW% 43SOOr'"l 43930CC2 4405DCCO 44i3tCCO 442COSt0 4430 00 C L 444corcC1 44 5 I? C' c-' C.0 4 4 b 2 3C OC 4473cc C G 44800CC3 4495cc c.3 +5Cc702C@ 45iCGCirC 27 4 5 2 3 0 IC'@ 2 453COLGO 454coccc 45506CCC 45ecc@c? 4 5 7000 CO 458COfCO 45QOOC'OO 46CCOCCO 461CC090 4bXOCOC 463COCCO 4 6 43 0 0 C 0 4 6 5 C CCO3 46OCOOGO 45 7c oc 00 46 8COO 00 45SGCOCO 4 7C 0 0 000 471COCCO 472SOOOO 473COOCC 47450CQO 4 7 F C O C cc 476tt>O0C 477L"OCCO 478CCCcPO 47900?50 48C2CCCO 48 1 ? C O C L7 48;GGCCO 483000CO 48400COO 485CCCW 486COCO@ 48700000 488cU13C9 4890OOCc) ~~LCOQCO 4 9 1 C 90PQ 492COOCO 497-ccccc 49~C0200 ~ ~ E ~ C C C O 496COCC.O 4 9 7200CO Subroutine COLXO. - Subroutine COLXO computes the coefficients of the tridiagonal matrix where 5 = 0 and 0 5 r] S 1. The flow chart for subroutine COLXO is as follows : Compute 28 (7 ENTRY COLXOX at 0 < ETA < 1 a t ETA=l e3 RETURN The program listing for subroutine COLXO is as follows: 4 9 ecnr: 63 4 9 9 c npcc mr x c 51)' c nf- m;cw F O ? c 00oc 50'.cc 505C 3 5UtCOCOO 527CC?CL 511CCCGO 5 -L Z-L1O C O Q 5 1 3JCC03 51 4COCO0 51 S C O C O D 51 6C GZGC 5 17c 0 ' ) co 51 E C O G 0 0 52CCOQCL 52COObC2 5 2 i COP!nC 522C@CCC 52 3CPGOC 5240 0001 525i'O609 52cocca~ 527COCt3 528CCOGO 52930nOO 5332CGOC 5 3 1O O O C C 5 3 5 SOOC.0 533E;CCC.? 29 534tC"r,0 535CCJCC 536COOCC 5 3 7 C Q f Ct 53BGCCC~l 53 3C 3 3 o c 54cc occs 5 4 1 ccocc 542C 09CG 543COCCt) 54*c GO oc E4530GCO 546COCO2 E47C9C 00 54ECCCCO 549ar3~cc E 5 G C 00 G O 55iCQ'?OC E 5 2 c c c 00 5 5 2 2 Ci)W 554~000C 555OGc)OO 55 6 C C O C C 557C C3C0 558CC3CO 559C OPC@ 5 6 C d (3') w 0 56LC C C CC F 6 2 O C ZOC 563LL;OCO 544C 0030 5 6 5 ~ 0 ~ 566C0003 5 6 7G 'IO 03 56BGCOflC' 5 6 9 C 30 C" 57cJGCC00 57 1Q!oCL\G 57205c30 573?tOCO 5 74C C C 00 575cc;cco 5763CO3C 577CCCOO 5780G O O 0 5790 0 J CO 58n000CG 5813CCGO 58200000 583CCGCO 584Li0030 585COGCO 58630000 5 8 7ccc 30 5980050G 58990CCO 59CCCi300 591CG3CG 592300CC 5933005C 594OGOCG 59scoco3 59630000 5 9 730000 5983CtFO 5 9 90 C $3CC 600C05GC 6GlC0OGO 6O2C 0 00G 6030C300 t0430000 6 O5COOOO 30 606C00?0 6073COCO 608CG000 63930303 bliJCC)SO3 61130 Or)@ C12CGOOO 6i3oooao b140000~3 615000GO 61 W O O 0 0 61700000 61 800000 E1900039 62000000 621CGf00 622COCOO t23C0000 62400000 625CCIOC0 62bOOOC‘0 627C 0009 62803000 62 900000 ~~OOOC?OG t3100000 63200G00 03300000 6340G303 63 5 00000 esoco~oc 63700C00 638Cc)OOO 5 3 95 0C ‘30 64COOCGG b 4 1 C 3QC0 042300CQ Subroutine COLMN. - Subroutine COLMN computes the coefficients of the tridiagonal matrix where 0 < 4 < 1 and 0 5 77 5 1. The flow chart for subroutine COLMN is as r follows : a t ETAS 31 64 ?c@ 64450055 t 4 S 39irOO 6465'53C3 b4?C/3CCo 54800603 649303CC 650399"O 65 l C 9 C O 1 65200000 0 5 300 300 654300OC 655COGOO t503GCt.0 6 5 7C09 00 b 5 8 C C COO 65900000 66@000CO 6 6 1i OOOQ 662CC000 66400C91 -66430002 66 EOO w o 66630030 bb7COOC.0 568COCGl 669COCOO 67C300CG C7100CCc) 67200 000 67390000 67400 o m 675000 CO 676OC ?Or) 677C030c1 67B00(\00 67SCOCCO 6 8 nt!00 C (1 6 8 1 300t0 tezcaow 6 8 5 39C?O 684000CO t8 5 3 o n a 0 686CCOOC 6 8 7C'OOCO 6 0e00GOO b8900L7CO 6 9 t C 0C r 9 6 9 I C OC GG 69ZCOOCO 693C03C0 67kOOOCC b95(\01‘1CO t9600CCG 697c‘OOOO 698COOCO 6 9 9 00 000 170 70C CGC GO 701CO@CC 7 C 2C 3OCO 70 3200CO 704coo00 70500000 178 7ccccoco 7C7iOOCO 708OOOCI: 70 9C O C CC 7 1i.c oo r c 71 !C O O 0 0 71 230000 7 13 C m O O 7142CCOO 7 I L c s 0c 30 716 0 OC 0 0 717C31)CO 71FiC00CO 71900(?CC 72C SGC?OCi 7L? C O ~ O O 722CGO03 723CO1?CO 7 2 6 ?OGc)O 725JOOCO 7 Z6‘0tOO 7271“OOOC 72 R C 0 7 ”0 72S3pW3 73CfC.OCO 73LCO“n9 732iccci. 7 3 3 i oco3 7 3 4 o~? r n 735iO?C3 73t310OG 73 7COCOO 738301‘GO 730C030C 740c @!-Pa3 7 4 1 ccc GO 742-QOOO 763C0000 746500CO 7 4 5 3 0 C? co 746CO’?@C 747c ICOC? 7 4ac o o co 74QJ03C3 75COOJCQ 752 C O C J C 7523COGG 7 5: C OCC 3 751C3003 75 c 53 2 t 3 75eCOYCI 7573@ClCO 75e300C5 75 SOCOn0 33 C C S T A T I O N (S.N1 X I GREATER T H A N 6, L E S S T H A N 1 9 E T A =1 Subroutine CQLXL. - Subroutine CQLXL computes the coefficients of the tridiagonal Compute at ETA?) Compute Coefficients at ETA=l 35 he program listing f o r ~ ~ ~ r o ~ ~ i n ~ SUBROUT IlvF COCXL ( l u l 9 N 2 849COCCO C 8500COGO C COMPUTES CUFF0 FOR XI=1 ( X=Ll CJLUMN I M P L I C I T emc~co C IROCCL = 1 CCLUCN I C P L I C I T f?52CCOCO C IQOCOL = 1 ROW IMPLICIT 8 5 m m o C e54roocc COMMON / P I C K / A I 10 920 I * A A ( 23 1 I AB ( 10 r 2 G ) 9 A L P H A ( 2@ $ 9 B ( 20 I 9 85 5COOC9 2 B S l ( 1 3 9 2 C 1 r B S l B ( 1 0 , 2 @ ) r C ( 1 6 r 2 0 ) r C B ( 1 0 * 2 0 1 ~ C K ( I O ) ~ C K E T A ( ~ C I ~9 O I @56CCCO@ 4 CKX1(13,iOlrCCST(23) cCP(l9tiO)rD(lO,ZO) pDC(20)t E 5 7 G C OCO’ 6 CELESQ~OELETA~DELTA~2~~~DELXISQ,E~lG~2O~~ElGHT3~ 85830001 8 ELAM(23)rETA(13)9EXPG,F(~~~2G~rGG,GIMACHrHl(lO~2@I9~Z(lG9ZOI9 859000CO A t.3 (111,20 I ,HC( 2 0 1 , HCOMB( 2C I t hE,HW ( 2 0 )9 I F I R S T , I POCCL 9 I T C I I T R 9 I TT, 85050000 C I T T C ~ L M l ~ L M 2 t ~ C D C T ~ ~ ~ ~ ~ M O O T ~ 2 ~ ~ ~ M S D O T ~ Z O ~ ~ P I O ~ ~ P F E eL6 1 C00000 C ~ 2 O ~ ~ Q C ~ 5 QC19QC*\UET ( 2 0 1 tQCCMB( 2 3 b VQR ( 2C # p Q R 1 rQS( 20 9RNS 9RODPC 9ROPCPPf 062OOOC0 G K S S ( ~ Z ~ ~ ~ S T O Z ~ S I G ~ S I G O P I S I G M B I S I G M A ~ S I G P ~ S I N T ( ~ O ~ ~ S ~ ~ ~ S M Z V T A U ~ T B ~ 0000 8 6 3 0 I T T ( 13 23 1 ( T T F ( 10 9 20 I t TWDE L X I t TWOGI rV1.20 1 9 V @( 1C) o X ( 2 2 1 v X D X I S Q v 064300CO K X C D X I , Y ( 1 0 9 2 J I ,Z(201rZB(10) E65000CO CCMYO>J / I I \ P U T S / DUVMY ( 1I ,AkXP, A L C T A R I 1.3 I , T T A L C ( 10) vMAL‘PHC, WALPHC 9 866COOOO 2 A L P H A T ( 1 C ) r T A L P H A ( 1 O I r M A L P H A , N A L P h A I A L S T A B ( 1 0 9 T T A L S ( 10 1 r M A L P H S 9 e67@GOC@ 4 NALPHS~ASEXP9BETAtREXP1BSEXP,CE,CE~CKETATB(5@~~TTCKETA(lO)~ 66830000 0 E T A T A 8 1 5 l ~ N C K E T A ~ N E T A ~ C K X I T A B ~ ~ O l ~ T T C K X I ~ ~ ~ I ~ X I T A 8 ~ ~ I ~ N C K X 06900@01? I~ , 8 N X I VCORDSY VCp DP t C P P cC P T A R ( 1 0 t p TTABCP ( 1 0 I CCP 9 L C P 9OECT A 0 (20I 9 87100001 A DELTAU,DELTMI~,DTMAX,ELAMTB(~~)~TTELAM(~I~PELA,MI~),NELAMI 87100002 C ~PELAM,E~DTAUIEPSONEIEPSCNEP,EPSGNPP,ERRORT,GAMB~P~~A~INF~ 872000CO E HCCMBTB ( 2 8 1 VT T hCOMR ( 7 I 9 PHC ’JMB( 41 9 NHCOMB 9 NPHCOMB ,HC T A B ( 2 8 ) , 87300000 G T T A B H C I 7 ~ ~ P H C ~ 4 l ~ N H C c N P h C I H E T b B ( l O l r T T A B ~ l O l ~ T T A B H E ~ l ~ ~ ~ M ~ E t ~ H E ~ H WE T~ A W ~O~Ol C5 O~ ~ I TTABHW(l51~MHW~NH~~IAOJUST~IPLOT~L~MACH~O~I.’AXITT~I.’D~AXt 0 ~ X I O G O1 J MDOTJ(20lr 876C0000 K MW02rYkSTR9NTP(7)pPLTIYE(IS1,PRAT120lrPRAT(2Gl*PRFREQ9FSEXP,PSTAG~~(l~I, 8 7 7 0 000C M TTPSTAG(?OI,YPSTAG,NPSTAG9PTI.’AX,PTMIN,QCTAB(~Cl~TTABQC(lC),MQC, @ 7 8C30Ct N hQCtQRAT(2O) t 879COGCO 13 CRRAT ( 2 9 ) r Q R T A B ( 1 G ) ,TTABQR( 10 )9MQR,NQRrR( 2 0 ) 9 R I E X P 9 R N S I ~ROIRODP, 080COOOC Q R O P ~ R S ( 2 C ~ r R S S M A X , S ~ S T E B O L ~ T ~ l ~ ~ 2 ~ ~ ~ T A U C ~ T ~ l A B ~ l @ I ~ T T A B8 T 8B1 ~5 0l 000~0 ~ S MTR,~TB~TDPRI~E,THETA(Z@)~TPRI~E,XO9%ORDER,ZS(2C),ZSMAX 802000C3 REAL YDCTCqMDOT~MCOOT~YSDOT~MhSTRiM~O2~MACHhOvPDl’AX e 8 3ccooo DIMENSION A L ( 1 0 1 88470000 I h T E G E R S,SI.’l,SMZ E85cocoo 2 3 1 FORMAT (7EL8.71 886O@PCO C a8icooco C STATION (1rL) X= L r E T A SO, 888oooco 889300CO e9003000 89’ OOOCrJ e9200ccc 89”20CCC @ 94C OOOC 095300CC 896GOOCO 8973 W O C 8 s 0cooc0 8 9 9 0 00 00 90C1COCC‘? ~(313COC@ 902Cl)c)nC 9G3SOOiO so~oooc.0 905COOC0 9Cb300(30 907CCCOQ 90BOOrJCr? SO9COCOO 91 O C 3 C G O 91 3 c?oc?oo 912cocco 91 ? C C O O C 914C;CcIOO 915 r O O C 3 916CSOCO 91 7GOOCC 918COC30 919C30GO 92000CCC 921@OCOO 92200000 92300OCO 924C qOOO 525GQOCO 92b30000 92100000 92 a ~ o a c o 9 2 90 0 ooc 93@OO@CO Q31OOCC0 93230CC3 933DOOCO 9 3 4G C 0 C 3 9350occo 936COCOO s37cocco 93800CCC 939000C3 94CtSG 0C0 941 G O O C 3 9 4 2 C 0 0 GO 9430GOCO S4411Dn00 94 SCCC C C S4OCr)OCO 947COGC0 94030060 949COCCG 9 5 00 0 0 0 0 S5!CQCCO 95 2 C 43 0 00 953COOOQ 554C3OCO 95 5 c (3 0 c 0 95tOOCCIO 95 7coc 00 556000CO 959coccc $6 CC 5C 00 951C@@0@ 9b2C0000 963COOCO S 6 4 C C O 00 96 5 000 00 S6600C00 967G0000 SbSOOOGO 96QC00C0 S7COOCC3 s7100000 972COC00 97360000 9740occo S75C3CCO 97600000 9770@0@0 $7 8OOCCC 979COOOO 90CCQGCO s 8 100coo S8PC'OOCO $8 3 C O O C C 37 290 CQNT IrYUE 9843000C P A R T =H * XC * CELXI 9 8 5 0')OOC PART2=9MLt"Z/PPR T s 8t.C ocoo -* P A R T 1 = 9,C Db'LM12/PART S87000r?0 VB(MI = PART2 S80COGCq AB(M,Ll = PART1 + PART2 sa9;oo~n B S l B ( Y 9 L ) =- P P R T l s9Ccocco I F ( IFIRSTIEQoC ) GO TO i 7 8 991COCOO 230 R ( L ) = B S Z R ( P * L ) + BSAVE + E P T 4 99 23GCCO DC(L)=ON+TNl+(BSAVE-BSi(MIL) )* T(M9L)- A(C,L)*T(t'WtrLl- C(M+LI 793C0000 994C3GD0 995000PD $963@9LiC 5 9 7COC OD 9Q800OCC 999c oc c 3 t3OC3COCiG 1c01c0cc0 i302COtOO 1C O 3 O O C P O lG'360OGQO i a ~ ~ s o r c G iaoccwoo iC07COOOO lCCf!CCC(?O i oowecrG 1.01c 09 cor) iOliOOOW i3 12C 0 GCO 1 0 13c OOCO 1 cz 4 3 C 9 0 ) ICIC.JOOG@ i Ci6CGCCO 1 C17C OGOO 101.8COOGD lG19J3000 i32030cof) lC21C.0CCcI 13220OOCO lO233OCOO 1324Cr)COC 1C7_r0ctCO G S L = H l ( S 9 L ) * H Z ( S ~ L ) * H ~ ( S V L ) RO * *CP(S9L) lCZ6DOCCO PARTW = -!.O/rJ + ACD I C2 7 C O C 00 EPT4= SIGP * Y*PARTW 1328COOCO EPTB = EPT4 * TB 1G2 92OOGO EPT4 = EPT4 * T ( S 9 L ) **3 103GQOCCO DN = ACD * (PART1 + PART2)/(4*0* XODXI) + EPTR 1J3LOOOOO BSAVE=H*RCPCPP*( PPRTW 1 - G S L / D E L T A U 133200(3.60 GC T O ( 3 5 1 t 6 5 0 ) ~ I F O C O L 1333C.0000 550 CCNTINUE AJ=GSL * Y D C T ( L ) / ( R O * Z s O * C E L T A ( L 1 * D E L E T A 1 @DSL= - F F * 2 2 2 1036COCCO QSAVE= DD:L* PS(L) 1C 37COCGO E S C 3 2 L = ( H 1 (SMZ 9L) +kl ( S Y Z 9 L I ) * ( H 3 ( S M Z 9 L I +H3( SM1 r L ) )* ( C K E T A ( SH29 L ) A 0 3 8DcC 00 1+ C K E T 4 ( S C l , L ) ) / (4.C*(HZ(SM2.L)+HZ(SEnl9L))) 10392C'CCO * P A R T E 3 = F F E SM3 Z L 104CCOCOC P A R T D 3 = ACC*ADDZ*@SM?ZL iO41C O C C O V ( L ) = -PAFTC3- PARTE3- A J 1342iOOOD ESMLZL= ( ~ l I S M l r L ) + H l ( S r L ) ) * ( H 3 ( S M l ~ L ) + H 3 ( S ~ L ) ~ * ( C K E T A ( S ~ ~ t L ) ic43coooo 1 +CKETA(SrL))/(4.C* (HZ(SMItL)+HZ(StL))) 1C 4 4 0 0 C O O PARTE1 F F*9*C*ESMlZL 1345300Cr! P A P T D Z = ACC*ADCl*S.O*DSMlSL 134tOOOCO A ( S g L ) = PARTGl + PARTD3 + PARTE3 + P A R T E l + 4e@*AJ i04 7COOOO B S l ( S 9 L ) = CDSL*SIG*T(StL)**3 R(S)= B S 1 1 5 , L ) + B S A V E + E P T 4 - PARTD1 - P A R T E l -3sG*PJ llj48COOOO 1049COOOO I F (1FIRST.EQ.G ) GO TO 6 5 0 105OCOCOO 6 4 8 D C ( S) = D h - VBfS 1 *T(S,LMZ) -AB(SvL)*T(SqLMl)- (BSlB(S9L) 1c 5 I t O O ' ? O 1 -BSAVE) * T(S,L)+ QSAVE + DDQSZ lC52O(ri?C@ GO TO 350 1C53COCPO 38 1C 5 4 O O G @ O 1C55600CO 1cscocco(! I CSYFOOCG 105@COOCO 105900060 1 C6C C 0000 106 IDOCC9 1C 6 2 C O G O O fObSC~0000 1 C 64C 00 CO 1065G0000 lC6OGCCOO I C6 7OOOOO 1C68000CO 1CbSOOCOO 1C7'oCOCCC. 1C 71 C GCCO L C72CCOQO Subroutine SQAERO. - Subroutine SQAERO computes convective and radiant heating rates and surface mass-loss rates and obtains variables which are functions of time, temperature, and pressure. The flow chart for subroutine SQAERo is as follows: SOAERO v a r i a b l e s as functions of Ad j u s t heatin @ 39 v a r i a b l e s as f u n c t i o n s of i + radiant h e a t i n g ' I Compute mass + loss rate due t o sublimation loss r a t e due loss rate due t o oxidation, 40 isting for subroutine is as fo3Kows: Ic 7 3c o a 00 i374aoooo b L 75GO GOO 107600COO lC77COOC3 107800000 1C 7 9 C 00 00 1 C 8GCOO0 1 1 c 8 IO0000 108 2c0000 108300000 1c 8400 000 lC8500000 108600000 108 7 'C 0000 108800000 2 ALPHAT(lC)~TALPHAIlG)rMALPHA,NALPHA~NALPHA~ALSTABI~O~~~TALS(l0)~MALPHS~ 1 0 8 9CCOUO 4 N A L P H S t ASEXPI B E T A 9 REXP, B S E X P 9 CE ( C K E T A T B f 5 0 1 * T ? C K E T A I101 9 109000000 6 E T A T A B ( 5 f 0 NCKETA, N E T A pCKX I T A B (50j 9 TTCKX 1.110 # r X I T A B l 5 ) P N C K X I D 1 C 9 1 C 0000 8 NXI~CORDSY~CPCP,CPP~CPTA6~lO~~TTAECP~1O~~MCP~NCP~DELTAOI20~~ 109300CC'1 A DELTAU,DELTMInrDTMAXIECAMT8(28lrTTELAM(7),PELAM(4)~AELAM9 1C 9 3 0 0 0 O 2 C NPELAYIEhOTAUIEPSONE,~PSONEP~EPSONPP~ERRORY,GAM8AR~GAMINFT 1094000c0 E HCIjMBTE ( 2 8 1 TTHCCMB I 7 ) s PHCCMB ( 4 ) rNHCOf46 t NPHCCMB v H C T A B (281 9 109 50 00 00 G T T A B H C ( 7 ) 9 P H C 1 4 ) , ~ H C , N P H C ~ H E T A 8 1 0 T T A B H E ~ l O ~ ~ M ~ E 9 h H E 7 H W T A ~ ( l 5 ~ ~1 0 9 6 3 0 C O O I TTABHW(1Sl~MHW~NHW~IAOJUST~~PLO~~L~MAtHNO~MAXITT~~DMAX~ 1C97COQOl J PDOT3(2J)r 109 800000 K MWC29 M W S T P 9 N T P 4 7 ) r P C T IME( 15 1 P;lAT(ZO) r P R F R E Q ? P S E X P v P S T A G T B ( 1 C 1 D lC9930COC1 M T T P S T A G 1 Z O I , M P S T A G ~ N P S T A G ~ P T M A X ~ ~ T M ~ N ~ Q C T ~ B ~ 1 O ~ ~ T T A B Q C ~ l O ~ ~ M110000000 QC~ N hCCtQQAT(20) t IlGlCOOOO 0 Q P R A T ( 2 J ) t Q R T A B ( l O I ~ T T A B Q R ( 1 O ~ ~ M Q R ~ k C R ~ R ( 2 ~ ~ ~ ~ X E X P I R N S I I R O I 110200000 ~~C~~ Q R C P ~ R S ( 2 C I ~ R S S M A X ~ S ~ S T E B C L ~ T ~ l ~ ~ Z O ~ ~ T A U O ~ T B T A B I~ 1 O ~ ~ T T A B T1103C0000 B~10~ S MTB~YTB~TOPRIME,THETA(~O~~TPRiMErXO~XCROE~pZS(Z~~~ZSMAX 11 0 4 0 0 0 O O R E A L MDOTCpMDOTv MCDOY 9 MSDOT, Mk STR qMW02rMACHNO (MDYAX 11C 5COOOG INTEGER SpCClpSM2 1106COOOO C t 3 0 K U P CP, CPBAR, C K N PETCe A S F U N C T I C N S CF TEMFERATURE 110700000 DO 11 N = l , L 110800000 C A L L F T L U P ( T T ( S p N 9 ALPHA( N !s M A L P H A p h A L P H A s T A L PHA 9 A L P H AT 1 1109300OO 11 C A L L F T L U P ( T T I S , N ) r H W ( N ) ~ M H W e ~ H ~ f T T A B ) lllOGOGC0 I F ( I T T e N E e l I GO TO 1CD 111130000 C LJOK U P FUNCTIChS OF T I M E 1112000c0 CALL FTLUP (TAU,ALPHAC~MALPHC~~ALPHC~TTALCV~LCTAB) 1113OOOOO C A L L F T L U P ( T A U 9 A L P H P S I MAL PHS, N A L PHSITTAL S r A L S T A 8 b 1 1143 0 Or30 CALL FTLUP ( T A U I H E , M ~ E ~ N H E , T T A B ~ E * ~ E T A B ~ 111 5 C o t eo CALL FTLUP (TAUPPSTAGIMPSTAG~NPSTAGITTPST~G,PSTAGTB) 1115oooco CALL FTLUP ( T A L s Q C l ~MQCINQCITTABQC~QCTAE) 1117OOCOO C A L L F T L U P (T~UIQR~,MCRINQRITTABQR,QR,QRT~B) 1118GOL)OO C A L L FTLUP {TA~!~TB,MTB~NTBDTTABTB,TBTAB) iX19C03G0 TB =TB**4 112Oi)O000 C 112100000 C 4 3 J U S T C O Y V E C T I V E AND R A D I A N T H E A T I X G R A T E S A N 0 T H E PRESSURE AND 1122co00c C H E A T I N G . O I S T R I R U T 1 C N T O StrAPE CHANGE (ADJUST Q C l ? Q R ~ * P ~ A T ~ ~ 1R A T lf23C0300 C f 12460000 IF ( C O R D S Y e N E e O J GO TO 20 1125COOCO C A L L ADJLST 112600003 -73 00 3 0 N = l r L 112700OOO DE L T A 0 ( N 1 = D E L T P t N) 1128COciC0 QR(NJ = Q F l * QRRAT(N1 112 90 0000 Q C ( h I = QCI * Q R A T ( N ) 113000000 PRELOCIN) = PSTAG * PRAT(N1 1131COOOO C A L L D I S C C T I T T ~ S ~ N l ~ P R E L O C ~ N l ~ T T A ~ H C ~ H C T A ~ ~ P H C ~ l l ~ 2 6 ~ 4 ~1 H 1 3C2 O~ONO O~ O~ C A L L D I S C C T I T T I S ~ N l ~ P R E L O C ~ N l ~ T ~ E L A M ~ E L A ~ T ~ ~ P E L A ~ ~ l 1 p Z 8 ~ 4 ~ E L1133GG000 AM~NJ 1) 11 3 4 0 0 0 C O ?9 C A L L D I S C C T ( T T I S ~ ~ ~ ~ P R € L O C I ~ ~ ~ T T H C C ~ ~ ~ H C O M ~ T E ~ P H C G 1 M1 3B500~ ~0tO~ ~ ~ ~ ~ ~ I 1 HCOMElN)) 113600000 4 C CUMPUTE QS ACRCSS FRCNT SURFACE 1137COOOO B A T = 1.3 BETA 1138000GG 1 3 3 DO 200 N = ’ c L 113930000 C t L L =HE / O C ( N I 11*000000 CAT 3 Q C ( h ) * (1rC .. HW(NI/HE) 114~00000 BLOCK=(AL.PHAC * M C D O T ( N I + A L P H A S * M S D O T ( N I ) * C E L L 114200000 QCtriET(N) = C A T * ( l e 0 1- B E T A * ELLCCK) - B A T *(Oa6* BLOCK - C.084 * BLOCK**2) 11433000O I144COOOO QCCHB(Y)= MCDOT(N) * HCCIMBtN) 1145COOOO Q S ( N ) = Q C h E T ( N ) + ALPHA* W I N ) - M S O O T ( N ) * H C ( N ) + CCOMB(N) 1146COOOO 210 C C N T I N U E 1147000Cc) RETURY 1148COOOO i 149Q0000 1150COOCO C 115100000 ENTRY SQAEPOY 115200000 DO 1033 N=l,L 1153COOCO C 1154000W C CJMPUTE YSDOT--- M A S S LOSS RATE CUE TC S U B L I M A T I O N 1155000CO C 115600000 IF ( A S E X P 1 3 1 C , 3 C 5 ~ 3 1 3 115700000 3 3 5 PSDOTIN)=C.O 11 5 BC 0000 GO TO 330 115900000 310 BLOCK = - B S E X P / T T F I S # N I 1lbGOOOOO VSDOT(Y)= ASEXP * P R E L G C ( N 1 **PSEXP 9. E X P ( B L O C K ) * P ( X ) * * R I E X F , 116 lCO000 3 3 7 COLL = (HE-HW(N)J/(QChET(N)*ELA~(Nl) 1162300CC C 116 300000 C COMPUTE ‘4COOT--- P A S S L O S S R A T E DUE TO O X I C A T I O N 11640000O C 116500000 C H A L F CPDER 9 X I O A T I C N 116630000 C 1167COOCO 3 3 3 I F ( A E X P ) 39Cv3@5r390 116830000 385 MCDOTi N ) = D e 0 116900000 GI2 TO 9 3 0 117C.OOCOO 3 3 3 MCDGTIN) = PEXP * EXP(-BEXP/TTF(SvN)I 117130000 I F ( X O R D E R - O c 5 ) 9CCv4G3r6GO 117200000 4 2 3 ARC = 4 r J * P C D C T ( R ) * * 2 * PRELOC(N1 * *CE RST02 ‘ 11 73OOOOO PART = C O L L * CCDOT(N)**Z * PRELOClNI * RSTCZ 117400000 TEST = A B C / P A R T * * 2 117500000 I F (TESTeLT.7eE-121GO TO 4 2 0 1 1 76GC000 M C D O T I N ) =.5*( ( - P A R T ) + SQRT ( P A R T * * Z + A B C I l 11 7700000 GO TO 300 1 l78cooco 4 1 3 MCDOT(N) = CE /COLI- 117900000 G O TO 300 118000000 C 118100OOO C F I R S T CRDER O X I C A T I C N 118200000 C 1183COOOO 5 3 0 MCDOT(N) = M C U O T ( N ) * P R E L C C ( N ) * RSTOZ * CE/(l*G + M C O O T ( N ) * P R E I .oc 118400000 1 ( N ) * COLL*RSTCE) 1185COOOO C 118600000 C MOOT IS EQUAL TC TI-E LARGER OF MSOCT A h 0 MCOOT 118700000 C 1 1 8 800000 93Q I F ( M C D J T ( h ) . L T . M S O O T ( N ) f GO T O 950 1189i)OOOO MDOT(I4I.s M C D O T ( N 1 119000000 v S O T T ( N ) = 0.0 1191COOOO GO TO 1 O O C 119200000 950 M D O T ( N ) = F S D O T ( N ) 119300000 MCDO T ( N J = C. 0 1194POOOO 10 10 CONT I Y U E 1195COOOO RE TURY 1196C0000 EN0 119730000 42 computes the convective and ra heating rates and the pressure and heating ~ i s t r i b u t ~ o to n s account for shape change. he flow chart for subroutine i s as follows: Yes Compute new nose radius 100 1 Obtain pressure rate I Obtain heating- 43 he program listing for subroutine i s as follows: SUBROUTINE A C J L S T I19800000 C C T M l S R O U T I N E BCJUSTS T H E C O N V E C T I V E AND R A D I A N T H E A T I N G R A T E S p T H E PRESSURE 1200(i0000 C AVD H E A T I N G O l S T R I B U I I O N T O S H A P E CHANGE ( A D J U S T ~ C l * Q R l t P R A T ~ Q R A T1 120100000 C 120200000 CCMMCN / P I C K / A( 10 9 2 0 ) ,AA( 20 1 , A 5 ( 109200 , A L P H A ( 2 0 ) I B ( 20 1 I 120300000 2 B S l ( 1 0 9 2 C 1, B S 1 B I l G r 2 0 1 ,C( 10 9 20) P C B I 10 P 20 b 9 C K ( 10 I q C K E T A ( 10 920) 8 120400000 4 CKXI~10~201~COST~20JrtP(1012O~~O~lO~ZO)rOCl2O~~ 120500000 6 DELESQ, D E L E T A , D E L T A (201 * D E L X I 1) D E L X I S Q * E f 1 0 920 b r E I G H 7 3 9 120600001 8 E L A M ( 20 I V E T A( 10 1 9 EXPG cF ( 10 9 20 ) rGG,GI MACH 9 H 1 ( 10 t 20 1 9 P2 (10 9 20 1 9 120700000 A H 3 10 9 20 ) rHC( 20 1 p HCOMB( 2C 1 ,HE (HW ( 2 0 9 I F I R S T 9 IROCC'L 9 I T C 9 I T R o I TTI 1208000GO C I T T @ ~ L M l ~ L M 2 ~ C C O O T ~ 2 O ~ ~ M D O T ~ 2 2 ~ ~ M S O O T 1 2 0 ~ ~ P I D ~ ~ P R E L O C 1~ 22 0O900000 ~~QC~2O~~ E QC19QCNET f 20) VQCOMBt 20) rQR I 20 1 9 O R l t Q S ( 20) 9 RNS (RODPC rROPCPP t 121000000 G R S S ( ~ ~ J ~ R S T ~ ~ ~ S I G ~ S I G O P ~ S I G M A ~ S I G P ~ S I N T ( ~ O ~ ~ S M ~ T S M ~ ~1 T2 1A100000 U ~ T B ~ I T T ( 1 0 $ 2 0 1 r T T F ( 1 0 9 20 9 TWOELX I 9 TWOGI r V ( 20 1 p V B ( 10) t X ( 2 2 1 9XOX I S Q 9 121200000 K X C D X I I Y ( ~ O ~ ~ O ~ ~ Z ( ~ O ) ~ L B ( ~ O ) 121300000 COMMON / I h P U T S / DUMMY ( 1) PAEXPI A L C T A B ( 10 f t T T A C C 1 1 0 1 t M A L P H C 9 NALPHC9 12 1400000 2 ALPHAT I l C 1 9T ALPHA (10 1 ? M A L PHA, NALPHA, A L S T A B ( 10 I 9 T T A L S ( 10 1 9 M A L P H S 9 121500000 4 NALPHS,ASEXP,BETA,BEXP,BSEXP9CE9CKETATB(5O)*TTCKETA(lO)~ 121600000 6 E T A T A B ( 5 ) qhlCKETA9 NETA 9CKX I T A B ( 5 0 ) r T T C K X I ( 1 0 1 9 X I T A B ( 5 ) r N C K X I 9 121700000 8 NXI~CORDSY~CPDP~CPP~CPTAB~lO~~TTABCP~lO~~MCP~NCP~DELTAO~2O 121900001 l~ A DELTAUIDELTMINIDTMAX,ELAMTB(~~)~TTELAM(~~,PELAM(~),NELAM, 121900002 C N P E L A M 9 E h O T A U 9 E PSCNE 9 EPSONEP 9 EPSONPPp ERRORT 9 GAME P R 9 GAM I N F t 122000000 E HCOMRTB ( 2 8 ) *TTHCCMB( 7 1 r P H C G M S ( 4 ) ~NHCOMB,NPHCOMB,HCTAB ( 2 8 ) 9 122100000 G T T A B H C I 7 ) ~ P H C ( 4 1 , N H C , N P H C ~ H E T A S ~ l O ~ ~ T T A B H E ~ l O l ~ M ~ E ~ N H E ~ H W T A B ~1 2l 52 ~ 2 0~0 0 0 D I TTABHW~1S~~MHW~NHW~IADJUST~IPLOTvL~MACHNO~MAXITT~MDPAX~ 122330001 J MOOTO(2O)v 122400000 K MWO29 M W S T R q N T P ( 7 ) p P L T I M E I 1 5 ) r P R A T ( 2 0 ) r P R F R E Q 9 P S E X P v P S T A G T B t 10 I , 122500000 M T T P S T A G ( ~ O ) ~ M P S T A G I N P S T A G ~ P T M A X ~ P T M I N ~ Q C 1T G A )Bt (T T A A Q C I IO) 1MdlC9 122600000 N NQCvQRAT(201* i227000e0 0 QRR AT ( 20 1 QRT AB ( 1 0 1 9 TTABQR ( 1-0) MQR r NQR 9R ( 20 ) 9 R I E XP 9 RN SI ,ROTRCOP p 122800000 Q R G P ~ R S ( ~ C ) ~ R S S ~ A X , S ~ S T E B O L I T ( ~ ~ ~ ~ ~ ) ~ T A U ~ ~ T B T A B ( ~ @ ~ ~ T T A 122900000 B T B ( ~ O ~ V S MTB~NTBITDPRIME~THETA(~O)~TPRIME~XOIXORDER~ZS~~O~~ZSMAX 123000000 REAL MDIJTC,MDOT~MCDOTIMSOOT,M~STR~MW~~,~ACHNO~PDPPX 123lOOCOO INTEGER SvSIYl,SM2 1232COOOO DIMENSION P S I ( 2 0 ) 123300000 D I C E N S I O N U E U I ( 20 19 AL( 2C 1 9 A I N T ( 20) 9 YY ( 3 t 123400000 N S P l = NSTEP + 1 123500000 'DO 50 M = 1 9 L 123630000 RSSINI = RS(N) + DELTA(hl*CCST(NI 123700000 5 3 Z S ( N ) = ZS(N) + (DELTAO1N) I F ( I A O J U S T m E Q * O I RETURN - DELTA(NIl* SINTlN) 123800000 123900000 RNS=(ZS(Z)**2 + RSS(2)**2 -2eO*ZS121*ZS(l) 4 ZS(1)**2)/ 1240000GO 1(2.0*( Z S ( Z l - Z S ( 1 t ) 1 124100000 SPRNS = SQRT (RluS) 124200COC C A D J U S T R A T E T n S H A P E CHANGE 124300000 QC1 = QC1 * SQRT ( R N S I / R N S t 12440OOOO Q R 1 = QR1 * RNS/ R N S I 124500OOO P S I (ll=Om 1246GCOOO M= 1 124100000 1 3 0 00 200 h - 2 , L 1248i)ODO@ NP1 = N41 1249COOGO h Y l = Y-1 125COOOOO I F (NIB. L ) G C TO 13C. 125100000 TANPHI = (RSS(NP1) - R S S ( N M l ) ) / ( Z S ( N P l ) - ZS(NM1)) 125200000 GO T U 1 5 0 1253COOGO 130 T A N P H I = (RSS(L)-RSS(L~I))/(ZS(LI-ZS(LMl) t 12 5 4 3 0 C O O 1 5 0 P H I =. A T A h ( T A N P H I ) 1255COOOO P S I IN l = P I O 2 - P H I 325600000 230 C C k T I N U E 125700000 C NEW PRESSURE OISTRI5UTIOh 125800000 DO 2 5 0 N = l p L 125400000 PRAT(N) = ( l e 0 - U E U I ( N 1 = SQRT((1.0+ GIMACH) * C O S ( P S I ( N ) I * * 2 + GICACH TWOGI) * ( ? e O - P R A T ( N ) * * E X P G ) 1 1260G0000 I 261 00000 250 C O h T I N U E 126200000 C OSTAIN NEW I-EAT O I S T R I B U T I O h 1 26 3 300 00 C 1264COOCO 44 C E V A L U A T E I N T E G R A L AT L =G 1265OOOOC AL(1)=0r0 I. 2 6 t O C O C Q AINTO=PKAT(l)*UEUI(l)* RSS(lI**L 126700000 2 7 0 CCNT I N I J E 12683OC 00 OR AT I11 x 1 - 0 I. 26SOOOOO DC 6 0 0 k = 2 1 L 127(ic0000 NM f=N- L 1i 7 1 e o 0 0 0 h'P2 =M-2 127200000 AINT=AKNTC 12733ooco SU MH1=0 s 127400000 I F ( N * E Q e Z I GO TO 3 1 9 I275COOOO DO 3 0 3 1 = 2 1 N M i 127600300 330 SUMHL=SUYHl+HL( S e I ) 1 2 7 7 C O 000 31'3 A L I N ) = X ( S ) * ( S U M H l + ( H l ( S v l ) + H l ( S , h ' 1 ) / 2 . 3 ) 127830OCO C 1279G0000 C EVALUATE INTEGRAL 12 81)00000 C 1 2 8 100000 I F (NaEQe 2 ) GC TO 5 C O 1.2 8 2 30000 C EVALUATE Y ( J ) , Y ( 1 . ) , Y ( 3 1 1283C0000 00 400 K = 113 128400000 AMK = N- ( 3 - K ) 128530000 490 Y Y ( K l = P R A T ( h M K I * U E U I f NMK) * ( R S S I N M K ) * * 2 I 128600000 COEF2= A L I N M 2 ) - A L I N ) 128730600 POXO= I AL ( N t J 2 ) - AC ( N M 1 I ) * CCEF2 1288000PO 1209COOCO PLXl=(AL(hMl)- ALINM2I)* ( A L I h M l J - AL(N11 PZX2.2 ( A L ( N ) - A L ( N M 2 ) ) * (ALtNj-ALINMl)) L29000000 COEFl= (3.0* A L I N M 1 ) - 2 * 0 * C O E F 3 = ( 2 m C * A L l h ) + AL(NF'Z)- ALfhFnZI -A L ( N ) )/POXC 3*0* A L ( N M 1 ) I / P Z X S 2 29 1 coooo 1292000CG A I N T I N ) = ( ( A L ( N ) - ALlNM2)1**2/6,0)* ( Y Y I I ) * C O E F l + YY(21*COEF2/ I 2 9 3 ooao ~ 1 P l X l + Y Y 1 3 ) * COEF3 1 1294GOOO0 I F (NsGT.?) A I h T (NJ = A I h T l N M 2 ) + A I N T I N ) 1295C0000 GO TO 590 129cc0000 C N= 2 1297COO@O 530 Y Y ( 2 ) = ( P R A T I 1 ) + P R A T I Z ) ) + ( U E U I I l ) + U E U I ( 2 ) I*! LRSSIl)+ R S S ( 2 ) 112.0 1298500CO 1 1**2 /4.0 129SCOOCO YY(3)= PPAT(2)* UEUII21 *(RSSI2)**2) 1300OOm~ AINT(NI=ALI2)*(4mC* YYI2) + YY(3) )/6eC 13.31COOOC 5 3 0 A N U M = P R A T t N ) * U E U I ( N t *RSS( N ) * S P R N S I30230OOO P R A T I N ) = AhUM / I S Q R T I A I h T ( N I ) * GG) 1303L0001! 630 C O N T I N U E 133~00rJCO RETURN 130530000 END I. 3 0 6-3 O.O 0.0 Subroutine %PRINT.- Subroutine ZPRINT writes the output data. The flow chart for subroutine %PRINT is as follows: Write output 45 he program listing for subroutine Z P is as follows: SUBROUTINE Z P R I N T 130 700000 t P308GOOC0 CCMMON / P I C K / A(10,201 r A A ( 2 O ) r A 8 ( 1 0 1 2 ' O I r A L P H A ( 2 0 ) ,8123 1 9 130930000 2 l 3 S 1 ( 1 0 9 2 0 ) q B S l B ( 1 0 ~ 2 0b r C t 1 0 1 2 0 1 9 C B ( 1 0 , 2 0 1 r C K ( 10)q C K E T A ( 1 0 1 2 0 1 9 131OGOOOO 4 C K X I ( 1 O s i O l p C O S T ( 2 O l u C P ( 1 0 1 2 0 I 9 D ( l O t Z O ) v O C ( 2 0 ) I) 131130GCO 6 DELESQ~DELETAsDELTA(2O~~OELXISa,E(lO~2O~,E~GHT3, i3iz3oeoi 8 E L A M ( ZJ)9 E T A [ 10 t 9EXPG CF( 1 3 9 2 0 ) ,GGqGIMACH r H l ( 1 0 92C 1 g H 2 (10920)t 131 3C 0000 A H3 ( 1 9 920 1 r H C ( 20 I , HCOMB( 2C I c t'E9HW ( 20 1 t I F I R S T I I R O C O L 9 I T C 9 I T R s I T T I 131400000 C I T T O ~ L M l ~ L M 2 ~ M C D O T t 2 O ) r M C O T 1 2 2 ) r M S O O T ~ 2 2 ~ ~ M S D ~ T ~ 2 O ~ ~ P ~ D 2 ~ P ~ F L C C ~ 2 O1~3~1Q 530000 C~2O~~ E QCl~QCNET(2O~~QCOMB(2O~~QR~Z~~,QRlrQS(2OJ~RNS~RODPC~ROPCPPt 131600000 G R S S ( 2 2 ) 9 R S T 0 2 9 S I G q S I G D P 9 S I G M A 9 SI G P t S I N T ( 2 0 1 9 S P l rSM2 PTAUITB, 131700000 I T T ( 10920 ) r T T F (10.20 1 s T W D E L X I ,TidoGI r V ( 201 g V B 4 1 0 1 9 X ( 2 2 ) , X D X I S Q 9 131800000 K XODXI 9 Y 1 1 0 1 2 0 ) J(23) , 2 6 1 1 0 ) 131900000 COMMON / I N P U T S / DUMMYll)rAEXP,ALCTAB(lO),TTALPHC,NALPHC9 132COOOCO 2 A L P H A T ( 1 0 ) T A L P H A (10) ,MAL PHAv N A L P H A ? A L S T A B ( 10 II r T T A L S ( ' 1 C ) 9 Y A L P H S 9 1323 00000 4 N A L P H S , A S E X P , B E T A ~ B E X P ~ B S € X P q C E * C K E T A T B ( 5v0T~T C K E T A ( 1 0 ) 9 1?2iO0000 6 E T A T A B I S J 9NCKETArNETAvCKXITAB( 5 0 (TTCKX I ( 10)9 X I T P B ( 5 ) 9NCKXI 9 13230000C 8 N X I ~ C U R D S Y ~ C P D P ~ C P P ~ C P T A B ~ ~ O ~ ~ T T A B C P ~ ~ O ~ I M C P ~ ~ C P ~ O E L1'25OOCO1 T~C~Z~~~~ A CELTAU, D E L T M I h r DTMAX 9 E L A M T B t 2 8 ) q TTELAM ( 7 b 9 P E L A M ( 4 I t A k L A M 9 1325000n2 C NPELAY~EhOTAU~EPSCNEq~PS~NEPSONPP,ERRORT~GbM~A~~~AMINf~ 132630000 E H C O M B T ~ ( ~ ~ J , T T H C C M B ~ ~ ) ~ P H C ~ ~ B ~ ~ ~ V N H C O M B ~ N P H C O ~ ~ ~ ~1 '3 C2 7 TC OAO~O (O ~ ~ ~ ~ G T T A B H C ( 7 l r P H C ( 4 ) r N H C , N P H C ~ H E T A B ~ l ~ ~ 9 T T A B H E ( l ~ ) ~ M ~ E q N H E ~ H W T A B ~ l 5 ~1t 3 2 8 0 0 0 0 0 I T T A B H W ~ 1 5 ~ q M H W ~ N H W ~ I A D J ~ S T ~ I P L O T ~ L ~ M A C H ~ O ~ ~ A X I l T ~ ~ D ~ A X ~ 13293GOC1 J PDOTO(20lr 133GOOOCO K MWOZ,YWSTRthTP( 7 ) ( P L T I M E l 1 5 ) q P Z A T ( Z 0 ) r P R F R E Q 9 P S E X P 9 P S T A G T R ( IC.1 9 1 3 3 13 0 3 0 U M TTPSTAG(10)9YPSTAG,NPSTAG~PTMAX9PTMIN,QCTAB(lC)~TTA~QC(l~~,MQC9 i 332 C OOCC N NQCpQRAT(29)v 133POOr)OO 0 ERRAT ( 2 0 ) t Q R T A B ( l O ) , T T A B Q R ( 10 ) ~ M Q R c N P R I R ( 2 0 1 , R I E X P , R N S I vROVRODP, 1334C0000 Q ROP,RS( 2 G ) vRSSMAXpS9 S T E B C L I T ~ 13,i'Q) r T A U C ( T E T A B ( 1 C 1 p T T A B T B ( 1 0 ) 9 133530000 S YTB~NTR~TDPRIMErT~ETA(ZO~~TPRI~EtXORDER~ZS~2C~,ZSMAX 1336OOOOO RE A L YDCTC 9 MDOT 9 MCDOT p MS DOT 9 PW STR 9 MW02 I MACHNO MCMA X ?337000C0 I N T E G E R S 9 S M l v SM2 i338300ro DIMENSION QRR(2O) 133900000 EQUIVALENCE (QRR(1) r H l l l q : ) ) 134OOOOC0 'DO 1 0 N = 1 9 L 134100000 13 Q R R ( N ) = S I G * TTF(S,N)**4 1342COC00 WRITE ( 5 9 9 8 ) 134300000 9 8 FORMAT ( *O*) 134400000 W R I T E (5,100) T A U v O E L T A U 134500000 1 10 FORMAT ( * C T A U = * F l C e 4 r 1 4 X * D € L T A U = * F 9 e 6 1 13463OOGO WRITE ( 6 9 1 c 1 ) Q C l , QR1, H E 1347COOOO 1 2 1 FORMAT ( * C * ~ ~ X ~ Q C = * E ~ ~ . ~ , ~ X C * Q R = * E ~ ~ ~ ~ , ~ X I * H E = * E ~ ~ ~ ~ ) 134800CCO C 134930000 W R I T E (693.02) T ( S 9 1 ) 135@0OOOO 1 C 2 FORMAT ( 1 5 X * T ( S 9 1 l = * E l l a 4 ) 1351003@0 WHITE ( 6 , 1 0 5 1 1352COOOO 13 5 f OR MAT t * C * l 4 X * T E M PE R A TURE I M I N * 1353COOCO WRITE ( 6 , 3 1 C ) ( X (NIeN=l,LI 135420000 115 FORMAT ( * E T A * 6 X * X = * 1 5 F E . 5 / ( 1 2 X 1 1 5 F 8 . 5 1 135500000 DO 1 1 5 M = ? 9 S 135600COC P Y = S- ( M - 1 ) 1 3 5 7GOOC0 1 1 5 WRITE ( 6 r 1 2 C ) ETA(MM),(TTFIPMpN) tN=19L) ;35moooo 1 2 3 FORMAT ( f6.3 r b X 1 5 F 8 e 1 / ( 1 2 X 9 1 5 F 8 e l ) b i3 5 9 0 0 0 0 0 140 FORMAT ( * E T A * 6 X * X = + 1 O ( F 9 . 5 , 3 X ) / l i 2 X , 1 0 ( F 9 0 5 r 3 X 1 ) ) 1366 30000 1 5 0 FCRInAT ~ F C ~ l ~ 5 X 1 0 E 1 2 . 4 / ~ 1 2 X ~ l1 O ~ l 2 ~ 4 ~ 1 3 6 1300 PG C 13620OGGO WRITE ( 5 , 1 5 5 ) 1363COOCO i 3 5 FORMAT (*C*l4X+MDOT(NI--SURFACE MASS LCSS R A T E * ) 1364000 GO WRITE (6,140) ( X ( N ) t N = l , L ) 136550000 W R I T E (5,150) E T A t S ) , ( M D C T L N I v N = l , L ) 135ocoooo C 13 6 7COO 00 WRITE ( 6 9 7 6 5 ) 1368ccoao 1 5 5 FORMAT (*C*14X*MCDDT(N)--SURFAC€ MASS L E S S R A T E DUE TO C X I D A T I C N * ) 136SOOOC.O WR I T E 4 6 9 3 5 0 1 E T A ( S 1 t ( MCDOT ( iJ 1 9 N = l , L I 137c0cooo C 1 3 7 1 00000 W R I T E (5,170) 1372tOC00 1 7 0 FORYAT (*L*f4X*DELTA(N)--MATERIAL THICKNESS*) 137300000 W R I T E (S9:5Cg1 E T A ( Sl v ( D E L T A ( N 1 r N = l r L ) 1374COOCO 46 C 1? 7 5 5 0 O C O WRITE ( 8 9 1 7 5 8 13761iOOOO 1 7 5 FORMAT ( * C s l 4 X * Q R A T ( N ) - - R A T 1 0 CF L O C A L H E A T I N G T C S T A G N A T I O N H E A T 1 1377C00GG 1NG*) 137800000 MRITE (Sp’50) ETAtSisl ~ R A T ~ N ~ ~ ~ = ~ ~ L ~ L37SOOCC0 C 138OOCOCO WRITE( 0 9 1 7 6 ) I 3 8LCOOGO 176 FORMATl*O*l4X*PPAT(NI--RATIO OF L O C A L PRESS TO STAG PRESS*! ?38230000 W R I T E ( 6 9 1 5 C I E T A I S ) q I P R A T ( N ) rh=19L) 1 3 8 3COOOG C 1384000GO WRITE ( 6 , l e O ) 138 5 000 CC 133 FORMAT ( * C * l 4 X * P S ( V t - - N E T HEAT INPUT*) 13803OCCO W R I T E ( 5 1 1 5 0 ) E T A ( SI 9 (QS (NI ,N=lvL) 1387000CO C 1388000CO WRITE (6,190) 1389OOOOO 190 FCRMAT (*C*L4X*QRR ( N )--RERAO I A T I O N * 1 13990000C WRITE (6,150) E T A l S f t (QRR(N)*N=lvL) 139130500 C 139260000 WRITE (69200) 139300000 230 FORMAT I * C * 1 4 X * 4 C C M B ( N l - - H E A T DUE TO COMBUSTION FCR C X I D A T I O N * ) 119100000 , UR I T E ( 6 , 1 5 0 1 E T A ( S) (QCOYB I N 1 r N = l C LJ 139500000 C 139600000 WRITE (69400) ITCrITR,ITTO rIROCOL 1397POOC3 430 FCRMAT (*O NCi, ITER, C O L r = * I 4 , 5 X , * N O e I T E R 8 ROW=*I4,5Xp*TOTAL 139800000 1NOe I T E R ~ = ~ I B I S X * I R O C C L = * I 3 ) 1399000CO RETURN 1400COOCO END 1 4 0 1- 0_0 _ 00O Subroutine SOLMAT.- Subroutine SOLMAT solves a system of linear equations in which the matrix of coefficients is a tridiagonal matrix. The method of solution is equiv- alent to Gaussian elimination. The flow chart for subroutine SOLMAT is as follows: 47 i s as follows: 1402OOUUU 40 300000 40400000 140500000 140 600000 40 700000 40800000 40900000 141000000 141100000 141200000 141300000 141400000 141 500000 141700000 141800000 141900000 142000000 142 100000 142 2 00000 142300000 142400000 142500000 100 CONTINUE 142600000 142700000 00 200 K - 1 r N M 2 142800000 142900000 143000000 143100000 143200000 43300000 143400000 143500000 300 CONTIMUE . 143600000 RETURN .143?00000 END 143800000 nput xamples of input data are given in appendix B. he first card of the input is iden- tification for the job. Any identification may be written in column to and including column 80. F LIST with the name D2430 is used to load the input data. Each input variable is initially set equal to zero by the program unless otherwise stated. At least four inputs are associated with each table input: the dependent-table values, the independent-table values, the number of entries in the table, and the order of interpo- lation. The number of entries in the dependent and independent table must be the same. This is specified by a FORTRAN variable beginning with the letter N. The order of inter- polation is a FORT N variable beginning with the letter M and may 1, o r 2. For example, f o r first-order interpolation of the specific-heat array, set =l;for second- order interpolation, set MCP=2. If the specific heat is a constant, set MCP=O. 48 he following list contains the input variables with the dimensions used in the pro- he size of an a r r a y is limited to the dimensions stated, The m ~ ~ m unumber m of stations in the x-direction is 0 and the maximum number of stations in the y-direction F Symbol Description variable AE oefficient of the exponential t e r m when the Arrhenius expression is used for calcula,ting MC ALCTAB(10) “C Aerodynamic -blocking coefficient for heat and ALPHAT(10) “ Absorptance of surface, a function of temperature (TALPHA) ALSTAB (10) “S Aerodynamic -blocking coefficient for heat and mass transfer associated with MSDOT, a func- ASEXP AS Coefficient in the expression for calculating MSDOT BETA P Determines whether ablation or transpiration theory will be used for effect of mass transfer on heat transfer; for ablation theory, BETA=1; for transpiration theory,. BETA=O BE B Power of the exponential term in the Arrhenius expression for calculating MCDOT BSEXP BS Power of the exponential term in the expression for calculating MSD CE Ce ygen concentration, by mass, at edge of bound- ary layer CKETATB(50) Thermal conductivity in 7-direction, a function of k7 7 (ETATAB) and temperature (TTCKETA) hermal conductivity in 5 -direction, a function of kE TAB) and temperature (TTC CORDW Trigger to indicate coordin system; if curvi- linear coordinates, COR =O; if Cartesian coordinates, 49 Symbol Description c Iq Specific heat of layer along y=O P CPP Specific heat of layer along x=L cP' CPTAB(10) cp Specific heat, a function of temperature (TTABCP) DE LTAO(20) 6 Initial material thickness, must have L values DELTAU AT Initial computing time interval DELTMIN Minimum value allowed for DELTA DTMAX Maximum DELTAU which can be used; if no value is given, DTMAX=2.0 ELAMTB (28) h Ratio of mass of material removed p e r unit mass of oxygen that reaches the surface, a function of pressure (PELAM) and temperature (TTELAM) ENDTAU Time at which calculation stops EPSONE E Emittance of front surface EPSONEP E' Emittance of layer along x=L EPSONPP E" Emittance of layer along y=O ERRORT Acceptable relative e r r o r in temperature ETATAB( 5) rl ETA table for CKETATB GAMBAR Mean ratio of specific heats behind bow shock wave, used only i n computation of heating-rate distribution around body GAMINF Ratio of specific heats in free stream, used only in computing heating-rate distribution around body HCOMBTB(28) AHC Heat of combustion, a function of pressure (PHCOMB) and temperature (TTHCOMB) HCTAB(28) AHS Heat of sublimation, a function of pressure (PHC) and temperature (TTABHC) HETAB( 10) He Total free-stream enthalpy, a function of time (TTABHE) HWTAB( 15) HW Enthalpy of gas at the wall temperature, a function of temperature (TTABHW) 50 F mbol variable Description Trigger f o r adjusting heating-rate and pressure distributions to shape change; if and PRAT are not adjusted; if STfO, QRAT and PRAT will be adjusted to shape change IPLOT Trigger for plotting routine; if LOT=O, no plots; if IPLOT#O, the following plots will be made: RSS versus ZS at times indicated in PLTIME table; MDOT versus x at each PRFREQ time; and T(M,N)versus x indicated in NTP a r r a y at each PREREQ L Number of stations in the x-direction MACHNO Free-stream Mach number MALPHA Order of interpolation for ALPHAT MALPHC Order of interpolation f o r ALCTAB MALPHS Order of interpolation for ALSTAB MAXITT Maximum iteration count; when iteration count exceeds this number, DELTAU will be halved until DELTAU is less than 1.OE-6, then the program will stop and a ,message will be printed MCP Order of interpolation for CPTAB MDMAX Maximum expected MDOT; this must be given to get a reasonable scale for plots; not needed if IPLOT=O MDOTO(20) m Initial mass loss rate at surface, must have L values MHE Order of interpolation for HETAB MHW Order of interpolation for HWTAB MPSTAG Order of interpolation for PSTAGTB MQC Order of interpolation for QCTAB MQR Order of interpolation for QRTAB 51 Symbol Description rder of interpolation for T B 02 M Molecular weight of diatomic oxygen used in 2 oxidation equation MWSTR Molecular weight of free stream used i n oxidation equation NALPHA Number of entries i n ALPHAT NALPHC Number of entries in ALCTAB NALPHS Number of entries in ALSTAB NCKETA Number of entries in CKETATB NCKXI Number of entries i n CKXITAB NCP Number of entries in CPTAB NELAM Number of entries in ELAMTB NETA Number of entries in ETATAB NHC Number of entries i n HCTAB NHCOMB Number of entries in HCOMBTB NHE Number of entries in HETAB NHW Number of entries i n HWTAB NPELAM Number of entries in PELAM NPHC Number of entries i n PHC NPHCOMB Number of entries i n PHCOMB NPSTAG Number of entries in PSTAGTB NQC Number of entries in QCTAB NQR Number of entries in QRTAB NTB Number of entries i n TBTAB NTP('7) Array of seven values which specify the tempera- t u r e s to be plotted; NTP(1) = the number of temperature rows t o be plotted (may be six o r less); NTP(2) through NTP(7), the row number of the temperatures to be plotted. For example, 52 F Symbol Description variable specifies that three (3) rows of temperature will be plotted and these rows are 1, 5, and 10 NXI Number of entries in XITAB PELAM(4) Pressure table for ELAMTB PHC(4) Pressure table for HCTAB P HCOMB(4) Pressure table for HCOMBTB P LTIME (15) Times at which RSS versus Z S , that is, the body shape, will be plotted; not needed if IPLOT=O PRAT (20) Initial ratio of local to stagnation pressure, must have L values, not needed if IADJUSTfO PRFREQ Printing time frequency f o r output data PSEXP P Exponent of pressure term in sublimation equation PSTAGTB( 10) Stagnation pressure, a function of time (TTPSTAG) PTMAX Maximum expected value of T, used to get rea- sonable scale in plotting, not needed if IPLOT=O PTMIN Minimum expected value of T, used to get rea- sonable scale in plotting, mot needed if IPLOT=O QCTAB(10) Cold-wall convective heating rate, a function of time (TTABQC) QRAT (20) Initial convective heating-rate distribution must have L values, not needed if IADJUSTfO QRRAT (20) Radiant heating-rate distribution over body, must have L values QRTAB( 10) qr Radiant heating-rate tables, a function of time (TTABQR) R Radius of curvature of base curve at node points, must have L values RIEXP r Exponent of nose-radius t e r m i n MSDOT equation RNSI Rstag Initial nose radius 53 F AN Svmbol De scription variable P aterial density P” Density of layer along y=O ROP P‘ Density of layer along x=L RS(20) Rcyl Cylindrical radius from body axis of symmetry to node points on the base curve, must have L values RSSMAX Maximum expected value of RSS, used to get a reasonable scale for plots, not needed if IP LOT =O S Number of stations in y-direction STEBOL CT Stefan-Boltzmann constant for radiation T(10,20) Initial temperature, must have S*L values TALPHA( 10) Temperature table for ALPHAT TAUQ 7 Initial time TBTAB( 10) Temperature t o which back surface is radiating, a function of time (TTABTB) TDPRIME Thickness of layer along y=O THETA(20) e Angle (in degrees) lesq than or equal to 90’ between RS and R, must have L values TMIN Minimum temperature value; if TMIN#O and a computed temperature goes below TMIN, the temperature will be set equal to TMIN; if TMIN=O, no restraint will be made on the com- puted temperatures TPRIME Thickness of layer along x=L TTABCP( 10) Temperature table for CPTAB TTABHC(10) Temperature table for HCTAB TTABHE(io) Time table for HETAB TTABHW(15) Temperature table for HWTAB TTABQC (10) Time table for QCTAB 54 Symbol Description TTABTB( 10) Time table for TBTAB TTALC (10) Time table for ALCTAB TTALS( 10) Time table for ALSTAB TTCKETA( 10) Temperature table for CKETATB TTCKXI( 10) Temperature table for CKXITAB TTELAM(7) Temperature table for ELAMTB TTHCOMB(7) Temperature table for HCOMBTB TTPSTAG( 10) Time table for PSTAGTB XITAB(5) 5 Table of values of CKXITAB xo xb Length of base curve XORDER Order of oxidation z S(20) Initial distance from the initial stagnation point to RSS along body axis of symmetry, must have L values ZSMAX Maximum expected value of ZS, used to get rea- sonable scale for plotting RSS versus ZS, not needed if IPLOT=O r output Examples of output data are given i n appendix B. The input data are printed at the beginning of the output listing in the same order in which they appear in the NAMELIST statement. Then the identification card is printed. Headings and interpretations are as follows: Heading Description TAU Time at which the calculations were made DELTAU The computing time interval QC Convective heating rate QR Radiant heating rate 55 otal free -stseam e ~ t h a l p y emperature at time T - AT; this value can indicate whether a reasonable T is being used; by observing this value and the value at 7,unusual behavior might indicate the need for a smaller AT. TE Temperatures; to locate the station read ETA to the left and x above the temperature column; up to 15 temperatures are printed on one line; if more columns have been used, the remaining temperatures will be printed on the next line ETA Dimensionless y values, printed in the first column on the left side of the page Length along base curve from stagnation point to the station, printed in the second column and reading from left to right Surface mass loss rate at station n Mass l o s s due to oxidation at station n DELTA(N) aterial thickness at station n RAT (N) atio of local heating to stagnation heating at station n PRAT(N) Ratio of local pressure to stagnation pressure at station n Net heat input at station n Reradiation at station n Neat due to combustion for oxidation at station n Number of iterations for the previous column solution Number of iterations for the previous row solution Total number of iterations from the beginning of the problem IROCOL Tells at which solution the printout was made; value of 1 indi- cates column solution; 2, row solution Diagnostics The program has several automatic stops to avoid the waste of computer time on problems which appear to be having computational difficulties. These stops are (1) DELTA < DELTMIN: any thickness DELTA becomes less than the input DELTMIN a normal printout is made and the program will stop. 56 gative temperature: any temperature becomes negative, a normal printout is made and the program will stop, (3) DELTAU < LOE-6:: the computing time interval DEE AU becomes less than 1.OE-6, the message TEM ES CONVERGE will be printed. The current estimated temperatures are printed, a normal printout is made, and the pro- gram will stop, eration count exceeded: If the maximum iteration count input M exceeded and t calculation is a row solution, the co ing interval cannot be halved, The message S IS A ROW SOLUTION, DELTAU C T CHANGE is printed. The current estimated tenrqeratures are printed, a normal printout is made, and the program will stop. (5) Temperatu verging: If any temperature begins diverging, the message TEMPERATURE IS RGING . .. ~ WHY is printed. The current estimated temper- ~ atures are printed, a normal printout is made, and the program will stop, Whenever these diagnostics appear, the input should be checked to make s u r e that all initial conditions have been given. Check all input tables for any discontinuities. Negative temperatures may result from oscillations caused by time intervals which are too large. High values of NIDQT and rapid changes of heat input with time may require smaller time intervals for computational purposes. SAMPLE CASES Three sample cases a r e presented to illustrate the operationtof the computer pro- gram. All the cases are for ablating bodies of different geometries: a hemisphere, a hemispherically blunted cone, and a right-circular cylinder. A listing of the input data and a sample of the output data for each case are shown in appendix Be Computer-generated curves of some of the output from the sample cases are shown in figures 1, 2, and 3. The curves show body shape change due to ablation, histories of mass-transfer rate over the surface of the bodies, and selected temperature histories. The body shape is plotted at each time listed in the input PLTIME. The mass-transfer rates over the surface and the temperatures along the rows specified by the input NTP are plotted at each printing frequency for the output data. 57 The computing time depends on the accuracy desired; the boundary condition, that is, the heating-rate history; and the number of node points. The computational times for the sample cases are 136 seconds for the hemisphere, 312 seconds for the right-circular- cylinder, and 150 seconds for the hemispherically blunted cone, These cases have not been optimized with respect t o time and, therefore, may run in shorter periods of time. Langley Research Center, National Aeronautics and Space Administration, Hampton, Va., September 3, 1971. 58 LANGLEY LIBRARY SUBROUTINES Subroutine FTLUP Language: FORTRAN Purpose: Computes y = F(x) from a table of values using first- o r second-order interpolation. An option to give y a constant value f o r any x is also provided. - Use: CALL FTLUP(X, Y, My N, VARI, VARD) X The name of the independent variable x, Y The name of the dependent variable y = F(x). M The order of interpolation (an integer) M = 0 f o r y a constant. VARD(1) corresponds t o VARI(1) for I = 1, 2,.. .,N. For M = 0 or N 5 1, y = F(VARI(1)) f o r any value of x. The program extrapolates. M = 1 or 2. First or second o r d e r if VARI is strictly increasing (not equal). M = -1 o r -2. First or second o r d e r if VARI is strictly decreasing (not equal). N The number of points in the table (an integer). VARI The name of a one-dimensional a r r a y which contains the N values of the independent variable. VARD The name of a one-dimensional a r r a y which contains the N values of the dependent variable. Restrictions: All the numbers must be floating point. The values of the independent variable x in the table must be strictly increasing o r strictly decreasing. The following a r r a y s must be dimensioned by the calling program as indicated: VARI(N), VARD(N). Accuracy: A function of the o r d e r of interpolation used. References: (a) Nielsen, Kaj L.: Methods i n Numerical Analysis. The Macmillan Co., c.1956, pp. 87-91. (b) Milne, William Edmund: Numerical Calculus. Princeton Univ. Press, c.1949, pp. 69-73. Storage: 4308 locations. E r r o r condition: If the VARI values are not in o r d e r , the subroutine will print TABLE BELOW OUT O F ORDER FOR FTLUP AT POSITION xxx TABLE IS STORED IN LOCATION xxxxxx (absolute). It then prints the contents of VARI and VARD, and STOPS the program. Subroutine date: September 12, 1969. 59 a Subroutine DISCOT Language: FORTRAN Purpose: DISCOT performs single o r double interpolation f o r continuous o r discontinuous functions. Given a table of some function y with two independent variables, x and z, this subroutine performs Kxth- and Kzth-order interpolation t o calculate the dependent variable. In this subroutine all single- line functions are read in as two separate a r r a y s and all multiline functio-ns are read in as three separate a r r a y s ; that is, xi ( i = 1, 2, . .,L) Yj (j = 1, 2, . . ., M) k' (k = 1, 2, . . ., N) - Use: CALL DISCOT (XA, ZA, TABX, TABY, TABZ, NC, NY, NZ, ANS) XA The x argument ZA The z argument (may be the same name as x on single lines) TABX A one-dimensional a r r a y of x values TABY A one-dimensional a r r a y of y values TABZ A one-dimensional a r r a y of z values NC A control word that consists of a sign (+ o r -) and three digits. The control word is formed as follows: (1) If NX = NY, the sign is negative. If NX # NY, then NX is computed by DISCOT as NX = NY/Nz, and the sign is positive and may be omitted if desired. (2) A one in the hundreds position of the word indicates that no extrapolation occurs above zmZ. With a z e r o in this position, extrapolation occurs when z > Z m Z . The zero may be omitted if desired. (3) A digit (1 to 7) in the tens position of the word indicates the order of interpolation in the x-direction. (4)A digit (1 to 7) in the units position of the word indicates the order of interpolation in the z-direction. NY The number of points in y a r r a y NZ The number of points in z a r r a y ANS The dependent variable y 60 A A - Continued The following programs will illustrate various ways to use DISCOT: CASE I: Given y = f(x) NY = 50 NX (number of points in x array) = NY Extrapolation when z > zmax Second-order interpolation in x-direction No interpolation in z-direction Control word = -020 DIMENSION TABX (50), TABY (50) 1 FORMAT (8E 9.5) READ (5,l) TABX, TABY READ (5,l) XA CALL DISCOT (XA, XA, TABX, TABY, TABY, -020, 50, 0, ANS) CASE 11: Given y = f(x,z) NY = 800 NZ = 10 NX = NY/NZ (computed by DISCOT) Extrapolation when z > zmax Linear interpolation in x -dir ect ion Linear interpolation in z-direction Control word = 11 DIMENSION TABX (800) , TABY (800) , TABZ (10) 1 FORMAT (8E 9.5) READ (5,l) TABX, TABY, TABZ READ (5,l) XA, ZA CALL DISCOT (XA, ZA, TABX, TABY, TABZ, 11, 800, 10, ANS) CASE 111: Given y = f(x,z) NY = 800 NZ = 10 NX=NY Extrapolation when z > zmax Seventh-order interpolation in x-direction Third-order interpolation in z-direction Control word = -73 DIMENSION TABX (800) , TABY (800) ,TABZ (10) 1 FORMAT (8E 9.5) READ (5,l) TABX, TABY, TABZ READ (5,l) XA, ZA CALL DISCOT (XA, ZA, TABX, TABY, TABZ, -73, 800, 10, ANS) CASE IV: Same as Case 111with no extrapolation above zmax. Control word = -173 CALL DISCOT (XA, ZA, TABX, TABY, TABZ, -173, 800, 10, A N S ) 61 - ~on~inu@d Restrictions: See rule (5c) of section "Method" for restrictions on tabulating a r r a y s and discontinuous functions. The o r d e r of interpolation in the x- and z-directions may be from 1t o 7. The following subprograms are used by DISCOT: UNS, DISSER, LAGRAN. Method: Lagrange's interpolation formula is used in both the x- and z-directions for interpolation. This method is explained in detail in reference (a) of this subroutine. For a s e a r c h in either the x- or z-direction, the following rules are observed: (1) If x < xl, the routine chooses the following points for extrapolation: x17x2>. . .)xk+l and Y19Y27 - * -j Yk+l (2) If x > xn, the routine chooses the following points for extrapolation: xn-k?xn-k+l> ' * - 9 xn and Yn-kYYn-k+l, * . *7 Yn (3) If x 5 xn, the routine chooses the following points for interpolation: When k is odd, When k is even, (4) If any of the subscripts in rule (3) become negative o r greater than n (number of points), rules (1)and (2) apply. When discontinuous functjons are tabulated, the indepen- dent variable at the point of discontinuity is repeated. (5) The subroutine will automatically examine the points selected before interpolation and if there is a discontinuity, the following rules apply. Let xd and x ~ be + the ~ point of discontinuity. (a) If x 5 xd, points previously chosen are modified for interpolation as shown: Xd-k'xd-k+17 ' * - 2 xd and Yd-ktYd-k+lY * * *¶ Yd (b) If x > xd, points previously chosen are modified f o r interpolation as shown: xd+l,xd+2Y ' * . Y Xd+k and Yd+l,Yd+2,.. * ' 2 yd+k (c) When tabulating discontinuous functions, there must always be k + 1 points above and below the discontinuity in o r d e r to get proper interpolation. (6) When tabulating a r r a y s f o r this subroutine, both independent variables must be in ascending order. 62 (7) In some engineering programs with many tables, it is quite desirable to read in one a r r a y of x values that could be used for all lines of a multiline function or different functions. Even though this situation is not always applicable, the subroutine has been written to handle it. This procedure not only saves much time in preparing tabular data, but a l s o can save many locations previously used when every y coordinate had t o have a corresponding x coordinate. Another additional feature that may be useful is the possibility of a multiline function with no extrapolation above the top line. Accuracy: A function of the o r d e r of interpolation used. Reference: (a) Nielsen, Kaj L.: Methods in Numerical Analysis. The Macmillan Co., c.1956. Storage : 5558 locations. Subprograms used: UNS 408 locations. DISSER 1108 locations. LAGRAN 558 locations. Subroutine date: August 1, 1968. 63 cd 0 w M E: 4-J *d m d .r( 4-3 7 9 .r( d a, i3 cd m . m t W . d Q 0 I1 'H - 0 a * 11 X m I w m m N, a m r - W a 2 a, l-4 + w * 11 LL n I m a a a E" - I - e w . 0 I1 I W OI a . cd * Y X m a N W 2 a, - * 0 z m I1 3 E ffl m i -c, X Y W a I- n z W n m I W 0' N k z m 0 w m N .c W a m c s .-. IJ? - O W * Q Y m m e m - . o E a I- 0 * 0 0 - m c w -.NI- -a e x I1 I- oo e C 11 X a - L F I- I1 N e c C L at- a I1 I- c E: cd z -I1 o c a: 0 JF 4 ILQI- Q * .* t C O LLR w J-- I - C J w I 1 I1 s a C J W 64 m rl A In n 0 c 0 I W I w I 'XI + W n m m " 0 0. * CD OI I- m 4 ro P PJ 4 * * n r- .-( rr N d m 0 C I UJ + W m m . 9 9 N Q m OI 4 N 0 0 m 0 4 0 " O m 0 I I - w W W Lu w m p \ I 0 4 m (P ln m N w. .. O N 5. " .-) m G m o f - m (E rr m N