The improvement of the reduced coordinate iterative procedure for simultaneous linear equations by Timothy Mark Hodges A thesis submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE in Mechanical Engineering Montana State University © Copyright by Timothy Mark Hodges (1982) Abstract: An iterative method for solving simultaneous linear equations is considered. Previously, the trial solution generation routine depended on knowledge of the physical system. A method is introduced to generate the trial solutions based on the system of equations. The new method is used to solve several differential equations with various boundary conditions, so as to show that the method is independent from the physical system. Examples of two steady-state problems and a transient problem, with 1000 unknowns, demonstrate the performance as compared to existing techniques. Results indicate that the method is superior in cases where the boundary conditions are more complicated, and the method is comparable in all other cases. IHE IMPROVEMENT OF THE REDUCED COORDINATE ITERATIVE PROCEDURE F O R SIMULTANEOUS LINEAR EQUATIONS by Timothy Mark Hodges A thesis submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE in Mechanical Engineering MONTANA STATE UNIVERSITY Bozeman, Montana December 1982 MAiN u b . n1 37? (pkb ^ dap' ^ l H ii APPROVAL of a thesis submitted by Timothy Mark Hodges This thesis has been read by each m e mber of the thesis committee and has been found to be satisfactory regarding content, English usage, format, citations, bibliographic style, and consistency, and is ready for submission to the College of Graduate Studies. XvU-CDate Z 7 /<? A Chairperson, Graduate Committee Approved for the Major Department 42 2-1 > ^ . Date Head, Major Department Approved for tl i'Z Date " 7 J ' t 2' Graduate Dean iii STATEMENT OF PERMISSION TO USE In presenting this thesis in partial ments for a master's degree at Montana fulfillment of the require­ State University, I agree that the L i b r a r y shall m a k e it a v a i l a b l e to b o r r o w e r s u n d e r rules of the library. Brief quotations special permission, f r o m this thesis are a l l o w a b l e w i t h o u t provided that accurate acknowledgement of source is made. P e r m i s s i o n for e x t e n s i v e q u o t a t i o n from or reproduction of this thesis m a y be granted by m y major professor, the Director of Libraries when, or in his/her absence, in the opinion of either, use of the m a t e r i a l is for s c h o l a r l y purposes. the m a t e r i a l Date the proposed A n y co p y i n g or use of in this thes i s for f i n a n c i a l g a i n shall not be a l l o w e d without m y written permission. Signature. by V ACKNOWLEDGEMENTS The aut h o r w i s h e s to th a n k Dr. D. 0. B l a c k k e t t e r and Dr. Ri 0. W a r r i n g t o n for t h e i r h e l p and guid a n c e study. The auth o r in the p e r f o r m a n c e of this also w i s h e s to t h a n k Dr. R. J. Cona n t for all his help in advising over the past year. all her support and understanding. And finally thanks go to Lisa for vi TABLE OF CONTENTS Page L I S T S ......................... List of T a b l e s.......... . .................................... . ... List of F i g u r e s .......... ABSTRACT.................................. ............. , ..... . 1. 2. 3 INTRODUCTION.... ........................... DESCRIPTION OF METHOD .............. ................ ....... . . . vii vii ix xi I 3 . DESCRIPTION OF THE NEW TRIAL SOLUTION GENERATION.............. 6 4. APPLICATIONS AND R E S U L T S ........................ ............... . 10 5. DEVELOPMENT OF RCDP WITH APPLICATIONS AND RESULTS ....... 47 6. CONCLUSIONS....... ..... 58 REFERENCES C I T E D .................. 60 APPENDICES,... ............................... 62 Appendix A— Illustrative Example of RCIP ................. Appendix B- S o l u t i o n of a S i m p l e B o u n d a r y Va l u e P r o b l e m Using RCIP .......................... Appendix C- Flow Chart of RCIP Computer Program ............. Appendix D- S o l u t i o n of a S i m p l e B o u n d a r y Value P r o b l e m Using R C D P ......................................... 63 68 72 74 vii LIST OF TABLES Table 1 2 3 4 5 6 7 8 Page Results of I-D Ordinary Differential Equation Problem I, with Derivative Boundary Conditions, for Various Numbers of Trial Solutions......................................... 14 Results of I-D Ordinary Differential Equation Problem 2, w i t h Composite Boundary Conditions, For Various Numbers of Trial Solutions ........................................ 16 Results of I-D Ordinary Differential Equation Problem 3, with Mixed Boundary Conditions, For Various Numbers of Trial Solutions ..... 17 Results of I-D Ordinary Differential Equation Problem 3, with Mixed Boundary Conditions, for Various SOR Factors 18 Results of I-D Ordinary Differential Equation Problem 4, w i t h Dirichlet Boundary Conditions, for Various Numbers of Trial Solutions ....................... 21 Results of I-D Ordinary Differential Equation Problem 4, w i t h D i r i c h l e t B o u n d a r y C onditions, for V a r i o u s SOR Factors ...................... 22 2 -D L a p l a c e s E q u a t i o n R e s u l t s F o r Va r i o u s N u m b e r s Trial Solutions ............ of 25 2-D Laplaces Equation Results for Various SOR Factors .. 26 Heat Condu c t i o n P r o b l e m , C u b e - C u b e G e o m e t r y , F o r Va r i o u s N u m b e r s of Trial Solutions ........................................... 33 Results of the 3-D Steady-State Heat Conduction Problem, Cube-Cube Geometry, For Various SOR Factors............. 34 Results of 3-D Transient Heat Conduction Problem, Cube Geometry, Using RCIP ...................................... 38 Results of 3-D Transient Heat Conduction Problem, Cube Geometry, Using ADEP ...................................... 40 9 R e s u l t s for the 3-D S t e a d y - S t a t e 10 11 12 viii LIST OF TABLES (continued) Table 13 Page Results of RCDP for the Ordinary Differential Equation, with Derivative Boundary Conditions, For Various Numbers of Equations..,........... ................................. 50 14v R e s u l t s of G a u s s i a n - E l i m ! n a t i o n for the O r d i n a r y !./ Differential Equation, w i t h Derivative Boundary ’ Conditions, For Various Numbers of Equations............ 50 V * 15 Results of RCDP for the Ordinary Differential Equation, with Composite Boundary Conditions, for Various Numbers of E q u ations........................ 52 R e s u l t s of G a u s s i a n - E l i m i n a t i o n for the O r d i n a r y Differential Equation, with Composite Boundary Conditions, For Various Numbers of Equations ........... 52 Results of RCDP for the Ordinary Differential Equation, with Mixed Boundary Conditions Conditions, for Various Number of Equations ....................................... 54 I S ^ R e s u l t s of G a u s s i a n - E l i m i n a t i on for the O r d i n a r y Differential Equation, with M i x e d B o u n d a r y Conditions, for Various Numbers of Equations ........................ 54 16 17 19 20 Results of RCDP for the Ordinary Differential Equation, with Dirichlet Boundary Conditions, for Various Numbers of Equations ............................................... R e s u l t s of G a u s s i a n - E l i m i n a t i o n for the O r d i n a r y Differential Equation, with Dirichlet Boundary C o n d i t i o n s , for V a r i o u s N u m b e r s of E q u a t i o n s ........ 56 56 ix LIST OF FIGURES Fig. 1 2 3 4 5 6 7 8 9 10 11 Page T r i a l S o l u t i o n s and D i f ferent Relaxation Factors Versus U s e r E x e c u t i o n T i m e for 1—D O r d i n a r y D i f f e r e n t i a l Equation Problem 3, With Mixed Boundary Conditions...... 19 Trial Solutions and Different R e l a x a t i o n F a c t o r s V e r s u s U s e r E x e c u t i o n T i m e F or I-D O r d i n a r y D i f f e r e n t i a l Equation Problem 4, with Dirichlet Boundary Conditions... 23 T r i a l S o l u t i o n s and D i f f e r e n t Relaxation Factors Versus User Execution Time for the 2-D Laplaces Equation........ 27 C u b e — C u b e G e o m e t r y f o r the 3 — D S t e a d y — S t a t e H e a t Conduction P r o blem.......................................... 30 Tr i a l S o l u t i o n s and D i f f e r e n t Relaxation Factors Versus User Execution Time for 3—D Steady— State Heat Conduction Problem, Cube-Cube Geometry......... ...... .............. . 35 U s e r E x e c u t i o n T i m e V e r s u s A v e r a g e P e r c e n t Error. R C I P Versus ADEP for the 3-D Transient Heat Transfer Problem with Elapsed Time T=0.1 ..................................... 42 U s e r E x e c u t i o n t i m e V e r s u s A v e r a g e Pe r c e n t E r r o r . R C I P Versus ADEP for the 3-D Transient Heat Transfer Problem with Elapsed Time T = 0 . 5 .................................... 43 U s e r E x e c u t i o n T i m e V e r s u s A v e r a g e Pe r c e n t Error. R C l P Versus ADEP for the 3—D Transient Heat Transfer Problem with an Elapsed Time T=I .0...................... .'.......... 44 User Execution Time Versus Average Percent Error for RCDP Versus Gaussian-Elimination of I-D Ordinary Differential Equation Problem I, Derivative Boundary Conditions.... ,.. 51 User Execution Time Versus Average Percent Error of RCDP Versus Gaussian-Elimination for I-D Ordinary Differential Equation Problem 2, Composite Boundary Conditions........ 53 User Execution Time Versus Average Percent Error of RCDP Versus Gaussian-Elimination for I-D Ordinary Differential Equation Problem 3, Mixed Boundary Conditions............ 55 X LIST OF FIGURES (continued) Fig. 12 Page User Execution Time Versus Average Percent Error of RCDP Versus Gaussian-Elimination for I-D Ordinary Differential Equation Problem 4, Dirichlet Boundary Conditions..... .. 57 xi ABSTRACT An iterative method for solving simultaneous linear equations is considered. Previously, the trial solution generation routine depended on k n o w l e d g e of the p h y s i c a l system. A m e t h o d is i n t r o d u c e d to generate the trial solutions based on the system of equations. The new m e t h o d is u s e d to solve seve r al d i f f e r e n t i a l e q u a t i o n s w i t h va r i o u s boundary conditions, so as to show that the method is independent from the p h y s i c a l system. E x a m p l e s of t w o s t e a d y - s t a t e p r o b l e m s and a transient problem, w i t h 1000 unknowns, demonstrate the performance as compared to existing techniques. Results indicate that the method is superior in cases where the boundary conditions are more complicated, and the method is comparable in all other cases. (I) CHAPTER I INTRODUCTION Many numerical methods have been developed to accurately solve a large s y s t e m of s i m u l t a n e o u s e q u a t i o n s . that has the possibility of being A m e t h o d is p r e s e n t e d here faster and more accurate than these methods. The Reduced Coordinate Iterative Procedure (RCIP)[1] uses a linear c o m b i n a t i o n of trial s o l u t i o n s , w i t h each trial s o l u t i o n having an unknown weighting coefficient. mined by minimizing E a c h weighting coefficient is deter­ an error function. This minimizing process pro­ duces a smaller set of equations which can be solved directly for these w e i g h t i n g co e f f i c i e n t s . tions, Therefore, in solving a large set of e q u a ­ the RCIP method reduces the number of equations to be solved. The m e t h o d of least squares can be r elated to the R C I P method, because of method.[3] passes the minimization of the s quared residual in the RCIP The least squares method finds the equation of a curve that through scattered points. This curve is found so that the sum of the square distances from each point to the curve is a minimum. the RCIP method equation set, used for the s u m of the the variance, curve equations as RCIP fitting is. squares is minimized. and not for the of the r e s i d u a l s The least solu t i o n squares of from method In the is simultaneous (2) Another method that RCIP is related to is the Conjugate Direction M e t h o d [4,8]. The R C I P and C o n j u g a t e D i r e c t i o n m e t h o d s b o t h use the minimization of an error function in the solution of the problem. Conjugate Direction direc t i o n s . The Method minimizes the error along Conjugate Direction Method will iterations than there are unknowns. The o r t hogonal converge in less The methods have been shown to be different [I]. To evaluate techniques were using the p e r f o r m a n c e used: successive of the R C I P m ethod, The first was a Gauss-Seidel o v e r - r e l a x a t i o n (SOR) [5], iterative scheme and the second w as the Alternating Direction Explicit Procedure (ADEP)[6], methods t w o existing Both are excellent for c o m p a r a t ion, b e c a u s e of the Ir speed of c o n v e r g e n c e and their accuracy. The RCIP method previously has had a systematic procedure for the generation of trial solutions. was dependent on knowledge However, the trial solution generation of the physical system which the equation represented. The trial solution generation should be independent of the knowledge of the physical system. It is the purpose of this paper to p resent a trial solu t i o n generation scheme that is independent of the knowledge of the physical system while continuing to produce rapid convergence and be competitive with existing methods. (3) CHAPTER II DESCRIPTION OF THE METHOD The RCIP method uses a linear tors with each efficient. duced set trial combination of trial solution having solution vec­ an unknown scalar weighting co­ The w e i g h t i n g c o e f f i c i e n t s are o b t a i n e d b y solving a r e ­ of equations which are obtained by minimizing the variance. The r e d u c e d set is s o l v e d usi n g an exact or direct method. The trial s o l u t i o n s are d i f f e r e n t at each i t e r a t i o n and the it e r a t i v e process continues until the desired convergence is reached [2]. The formulation of RCIP proceeds as follows: Let AX=F (I) be a system of n equations in n unknowns. (m is the number of trial solutions, Initially choose m vectors G(k,m)Q n in length, the subscript 0 indicates the first iteration) G(k,I)q ,'G(k, 2 )q ,....,G(k,m) q k=l (2 ) where m < n, and set m k=l X0 = Z ctj G(k,j)0 (3) J=I where the scalars (a^'Qg" o m ) are to be determined. Let ,am )= < A X 0- F , A X 0-F> = | IA X q- F I I2 (4) (4) be the inner (R q = A X q -F), product and the respectively. square F i n d the of the norm of the residual s o l u t i o n (<Zq ^,....,aQ m ) to the system p I ,..., m . (5) Designate V 0 V ( a 0 , l ,,--,<z0 , m ) and let X(l,l)= 2 k -!#•••# He UQ j G(k,j)0 j=l Then ...,am )= l IAX1-Fl I solve the system p !#•••>m and if Ca1 m ) is the solution, de s i g n a t e (10) V 1= V 1 (O1 1 1 --^al m ) and let m X(2,l)= ^ O1 . G(Icj)1 j=l k = l ,...,n (11) k Ii111 >u (12) At the ith stage. X(i,D— 2 ai—i 4 ®'Ck, j )^_i 3=1 ’J Select v e c t o r s G(k,2) X. = G(k,m) m 2 Oj G ( ^ j ) i J=I and let k = l , 11.,n (13) (5) Then Vi U 1, . . . , <zmM IAXi - F l I 2 . . (14) Again solve the system 9V. P=I,..,m. (15) If this s o l u t i o n is (^i !,•••,^ i m ), then V i = V i (ai>1,.,•,ai>m) . (16) The algorithm continues with X(i+l,l)= U i j G(k,j)i k=l,...,n , (17) j=l s e l e c t i o n of G(k,2) i + 1 ,...,G(k,m)i+1 , X i+1™ 2 “ j G (k,j)i+1 j=l k = l ,...,n , (18) and a subsequent minimization of V i + l (al ’---’a m ) = ^ A X i+l_ F ^ 2 - (19) The solution of the original system is derived from X = L i m i_ >+eoG(i,l). (20) T o i l l u s t r a t e the t h e o r y of the above s e c t i o n an e x a m p l e p r o b l e m presented in Appendix A. is (6) CHAPTER III DESCRIPTION OF NEW TRIAL SOLUTION GENERATION P r e v i o u s l y the trial s o l u t i o n g e n e r a t i o n p r o c e s s w a s b a s e d on knowledge of the physical system represented. The new trial solution selection process successfully makes the RCIP method independent of the k n o w l e d g e of the p h y s i c a l system. system of equations and The n e w m e t h o d u t i l i z e s only the information resulting from other trial solutions to obtain sets of trial solutions. At the beginning of the first iteration, set is selected. an initial trial solution O n s u c c e s s i v e i t e r a t i o n s the trial s o l u t i o n set is c o m p o s e d of the last b e s t solution, and a sequence of special G a u s s — Seidel solutions. E q u a t i o n s to be solv e d b y G a u s s - S e i d e l for trial solutions are formed from the same coefficient matrix as the original p r o b l e m and a n e w right h a n d side. F o r the second trial solution the n e w right h a n d side is the r e sid u a l f r o m the e q u a t i o n set using the last best solution. s o l u t i o n is zero. o b t a i n trial The initial Three Gauss-Seidel s o l u t i o n two. trial solution two. is f o r m e d f r o m guess used for iterations the Gauss-Seidel are p e r f o r m e d to The third trial s o l u t i o n is s i m i l a r to The difference is that another new' right hand side the r e s i d u a l of the seco n d trial solution. Again a Gauss-Seidel solution scheme is used to solve for the solution to this new set. An initial guess of zero is used, w i t h three iterations (7) x performed. The rest of the trial solutions are calculated in the same fashion until m number of trial solutions are reached. An example, of m equal to three trial solutions, is shown below. Let A*X=F (21) be an nxn system of equations. For the first iteration the first trial solution is G(i,I) = initial estimate i=l,...,n. Now find the residual vector for thefirst R^T.S. (22) trial solution (or T.S. I) I) = A*G(i,l) - F i i=l,...,n. (23) i=l,...,n . (24) Form the new equation set for trial solution two A*G(i,2) = R i CT-S. I) Solve using Gauss-Seidel with an initial iterations to o b t a i n G d , 2). Now guess of zero. Perform three find the residual v e c t o r for the second trial solution R i (T.S. 2)= A*G(i,2) - R ^ T . S . I) i=l,...,n. (25) Form the new equation set for trial solution three A*G(i,3) = R i (T.S. 2) Solve this Perform set three using Gauss-Seidel iterations i=l,...,n. with to obtain G d , 3). for the first i t e r a t i o n have b e e n found. an initial The three solution. guess of zero. trial solutions For the s e c o n d th r o u g h the nth iterations the only change is that the first trial last best (26) solution is the (8) The ba s i s for this trial s o l u t i o n s e l e c t i o n p r o c e s s is b a s e d on the following: A*G(i,l) - F - subtract R i CT-S. D = O (27a) A*G(i,2) - R i CT-S. I) - R i CT-S- 2) = 0 (27b) A*G(i,3) - R i CT-S- 2) = 0 (27c) (27c) from (27b) A*(G(i,2) - G ( i,3)) - R i CT-S- D = O subtract (28) from A*(G(i,D (28) (27a) - G(i,2) + G(i,3)) - F = 0. (29) N o t e , if G d , 3) is an exact solution to equation (27c) and X i = Gd,I) then X i is an exact - G d , 2) + G d , 3). s o l u t i o n to e q u a t i o n (30) (21). Note that G d , 3) is approximate therefore, X i is approximate. The numerical algorithm for the generation of the trial solutions is as follows. The first trial solution for the first iteration is Gd,I) = initial estimate i=l,...,n. (31) The first trial solution for the second through the nth iterations is Gd,!) = X. i=l,...,n. (32) (9) The second through the m t h trial solution is calculated as follows i=l,...,n i=l,...,n k k = 2 ,m p = l , ..,3 (33) (34a) R i (kk) = (A(i,k,)*G(k,kk-l)) - R i(Rk-I) (34b) G(i,kk) = 0 (34c) G(i,kk)p = R i (Rk) / A(i,i) n - Z A(i,k)*G(k,kk) k=l (34d) / A(i,i) . The above a l g o r i t h m s w i l l c a l c u l a t e m n u m b e r of trial s o l u t i o n s . A n illustrative problem is solved and included in Appendix B. (10) CHAPTER IV APPLICATIONS AND RESULTS This c h a p t e r is d e v o t e d to the s o l u t i o n of p r o b l e m s b y the R C I P method and a c o m p a r i s o n w i t h some particular the SOR and ADEP methods The RCIP equations. method is Therefore, i n t e n d e d to of the exis t i n g techniques. In are compared with the RCIP method. solve linear systems of algebraic to solve the following differential equations a finite difference technique is used to model each differential equation as a system of algebraic equations. In each p r o b l e m the c o n v e r g e n c e lim i t used is a l w a y s that the v a r i a n c e be less than or equal to some convergence criterion. The v a r i a n c e of the e q u a t i o n set is d e f i n e d as the s um of the residuals squared, for all the equations. average percent W h e n an exact s o l u t i o n is k n o w n an error can be obtained which of the d i f f e r e n c e s b e t w e e n the exact is defined as the average s o l u t i o n and the approximate solution divided by the exact solution. PROBLEMS ONE THROUGH FOUR The following four ordinary differential show the generality of the new method. equations are solved to Various boundary conditions are (11) employed to illustrate a spectrum of problems. Problem one follows: Solve A — - + y = 0 (35) dx for the region 0 <= x <= y' (0) = 0 To illustrate differential , tt/2 with the derivative boundary conditions y' (tt/2) = I (35a) the finite difference technique e q u a t i o n and b o u n d a r y c o n d i t i o n s a l g e b r a i c form. the above governing will be modeled in The cent r a l d i f f e r e n c e a p p r o x i m a t i o n of the second order derivative is d2J y i+1 ~ 2 Ji + Yi-! ---= --------------------dx^ Ax^ (36a) equation (35) becomes ?i+l - % ?i + y i-l Ax + 2 Yi (36b) 0 The central difference approximation of the first order derivative is iI dx equations y i+l ~ y i~l (36c) 2Ax (35a) become y i+l(0) = y i_ 1 (0) y i +l(n/2) - y i_ 1 (n/2) = 2Ax The above finite (36d) . (36e) d i f f e r e n c e m o d e l approximates the differential equation as a system of linear equations. i (12) The exact solution for problem one is Tesact = " C0S x • <36f) The finite d i f f e r e n c e m o d e l for p r o b l e m I is u s e d to illustrate the SOR algorithm used. The algorithm follows: Y j + i(r+1) + Y . * (r+1) Y. (r+1) = (I-X) *Y.(r) + X * -------------------------2 - AX2 the variable indicates r indicates the p r e s e n t nodal point. the previous iteration, iteration, and the subscript The variable X is the SOR factor, the val u e of X=1.0 is just the r+1 i indicates the which is between I and 2 for over r e l a x a t i o n and b e t w e e n 0 and I for under relaxation. va l u e (37) G a u s s - S e i d e I routine. The p r o b l e m s w e r e m o d e l e d in the same m a n n e r as p r o b l e m I. The remaining And the S OR factor used in the following problems was the same as above. [5] Problem two follows: Solve d2y --dx2 + y = 0 (38) for the region 0 <= x <= rc/2 with the composite boundary conditions y ' (0) + y(0) = I y' (n/2) - y(jr/2) = -I (39) . (40) The exact solution for equations (38-40) Yexact = (SIN x + C0S x)/2 Problem three follows: x 2 d2y --. dx2 • is , (41) Solve dy o — 2x — + 2y = x dx (42) (13) for the region I <= x <= 2 with the mixed boundary conditions y ( I) = 0 , y ' (2) = 0. (43) The exact solution for equations (42-43) 4 Yexact “ " x 3 5 ’5 2 ---x + 3 " is 1 3 " x 2 • <4 4 > Problem four follows: Solve 2 d2y (1—x ) dx2 — dy 6x — dx — 4y = 0 (45) for the region 0 <= x <= 0.5 with the Dirichlet boundary conditions y(0) = -4.5 , y ( 0 .5) = 2 . (46) The exact solution for equations (45-46) 27 0 2 2 Yexact ~ — (3x-x /(1-x ) ) 6 S t a n d a r d fini t e d i f f e r e n c e approximate the above problems. is - 27 2 2 — (l/(l-x ) ) 6 . (47) t e c h n i q u e s are used to algebraically In each of the first nodal n e t w o r k is c h o s e n so that there is four problems a 50 spaces for each region, which requires a different number of equations for each problem. The d i f f e r e n t n u m b e r of e q u a t i o n s r e s u l t e d f r o m the d i f f e r e n t b o u n d a r y conditions. A u n i f o r m initial e s t i m a t e of 0.5 is c h o s e n to start the methods. In problem one the convergence limit was that the variance in the 51 e q u a t i o n set be less t h a n or equal to 0.1. The r e s u l t s of the R C I P m e t h o d for v a r i o u s n u m b e r s of trial solutions are s h o w n in Table I. The SOR method, obtain the with over and then under relaxation factors, convergence criterion did not in 10,000 iter a t i o n s w i t h a user Table I. Results of I-D Ordinary Differential Equation Problem I , with Derivative Boundary Conditions, for Various Numbers of Trial Solutions. NUMBER OF TRIAL SOLUTIONS 2,3,4 NUMBER OF ITERATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) DID NOT CONVERGE AT 100 ITERATIONS. 11 0.3208 12.97 6 11 1.1182 15.59 7 8 1.1586 13.40 8 6 0.7707 11.63 9 5 0.2624 11.13 The SOR Method Did Not Converge at 10,000 Iterations. (14) 5 (15) execution time of 660 seconds. to S O R in that R C I P o b t a i n s Therefore, the RCIP method is superior a s o l u t i o n and SO R does not. W h e n the number of trial solutions was less than 5 the convergence criterion was not o b t a i n e d w i t h the R C I P method, it did not conv e r g e at 100 it e r a ­ tions w i t h a u s e r t i m e of 240 seconds. This is b e c a u s e the s m a l l e r number of trial solutions does not contain enough information to obtain rapid convergence. Problem 2 is v e r y similar to p r o b l e m I. s o l u t i o n of 51 e q u a t i o n s are s h o w n in Table 2. trial solutions is less than 8 the convergence The r esults of the W h e n the n u m b e r of c r i t e r i o n w as not obtained w i t h the RCIP method , this was because of the smaller number of trial s o l u t i o n s not containing enough information to obtain rapid convergence. The trial solutions 2—7 did not converge at 100 iterations with a time of a p p r o x i m a t e l y 240 seconds. The S O R m e t h o d did not o b t a i n the c o n v e r g e n c e c r i t e r i o n at 10,000 iterations w i t h a time of 660 seconds. Several under relaxation, again, relaxation factors were utilized, with no convergence being obtained. produces a solution and SOR does not. over and then The RCIP method The limit of convergence for this problem is that the variance be less than or equal to 0.001. Problem 3 was solved and the results are shown in Table 3 for the R C I P m e t h o d and in T a b l e 4 for the S O R method. execution method, I). time versus the n u m b e r of trial A g r a p h of the u s e r so l u t i o n s for the R C I P and over relaxation factor for the SOR method is included (Fig. Clearly, as the graph shows, the conver g e n c e to a solution r e q u i r e s less t i m e for the R C l P m e t h o d than for the S O R method. The Table 2. Results of I-D Ordinary Differential Equation Problem 2, with Composite Boundary Conditions, for Various Numbers of Trial Solutions. NUMBER OF TRIAL SOLUTIONS 2-7 NUMBER OF ITERATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) DID NOT CONVERGE AT 100 ITERATIONS. 22 .2306 41.29 9 10 .1739 21.69 10 4 .2227 9.93 11 4 .1333 10.95 The SOR Method did not Converge at 10,000 Iterations. (16) 8 Table 3. Results of I-D Ordinary Differential Equation Problem 3, with Mixed Boundary Conditions, for Various Numbers of Trial Solutions. NUMBER OF TRIAL SOLUTIONS 2 NUMBER OF ITERATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) DID NOT CONVERGE AT 100 ITERATIONS. 20 .0761 17.77 6 8 .0686 10.99 8 6 .0088 11.19 10 5 .0181 11.84 12 4 .0324 11.54 (17) 4 Table 4. Results of I-D Ordinary Differential Equation Problem 3, with Mixed Boundary Conditions, for Various SOR Factors. SOR FACTORS I.0-1.3 NUMBER OF ITERATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) DID NOT CONVERGE AT 1000 ITERATIONS. 837 .1216 52.21 1.4 347 .1594 21.92 1.5 648 .0629 40.50 1.6 680 .0634 42.52 (18) 1.35 (19) SOR FACTOR DSER EXECUTION TIME (SEC) 1.45 4 6 8 □ RCIP METHOD A SOR METHOD 10 12 NUMBER OF TRIAL SOLUTIONS Figure I. Trial Solutions and Different Relaxation Factors Versus User Execution Time for I-D Ordinary Differential Equation Problem 3, with Mixed Boundary Conditions (20) g r a p h of the trial s o l u t i o n s v e r s u s the e x e c u t i o n t i m e for the R C I P method is flat indicating about the same execution time for any number of trial solutions, time where the graph of the SOR factor versus execution for the S O R m e t h o d has a dip i n d i c a t i n g the i m p o r t a n c e of the optimum SOR factor. a variance The solution to problem 3 is for 50 equations and less than or equal to 0.001. Problem 4 was solved and the results are found in Table 5 for the RCIP method execution method, and T a b l e time and (Fig. 2). versus 6 for the S O R method. the n u m b e r of trial A graph so l u t i o n s of the user for the R C I P the over relaxation factors for the SOR method is included In F i g u r e 2, the S O R and the R C I P m e t h o d b o t h have a p p r o x i ­ mately the same results. The RCIP method was faster, by approximately 10 seconds, in the e x e c u t i o n t i m e t h a n the S OR m ethod, until the S O R method was approaches its optimum faster. F o r this p r o b l e m methods relaxation factor where the t w o m e t h o d s are the SOR method c omparable. The solved 49 equations for a variance less than or equal to 0.001. PROBLEM FIVE Laplace's equation was solved in a rectanglar region of length one in the y d i r e c t i o n and t w o in the x direction. Each side of the rectangle is maintained at a different temperature. The problem is formally stated as follows: Solve d2T d2T --- -f — — = O 9x2 (48) 3y2 for the region 0 <= x <= 2 , 0 <= y <= I (49) Table 5. Results of I-D Ordinary Differential Equations Problem 4, with Dirichlet Boundary Conditions, for Various Numbers of Trial Solutions. NUMBER OF TRIAL SOLUTIONS 2-3 NUMBER OF ITERATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) DID NOT CONVERGE AT 100 ITERATIONS. 51 7.5369 42.83 6 20 7.5286 25.89 8 10 7.5297 17.77 10 6 7.5252 13.58 11 5 7.5354 12.58 (21) 4 Table 6. Results of I-D Ordinary Differential Equation Problem 4, with Dirichlet Boundary Conditions, for Various SOR Factors. SOR FACTORS I.0-1.3 NUMBER OF ITERATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) DID NOT CONVERGE AT 1000 ITERATIONS • 925 7.5231 55.71 1.5 709 7.5234 42.78 1.6 517 7.5237 31.25 1.7 342 7.5248 20.84 1.8 181 7.5463 11.22 1.9 148 7.5367 9.23 (22) 1.4 (23) SOR FACTOR USER EXECUTION TIME (SEC) 1.4 30 1.5 1.6 1.7 1.8 1.9 A SOR FACTOR □ RCIP METHOD - NUMBER OF TRIAL SOLUTIONS Figure 2. Trial Solutions and Different Relaxation Factors Versus User Execution Time for I-D Ordinary Differential Equation Problem 4, with Dirichlet Boundary Conditions (24) with the boundary conditions T(x,0) = 200 (50a) T(x,2) = 400 (50b) T(0,y) = 300 (51a) T(l,y) = 100 (51b) A standard finite difference technique was used to approximate the equation in (48). A nodal network of 7 nodes in the y direction and 15» nodes in the x direction, was selected. This results in Ax and Ay being 0.125. All solution attempts began with an initial estimate of a uniform temperature distribution equal the analytical solution [7]. to unity, the results are compared to The convergence limit for the solution of the 105 e q u a t i o n s w a s set at the v a r i a n c e b e i n g less t h a n or equal to 0.000001. D a t a f r o m the s o l u tions us i n g d i f f e r e n t n u m b e r s of trial s o l u t i o n s is p r e s e n t e d in T a b l e 7 for the R C I P m ethod, the solutions using different relaxation factors and data f r o m is presented in Table 8 for the SOR method. The results for the RCIP method are compared to the results of the S O R meth o d . A g r a p h of e x e c u t i o n t i m e v e r s u s trial s o l u t i o n s for the RCIP method, and SOR factor for the SOR method will indicate the effec­ tiveness of the RCIP method in speed and accuracy.(Fig. 3) F i g u r e 3 i n d i c a t e s that the S O R m e t h o d has a s t e a d y decrease in execution time for each successive SOR factor until of 1.53 is reached. After the optimum is the optimum value reached an increase is Table 7. 2-D Laplace's Equation Results for Various Numbers of Trial Solutions NUMBER OF TRIAL SOLUTIONS NUMBER OF ITERATIONS 2 23 7.0529 1.3430 3 9 . 7:0528 .9422 4 6 7.0527 .8967 5 4 7.0528 .7912 6 3 7.0527 .7387 7 3 7.0527 .8490 AVERAGE % ERROR USER EXECUTION TIME (MIN) (25) Table 8. 2-D Laplace's Equation Results for Various SOR Factors SOR FACTOR NUMBER OF ITERATIONS AVERAGE % ERROR USER EXECUTION TIME (MIN) 7.0529 1.6250 1.2 84 7.0529 1.0895 1.4 51 7.0529 .6958 1.5 35 7.0528 .5023 1.6 35 7.0527 .5010 1.7 48 7.0527 .6588 1.8 75 7.0527 .9808 (26) 129 1.0 (Gauss-Seidel) (27) SOR FACTOR RCIP METHOD A SOR METHOD USER EXECUTION TIME (MIN) □ 1 2 3 4 5 6 7 8 NUMBER OF TRIAL SOLUTIONS Figure 3. Trial Solutions and Different Relaxation Factors Versus User Execution Time for 2-D Laplace's Equation (28) observed. In the execution time RCIP from 2 method trial there is s o l u tions a large decrease to 3 trial in the solutions, but thereafter until 7 trial solutions the execution time decreases by only 9%. The decrease in execution time from 3 to 4 trial solutions is only 0.046 minutes, where the average decrease is 0.068 minutes per trial solution. from 3 to 6 trial solutions This small decrease is due to the next to last iterations variance being just above the convergence limit this causes the method decrease in the variance, The SOR methods to p e r f o r m one more iteration with 0.2X10 below the convergence limit. s o l u t i o n had a s m a l l e r e x e c u t i o n time a 98% at its o p t i m u m v a l u e of 1.53 t h a n any of the s o l u tions of the R C I P method. The RCIP method solutions, This is flat, in its solutions shows that exception of 2, any cho i c e o nly 9% difference for different numbers of trial solutions, from of 3 to trial with 6 trial solutions. the possible is going to take approximately the same amount of time to obtain a solution. Where the SOR method has a large difference , 69% from Gauss-Seidel to the optimum SOR factor, in its execution time. A accurate solution with acceptable execution time is only obtained close to the optimum value. PROBLEM SIX The elliptical partial differential equation to be solved is d2T where T, x, y, S2T 9 2T and z are non-dimensional variables for temperature and three spatial coordinates. The g e o m e t r y is a cube of face l e ngth 0.4 (29) l o c a t e d c o n c e n t r i c a l l y in a large cube of face l e n g t h one. cube The inner is maintained at a temperature of unity while the surface of the ou t e r cube is set at zero t e m p e rature. problem (Fig. By using the s y m m e t r y of the o n l y a s i x t e e n t h of the c o m p o s i t e cube n e e d be considered. 4) The problem is formally stated as: Solve 9 2T d 2T B2T dx2 By2 8z2 0 (53) for the region 0 <= x <= z , 0 <= y <= I , 0 <= z <= I (54) with the boundary conditions T(x,y,l) = 0 (55a) T(x,l,z) = 0 (55b) T(x,y,0.4) = I (55c) T(x,0.4,z) = I (55d) BT — (z,y,z) = 0 Bx , II O N N I BT dz BT — (x,0,z) = 0 Sy (55e) BT — (0,y,z) = 0 Bx (55f) A standard finite difference technique was used to approximate the second order derivatives approximation was (55f). in e q u a t i o n u s e d for the (53) . derivatives A central difference in e q u a t i o n s A nodal network of 10 nodes per side was (55e) and selected resulting in 10 nodal spaces, therefore, the number of equations is 475 with Ax = Ay Az = 0.1. (30) F i g u r e 4. C u b e - C u b e G e o m e t r y for 3 -D S t e a d y - S t a t e Heat Problem Conduction (31) To d e t e r m i n e fluxes were cube a measure of the a c c u r a c y of the solutions, heat calculated for the inner cube surfaces. and for the outer Tb n o n - d i m e n s i o n a l ize these quantities, divided by the heat flux of concentric conditions surfaces, (T^ inner cube, spheres with the T q outer cube), they w e r e same boundary and radii equal to the face l e n g t h s of the inner (r%) and out e r (r^) cubes. The v a l u e T 2 is the b o u n d a r y c o n d i t i o n acti n g over the area A. The va l u e T^ is the inner parallel nodal point associated with T 2 , with a distance of Ax between them. This non-dimensional heat flux (q') is as follows -A(T2- T 1 )(ro-r.) (56) q' = Ax 4jr T iXo (Ti-To ) Ti = I , T0 Ax = .1 0 , Ti = (57a) .4 (57b) , A = .1 X .1 - O 1IS(T2-T1 ) (58) 4 TT D i f f e r e n t n u m b e r s of trial solutions, for the R C I P method, w e r e u s e d to o b t a i n s o l u t i o n s to this p r o b l e m . A n a c c e p t a b l e s o l u t i o n w a s reached, trial with a variance solution set. The less than or equal to 0.0000001, solutions using two or three for each trial solutions w e r e s l o w e r to c o n v e r g e t h a n the so l u t i o n s using 4, 5, 6, or 7 trial solutions, which all average rate increase trial solution. take from approximately the same amount of time. 5 to 7 trial solutions is 0.045 seconds per The increase of 1.51 seconds in execution time from 5 to 6 trial solutions is higher than the average rate increase. due to the next The to last i t e rations variance being just This is above the (32) c o n v e r g e n c e limit. iteration. 0.1X10 This T h i s causes the m e t h o d to cont i n u e w i t h an o t h e r continuation to the last iteration gives a variance, 100% lower than the convergence limit. The r e s u l t s f r o m the R C I P m e t h o d (Table 9) w e r e c o m p a r e d to the results obtained by solving the same problem using the SOR method. same convergence limit was used as for the RCIP method, than or equal to 0.0000001, to obtain comparable variance less results. relaxation factors ranging from 1.0 (which makes the routine to G a u s s - S e i d e l ) to a v a l u e obtain solutions. of 1.8 w e r e The optimum value used in the The Over identical SOR method to of the over relaxation factor was f o u n d to be 1.6. A uniform temperature distribution of 0.5 was used as the initial e s t i m a t e in e a c h meth o d . s h o w n in T a b l e 10. The re s u l t s f r o m the v a r i o u s S O R runs are The r e s ults are also s h o w n on a g r a p h (Fig. 5) of execution time versus the number of trial solutions in the RCIP method, and the relaxation factor in the SOR method. of various SOR factors and execution time rate of 1.89 seconds per 0.1 increase decreases seconds Thereafter., per trial solution the curve is flat at an approximate in the SO R factor. graph of the RCIP methods results decreases 2.6 The graph of the results from Whi l e the at an approximate 2 to 4 trial rate of solutions. with a 2% increase for trial solutions 4, 5, 6, and 7. The t w o curves cross w i t h the S O R h a v i n g the s m a l l e s t e x e c u t i o n time at the optimum. If the optimum SOR factor is known then the SOR method has a significant advantage. The disadvantage of the SOR method Table 9. Results for the 3-D Steady-State Heat Conduction Problem, Cube-Cube Geometry, for Various Numbers of Trial Solutions. NUMBER OF TRIAL SOLUTIONS NUMBER OF ITERATIONS HEAT FLUX OUTER INNER CUBE CUBE % DIFFERENCE IN HEAT BALANCE USER EXECUTION TIME (SEC) 18 .09527 .09530 .03845 12.29 3 7 .09527 .09529 .02601 8.55 4 4 .09527 .09527 .00304 7.09 5 3 .09527 .09529 .01795 7.15 6 3 .09527 .09527 .00110 8.66 7 2 .09527 .09528 .00943 7.24 (33) 2 Table 10. Results of the 3-D Steady-State Heat Conduction Problem, Cube-Cube Geometry, for Various SOR Factors. SOR FACTOR NUMBER OF ITERATIONS HEAT FLUX OUTER INNER CUBE CUBE % DIFFERENCE IN HEAT BALANCE USER EXECUTION TIME (SEC) .09526 .09531 .05595 16.55 1.2 69 .09526 .09531 .05081 11.44 1.4 44 .09526 .09530 .03516 7.86 1.5 33 .09527 .09529 .02392 6.18 1.6 (optimum) 26 .09527 .09527 .00129 5.23 1.7 33 .09527 .09527 .00141 6.19 I i8 51 .09527 .09527 .00073 8.82 (34) 104 1.0 (Gauss-Seidel) (35) SOR FACTOR RCIP METHOD A SOR METHOD USER EXECUTION TIME (SEC) □ 1 2 3 4 5 6 7 8 NUMBER OF TRIAL SOLUTIONS Figure 5. Trial Solutions and Different Relaxation Factors Versus User Execution time for 3-d Steady-State Heat Conduction Problem Cube-Cube Geometry (36) was that a trial and error process must be used to obtain the optimum value of the relaxation factor. The RCIP method will be more efficient for the trial solutions 4, 5, 6, and 7, because of the small variation in the e x e c u t i o n times. as efficient T h e choice of 2 or 3 trial so l u t i o n s w a s not as 4 to 7 trial solutions, but 2 or 3 still p r oduce excellent results. PROBLEM SEVEN The parabolic partial differential equation to be solved is 9T S2T 92T 92T 9r 9x2 9y2 9z2 for the cube r e g i o n 0 <= x <= I, 0 <= y <= I, and 0 <= z <= I, wh e r e T, t , x, y, and z are t e m p e r a t u r e , time, all non-dimensional variables and three spatial coordinates, representing respectively. The boundary conditions for (59) are: T = 0 at x=l or y=l or z=l (60a) 9T — = 0 at x=0 9x (60b) 9T — = 0 at y=0 9y (60c) 9T — = 0 at z=0 9z (60d) and the initial condition is T = I at T = 0 . (61) The a l g e b r a i c a p p r o x i m a t i o n of the p a r a b o l i c e q u a t i o n (59) w a s a c c o m p l i s h e d by u s i n g the C r a n k N i c o l s o n m e t h o d [5], and a central (37) difference was used to approximate 60d). the first order derivative The cube geometry is approximated by a nodal network of 10X10X10 nodes which gives 1000 equations and 1000 unknowns. spaces 0.1. in (60b- on each face This results in 10 of the c u b e , w i t h a m e s h size of A x = Ay = Az = Results were determined for three elapsed times, t =0.1, .0.5, and 1.0. The effe c t of u s i n g d i f f e r e n t v a l u e s of the t i m e i n c r e m e n t w a s also studied. The ADEP method was compared to the RCIP method for this problem. A unif o r m temperature distribution, equal to unity, w a s used as the initial e s t i m a t e to start the s o l u t i o n pr o c e s s for b o t h the R C I P and A D E P m e t h o d s . T a b l e s 11 and 12, and F i g u r e s 6, 7, and 8 illustrate the relation between the execution time and accuracy of each method. A value of 4 trial solutions was used to obtain the results in T a b l e 11 for the R C I P method. chosen from the results w h i c h 4 trial of shown T he n u m b e r of trial solutions w a s the previous 3-D steady-state problem, in s o l u t i o n s p r o d u c e d the s m a l l e s t e x e c u t i o n time (7.09 seconds). F o r the e l a p s e d t i m e of T =0.1 T a b l e 12 and Fig. 6 s h o w s that A D E P p r o d u c e s an a v e r a g e p e r c e n t e r r o r of steps except for At=O.01, m o r e than .26% for all the time which proved too large to maintain accuracy. The average percent error increases from .26% to . 2 % as the time gets smaller. This increasing error step is due to the large n u m b e r of iterations and the error in the algebraic approximation. Table 11. Results of 3-D Transient Heat Conduction Problem, Cube Geometry, Using R C I P . NUMBER OF TIME STEPS ELAPSED TIME, -c 0.02 5 0.1 6.2355 . .1739E-07 .4635 0.0125 8 0.1 .6703 .197 8E-10 .6825 0.01 10 0.1 .4398 .87 91E-06 .7838 0.005 20 0.1 .2852 .6876E-09 .8332 0.004 25 0.1 .2811 .4648E-10 1.0180 0.0025 40 0.1 .2808 .8269E-13 1.5627 0.002 50 0.1 .2814 .3033E-14 1.9273 0.025 20 0.5 2.4292 ,9586E-10 1.6240 0.02 25 0.5 .5827 .6116E-06 1.8158 .40 0.5 .1233 .1627E-07 2.1403 50 0.5 .0303 .2478E-08 2.2113 0.005 100 0.5 .1010 .2145E-11 3.7417 0.004 125 0.5 .1164 .1476E-12 4.6422 0.002 250 0.5 .1368 .9767E-17 9.2708 TIME STEP At 0.01 VARIANCE USER EXECUTION TIME (MIN) (38) 0.0125 AVERAGE % ERROR Table 11 (continued) 0.05 20 1.0 1540.0572 .1800E-08 1.9290 0.04 25 1.0 237.1156 .1974E-06 2.0658 0.025 40 1.0 1.7589 .1723E-08 2.4108 0.02 50 1.0 .4782 .3728E-09 2.6940 0.0125 80 1.0 .3681 .1043E-10 3.5928 0.01 100 1.0 .5620 .1529E-11 4.0158 0.005 200 1.0 .8218 .1343E-14 7.3598 VO Table 12. Results of 3-D Transient Heat Conduction Problem, Cube Geometry, Using A D E P . NUMBER OF TIME STEPS ELAPSED TIME, T 10 0.1 24.2707 .1210 0.001 100 0.1 .2672 .3162 0.0005 200 0.1 .2605 .5322 0.0002 500 0.1 .2784 1.1833 0.0001 1000 0.1 .2818 2.2705 500 0.5 1.2731 1.1302 0.0005 1000 0.5 .4254 2.2125 0.00025 2000 0.5 .2140 4.3562 0.0002 2500 0.5 .1887 5.4307 0.000125 4000 0.5 .1612 8.6435 0.0001 5000 0.5 .1549 10.7778 500 1.0 11.1638 1.1108 TIME STEP At 0.01 0.002 USER EXECUTION TIME (MIN) (40) 0.001 AVERAGE % ERROR Table 12. (Continued) 0.001 1000 1.0 3.4006 2.1768 0.0005 2000 1.0 1.5261 4.3140 0.00025 4000 1.0 1.0616 8.5410 H A ADEP METHOD □ RCIP METHOD (42) AVERAGE % ERROR I I 2 USER EXECUTION TIME(MIN) Figure 6. User Execution Time Versus Average Percent Error. RCIP Versus ADEP for the 3-D T r a n s i e n t Heat T r a n s f e r P r o b l e m w i t h an El a p s e d T i m e t =0.I. A ADEP METHOD (43) AVERAGE % ERROR RCIP METHOD USER EXECUTION TIME(MIN) Figure 7. User Execution Time Versus Average Percent Error. RCIP Versus ADEP for the 3-D T r a n s i e n t Heat T r a n s f e r P r o b l e m w i t h an Elapsed T i m e x=0.5. A ADEP METHOD (44) AVERAGE % ERROR RCIP METHOD USER EXECUTION TIME(MIN) Figure 8. User Execution Time Versus Average Percent Error. RCIP Versus ADEP for the 3-D Transient Heat Transfer Problem with an Elapsed Time t=1.0. (45) The graph method (Fig. of the execution time 6) indicates v e rsus that when the accuracy smallest percent for the R C I P error (0.28%) w a s r e a c h e d an o p t i m u m va l u e of the t i m e step h ad also b e e n reached. Therefore, further refinement of the time step would amount of time to produce the same accuracy. to r e a c h the a c c u r a c y of the A D E P me t h o d , execution time for a specified require a larger The RCIP method was able but A D E P w a s s u p e r i o r in accuracy over the RCIP method. due to the s m a l l e l a p s e d t i m e T=0.1. B e c a u s e of this sm a l l time the solution process resembles that of the steady-state problem. noting that as the elapsed time is increased larger time used. This is However, steps can.be The ability of RCIP to use larger time steps, as compared to the smaller time steps that A D E P requires, e n ables R C I P to o b t a i n the required accuracy in less time. For the indicate that elapsed time of T=0.5, the RCIP method produces time than the ADEP method. Tables more 11, 12 and Figure accurate, results 7, in less The RCIP method obtained an average percent error equal to 0.0303% in 2.1403 minutes of execution time, with a time step of 0.0125 and 40 iterations. results time T he A D E P m e t h o d r e a c h e d its best (0.1612%) at At=O.000125 and 4000 iterations, of 8.6435 m i n u t e s . with an execution The graph. Fig. 7, indicates that w h e n the s m a l l e s t p e r c e n t e r r o r 0^0303% occurs the R C I P m e t h o d has reached an optimum time step. The further refinement of the time poorer accuracy (0.1164%) and larger execution times F o r the e l a p s e d t i m e of t step produced (4.6422 minutes). =1.0. T a b l e 11, 12, and Fig. 8, the graph of the results of the RCIP method is entirely below the graph of ADEP's (46) results. At each time step the RCIP method is much faster. the larger time steps results The use of in the RCIP method having the advantages of less i t e r a t i o n s w i t h less error, and a faster e x e c u t i o n time. larger elapsed times are used ADEP will perform numerous If iterations, therefore the ADEP method will be slower than the RCIP method and less accurate. All computer runs were accomplished on the Honeywell CP-6 computer in double precision. in Appendix C. A flow chart of the computer program is included (47) CHAPTER V D E V E L O P M E N T OF R C D P W I T H APPLICATION AND RESULTS M a n y dir e c t m e t h o d s have b e e n d e v e l o p e d to solve sets of l i near equations. These methods have been restricted to solving small sets of e q u a t i o n s u s u a l l y less t h a n 40 [5]. A n e w m e t h o d is p r e s e n t e d here w h i c h cou l d pr o v e to be m u c h f a ster for the s o l u t i o n of large sets of tridiagonal equations. T h i s n e w meth o d , (RCDP), uses two c a l l e d the R e d u c e d Coordinate Direct Procedure trial solutions coefficients in the RCIP method. of one trial to for t he weighting The trial solutions generated consist s o l u t i o n due to the coefficient s o l u t i o n due to the b o u n d a r y conditions. successfully solve the problem solve matrix and one trial These t w o trial solutions in one iteration. An attempt was made to e x p a n d this m e t h o d to a general routine to solve n o n - t r i d i a g o n a l systems. A problem was d i s c o v e r e d w i t h this expansion. tridiagonal systems more solve the problem. the subsequent than t w o trial solutions are n e c e s s a r y to In the development of the extra trial solutions and reduced matrix the problem was found. the to solve for the weighting coefficients When more than two trial solutions is required reduced matrix becomes closer and closer to being singular as the n u m b e r of trial s o l u t i o n s is increased. give erroneous For n o n ­ results. T h e r e f o r e the m e t h o d w o u l d (48) The a l g o r i t h m s to f o r m the trial s o l u t i o n s for R C D P are as follows. Let A*X = F (62) be a s y s t e m of n e q u a t i o n s and n u n k n owns. To c a l c u l a t e the trial solution due to the boundary conditions set G(i,m) = 0 i=l,...,m-1 (I) then G(i+m-l,m) = F(i)/A(i,i+m— I) i+m-2 Z A(i,j)*G(j,m)/A(i,i+m-1) (2) J=I i=l,...,n-m+1 To calculate the coefficient matrix trial solution set G(i,i) = I G ( j ,i) = 0 j = l , ...,m-1 , j /= i , i=l,...,m-1 (3) i=l, — (4) ,m-1 then G(i+m-1,k)= - i+m—2 ^ A(i,j)*G(j,k)/A(i,i+m-1) (5) J=I i=l,...,n-m+1 The algorithms are written , k=l,...,m-l in general t r i d i a g o n a l s y s t e m m is equal to two. existing technique, (6) form, although for a A c o m p a r i s i o n of R C D P w i t h an Gaussian-Elimination the v a l i d i t y of the method. . [5], were made An i l l u s t r a t i v e p r o b l e m to determine is solved and included in Appendix D. The four one-dimensional problems and 12 are to be s o l v e d b y each method. stated in Chapter IV pages 11 A n u m b e r of d i f f e r e n t m e s h sizes were chosen to obtain results for small to large equation sets. (49) The results of the ECDP and the Gaussian-Elim!nation methods for various numbers of equations are shown in the following eight tables. C o m p a r i s o n s are m a d e for each p r o b l e m on a graph of e x e c u t i o n time versus average percent error. The r e s u l t s of the R C D P m e t h o d and the results of the G a u s s i a n Elimination method show that at larger mesh sizes the two methods are comparable. the RCDP As the m e s h size gets smaller, or larger e q u a t i o n sets, method produces a c cu r a t e r esults in less time than the Gaussian-Elimination method. - This is due to the number of calculations performed by each method. The Gaussian-Elimination method requires n calculations a to produce solution, and the RCDP requires 2 8 n ' calculation to produce a solution. In p r o b l e m 4 the graph Figure p r o d u c e s m u c h m o r e a c c u r a t e r esults method in less time. 12 sh o w s that the R C D P m e t h o d t h a n the G a u s s i a n - E l i m i n a t i o n (50) Table 13. Results of RCDP for the Ordinary Differential Equation, with Derivative Boundary Conditions, for Various Numbers of Equations. NUMBER OF EQUATIONS AVERAGE % ERROR 11 .3099 .18 21 .0772 .30 51 .0123 .80 101 .0031 2.20 201 .0008 7.53 USER EXECUTION TIME (SEC) Table 14. Results of Gaussian-Elimination for the Ordinary Differential Equ a t i o n , w i t h D e r i v a t i v e B o u n d a r y Conditions, for Various Numbers of Equations. NUMBER OF EQUATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) 11 .3099 .16 21 .0772 .30 51 .0123 1.53 101 .0031 8.94 201 .0008 66.02 A Gaussian-Elimination D RCDP Method (51) AVERAGE % ERROR .07 USER EXECUTION TIME (SEC) Figure 9. User Execution Time Versus Average Percent Error for RCDP Versus GaussianElimination of I-D Ordinary Differential Equation Problem I, Derivative Boundary Conditions. (52) Table 15. Results of RCDP for the Ordinary Differential Equation, with Composite Boundary Conditions, for Various Numbers of Equations. NUMBER OF EQUATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) 11 .1246 .17 21 .0318 .29 51 .0052 .80 101 .0013 2.19 201 .0003 7.40 Table 16. Results of Gaussian-Elimination for the Ordinary Differential Equation, with Composite Boundary Conditions, for Various Numbers of Equations. NUMBER OF EQUATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) 11 .1246 .16 21 .0318 .30 51 .0052 1.53 101 .0013 8.86 201 .0003 65.39 Gaussian-Elimination □ RCDP Method (53) AVERAGE % ERROR A USER EXECUTION TIME(SEC) Figure 10. User Execution Time Versus Average Percent Error of RCDP Versus GaussianElimination for I-D Ordinary Differential Equation Problem 2, Composite Boundary Conditions. (54) Table 17. Results of RCDP for the Ordinary Differential Equation, with Mixed Boundary Conditions, for Various Numbers of Equations. NUMBER OF EQUATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) 10 .7485 .17 20 .1857 .28 50 .0296 .77 100 .0074 2.18 200 .0018 7.59 Table 18. Results of Gaussian-Elimination for the Ordinary Differential Equation, with Mixed Boundary Conditions, for Various Numbers of Equations. NUMBER OF EQUATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) 10 .7485 .15 20 .1857 .28 50 .0296 1.46 100 .0074 8.77 200 .0018 67.00 Gaussian-Elimination D RCDP Method (55) AVERAGE % ERROR A USER EXECUTION TIME (SEC) Figure 11. User Execution Time Versus Average Percent Error for RCDP Versus GaussianElimination of I-D Ordinary Differential Equation Problem I, Mixed Boundary Conditions. (56) Table 19. Results of RCDP for the Ordinary Differential Equation, with Dirichlet Boundary Conditions, for Various Numbers of Equations. NUMBER OF EQUATIONS AVERAGE % ERROR USER EXECUTION TIME (SEC) 9 2.6465 .15 19 5.9274 .26 49 7.2303 .74 99 4.4752 2.13 199 .3946 7.28 Table 20. Results of Gaussian-Elimination for the Ordinary Differential Equation, with Dirichlet Boundary Conditions, for Various Numbers of Equations. NUMBER OF EQUATION AVERAGE % ERROR USER EXECUTION TIME (SEC) 9 19.0485 .14 19 94.2719 .26 49 123.7314 1.37 99 62.9538 8.38 199 27.2497 63.46 Gaussian-Elimination □ RCDP Method (57) AVERAGE % ERROR A USER EXECUTION TIME(SEC) Figure 12. User Execution Time Versus Average Percent Error of RCDP Versus GaussianElimination for I-D Ordinary Differential Equation Problem 4, Dirichlet Boundary Conditions (58) CHAPTER VI CONCLUSIONS The r e s u l t s s h o w that the R C I P m e t h o d is an e x c e l l e n t solu t i o n r o u t i n e for line a r e q u a t i o n sets. T he R C I P m e t h o d p r o v e d to be m o s t useful on problems with complicated boundary conditions. The first two I-D problems having mixed and composite boundary conditions were solved by the RCIP solution. method. The Conclusion, try SOR method however, the RCIP method did when not pr o d u c e convergence a problems are encou n t e r e d . The R C I P m e t h o d and S O R m e t h o d w i t h o p t i m u m o v e r ­ relaxation factor solution produces 3-D steady-state problems. comparable results for the 2-D and If the optimum SOR factor is not known then a trial and error search must be accomplished to determine the optimum r e l a x a t i o n factor. The R C I P m e t h o d does not require a search for a optimum trial number solutions, of except one, solutions, r e s ults choos i n g any n u m b e r in fast accurate solutions. of trial In the s o l u t i o n to the t r a n s i e n t p r o b l e m R C I P has some d e f i n i t e a d vantages over A D E P , which has the ablity to operate with larger time steps and rapid convergence of the RCIP method. The number of trial solutions to p i c k if a single s o l u t i o n a t t e m p t is sought is six trial solutions. This number' of trial solutions produced excellent results. ,i (59) The R G D P m e t h o d and G a ussia n - E l i m i n a t i o n are comparable methods for the solution of small equation sets. producing accurate The RCDP has an advantage of r e s u l t s m u c h faster than the Gaussian-Elimination routine for equation sets larger than 40. (60) REFERENCES CITED (61) 1. Blackfcetter, D.O., V/arrington, R.O., Henry, M.S., and Garner, E.R., 'A N e w I t e r a t i v e M e t h o d for So l v i n g S i m u l t a n e o u s L i n e a r "Equations',Advances, in C o m p u t e r M ethods for P a r t i a l D i f f e r e n t i a l Equations, Vol III> June 1979, pp 70-72; 2. B l a c k k e t t e r , D.O., V/arrington, R.O., and Horning, R., ' E v a l u a t i o n ' of a N e w I t e r a t i v e P r o c e d u r e f o r C o n d u c t i o n H e a t T r a n s f e r Problems', P r e s e n t e d at the 2 nd N a t i o n a l C o n f e r e n c e on N u m e r i c a l Methods in Heat Tranfer, Univ. of Maryland, Sept. 1981. 3. Golub, G., ' N umerical M e t h o d s for S olving L i n e a r L e a s t Problems,' Numerische Mathematik 7, p. 206-216, 1965. Squares 4. Hesteries, M.R., and E. Stiefel, 'Methods of Conjugate Gradients for Solving Linear Systems,' Journal of Research of the National Bureau of Standards, Vol. 49, No. 6, Dec., 1952. 5. H o r n be c k , R.W., N u m e r i c a l M e t h o d s , N e w York: Q u a n t u m P u b l i s h e r s I n c ., 1975. 6. H o r ning, R.P., 'A N e w I t e r a t i v e M e t h o d for So l v i n g S i m u l t a n e o u s Linear Equations w i t h Direct Applications to Three-Dimensional Heat Conduction Problems', Masters Thesis, Montana State Univ., August 1980. • . V1 - 7. K a r l e k a r , B.V., and D e s m o n d , R.M., 'E n g i n e e r i n g Heat T r a n s f e r ,New York: West Publishing Co., 1977. 8. Stewart, G.W., 'Conjugate Direction Methods for Solving Systems of Linear Equations,' Numerische Mathematik 21, 285—297, 1972. (62) APPENDICES - (63) APPENDIX A ILLUSTRATIVE EXAMPLE OF RCIP (64) Consider the following example. 1 1 0 2 C 2I 0 Li. t-M , L x3 3 O I rH-i For an initial estimate select IT G ( 0 ,I) = thus n=3 and m=2. Ol O O and G (0,2) = I .IJ • Then equation (3) becomes Gr(Ojl) 4" (%2 G(0,2) —z (&2 X1 q and 1 1 0 A X 0 -F 1 2 0 0 0 Oi + 1 ©2 — 2 Oj + 202 _ 3 O2 - 1 <A X 0-F, AX q - F > = (a1+a2-2)2 + (a1+2a2-3)2 + (O2-I)2 w h i c h is equal to the V 0 (a^,a2 ) in e q u a t i o n (4). derivatives according to equation (5) yields av0 — = 2c^ + 3o2 - 5 F o r m i n g the p artial (65) and av0 — = «2 + ^a2 “ 3 . 9a2 Thus dV0 — = O and 9V0 — = O Sa2 yeilds the system 2a^ + Sa2 = 5 a^ + 202 = 3 w i t h the solution a^ = I , a2 = I T h a t is (a(0,l),a(0,2)) = (1,1) and thus f X 0 = G(0,1) + G(0,2) = / I For the second iteration, equation (7) becomes G(l,I) = X r select arbitrarily G(l,2) Therefore following equations (8)-(12) we have (66) O1 + X 1 = O1GCL,!) + o2G(l,2) o2 O1 + 2 o 2 O1 + 2o 2 2o1 + 3o2 — 2 A X 1-F So1 + So2 _ 3 O1 + 2 o 2 — I ^aI'a2 ^ ~ ^AX1-FiAX1-F> (2a1 + 3o2 - 2)^ + (Sa1 + So2 - 3)^ +(O1 + 2a2 — I)^ , 14a1 + 23O2 - 14 23a1 + 3 Sa2 - 23 and the equations to be solved are 14o1 + 23o2 = 14 23O1 + 3 Sq2 = 23 with solution O1 = I , o2 = O . Thus , (67) the algorithm terminates w i t h the solution X I (68) APPENDIX B SOLUTION OF A SIMPLE BOUNDARY VALUE PROBLEM USING RGIP (69) The problem is as follows d2u U + 0 X on 0 < x < I , with u(0) = 0 Use a c e n tral and u ( I) = 0 , (U exact = x - sinh(x)/sinh(I)) . difference approximation, and a step size of obtain the following equation set to be solved, -201 100 100 -201 0 0 0 . . . . 0 100 . . . . 0 0 . . . 100 -201 ITERATION I We have n = 9 and pick m = 3. For the initial estimate a constant value r -.088 / -.131 I -.139 ) -.142 < -.174 ) -.257 [ -.272 I -.207 \-.103 V 0 = .849 A v g . % error = 4.763 Uj = .0695 »2 = -.0663 a3 = .0483 (70) ITERATION 2 G(l,I) ^ O 193s .0326 .0429 .0499 .0530 >, .0520 .0450 .0330 Ix OlSSy / . o o 4 i Sn .00385 .00303 .00209 G(l,2) =, .00105 \, \ -.000237 -.00361 -.00691 -.00604 . V 1 = .00612 A v g . % error = 1.218 Ct1 = 1.04 a2 = -1.01 «3 = 1.28 ITERATION 3 At this iteration the V 2 = .0000873 and A v g . % error = .399 . ITERATION 5 At this iteration the V 5 = .000000000722 and the A v g . % error = .0762 Z ^ -.000864 -.00127 -.00122 ) -.000544 G d , 3) =S .00079 .00218 .00260 .00204 X. 0 0 1 0 2 / (71) The m e t h o d has c o n v e r g e d to the s p e c i f i e d li m i t that the v a r i a n c e be less than or equal to .00000001. The solution to the p r o b l e m follows: ^014 7 5 N' .02866 .04085 .05044 X 5 = <(.05655 > .05822 .05447 .04426 ^ 0 2650y . is as APPENDIX C FLOW CHART OF RCIP COMPUTER.PROGRAM (73) START DETERMINE EQUATION SET INPUT INITIAL ESTIMATE DETERMINE TRIAL SOLUTIONS DETERMINE ERROR MATRIX SOLVE FOR WEIGHTING COEFFICIENTS TIME STEP DETERMINE NEW F MATRIX OBTAIN APPROX. SOLUTION DETERMINE VARIANCE V VARIANCE S V <= E / / TRANSIENT ONLY __ SOLUTION E = CONVERGENCE LIMIT (74) APPENDIX D SOLUTION OF A SIMPLE BOUNDARY VALUE PROBLEM USING RCDP (75) The same p r o b l e m RCDP m e t h o d . d2u — dx2 s o l v e d in A p p e n d i x B is s o lved here using the The problem is as follows - u + x = 0 on 0 < x < I , with u(0) = 0 and u(l) = 0 , (Ue2act = x - sinh(x)/sinh(I)). The coefficient trial solution is and the boundary condition trial solution is 0 .0000’ 0.0010 - -0.0040 - 0.0101 0.0202 -0.0356 -0.0573 -0.0866 1-0.1247 The weighting coefficients are U1 = 0.0147 «2 = 1.00 , and the variance and average percent error are Variance = 0.22E— 32 Average % Error = 0 . 0 7 5 6 (76) The solution is ui 0.0148X 0.0287 V 0.0408 0.0505 / 0.0566 j \ 0.OSSlC 0.0545 \ 0.0443 0.0265/ J MONTANA STATE UN]V E B S I^ BOZEMAN 3 1762 10636202 1 N378 H666 cop.2 DATE Hodges, T. M. The improvement of the reduced coordinate iterative procedure ... ISSUED TO & /(>7 p