SOFTWARE FOR ME 251 A report written by Diana Rincon May 11, 1988 / -/VI_/ V Re- j Pn?-r a- c- 0 -

PREFACE The work assignment that led to this report, was completed in the Department of Mechanical Engineering at the University of Michigan from January 7, 1988 to May 12, 1988. I would like to express my appreciation to the following people for assisting me during the course of this assignment. Professor Kannatey-Asibu for his guidance and support. Xiangying Liu for his indispensable help on non-linear least squares methods. Mr. Don Orser from the National Bureau of Standards for sharing his knowledge of phase diagrams.

TABLE OF CONTENTS Page I. INTRODUCTION 1 II. STRESS-STRAIN RELATIONS 2 A. Input Data 2 B. Calculations 4 C. Plotting 6 D. Complementary Sections 6 Ill. PHASE DIAGRAMS 7 IV. CREEP AND VISCOELASTICITY 8 A. Models 8 B. Importance of Parameters 8 C. Input 9 D. Calculations 9 V. TWO DIMENSIONAL MOHR'S CIRCLE 12 A. Input Data 12 B. Calculations 12 VI. CONCLUSIONS 14

I. INTRODUCTION ME 251, Mechanical Behavior of Solids, is a very important course in the undergraduate program in mechanical engineering since the general concepts in materials science taught in this course are vastly used by mechanical engineers. Due to the course's importance, learning tools are a welcome commodity. It is therefore the objective of this assignment is to implement various areas covered in ME 251 in software packages that students can use to understand basic concepts. The report on this assignment is organized as follows: Chapter II discusses the area of Stress-Strain Relations. Phase Diagrams are reviewed in Chapter III. Creep and Viscoelasticity are presented in Chapter IV. Chapter V deals with the successful implementation of Mahr's Circle. Chapter VI list the conclusions based on the work of this assignment.

2 II. STRESS-STRAIN RELATION The software developed for the Stress-Strain Relations computes both the Engineering and True Stress-Strain values and other related parameters from tensile test data. This program also plots the Engineering and True Stress-Strain Curves. The structure of the program is shown on page 3. The most important sections include inputting the data, computing specific aspects of the deformation process during a tensile test, and graphically showing the relationships between Stress and Strain. Other complementary sections are printing the current data, saving the current data, and editing the data. The complete program listing along with an example demonstrating the capability of this program is included in the appendix. A. INPUT DATA A set of data is shown in Table 1. The variable Reading defines a particular data point as either the'INITIAL' point, the'YIELD' point,_the'ULTIMATE' point, the'FRACTURE' point, or simply another point (Reading[DataPoint]='READING'). The program takes into account that all the options for Reading with the exception of'READING', can only occur once in a particular data set. Consequently the user is not allowed to define more than one Data Point as such. The other variables, Load, Length and Diameter are self explanatory. However, the user should be cautioned that the units for these variables are not arbitrary. The Load, Length and Diameter should be expressed in kN, mm, and mm respectively.'-) F.=,:.-.: t,- " r:. v:, ".:I r, r. -.- -= { f.;() ( C!'('-..) C, " I1 (C",.- i............. -!1..,...:: T.ble 1.;Ie t of Data The User can input the test data directly or from a file. The format for the input file is one variable input per line, as follows:

PROGRAM STRUCTURE Lntro Main Menu List S EN Edit Save List Input Edit Save Computations Plots Ext Current urren Data Data Data Changel d, Delete Fi 1 1 a[3il Ex

4 Line 1: Reading [DataPoint1] Line 2: Load [DataPoint1] Line 3: Length [DataPoint1] Line 4: Diameter[DataPointl] Line 5: Reading [DataPoint2] etc. The maximum number of DataPoints in each set of data is 20. If a particular variable of a Data Point is unknown, the variable is set equal to 0.1E-50 (or Undefined). When using an input file, any unknowns should be included as either 0.1 E-50 or Undefined. When inputting the data directly, the user needs only to press CR (Carriage Return) and the program automatically assumes unknown to be Undefined. The set of data shown in Table 1, is used as the example data in the program. The user can load this set of data by choosing the "Input Data" selection of the Main Menu and consequently the "Load Example Data option". B. CALCULATIONS The different calculations performed by this program are listed below: 1. Initial Conditions 2. Stresses and Strains 3. K and n 4. Stress and Strain at Ultimate 5. Maximum Load 6. Maximum Nominal Strain 7. Modulus of Elasticity All the calculations make the use of the INITIAL DATA, i.e.,. the load, length, and the diameter before the test is run is used as a reference point in order to measure different aspects of the deformation process. IF no data point has been defined as'INITIAL', i.e.,. Reading[DataPoint]='INITIAL', the data point with load of zero or the point corresponding to DataPoint=1 will be assumed to define the initial data. The Stresses and Strains section computes both the engineering and true stresses and strains at each data point. The basic equations used in this section are as follow.

5 Stress Engineering s=Load[DataPoint]/Area[lnitial] True o=Load[DataPoint]/Area[DataPoint] Strain Engineering e=( Length[DataPoint]-Length [Initial])/Length[l nitial] True e=Ln(Area[lnitial]/Area[DataPoint]) (in terms of Diameters) True e=Ln(Length[DataPoint]/Length[lnitial]) (in terms of Lengths) Although both True Strain in terms of Diameters and in terms of Lengths is calculated for each Data point, such calculations are not always appropriate and should be used with discretion. The K and n parameters used in the mathematical model describing the relationship between the true Stress and true strain in the plastic region, i.e.,. o=Ken, are computed from calculated true Stresses and Strains of two different Data Points. The selection of the two data points is crucial in obtaining accurate parameters for the model. The user is reminded that both data points to be selected should occur in the region between Yield and Ultimate. However, the program allows the user to select any data point meeting the following conditions: -the computed True Stress is defined and not equal to zero -and the computed True Strain (either in terms of Lengths or Diameters) is defined and not equal to zero The Stresses and Strains At ULTIMATE section compute the Engineering Stress and both Engineering and True Strains at Ultimate from the calculated values of K and n. The equations used are: -Engineering Stress= K*(n/2.718282)n -True Strain = n -True Stress = K*nn The same aspects of the deformation process as determined directly from a Data point defined as'Ultimate', if such data point exists, will be printed with the above results.

6 The Maximum Load is computed by this equation: Maximum Load= (Eng. Stress at Ultimate)*Area[lnitial] The Modulus of Elasticity, E, is calculated from the approximation of the Stress-Strain Relation in the Elastic region (s=Ee). The user is asked to select a Data point for this calculation. This point should lie in the Elastic Region, although the program will allow the selection of any point whose Engineering Stress is defined and not equal to zero. C. PLOTTING The plotting routine uses graphics. The user is able to fully label the plots or he can press Return to use the default labels. There is also an option to display Grid. In order to print the plots, the word GRAPHICS must be typed before running the program. The Engineering Stress-Strain Curve section plots only the Data points. The True Stress-Strain Curve section plots the Data Points and the mathematical model using K and n. D. COMPLEMENTARY SECTIONS The Print Current Data, Save Current Data, and Edit Current Data sections are self-explanatory. Print Current Data displays the current data on the monitor. Save Current Data allows the user to create and name an input file of the format described above. Edit Current Data allows the user to manipulate his current data. The three subsections here are Edit an Individual Reading, Add a Reading, and Delete a Reading. All of these features provide versatility for the user.

7 III. PHASE DIAGRAMS The area of implementing phase diagrams in software was carefully researched. The main conclusions of this research are: 1. Software is scarce, but data needed for such implementation abounds. 2. There is material that describes how to develop software for the implementation of phase diagrams. 3. A particular Software developed by the National Bureau of Standards appears very comprehensive. Although software does not seem as readily available, the data needed to create the software is plentiful. This information can be found in different handbooks and magazines available at the library. Among the material describing how to implement phase diagrams in computer software is the book Computer Modelling of Phase Diagrams and the article Computer Calculation of Phase Diaarams of Iron Alloys by Nishizawa and Hasebe. The article in Japanese can be found inthe Appendix. The Software sponsored by the National Bureau of Standards can be described as an "Interactive Computer Graphics Program for Storing Phase Diagrams". The Phase Diagrams and the data used to create them can be found in the Bulletin of Alloy Phase Diagrams. For a more detailed description of this program see the Appendix under PHASE DIAGRAMS.

8 IV. CREEP AND VISCOELASTICITY The software developed for this area computes the Modulus of Elasticity, E, and the viscosity coefficients, a1, for the Maxwell, the Voigt and the Maxwell-Voigt models. The program also plots the different behaviors associated with each model and with Stress Relaxation for the Maxwell model. The Structure of the program closely follows the structure of the Stress-Strain Relation Program and will not be discussed in detail. However, the complete program listing along with an example demonstrating the capability of this program is included in the Appendix. A. MODELS The MAXWELL Model consists of a spring and damper in series. Its governing equation is -=(X/ 1l )1/q+('/E1), where q is a constant of non-proportionality. If q=1, the solid is called Newtonian. The VOIGT Model is a spring and damper in parallel. The governing equation is c=(E1*~)+1l*(t)q. The MAXWELL-VOIGT Model is a combination of both the Maxwell Model and the Voigt Model. It consists of a spring in series with a spring and damper in parallel, all in series with a damper. B. IMPORTANCE OF FINDING PARAMETERS E AND 71 The Importance of finding these parameters can best be observed with the aid of an example. Considering the Maxwell Model for a newtonian solid and assuming a constant stress (X*), the governing equation becomes ~=t*(~*/ll )l/q+(z*/E1). The total true strain is the sum of the elastic strain and the viscous (flow) strain, i.e., etotal=eelastic+Eflow. Therefore, it is apparent that.elastic= C*/E1 and ~flow=(*/fri1 )*t, where t is time. Combining the two equations, Eflow= (E1*t/Tl1)*Eelastic. Now knowing El/ri1, the following conclusions can be made. 1. IF El/1/1 is large then Eelastic<<~flow. 2. IF E1/T11 is small then Eflow <<~elastic.

9 3. IF El/ri1 is comparable to 1/t then Eflow=Eelastic. C. INPUT A set of input data is shown on Table 2. The True Stress is constant at every point. The program only considers the models under constant stress, i.e.,. only a stress step input. The user will only be asked once what the step input is. If it is a negative step input, the user must specify so through the use of a negative sign. The other variables are self-explanatory. ":::.:i:-:,. i:.:,' T J.'.-. F:!. Stres s, P' a',t ai n;_,, il;,.-, ( a L X T,i,(! 2 F? ) it t a )) 1 [ r"....... -CC c 1CC 1~ CC. UC:_.C, 1-,,, -. i': as' ()20, c C) ( C))'I h C) I: Ur A.-.l I.- L i ()C) 1..C)_iC_). C), i ())) ( (1 IC 00 0000 1,000,,:. -c.).f Da t: D. CALCULATIONS The only calculations involved for this software implementation are solving for the E's and t's. The methods use in the calculations are either the Linear Least Squares Method or the Non-Linear Least Squares Method, depending on which is appropriate. After the parameters have been computed and shown on the monitor, the behavior of the solid according to the chosen model will be graphically shown. The Menu for the Calculations is shown on page 11. The user can choose to ask the program to solve for any number or all parameters in each model. If the program must compute less parameters than the total number of parameters in the chosen model, the user will be ask to input the rest of the parameters. Stress Relaxation is the behavior of a solid. It eliminates creep, i.e.,. e=constant or ~=0O. The maxwell model has been chosen to illustrate Stress Relaxation for its simplicity. This section does not involve any calculations different from those discussed above. All equations used in the calculations and graphical representations of the solid's behavior according to each model are summarized on the following page.

10 MODELS FOR RATE AND TEMPERATURE DEPENDENT BEHAVIOR E, Maxwell Model I! rl =t*( *Tl 1)1/q+( */E1) time Voigt Model e= *l/El*(1-EXP(-E *t/jl1)) time,/ /, /,/ /, / / / / / El Maxwell-Voigt Model E2 T 1112 /e=t*/E1+( (*/1 1)*t+ t*/E2* (1 -EXP(- E2*t/2)) time Stress Relaxation (Maxwell Model) = t**EXP(-E,*t/It) time

1 1 Main Menu Computations Pa. ar Pr. Pa. Maxwell Stress Maxwell S oigt Voigt Relaxation 1 2 1 n 2 Par. Par. Par. Par. Par. Par. Linearity

12 V. TWO DIMENSIONAL MOHR'S CIRCLE This software is used to resolve stresses and strains in directions different from those along which stresses and strain are known. The results are graphically shown through the use of Mohr's Circle. The structure of this program is almost identical to the structure of the Stress-Strain Relation program. However since the amount of data needed to run this program is minimal, the use of input files has been omitted, and the editing features vastly simplified. The complete program listing along with an example is included in the Appendix. A. INPUT DATA The data needed to run this program is all the variables, Sx, Sy, txy of the general two dimensional system. This general two dimensional system is shown in the example in the Appendix. It is also available for viewing on the monitor through the program. The sign convention employed is shear stresses producing Clockwise system rotation are positive, and Counterclockwise rotations of the system define positive angle Theta. B. CALCULATIONS The Calculations produced by this program include: -the principal stress and its plane directions -the maximum shear stress and its plane directions -the shear and normal stresses for a specified angle Theta -the Mohr's Circle The Principal Stress and its plane directions are simple to find. Using the rules for resolving stress and noting that the shear stress is zero along the principal planes, the principal stresses are: sI 1 /2(Sx+Sy) +1/2[(Sy-Sx)2+4txy2]112 S2 = 1/2(Sx+Sy) -1 /2[(Sy-Sx)2+4txy2]1/2 The principal planes are: Theta1 =(1 /2)*ARCTAN(2'*xy/(Sy-Sx)) Theta2 =Theta1+90 The maximum Shear Stress is:

13 tmax= 1/2[(Sy-Sx)2+4txy2]1/2 The normal and true stresses on an inclined plane at Theta degrees from the horizontal are: s=1/2(Sy+Sx)+1/2(Sy-Sx)*COS(2*Theta) +txy*SIN(2*Theta) T=1/2(Sy-Sx)*SI N(2*Theta)-txy*COS (2*Theta) The direction of the planes at which the maximum shear stress occurs is: Theta3 =Theta1+45 Theta4 =Theta2+45 The Mohr's circle is a very useful graphical representation of all the stress states as Theta is varied. The circle has its center at (1/2(s1+s2,0) and radius of 1/2 (sl-s2). The user is reminded that any angle on the circle corresponds to twice the angle Theta on the real system. The circle is plotted and shown on the monitor. Notice that the most important points are denoted by X. Also the user can opt to connect Sx to Sy.. This feature will allow the user to quickly locate the center of the circle.

14 VI. CONCLUSION The following conclusions are derived from the work described above. 1. The implementation of the Stress-Strain Relations on a software package was successful. The program is very user-friendly and it will aid any student to comprehend the subject matter. 2. Further research on the area of the implementation of phase diagrams should be conducted. 3. Creep and Viscoelasticity is one area that will greatly benefit from the developed software. Students interested in this area will have a better understanding of the behavior of solids without consuming any time at all on tedious calculations. 4. Perhaps the area where software implementation is useful is Mohr's Circle Transformations. By using this software, any student can visualize the stress states with greater ease.

APPENDIX

STRESS-STRAIN RELATION EXAMPLE

(.':..F 0 01'.'' 6 C?.:....i:.(. i_....:t((".'C:. u T.':".-:'..l5 J T F 3.:".-. I1 ~....,....:.......... s. -,: C:: E;' i (7' -: ( t b.'.:,i ":, (": "(.':,; f, C:C, t:" C: (=a_,rr"i ~~~~ ~t u( _.::, C.C.. -.re.;~ 1'.J.,,'1'-:i.;.:. ):. 1. i:j..,- <;} t J u.'; i...!.':.. 5. ) )'- 1'.4 N:t ";:- p )..1 )': E8A)_,~'? EU e -~' e, -. U.:1...4 J'::': 8 )1J..

Th(, I it. I I mi (r (i:l. I. 5L q r,L l 1r71 I i iE a e'i E1 E r- r m':' e aT':: -I I r, | r.,R a::i. n 1:' g t. r"e c ie. Elr' g t'- l T "[' r-t.. a- I-,,'T: Ir 1'.'. ", I~~~~~~~~~~~~~ Ii's F~~~~~~~~~~~~~~~~~~~'.:.i'' L:. F; rea (ia i 9. I.I, )C) )C C)C)C. ) (i.)(i) (.,.' c: c:l -.'(ft (!) 8:'.; C) C)' " ) ": i; w i it.....,:76.....::. i,:: T, h er c..t rrenA v i 1 u t 2 r:(:,:1* L (. ( d qi i:.N l_. g t h r ii I am. r f niii He? ii i (jijd J. n,) OCC iC) i.i) *.;: R:'.:i:.L. n 4 0. / 8 C ) i ).:,': =,.C)C A.... " Wsea F(. {}49.80 C,i:6:)............ 4 R F.? aad J. ri..... Selec.t First eadirg for C f alc"U'latio n of:, Trl e ct trren t v alt (?:. i a Iare: LoC a d, k: N L,rg-tl, t n rri I).:,i:.:: tI te r, r ii,..:;,R 3a( ii " rtg ) C)C). (),i).1:).-.ea:d i rn q.40 4 ")C)C)O9 52 800) 2 -:"11:1" R He';,,.1., g 4 l ) )1,, C. 9(.............. 4, F r cl. i r i) - -: )().1.' i C). ",, eCt.1 I etFcr on d, e's c:l. n q or i a'1.... at: u i:1: " i: t:::',!i:n t i:: *~~~~~h!:re -.(.t,(' 1.... t.te)t.C(X1......... tc si ar!,c:.Ct...........C...e:... ii ~ -

i U.::i.'..:,.,,,i:..~,,!i,,''.' 1)!) c icu(i- a.t. dC3 T( I` O;fl)l cL 5 eI r J:,. L:.. I.:. fi rf l C' cn F..itd. cj: r' ('- " (-.(. I r LI! Em... r tt - (e IS It.. 1-. E'!s I i.E.i r (e t. S' E..' S't;. rcc:,!ii:,.o z-tc-II. c,..8.:? 1 2 4.8'.'.. 2.,:: 124 hlax i.m m 1o:ad. ~:: N: a i. (::: t..t I j1 t'e d f r-on S T e' l-. ti i a tE a.L, 1 C LIt 1 a t:. e f r'::.m -.t r'a:i. I. c... 5'1 57'7. 529.1 "1T1he ma:- i m L.tm E r Cq L:ineer in S t -r"a i. t i i,:.-...,,.,..;..

I ne cUrrent VaiULt~ cr te.. L. (ad, -:, _:. i'-, ti,-, l; (::..., riri r 1. F;( 1 i. n C) C C) iC) O:. ):)) i',,,?,:): e,.':.. _ r. (')::(.) i )...i. Ft,{"e~~~ n 1 *,('' l1' nq -v. ti. I C) C) C)::)()....,,'. s. 8 C-' 1 f.-( t |'8 (_".................. (i si. i,, I (4...... t (.t | t.-.. ].................. I,.: I!:::'1.. c' ":,.i' t'" C —', 0 -.t r. r. C ("'..I. -......C.. 1"- e M::.Ct'L u.1 is cr: f: E I a i't.. c J i. t y L. s,.5,5. —: 39

Eng, Stress vs, Eng, Strain 395 x 338 X S 282 t e 226 S 1 169 M a 113 56 G,.0 8G,4 G,08 8,11 0,15 0,19 0,23 G,27,31 G,34 0,38 Strain C~R to Poeted

Thue Stress vs. True Strain / Data(x) & Appr(-) 6;33 A 543 amm S 452 e i e362~ s 5 /~~~~~~~~~~~~~~~~~~ a1~81. BIGB GIG6 G.11 G.1 G23 8.28 G.34 GI4G Q.45 6,1 6U56 Sh~ain CR to iL~o C~e 4

STRESS-STRAIN RELATION PROGRAM LISTING

LIST OF VARIABLES Input Data Section DataPoints: Total Number of DataPoints in a Set of Data I: The Number of the individual Data point. Readings[l] Defines individual Data point as'Initial','Yield','Ultimate','Fracture' or a regular'Reading'. Loads[l]: The Load at Data point I. Lengths[l]: The Length at Data point I. Diameter[l]: The Diameter at Data point I. Calculations Section EngStress[l]: Engineering Stress at Data point I. EngStrain[l]: Engineering Strain at Data point I. TrueStress[l]: True Stress at Data point I. DiaTrStrain[l]: True Strain computed in terms of the Diameters at Data point I. LenTrStrain: True Strain computed in terms of the Lengths at Data point I. L: Initial Length. DO Initial Diameter. A0 Initial Area. n,K: Parameters in the approximation of the True Stress-Strain relation in the plastic region (a=K*en). UltEngStressRd: Eng. Stress at Ultimate as determined from Data point defined as'Ultimate'. UltTrStressRd True Stress at Ultimate as determined from Data point defined as'Ultimate'. UltTrStrainRd True Strain at Ultimate as determined from Data point defined as'Ultimate'. UltEngStressCal: Eng. Stress at Ultimate as calculated from K and n. UltTrStressCal: True Stress at Ultimate as calculated from K and n. UltTrStrainCal True Strain at Ultimate as calculated from K and n. MaxLoadRd: Maximum Load as determined from Data point defined as'Ultimate'. MaxLoadCal Maximum Load as calculated from K and n. MaxEngStrain: Maximum Engineering Strain E Elastic Modulus. First: First Data point selected by user to calculate K and n. Second: Second Data point selected by user to calculate K and n. Code: Assures selected point will not produce error, ex: +0.

Saving and Loading Input Data Files Section Indata: Declaration of Input File. Filename: Name of Input File. Plotting Section Titlename: Title for plots. Titlenames Default Title. Xlable: Lable for X-axis. Ylable: Lable for Y-axis. GridCode: Selection of Grid Option. Xmax Maximum value needed on the X-axis. Xmin Minimum value needed on the X-axis. Ymax Maximum value needed on the Y-axis. Ymin Minimum value needed on the Y-axis. Xarray: Array containing all X values. Yarray: Array containing all Y values. XConv: Array containing all X values after convertion for plotting. YConv: Array containing all Y values after convertion for plotting. Main Program A,Z: Integers Used in Selection of Main Menu Options. Quit: Boolean used to quit the program.

PROGRAM Stress Strain; CONST Undefined= 0.1E-50; Title = 14; Regular = 7; Highlite = True; Normal = False; CR = True; NoCR = False; TYPE String255 = String[255]; String80 = String[80]; VAR {Input Data} Loads,Lengths,Diameters: Array [1..20] of Real; Readings: Array [1..20] of string[80]; I,DataPoints: Integer; {Calculations} EngStress,EngStrain,TrueStress,DiaTrStrain,LenTrStrain: Array[1..20] of Real; LO, DO, A0, n, K, UltEngStressRd, UltTrStressRd, UltTrStrainRd, UltEngStressCal,UltTrStressCal,UltTrStrainCal, MaxLoadRd, MaxLoadCal, MaxEngStrain, E: Real; {Selecting Readings for Calculations of K & n and E} First,Second: Integer; Code: Boolean; {Saving and Loading Data in Files} Indata: TEXT; Filename: String[20]; {Plotting} Titlename,Titlenames,Xlable: String[80]; Ylable: String[20]; GridCode: Integer; Xmax,Xmin,Ymax,Ymin: Real; Xarray,Yarray: Array [1..20] of Real; XConv,YConv: Array [1..20] of Integer; {Main Program} A,Z: Integer; Quit: Boolean; {Useful procedures throughout the program} PROCEDURE WriteAt(X,Y: Integer; Highlite,UseCR: Boolean; TheText: string255); BEGIN IF Y < 0 THEN Y:= 12; IF X < 0 THEN X:= (80-Length(TheText)) DIV 2; GotoXY(X,Y); IF Highlite THEN TextColor(10); IF UseCR THEN Writeln(TheText) ELSE Write(TheText); TextColor(Regular); END; PROCEDURE Proceed; VAR PosY: Integer; BEGIN

WriteAt(-1,25,Highlite,NoCR,'Press Return to Proceed'); PosY:=WhereY; Readln; GotoXY(1,PosY); DelLine; END; PROCEDURE Read_Code(VAR Code,Q: Integer); VAR Codestr: String[80]; Error,PosX,PosY: Integer; BEGIN PosX: =WhereX; PosY: =Wherey; REPEAT ClrEOL; Readln (Codestr); IF length(Codestr)=0 THEN BEGIN Error:=0; Q:=45; END; Val (Codestr, Code, Error); IF Error<>0 THEN BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Selection type must be an integer'); Delay(1500); DelLine; GotoXY(PosX,PosY); END; UNTIL Error=0; END; PROCEDURE YesNo_Answer(Var Yes No_Code: Integer); VAR Answer: String[80]; BEGIN Readln (Answer); IF Length(Answer)=0 THEN YesNo Code:=2; IF (Answer='yes') OR (Answer='y') THEN Yes No Code:=1; IF (Answer='no') OR (Answer='n') THEN YesNoCode:=2; END; {Header} PROCEDURE Header; BEGIN Window(15,6, 72,25); Clrscr; TextColor (Title); Writeln(' ***************************************************'); Writeln ('* *'); Writeln ('* *'); Writeln('* UNIVERSITY OF MICHIGAN *'); Writeln('* Department of Mechanical Engineering *'); Writeln('* ME 251 *'); Writeln(' *'); Writeln('* Stress Strain Relationships *'); Writeln('* from Tensile Test Data Writeln('* *'); Writeln('* by Diana Rincon *'); Writeln ('* *' Writeln('* *'); Writeln (' ***************************************************'); TextColor(Regular); Window(1,1,80,25); END; {Introduction} PROCEDURE Introduction choice(Var Intro Code: Boolean);

VAR Yes No Code Integer; Code Procedure: Boolean; BEGIN REPEAT Intro Code:=False; Write('Do you wish to read the introduction? (no):'); Yes No Answer(Yes No Code); CASE Yes No Code OF 1: BEGIN Intro Code:=True; CodeProcedure:=True; END; 2: Code Procedure:=True; ELSE BEGIN WriteAt(-1,25,Highlite,CR,'Must answer yes or no and hit return'); GotoXY(15,19); DelLine; GotoXY(1,1); InsLine; GotoXY(1,20); InsLine; GotoXY(15,20); CodeProcedure:=False; END; END; UNTIL Code Procedure=True; Clrscr; END; PROCEDURE Introduction; VAR Intro Code: Boolean; BEGIN Introduction choice(Intro Code); IF Intro Code=True THEN BEGIN TextColor (Title); Writeln (' INTRODUCTION'); Writeln('This program solves for the ENGINEERING AND TRUE STRESSES AND STRAIN': Writeln('other important related parameters from Tensile Test Data.'); Writeln; Writeln('The user can input the Test data directly or from a file. The FORMAT Writeln('INPUT FILE is one input per line, as follows:'); Writeln(' Line 1-Reading[l] Line 2-Load[l] Line 3-Length[l] Line 4-Di Writeln(' Line 6-Reading[2] etc.'); Writeln('The VARIABLE READING defines the data point as either the initial poi Writeln('yield point, the ultimate point, the fracture point, or simply a nonWriteln('point (Reading[DataPoint]=Reading). The total NUMBER OF DATAPOINTS t Writeln('defined in this program is 20.'); Writeln; Writeln('THE OTHER PARAMETERS that can be solved for using this program are:') Writeln('the K & N parameters in the mathematical model for the relationship k Writeln('true stress and true strain, the Stresses and Strains at Ultimate, th Writeln('Load, the Maximum Engineering Strain, and the Modulus of Elasticity.' Writeln; Writeln('All calculations make use of INITIAL DATA (the load, length, and the Writeln('right before the tensile test is run). IF no data point has been de: Writeln('Initial, ie. Reading=Initial, the data point with load of zero or the Writeln('point first defined will be assumed to be the initial data.'); Writeln; Writeln('To print any graphs, User must type GRAPHICS before running the progr Proceed; END; END; {Initialize Data} PROCEDURE Initialize Data Array; VAR Q: Integer; BEGIN FOR Q:=1 to 20 DO BEGIN Readings[Q]:='Reading'; Loads[Q]:=0; Lengths[Q]:=Undefined;

Diameters [Q]:=Undefined; END; END; {Input Data} PROCEDURE Example Data; VAR Q: Integer; BEGIN FOR Q:=1 to 4 DO BEGIN Readings[Q]:='Reading'; END; DataPoints:=5; Readings [5]:='Fracture'; Loads[l]:=0; Loads[2]:=40; Loads[3]:=49.8; Loads[4]:=50.8; Loads[5]:=46.3; Lengths[l]:=50; Lengths[2]:=52.8; Lengths[3]:=56.9; Lengths[4]:=65.3; Lengths[5]:=69.1; Diameters[1]:=12.8; Diameters[2]:=12.6; Diameters[3]:=12.1; Diameters[4]:=11; Diameters[5]:=9.65; END; PROCEDURE Select Number Data Points; VAR Codestr: String[80]; Error: Integer; BEGIN REPEAT Error:=0; WriteAt(-1,-l,Normal,NoCR,'Select Number of Data Points (3):'); ClrEOL; Readln (Codestr); IF Length(Codestr)=0 THEN BEGIN Error:=0; DataPoints:=3; END; Val (Codestr,DataPoints, Error); IF DataPoints>20 THEN Error:=l; IF Error<>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCr,'Selection type must be an integer less than 20'); Delay(1000); DelLine; END; UNTIL Error=0; END; PROCEDURE PrintData; VAR POSY,POSYY: Integer; BEGIN IF DataPoints<=20 THEN BEGIN Window(1, 1, 80,25); Clrscr; PosY:=(21-DataPoints) DIV 2; TextColor (Title); WriteAt(-1,PosY,Normal, CR,'The current values are:'); Writeln; TextColor(Title); WriteAt (24, PosY+2,Normal, CR,'Load, kN Length, mm Diameter, mm'); FOR I:=l to DataPoints DO BEGIN PosYY:=PosY+3+I; GotoXY(6,PosYY); TextColor(Title); Write(I,'.');TextColor(Regular);Write(Readings[I]:9); GotoXY(21,PosYY); IF Loads[I]<>Undefined THEN Write(Loads[I]:10:4); GotoXY(41,PosYY); IF Lengths[I]<>Undefined THEN Write(Lengths[I]:10:4); GotoXY(60,PosYY); IF Diameters[I]<>Undefined THEN Writeln(Diameters[I]:10:4); END; END ELSE

SelectNumberData Points; END; PROCEDURE Select_Reading_Type; VAR Readingstr: string[80]; Error,Q: integer; Duplicate: Boolean; BEGIN REPEAT Clrscr; Error:=1; WriteAt(-1,24,Highlite,NoCR,'Reading Types:'+'Initial(I) Reading(R) Yield(Y) Ultimate(U) Fracture (F)'); WriteAt(-l,-1,Normal,NoCR,'Select type of Reading input (R):'); Readln(Readingstr); IF Length(Readingstr)=O THEN BEGIN Error:=0; Readings[I]:='Reading' END; IF (Readingstr='Reading') OR (Readingstr='R') OR (Readingstr='r') THEN BEGIN Error:=O; Readings [I]:=' Reading'; END; IF (Readingstr='Yield') OR (Readingstr='Y') OR (Readingstr='y') THEN BEGIN Error:=O; Readings[I]:='Yield'; END; IF (Readingstr='Ultimate') OR (Readingstr='U') OR (Readingstr='u')THEN BEGIN Duplicate:=False; FOR Q:=1 to DataPoints DO BEGIN IF Readings[Q]='Ultimate' THEN Duplicate:=True; END; IF Duplicate=True THEN BEGIN GotoXY(1,25); DelLine; WriteAt(-1,25,Highlite,NoCR,'An Ultimate Point has already been chosen'); Delay(1500); DelLine; END ELSE BEGIN Readings[I]:='Ultimate'; Error:=0; END; END; IF (Readingstr='Fracture') OR (Readingstr='F') OR (Readingstr='f')THEN BEGIN Duplicate:=False; FOR Q:=1 to DataPoints DO BEGIN IF Readings[Q]='Fracture' THEN Duplicate:=True; END; IF Duplicate=True THEN BEGIN GotoXY(1,25); DelLine; WriteAt(-1,25,Highlite,NoCR,'A Fracture Point has already been chosen'); Delay(1500); DelLine; END ELSE BEGIN Readings[I]:='Fracture'; Error:=0; END; END; IF (Readingstr='Initial') OR (Readingstr='I') OR (Readingstr='i')THEN BEGIN Duplicate:=False; FOR Q:=1 to DataPoints DO BEGIN IF Readings[Q]='Initial' THEN Duplicate:=True; END; IF Duplicate=True THEN BEGIN GotoXY(1,25); DelLine; WriteAt(-1,25,Highlite,NoCR,'An Initial Point has already been chosen'); Delay(1500); DelLine; END ELSE BEGIN Readings[I]:='Initial'; Error:=0; END; END; UNTIL Error=0; ND; PROCEDURE Read Loads; VAR

Loadstr:string[80]; Error:integer; BEGIN REPEAT Readln (Loadstr); IF Length(Loadstr)=0 THEN BEGIN Loads [I]:=Undefined; WriteAt(-1,25,Highlite,NoCR,'No Data Available for this point Assumed'); Delay(1500); DelLine; Error:=0; END; Val (Loadstr, Loads [i], Error); IF loads[I]<0 THEN Error:=1; IF Error <>0 THEN BEGIN WriteAt (-1,25,Highlite,NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(24,13); Clreol; END; UNTIL Error=0; END; PROCEDURE Read Lengths; VAR Lengthstr:string[80]; Error:integer; BEGIN REPEAT Readln (lengthstr); IF Length(Lengthstr)=0 THEN BEGIN Lengths[I]:=Undefined; WriteAt(-1,25,Highlite,NoCR,'No Data Available for this point Assumed'); Delay(1500); DelLine; Error:=0; END; Val (Lengthstr,Lengths [i],Error); IF Lengths[I]<=0 THEN Error:=l; IF Error <>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(42,13); Clreol; END; UNTIL Error=0; END; PROCEDURE Read _Diameters; VAR Diameterstr:string[80]; Error:integer; BEGIN REPEAT Readln (Diameterstr); IF Length(Diameterstr)=0 THEN BEGIN Diameters [I]:=Undefined; WriteAt(-1,25,Highlite,NoCR,'No Data Available for this point Assumed'); Delay(1500); DelLine; Error:=0; END; Val (Diameterstr, Diameters [i],Error); IF Diameters[I]<=0 THEN Error:=1; IF Error <>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(60,13); Clreol; END; UNTIL Error=0; END; PROCEDURE Input_Data_FormatperReading; BEGIN Clrscr; TextColor(Title); WriteAt(24,-1,Normal,CR,'Load, kN Length, mm Diameter, mm');

GotoXY(6,13); TextColor(Title); Write(I,'.'); TextColor(Regular); Write(Readings[I]); GotoXY(24,13);Read Loads; GotoXY (42,13);Read_Lengths; GotoXY(60,13);Read Diameters; END; PROCEDURE Input_Data; BEGIN FOR I:=l to DataPoints DO BEGIN Select_Reading_Type; Input_Data_Format_per Reading; END; END; PROCEDURE Inputing_Data; BEGIN Clrscr; WriteAt(-1,-l,Normal,NoCR,'Name of Input File:'); ReadLn (Filename); Assign (Indata, Filename); {$I-} Reset(Indata); {$I+} IF IOResult<>0 THEN WriteAt(l,25,Highlite,NoCR,'This File cannot be opened.') ELSE BEGIN I:=0; IF I<20 THEN BEGIN WHILE NOT EOF(Indata) DO BEGIN I:=I+1; Readln(Indata,Readings[I]); Readln(Indata,Loads [I]); Readln(Indata,Lengths [I]); Readln(Indata,Diameters[I]); DataPoints:=I; END; END; Close (Indata); END; END; PROCEDURE Input_Option; VAR Y,Q: Integer; Stop: Boolean; BEGIN Stop:=False; REPEAT Clrscr; TextColor(Title); Writeln('**INPUT OPTION**'); TextColor (Regular); Writeln (' Choose an option'); TextColor (Title); Write(' 1');TextColor (Regular);Writeln(' Input Data Directly');TextColor(14); Write(' 2');TextColor(Regular);Writeln(' Load Input Data File');TextColor(14); Write(' 3');TextColor(Regular);Writeln(' Load Example Data'); Writeln; Write('Enter selection here:'); Read Code(Y,Q); CASE Y OF 1: BEGIN Stop:=true; Window(1,1,80,25); Clrscr; Select_NumberDataPoints; InputData; END; 2: BEGIN Stop:=true; Window(1,1,80,25); Inputing_Data; END;

3: BEGIN Stop:=true; Window(1,1,80,25); Clrscr; Example Data; Print Data; proceed; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-3'); Delay(1500); DelLine; END; END; UNTIL Stop=true; END; {Edit Data} PROCEDURE Edit_Individual_Readings; VAR Q, Code, A, PosY: integer; Answer: string[80]; BEGIN REPEAT Print Data; PosY:=WhereY+1; Writeln; WriteAt(-1,PosY,Normal,NoCR,'Select variable to be modified,'+'by entering corresponding number:'); ClrEOL; Read code(I,Q); IF I<1 THEN A:=2 ELSE A:=1; IF (I>DataPoints) OR (Q=45) THEN A:=3 ELSE A:=A; CASE A OF 2: BEGIN WriteAt(-1,25,Highlite,NoCR,'Code out of range'); Delay(1500); DelLine; END; 3: BEGIN WriteAt(-1,25,Highlite,NoCR,'Code out of range'); Delay(1500); DelLine; END; ELSE Select_Reading_Type; Input_Data_Format_per Reading; REPEAT Print Data; Code:=4; WriteAt(-1,25,Normal,NoCR,'Do you wish to edit another variable? (no):'); ClrEOL; Yes No Answer(code); CASE Code OF 1: Code:=3; 2: BEGIN Code:=3; Q:=45; END; ELSE BEGIN Writeln; WriteAt(-1, 25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END; UNTIL Q=45; ROCEDURE AddReadings; VAR Q,Code,A,PosY,J:integer;

TempReadings: Array[1..20] of String[80]; TempLoads,TempLengths,TempDiameters: Array[1..20] of Real; BEGIN Q:=4; REPEAT Print Data; PosY:=WhereY+l; Writeln; WriteAt(-1,PosY,Normal,NoCR,'Select Reading to be added,'+'by entering corresponding number:'); ClrEOL; Read code(J,Q); IF (J<=DataPoints) AND (J>0) THEN BEGIN FOR I:=J to DataPoints DO BEGIN TempReadings [I]:=Readings [I]; TempLoads[I]:=Loads[I]; TempLengths[I]:=Lengths[I]; TempDiameters [I]:=Diameters [I]; END; FOR I:=J to DataPoints DO BEGIN Readings [I+1]:=TempReadings [I]; Loads [I+1]:=TempLoads [I]; Lengths [I+1]:=TempLengths [I]; Diameters[I+1]:=TempDiameters[I]; END; DataPoints:=DataPoints+l; END; IF J>DataPoints THEN DataPoints:=J; IF (J<1) OR (J>20) THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Negative Numbers or Number greater than 20'+ not accepted'); Delay(1500); DelLine; END ELSE BEGIN I:=J; Select_Reading_Type; Input_Data_Format_per_Reading; REPEAT Print_ Data; Code:=4; WriteAt(-1,25,Normal,NoCR,'Do you wish to add another variable? (no):'); ClrEOL; Yes No Answer(Code); CASE Code OF 1: Code:=3; 2: BEGIN Code:=3; Q:=45; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END; UNTIL Q=45; END; PROCEDURE Delete_Readings; VAR Q,Code,PosY,J:integer; BEGIN Q:=4; REPEAT Print Data; PosY:=WhereY+1; Writeln;

WriteAt(-1,PosY, Normal, NoCR,'Select Reading to be deleted,'+'by entering corresponding number:'); ClrEOL; Read code(J,Q); IF (J<=DataPoints) AND (J>=1) THEN BEGIN DataPoints: =DataPoints-i; FOR I:=J to DataPoints DO BEGIN Readings [I]:=Readings [I+1]; Loads[I]:=Loads[I+1]; Lengths[I]:=Lengths[I+1]; Diameters [I]:=Diameters [I+1]; END; REPEAT Print Data; Code:=4; WriteAt(-1,25,Normal,NoCR,'Do you wish to delete another variable? (no):'); ClrEOL; Yes No Answer(Code); CASE Code OF 1: Code:=3; 2: BEGIN Code:=3; Q:=45; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Reading not defined'); Delay(1500); DelLine; END; UNTIL Q=45; END; PROCEDURE MenuEditData; VAR J,Q: Integer; BEGIN REPEAT Clrscr; Window(29,10,80,25); Clrscr; TextColor (Title); Writeln('Edit Data Menu'); Writeln; TextColor (14); Write('1'); TextColor(Regular); Writeln(' Edit Individual Reading'); TextColor(14); Write('2'); TextColor(Regular); Writeln(' Add Reading'); TextColor(14); Write('3'); TextColor(Regular); Writeln(' Delete Reading'); TextColor(14); Write('4'); TextColor(Regular); Writeln(' Return to Main Menu'); Writeln; Write('Enter selection here:'); Read Code(J,Q); CASE J OF 1: BEGIN Clrscr; EditIndividualReadings; END; 2: BEGIN Clrscr; Add_Readings; END; 3: BEGIN Clrscr; DeleteReadings; END; 4: Writeln; ELSE BEGIN

Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-4'); Delay(1500); DelLine; END; END; UNTIL J=4; END; {Saving Data in a File} PROCEDURE Saving_CurrentData; BEGIN WriteAt(-1,-1,Normal,NoCR,'Name Input File to be saved:'); Readln (Filename); Assign (Indata,Filename); Rewrite (Indata); For I:=l to DataPoints DO BEGIN Writeln (Indata, Readings [I]); Writeln(Indata,Loads[I]); Writeln(Indata, Lengths[I]); Writeln(Indata,Diameters[I]); END; Close (Indata); END; {Calculations} FUNCTION Power(mantissa,Exponent:Real): Real; BEGIN Power:=Exp (Ln (Mantissa) *Exponent); END; PROCEDURE DetermineInitialConditions; VAR Initial: Integer; BEGIN Initial:=0; FOR I:=l to DataPoints DO BEGIN IF Readings[I]='Initial' THEN Initial:=I; END; IF Initial=0 THEN BEGIN FOR I:=l to DataPoints DO BEGIN IF Loads[I]=0 THEN Initial:=I; END; END; IF Initial=0 THEN Initial:=1; LO:=Lengths[Initial]; DO:=Diameters [Initial]; AO:=SQR(DO)*PI/4; END; PROCEDURE Print Initial Conditions; BEGIN DetermineInitialConditions; Clrscr; TextColor(Title); WriteAt(-1,11,Normal,NoCR,'The Initial Dimensions are:');TextColor(14); WriteAt(-1,12,Normal,NoCR,'Length mm Diameter mm Area sqmm'); GotoXY(19,13); IF L0=Undefined THEN Write('Not defined') ELSE Write(LO:10:4); GotoXY(35,13); IF DO=Undefined THEN Write('Not defined') ELSE Write(DO:10:4); GotoXY(50,13);

IF DO=Undefined THEN Write('Not defined') ELSE Writeln(AO:10:4); Proceed; END; PROCEDURE DetermineStressStrain; BEGIN Determine Initial Conditions; IF LO<>Undefined THEN BEGIN FOR I:=l To DataPoints DO BEGIN IF Lengths[I]<>Undefined THEN BEGIN EngStrain[I]:=(Lengths[I]-L0)/L0; LenTrStrain[I]:=Ln(lengths[I]/LO); END ELSE BEGIN EngStrain[I]:=0.1E-50; LenTrStrain[I]:=O.1E-50; END; END; END; IF DO<>Undefined THEN BEGIN FOR I:=l to DataPoints DO BEGIN IF Loads[I]<>Undefined THEN EngStress[I]:=Loads[I]*1000/AO ELSE EngStress[I]:=Undefined; IF Diameters[I]<>Undefined THEN DiaTrStrain[I]:=2*Ln (DO/Diameters[I]) ELSE DiaTrStrain[I]:=Undefined; END; END; FOR I:=l to DataPoints DO BEGIN IF (Diameters[I]<>Undefined) AND (Loads[I]<>Undefined) THEN TrueStress[I]:=Loads[I]*1000/(SQR(Diameters[I])*PI/4) ELSE TrueStress[I]:=Undefined; END; END; PROCEDURE Print Stress Strain; VAR PosY: Integer; BEGIN DetermineStress Strain; Clrscr; PosY:=(22-DataPoints) DIV 2; TextColor (Title); WriteAt(3,PosY,Normal,CR,'Reading Eng Stress Eng Strain'+'True Stress True Strain'); TextColor(Title); WriteAt(20,PosY+l,Normal,CR,'MPa'); TextColor(Title); WriteAt(46,PosY+l,Normal,CR,'MPa'); TextColor(Title); WriteAt(55,PosY+1,Normal,CR,'ln(Li/Lo)'); TextColor(Title); WriteAt(68,PosY+l,Normal,CR,'21n(Do/Di)'); IF LO<>Undefined THEN BEGIN FOR I:=l To DataPoints DO BEGIN GotoXY (3, PosY+l+I); TextColor(Title);Write(I,'.');TextColor(Regular);Write(Readings[I]:8); IF Lengths[I]<>Undefined THEN BEGIN GotoXY(29,PosY+l+I); Write (EngStrain[I]:10:4); GotoXY(54,PosY+1+I); Write(LenTrStrain[I]:10:4); END; END; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Initial Length Not defined.'+'Eng. Strain & True Strain dep on length Can not be Calculated'); Delay(2000); DelLine; END; IF D0<>Undefined THEN BEGIN FOR I:=l to DataPoints DO BEGIN IF Loads[I]<>Undefined THEN BEGIN GotoXY(16,PosY+l+I); Write(EngStress[I]:10:4); END;

IF Diameters[I]<>Undefined THEN BEGIN GotoXY(68,PosY+1+I); Write(DiaTrStrain[I]:10:4); END; END; END ELSE BEGIN WriteAt (-1, 25,Highlite,NoCR,'Initial Diameter Not defined.'+'Eng. Stress & True Strain dep on dia Can not be Calculated'); Delay(2000); DelLine; END; FOR I:=l to DataPoints DO BEGIN IF (Diameters[I]<>Undefined) AND (Loads[I]<>Undefined) THEN BEGIN GotoXY(42,PosY+1+I); Write(TrueStress[I]:10:4); END; END; Proceed; END; PROCEDURE Selecting_Reading(VAR Selected_Reading:Integer; Text:String80); {Selection of Reading for Calculation of K & N or E} VAR PosY,Q: Integer; BEGIN REPEAT Print Data; PosY:=WhereY+l; WriteAt (-1, PosY,Normal,NoCR, Text); ClrEOL; Read_Code (SelectedReading, Q); IF (Selected_Reading>=1) AND (Selected_Reading<=DataPoints) THEN Q:=10 ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Reading not defined'); Delay(1500); DelLine; END; UNTIL Q=10; END; PROCEDURE Are_True_StressStrain Defined(VAR Reading:Integer); (Checking Selected Reading to see if appropriate data point for such calculation} BEGIN Code:=True; IF (TrueStress[Reading]=0.1E-50) OR (TrueStress[Reading]=0) THEN BEGIN WriteAt(-1,25,Highlite, NoCR,'True Stress for this point must be defined'); Delay(1500); DelLine; Code:=False; END; IF (LenTrStrain[Reading]=0.1E-50) OR (LenTrStrain[Reading]=0) AND (DiaTrStrain[Reading]=0.1E-50) OR (DiaTrStrain[Reading]=0) THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'True Strain for this point must be defined'); Delay(1500); DelLine; Code:=False; END; END; PROCEDURE NoPrint_True_StressStrain Defined(VAR Reading:Integer); {Checking Selected Reading to see if appropriate data point for such calculation} BEGIN Code:=True; IF (TrueStress[Reading]=0.1E-50) OR (TrueStress[Reading]=0) THEN Code:=False; IF (LenTrStrain[Reading]=0.1E-50) OR (LenTrStrain[Reading]=0) AND (DiaTrStrain[Reading]=0.1E-50) OR (DiaTrStrain[Reading]=0) THEN Code: =False; END; PROCEDURE Calculate K and n; {Asks User to select PROPER readings used in the calculations of k & n and performs such calculations.} VAR LNStrains: Real;

BEGIN REPEAT Selecting_Reading(First,'Select First Reading for Calculation of K & n:'); Are TrueStressStrain Defined(First); UNTIL Code=True; REPEAT Selecting_Reading(Second,'Select Second Reading for Calculation of K & n:'); Are True StressStrain Defined(Second); IF Second=First THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Second reading must differ from the first'); Delay(1500); DelLine; Code:=False END; UNTIL Code=True; Clrscr; TextColor (Title); GotoXY(32,12); Write('n'); GotoXY(50,12); Write('K'); TextColor(Regular); IF (DiaTrStrain[Second]<>0.1E-50) OR (DiaTrStrain[Second]<>0) THEN BEGIN IF (DiaTrStrain[First]=0.1E-50) OR (DiaTrStrain[First]=0) THEN LNStrains:=LN(LenTrStrain[First]/DiaTrStrain[Second]) ELSE LNStrains:=LN(DiaTrStrain[First]/DiaTrStrain[Second]); END ELSE BEGIN IF (DiaTrStrain[First]=0.1E-50) OR (DiaTrStrain[First]=0) THEN LNStrains:=LN(LenTrStrain[First]/LenTrStrain[Second]) ELSE LNStrains:=LN(DiaTrStrain[First]/LenTrStrain[Second]); END; n:=LN(TrueStress[First]/TrueStress[Second])/LNStrains; GotoXY(25,13); Write(n:10:4); IF (DiaTrStrain[First]<>0.1E-50) AND (DiaTrStrain[First]>0) THEN BEGIN K:=TrueStress[First]/Power(DiaTrStrain[First],n); GotoXY(45,13); Write(K:10:4); END ELSE BEGIN IF (LenTrStrain[First]<>0.1E-50) AND (LenTrStrain[First]>0) THEN BEGIN K:=TrueStress[First]/Power(LenTrStrain[First],n); GotoXY(45,13); Write(K:10:4); END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Calculating K with current reading selection'+ not possible'); Delay(1500); DelLine; END; END; Proceed; END; PROCEDURE Call K and n; {Determines if Proper Data Points are available for calculation of K & N before calling Calculate K andn procedure.} VAR J: Integer; BEGIN J:=0; DetermineStressStrain; Clrscr; FOR I:=1 to DataPoints DO BEGIN Code:=True; NoPrint TrueStressStrainDefined(I); IF Code=True THEN J:=J+1; END; IF (DataPoints>=3) AND (J>=2) THEN Calculate K and n ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'No proper data to calculate k & n'); Delay(1500); DelLine; n:=0; K:=0; END; END; PROCEDURE ComputeUltimate_StressStrain;

VAR J: Integer; BEGIN J:=0; UltTrStrainRd:=0.1E-50; UltEngStressRd:=0.1E-50; UltTrStressRd:=0. 1E-50; FOR I:=1 To DataPoints DO BEGIN IF Readings[I]='Ultimate' THEN BEGIN UltEngStressRd:=EngStress[I]; UltTrStressRd:=TrueStress[I]; IF DiaTrStrain[I]<>0.1E-50 THEN UltTrStrainRd:=DiaTrStrain[I] ELSE UltTrStrainRd:=LenTrStrain[I]; END; END; IF (K<>0) OR (n<>0) THEN BEGIN UltEngStressCal:=K*Power(n/2.718282,n); UltTrStressCal:=K*Power(n,n); UltTrStrainCal:=n; END ELSE BEGIN UltEngStressCal:=0; UltTrStrainCal:=0; UltTrStressCal:=0; END; END; PROCEDURE Print Ultimate StressStrain; BEGIN ComputeUltimateStressStrain; Clrscr; Window(1, 1, 80,25); Clrscr; TextColor (Title); WriteAt(-1, 10,Normal,NoCR,'Stresses & Strains At Ultimate'); TextColor (Title); WriteAt(l,-1,Normal,NoCR,'Calculated from K & n:'+'Determined from Reading:'); TextColor(Title); WriteAt(l,13,Normal,NoCR,'Eng Stress True Stress True Strain'+'Eng Stress True Stress True Strain'); TextColor(Regular); GotoXY(1,14); IF UltEngStressCal<>0 THEN Write(UltEngStressCal:10:4); GotoXY(14,14); IF UltTrStressCal<>0 THEN Write(UltTrStressCal:10:4); GotoXY(27,14); IF UltTrStrainCal<>0 THEN Write(UltTrStrainCal:10:4); GotoXY(44,14); IF UltEngStressRd<>0.lE-50 THEN Write(UltEngStressRd:10:4); GotoXY(56,14); IF UltTrStressRd<>0.lE-50 THEN Write(UltTrStressRd:10:4); GotoXY(69,14); IF UltTrStrainRd<>0.lE-50 THEN Write(UltTrStrainRd:10:4); Proceed; END; PROCEDURE Calculate Maximum Load; BEGIN MaxLoadCal:=0; MaxLoadRd:=0; MaxloadCal: =UltEngStressCal*A0; IF UltEngStressRd<>0.lE-50 THEN MaxloadRd:=UltEngStressRd*AO ELSE MaxLoadRd:=0; END; PROCEDURE Print Maximum Load; BEGIN CalculateMaximum Load; Clrscr; TextColor(Title); WriteAt(-l,-1,Normal,NoCR,'Maximum Load, kN:'); TextColor(Title); WriteAt(12,13,Normal,NoCR,'Calculated from Su estimate'+'Calculated from Su reading'); GotoXY(20,14); IF MaxLoadCal<>0 THEN Write(MaxLoadCal:10:4); GotoXY(50,14); IF MaxLoadRd<>0 THEN Write(MaxLoadRd:10:4); Proceed; END;

PROCEDURE Max NominalStrain; BEGIN MaxEngStrain:=EngStrain [1]; FOR I:=2 To DataPoints DO BEGIN IF EngStrain[I]>EngStrain[I-l] THEN MaxEngStrain:=EngStrain[I]; END; Clrscr; TextColor(Title); WriteAt(-1, -1,Normal,NoCR,'The maximum Engineering Strain is'); GotoXY(35,13); Write(MaxEngStrain:10:4); Proceed; END; PROCEDURE Modulus of Elasticity; {Asks User to select PROPER readings used in the calculations and performs such calculations} VAR Reading:Integer; BEGIN REPEAT Reading =0; Selecting_Reading(Reading,'Select Reading for Calculation of E:'); Code =True; IF (EngStress[Reading]=0) OR (EngStress[Reading]=Undefined) THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Eng Strain for this point must be defined'+ and nonzero'); Delay(1500); DelLine; Code:=False; END; UNTIL Code=True; E:=EngStress[Reading]/EngStrain[Reading]; Clrscr; TextColor (Title); WriteAt (-1, -1,NOrmal,NoCR,'The Modulus of Elasticity is'); GoToXY(35,13); Write(E:10:4); Proceed; END; PROCEDURE Call Modulus Of Elasticity; {Determines if Proper Data Points are available for calculation of E before calling Modulus_Of_Elasticity procedure.} VAR J: Integer; BEGIN DetermineStress Strain; J:=0; FOR I:=l to DataPoints DO BEGIN Code:=True; IF (EngStrain[I]=0) OR (EngStrain[I]=Undefined) THEN Code:=False; IF Code=True THEN J:=J+1; END; IF J>=1 THEN ModulusOfElasticity ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'No proper data to calculate E'); Delay(1500); DelLine; END; END; PROCEDURE MenuComputations; VAR J,Q: Integer; BEGIN REPEAT Clrscr; Window(29,10,80,25); Clrscr; TextColor(Title); Writeln('Computations Menu'); Writeln; TextColor (14); Write('l'); TextColor(Regular); Writeln(' Initial Conditions');

TextColor(14); Write('2'); TextColor(Regular); Writeln(' Stresses and Strains'); TextColor(14); Write('3'); TextColor(Regular); Writeln(' K and n'); TextColor(14); Write ('4'); TextColor (Regular); Writeln(' Stress and Strain at Ultimate'); TextColor(Title); Write ('5'); TextColor(Regular); Writeln(' Maximum Load'); TextColor(Title); Write('6'); TextColor(Regular); Writeln(' Maximum Nominal Strain'); TextColor(Title); Write('7'); TextColor(Regular); Writeln(' Calculate the Modulus of Elasticity'); TextColor(Title); Write('8'); TextColor(Regular); Writeln(' All of the Above'); TextColor (Title); Write('9'); TextColor (Regular); Writeln(' Return to Main Menu'); Writeln; Write('Enter selection here:'); Read Code(J,Q); CASE J OF 1: BEGIN Clrscr; Window(1,1,80,25); PrintInitialConditions; END; 2: BEGIN Clrscr; Window(1,1,80,25); PrintStressStrain; END; 3: BEGIN Clrscr; Window(1,1,80,25); Call K and n; END; 4: BEGIN Clrscr; Window(1,1,80,25); WriteAt(-1,-l,Normal,NOCR,'K and n'+ needed to calculate stress/strain at ultimate'); Delay(2000); DelLine; Call K and n; Print ultimate StressStrain; END; 5: BEGIN Clrscr; Window(1,1,80,25); WriteAt(-l,-1,Normal,NOCR,'K and n'+ needed to calculate the maximum load'); Delay(2000); DelLine; Call _K and n; Compute ultimateStressStrain; Print maximum Load; END; 6: BEGIN Clrscr; Window(1,1,80,25); DetermineStressStrain; Max Nominal Strain; END; 7: BEGIN Clrscr; Window(1,1,80,25); Call_Modulus_of_Elasticity; END; 8: BEGIN Clrscr; Window(1,1,80,25); PrintInitial Conditions; Print Stress Strain; Call K and n; Print Ultimate StressStrain; Print maximum load; Max Nominal Strain; Call Modulus of Elasticity; END; 9: Writeln; ELSE BEGIN Writeln; WriteAt (-1,25,Highlite,NoCR,'Code outside of range 1-9'); Delay(1500); DelLine; END; END; UNTIL J=9; END; {Plotting} PROCEDURE Proceed_Graph; BEGIN WriteAt (67,25,Highlite,NoCR,'CR to Proceed');

Readln; END; PROCEDURE TitleLables; VAR Grid: String[80]; Finish: Boolean; BEGIN Write('Title for graph:'); Readln(Titlename); IF Length(Titlename)=0 THEN Titlename:=Titlenames; Write('Lable for the x-axis(Strain):'); Readln (Xlable); IF Length(Xlable)=0 THEN Xlable:='Strain'; Write('Lable for the y-axis(Stress/MPa):'); Readln(Ylable); IF Length(Ylable)=0 THEN Ylable:='Stress/MPa'; Repeat Write ('Grid scale (no)'); Readln (Grid); IF Length(Grid)=0 THEN GridCode:=l; IF (Grid='no') or (Grid='n') THEN GridCode:=1; IF (Grid='yes') OR (Grid='y') THEN GridCode:=2; Case GridCode of 1: Finish:=True; 2: Finish:=True; ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no'); Delay(1500); DelLine; END; END; UNTIL Finish=True; END; PROCEDURE Print TitleLables; VAR XlableCent,YlableCent,b: Integer; YChar: String[1]; BEGIN TextColor(Title); WriteAt (-1, 1, Normal,NoCR, Titlename); XlableCent:=3+((76-Length(Xlable)) DIV 2); WriteAt (XlableCent, 25,Normal,NoCR,Xlable); YlableCent:=2+(20-Length(Ylable)) DIV 2; For B:=1 to Length(Ylable) DO BEGIN YChar:=Copy (Ylable, B, 1); WriteAt (l,YlableCent+b,Normal, NoCR,YChar); END; END; PROCEDURE Axis; BEGIN Draw(42,11, 42,181,1); Draw(40,179,632,179,1); END; PROCEDURE Grid; VAR M, L: Integer; BEGIN L:=11; For M:=1 to 7 DO BEGIN Draw(40,L,632,L,1); L:=L+24; END;

L:=101; For M:=1 to 10 DO BEGIN Draw(L, 11,L,181, 1); L:=L+59; END; END; PROCEDURE Divisions; VAR M, L: Integer; BEGIN L:=11; For M:=1 to 10 DO BEGIN Draw (40, L, 44, L, 1); L:=L+24; END; L:=101; For M:=1 to 10 DO BEGIN Draw(L,177,L,181,1); L:=L+59; END; END; PROCEDURE XYMaxMin; VAR M,L:Integer; BEGIN Xmin:=Xarray[1]; Ymin:=Yarray[1]; Xmax:=Xarray[DataPoints]; Ymax:=Yarray[DataPoints]; FOR M:=1 to DataPoints DO BEGIN IF Xarray[M]<Xmin THEN Xmin:=Xarray[M]; IF Yarray[M]<Ymin THEN Ymin:=Yarray[M]; IF Xarray[M]>Xmax THEN Xmax:=Xarray[M]; IF Yarray[M]>Ymax THEN Ymax:=Yarray[M]; END; END; PROCEDURE ScalesXY; VAR M,L: Integer; Xscalenumbers,Yscalenumbers:Array[1..11] of REAL; XIncrement, YIncrement:Real; BEGIN IF GridCode=2 THEN Grid ELSE Divisions; XIncrement:= (Xmax-Xmin)/10; YIncrement: = (Ymax-Ymin)/7; Xscalenumbers [1]:=Xmin; For L:=2 to 11 DO Xscalenumbers[L]:=Xscalenumbers [L-1]+XIncrement; Yscalenumbers [1]:=Ymin; FOR L:=2 to 8 DO Yscalenumbers [L]:=Yscalenumbers [L-1]+YIncrement; GotoXY(5,24); Write (Xscalenumbers [1]:4:2); GotoXY(12,24); Write (Xscalenumbers [2]:4:2); GotoXY(19,24); Write (Xscalenumbers [3]:4:2); GotoXY(27,24); Write (Xscalenumbers[4]:4:2); GotoXY(34,24);

Write (Xscalenumbers [5]:4:2); GotoXY(42,24); Write (Xscalenumbers [ 6]:4: 2); GotoXY(49,24); Write (Xscalenumbers[7]:4:2); GotoXY(56,24); Write (Xscalenumbers [8]: 4:2); GotoXY(63,24); Write (Xscalenumbers [9]:4:2); GotoXY(70,24); Write (Xscalenumbers[10]:4:2); GotoXY(76,24); Write (Xscalenumbers [11]:4:2); M:=2; For L:=1 to 8 DO BEGIN GotoXY(2,M); Write (Yscalenumbers [9-L]:4:0); M:=M+3; END; END; PROCEDURE XYConversion; VAR M,L: Integer; BEGIN FOR M:=1 to DataPoints DO BEGIN XConv[M]:=Trunc(42+(590/( Xmain)*(Xarray[M]-Xmin))) YConv[M]:=Trunc(179-(168/(Ymax-Ymin)*(Yarray[M]-Ymin))); END; END; PROCEDURE Print Exes; VAR M,L: Integer; BEGIN FOR M:=1 To DataPoints DO BEGIN Draw (XConv [M] -2, YConv [M] +2, XConv[M] +2, YConv [M]-2,1); Draw(XConv [M] -2, YConv [M]-2, XConv[M] +2, YConv [M] +2,1); END; END; PROCEDURE TrueRelAppr; VAR M,L: Integer; XapprIncr:Real; Xappr,Yappr: Array [1..101] of Real; XapprConv,YapprConv: Array [1..101] Of Integer; BEGIN IF (K<>0) AND (n<>0) THEN BEGIN Xappr[1]:=Xmin; XapprIncr:=(Xmax-Xmin)/100; FOR M:=2 to 101 DO Xappr [M1]:=Xappr [M-1]+XapprIncr; FOR M:=1 to 101 DO BEGIN IF Xappr[M]<>0 THEN Yappr[M]:=K*Power(Xappr[M],n) ELSE Yappr[M]:=0; XapprConv[M]:=Trunc(42+(590/(Xmax-Xmin)* (Xappr [M] -Xmin))); YapprConv[M]:=Trunc(179-(168/(Ymax-Ymin)*(Yappr[M]-Ymin))); END; FOR M:=2 to 101 DO BEGIN L:=M-1; IF XapprConv[L]>=42 THEN

Draw(XapprConv [L],YapprConv [L],XapprConv [M],YapprConv [M],1); END; END ELSE WriteAt(53,22,Highlite,NoCR,'No approximation calculated'); END; PROCEDURE PlotENGStressStrain; BEGIN Clrscr; Determine StressStrain; Titlenames:='Eng. Stress vs. Eng. Strain'; TitleLables; Hires; Print TitleLables; FOR I:=l to DataPoints DO BEGIN Xarray[I]:=EngStrain[I]; Yarray[I]:=EngStress[I]; END; Axis; XY MaxMin; IF (Xmax<>Xmin) AND (Ymax<>Ymin) THEN BEGIN ScalesXY; XY Conversion; Print Exes; END ELSE WriteAt(-1, -l,Normal,NoCR,'No Proper Data Available'); Proceed_Graph; TextMode; END; PROCEDURE PlotTrueStressStrain; BEGIN Clrscr; Call K and n; ClrScr; Titlenames:='True Stress vs. True Strain / Data(x) & Appr(-)'; TitleLables; Hires; Print TitleLables; FOR I:=l to DataPoints DO BEGIN IF DiaTrStrain[I]<>Undefined THEN Xarray[I]:=DiaTrStrain[I]; Yarray[I]:=TrueStress [I]; END; Axis; XY MaxMin; IF (Xmax<>Xmin) AND (Ymax<>Ymin) THEN BEGIN ScalesXY; XY Conversion; Print Exes; TrueRelAppr; END ELSE WriteAt(-1, -1,Normal,NoCr,'No Proper Data Available'); Proceed_Graph; TextMode; END; PROCEDURE Plotting_Menu; VAR Y,Q: Integer; Stop: Boolean; BEGIN Stop: =False; REPEAT Clrscr; TextColor (Title);

Writeln('**PLOTTING MENU**'); TextColor (Regular); Writeln (' Choose an option'); TextColor (Title); Write(' l');TextColor(Regular);Writeln(' Eng Stress vs Eng Strain'); TextColor (14);Write(' 2');TextColor(Regular); Writeln(' True Stress vs True Strain/Data & Appr.'); Writeln; Write('Enter selection here:'); Read Code(Y,Q); CASE Y OF 1: BEGIN Stop:=true; Window(1,1,80,25); Plot_EngStressStrain; END; 2: BEGIN Stop:=true; Window(1,1,80,25); Plot TrueStressStrain; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-3'); Delay(1500); DelLine; END; END; UNTIL Stop=true; END; {Exit} PROCEDURE Exit; VAR Code: integer; Answer:String[80]; BEGIN REPEAT WriteAt(-l,-l,NormalNoCR,'Exiting program? (yes):'); ClrEOL; Readln (Answer); IF Length(Answer)=O THEN Code:=1; IF (Answer='yes') OR (Answer='y') THEN Code:=l; IF (Answer='no') OR (Answer='n') THEN Code:=2; CASE Code OF 1: BEGIN Quit:=true; Code:=3; END; 2: Code:=3; ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END; {Main Menu} BEGIN LowVideo; Clrscr; Header; Introduction; Quit:=False; Initialize Data Array; REPEAT {start main menu} Clrscr; Window(29,10,80,25);

Clrscr; TextColor(Title); Writeln('**MAIN MENU**'); TextColor(Regular); Writeln(' Choose an Option'); Writeln; TextColor (Title); Write (' l');TextColor(Regular);Writeln(' List Current Data');TextColor(14); Write (' 2');TextColor(Regular);Writeln(' Input Data');TextColor(Title); Write (' 3');TextColor(Regular);Writeln(' Edit Data'); TextColor(Title); Write (' 4');TextColor (Regular);Writeln(' Save Current Data'); TextColor(14); Write (' 5');TextColor (Regular);Writeln(' Computations');TextColor (Title); Write (' 6');TextColor(Regular);Writeln(' Plotting');TextColor(Title); Write (' 7');TextColor (Regular);Writeln(' Exit Program'); Writeln; WriteAt(-1,21,Normal,NoCR,'Enter selection here:'); ClrEOL; Z:=0; Read Code(Z,A); Writeln; CASE Z OF 0: Writeln; 1: BEGIN Print Data; Proceed; END; 2: BEGIN Input Option; END; 3: Menu Edit Data; 4: BEGIN Window(1,1,,80,25); Clrscr; Saving_CurrentData; END; 5: Menu Computations; 6: Plotting_Menu; 7: BEGIN Window (, 1, 80,25); ClrScr; Exit; END; ELSE BEGIN WriteAt(-1,25,HighLite,NoCR,'Code outside of range'); Delay(1500); DelLine; END; END; UNTIL Quit=true; END.

PHASE DIAGRAMS MATE'RIALS

Interactive Computer Graphics for Storing Phase Diagrams By Joanne L. Murray -" No Lowiet %oL-'Na trl L' Center for Materials Research National Bureau of Standards and Don J. Orser 3 —(.30 q,5'- 3443 -- De Pu6H -(301o qe)' Sap.O Center for Applied Mathematics National Bureau of Standards -(30o) q?3-2oo 0 Progress is described on an interactive graphics computer program needed for the creation of an automated phase diagram data base. Automation requires the ability to input literature data in various units and formats and to edit and update a phase diagram without unnecessary reentry of data. A relational data structure makes possible the necessary explicit representation of phase stability data. Examples of binary diagrams are given. Plans for global management of a large data base are described. Introduction Interactive Graphics Nine of the binary phase diagrams presented in this Maintaining an up-to-date compilation of phase diaissue have been plotted by an interactive graphics corn- grams and phase stability data has in recent years beputer program now being developed at NBS. This pro- come a serious problem.1'2 Phase diagrams can be comgram is part of a project whose goal is an automated phase piled from recent literature fairly easily, but keeping up stability data base. This article is not a technical de- with theevaluationand reviewof data isquite a different scription of the computer algorithms, but rather illus- matter. After a certain number of supplements to a comtrates for the metallurgist the potential for interactive pilation, complete revision becomes necessary. Because computer graphics in computing phase diagrams. When the original data from several experiments often have the computer procedures have become standardized, a been combined by the previous evaluator in some unmore detailed technical account of them, as well as the known way, it may prove necessary in many instances to computer system implementing them, will be provided. reread and reevaluate the original papers. A considerIn the first section of this article, the requirements for able amount of the original work must thus be duplia truly interactive graphics program are discussed. The cated. On the other hand,- in reevaluating data. it is nine binary diagrams in this issue are then used to possible to introduce new judgements.and thus exemplify various features of the program in the second changes) that were not present in earlier versions. An section. Although the program is in the first stages of automated phase diagram data base is needed to allow development, these computer-composed phase diagrams one to store all the older experimental data along with already reveal several advantages over draftsman- some blend of all the available data in an up-to-date drawn figures. Some features of phase diagrams do pose evaluated diagram and with a record of how the current problems for computer graphics, and these are also dis- blend was achieved. Thus, a way is needed to introdu ce cussed in the last section. Long-range plans for a fully new experimental data and to reevaluate and re:,ptiautomated phase diagram data base are described and mize the phase diagram. the influence that a completely automated data base There has been some work on d'git'zin g hsre d'ais likely to exert upon the phase diagram field is grams, and phase diagrams are routine]ly.?',!ttt,:. by considered. computer (especially thermody-nam i caally calcu:.-, i L:!ietin of.All! Phs 1X- )ieert m!) a 5.

phase diagrams)?.'l Nash and West'2 have addressed the compilation must be that it not violate any of these problems posed by ternary diagrams in interactive com- simple topological rules. puter graphics. We are now primarily interested in the type of interactive graphics needed for the creation of a We want to start with the phase stability data of shich phase diagram data base. The practical problem we the traditional phase diagram is merely one - address is that of the initial input of phase diagram data ized representation. This information may be therrnofrom the literature. Data appear in many formats - for dynamic data, experimental phase diagram data. or example, in atomic and weight percent scales, in numer- phase boundaries postulated by an evaluator From these ical tables or graphical form. The data are a mixture of data, one generates the elements of the phase diagram - experimental points, curves fitted to experimental data, the positions of the eutectics, peritctics, congr uent and boundaries that are drawn to make the diagram melts, and phase boundaries. By composing these elethermodynamically complete. The difference between ments, one can make a printed version of the phase plotting a phase diagram by computer and using an diagram. interactive graphics program to compose a diagram We can now see why computer graphics is different from various sources ofrata discussed below, from the storage of a digitized graph. The only informaRecent progress in the automation of thermodynamic tion explicitly stored in a digitized picture is an array of data bases is close in spirit to what we have in mind for blacltwite spots. If we ask for the position of a line or phase diagram graphics. There are now several thermo- vertex, this information is only available implicitly as a dynamic data banks in existence; o mnep l b rresult of processing the stored image. The real objects of ~the-ni Alcocgion hd sc h e ~ar~vS:e ntk interest in a graphical representation of a phase diagram to a cq~ompuite.databaa.'l3 Alcock's data bas~re ic=lessi- bare the lines, vertices, labels, and data points, and these ble toj ursalalaflr thewo~rldandis intended to be used as should be referred to explicitly. Only byjudicious choice of easily and as often as the tables in his book. It is to be explicitly represented objects can both composition and updated continuously by means of a file into which generation be carried out on the same data set. participating users can submit new data, which can then It is our intention that the above process be carried out be evaluated and incorporated into the data base. We interactively. By interactive, we mean that one can calcuhave in mind a similar treatment of phase diagram data. late the data from a graphics terminal and subsequently Let us now define the problem of diagram creation: modify the graphical elements such as lines and vertices what functions do we want the computer graphics pro- during a single session at the terminal. Most graphics gram to carry out? We divide our tasks into two distinct applications produce a graph as a result of the execution subtasks: of a program, and there is no way for the user to intervene between the calculation of the quantities to be graphed * Composition of the phase diagram graph and the graphing process itself. Suppose the user wants * Generation of the phase diagram data to shorten a line or move a vertex. There is no way to refer to a line, because its graphical representation has been By "composition", we mean all those processes that go Byinto transforming nuwe meric all dathose processes that go generated directly by the execution of a procedure, and it into transforming numerical data and bibliographic is not represented by an explicit data element. messages into a printed graph. In the composition mode, Representing it as a data element allows its attributes to the graphics program is being used as a draftsman's tool. be modified and subsequently displayed by the applicaThe elements being manipulated are not alloy phases tion of a separate display procedure. and phase transformations, but for example, axes, tick marks, labels, solid and dotted lines, and character The program should thus be divided into three separsizes. The manipulations one performs on these ele- ately functioning parts: the data structure stored in the ments are, for example, rotations of the lines, reposition- memory, the procedures that display it in graphical ing of the labels, and transformations of weight to atom- form, and the front-end procedure that interactively ic percent scales. The requirement we make of the permits the user to modify the data structure in order to composition function of the graphics is that one should input new data and to give instructions to produce be able to do in a straightforward and direct way graphs. by computer whatever a draftsman may do to a phase TIb be able to refer directly to graphical entities such as diagraby computer whatever a draftsman may do toaphlines and vertices, we organize the data structure as a diagram. By "generation", we mean those aspects of the pro- "relational data base".The objects in this data base are all gram that, by an algorithm, mimic scientific common of the graphical entities that we might want to refer to sense and thermodynamic knowledge. Thus, in the by name (i.e., lines, intersections of lines, phase regions process of generation, we determine not how a line is they separate, labels that lie within the regions). These to be graphed, but where it is allowed to lie. We include objects can be characterized by defining various attriunder the category of generation: butes for them. This is done by assigning a value to an attribute-object pair yielding an attribute-object-value 1. The computation of a phase diagram from thermo- triple. For example, a region of the graph (object) has dynamic data. associated with it a label (attribute) whose value is the 2. If both thermodynamic and experimental phase di- character string "LIQUID". In turn, the object label has agram data are available, optimal utilization of as attribute a position, whose value is a compositiorn' both sets of data together, by the method of Henig et temperature pair. The relational data base allows one al. or by a similar technique.'"7 to define and manipulate a diagram by allowing the user 3. The qualitative evaluation of phase diagram data to define the triples, e.g., the values associated with an by application of, for example, Gibbs' phase rule, attribute-object pair. van't Hoff's rule, and the 180~ rule. A very basic For example, changing the composition of a eutectic requirement of any phase diagram published in a means that two lines must have their end points

changed. Without a relational data base, one might, for match to each other when the numerical data fitting example, have to first identify the two lines and then route can distinguish between points through which the reenter two entire lists of points. This procedure is curve is constrained to run exactly and points that are cumbersome and involves the manipulation of much treated as approximate. Mlatching of slopes at end points extraneous data. If the vertex can be referred to directly, is needed to deal efficiently with minima. these other operations can be performed automatically The Ag-Al peritectic posed problems because part of by the computer. Hence, the user can enter and edit data the data was given in the form of an insert, and it is now in the most natural possible way. difficult to handle input data that are given as an insert. Furthermore, the relational structure makes possible Inevitably, there are occasions when there is disagreeinteractive evaluation of phase diagram data. If the data ment between the draftsman's diagram and his insert. are organized notjust into an arbitrary set of lines to be Assuming that the two sets of input data are consistent, plotted, but into a set of regions, lines, and vertices, then it is now impossible (and would in any case be awkward) the objects can be organized according to the under- to combine data for a single curve input under two differlying thermodynamics of the diagram. Two-phase and ent calibrations of the graphics tablet. This problem will single-phase regions can be easily distinguished, and be solved in part by features that allow one to modify the Gibbs' rule can be applied. Topological rules are easily list of coordinates that make up a curve. Only the judgeenforced because the topology of the diagram originally ment of the user can resolve actual discrepancies, howdetermined the organization of the data structure. It ever, because the composition stage assumes that the is the relational data base that allows one to organize data have already been evaluated. the data in a way specifically appropriate to phase We can now produce graphs that contain only a small diagrams. temperature/composition range and hence are effectively enlargements of portions of the full diagram. In the future, we will have a zoom feature that will allow Examples of Binary Diagrams enlargement of any part of the graph as an insert. A diagram can contain very closely spaced-regions The problems we are now considering are not typical that do not show on ordinary composition scales, but of those expected in future years, because we are only that will sometimes be of interest and for which data beginning to acquire a data base of phase diagrams. may be available. For example, the primary solid soluOur main task at present is not updating or optimizing bility may be very low. The most accurate and selfphase diagrams, but simply entering a large number of consistent way to represent these data is as a part of diagrams to establish the basic data base. Most of the a diagram that can be enlarged. data to be entered are not in the ideal form of numerical The benefit of using the computer as a draftsman's coordinates of points on the phase boundary but are tool can be seen on the Pb side of the Al-Pb diagram (see given as a combination of numerical and graphical data. tear-out in back of this issue). The drawing from which Our starting material is a draftsman's drawing. this was taken violated the 180~ rule at 98.55 at.% Pb.'ITmperature and compositions of invariant points are Because numerical data were included, the curves were often, but not always, explicitly' indicated. To input a spline fit to the numerical data, giving a clear change in curve to the computer directly from a graph, we use a curvature at 98.55 at. % in agreement with the 180~ rule. graphics tablet, which is a large magnetically sensitive Finally, it is clear that a set of graphical elements can sheet that can digitize a point indicated on its surface. be combined in various ways to form diagrams suitable In using the tablet, the first thing one must do is to for different purposes. For example, labels or excalibrate the table with respect to the scale of the curve perimental data points can be included or deleted in to be input. One sets the temperature and composition different representations of the data. Almost every diascales by indicating the temperatures and compositions gram presents an example of some data or detail that of the defining rectangle of one's choice. After the scales benefits by a separate representation. are set, curves are entered on the tablet. An individual point on a curve is often numerically specified and can be entered directly from the keyboard. The data points are then fit by a numerical spline."8 If the fit needs to be Future Developments checked, individual curves can be displayed with the data points superimposed on the fitted spline, or a table We have so far discussed contributions to phase diaof the points may be printed. Minor readjustments, such gram graphics from three quite separate disciplines: as making the horizontals exactly horizontal or making * Interactive computing lines meet exactly at minima, are now made. If there are * Metallurgical thermodynamics readjustments, new lines are entered from the keyboard * Numerical curve fitting and old lines are deleted. Positions, angles, and texts of the labels are now entered. Finally, a graph is composed As the phase diagram data base grows, an additional of lines and labels; coordinate limits are given, and we discipline will make more important contributions, specify which curves are to be plotted. Symbols and line namely, scientific data base management. So far, we character (dotted, solid, etc.) must be specified. The re- hav.e discussed a program that can only peruse data sulting enumeration of data and plotting parameters within the bounds of an individual phase diagram. comprise a graph that can be stored in a data file. When our phase diagram collection has grown to several Two tricky features of the Ag-A1 diagram (see tear-out hundred diagrams, we shall want to be able to use the in back of this issue) are the minimum representing the computer to examine a large collection of diagrams from congruent point 25 at. % and the eutectic at 58 at. %. the point of view of a particular feature. This then beMinima become considerably easier to graph and to comes data base management on a global level.

When global management is added, the collection will 3. I. Ansara. Comparison of Methods for Thermodynamic Calgain new usefulness. For example, one now finds in culation of Phase Diagrams, Int. Met. Rev.. No. 1. p 2:38 Hansen several different melting temperatures for Ti in (1979). different Ti binaries. With global management, one will 4. A.D. Pelton, C.W. Bale and W.T Thompson, F*AC"T be able to require that all the diagrams be consistent g, (..>.. IFacility for the Arnalysis of Chemical Ther-modynamwith pure metal properties. Phase diagram collection will become more useful as a research tool; thermody- Treatment Computerized Canadian ThermodyP9, p 107 (19. namic parameters can be automatically calculated and optimized self consistently; systems can be searched for 5. L. Kaufman and H. Bernstein, Computer Calculbrtiro of a particular phase or property; tables can be con- Phase Duzgrams, with Special Rejference to R eltactorv M.etstructed, of solid solubilities, for example. Relations als, Academic Press, New York (1970). between any phase diagram property and the positions AT Dinsdale A Computer Program to Calculate Phase Lf the.....ituent ^.,..6. A.T. Dinsdale. A Computer Program to Calculate Phase of the constituent elements in the periodic table Equilibria in Ternary Alloy Systems. National Physical can be studied. Laboratory, Division of Chemical Standards, Tedding.on, Phase diagrams are almost always studied in connection Laoratory, Division of Chemical Standards, eddinn with mechanical and electrical properties, and metastable DCS Internal Report 1/78, February phases are important, as well as equilibrium phases. The 7. G.P. Willers, The Construction of Thermodynamic Phase flexibility of the relational data base is such that one need Diagrams through Computer Graphics, M.S. thesis, Iowa not be limited to collecting only phase diagram data; any State University (1978). alloy property could potentially be stored in the data base 8. Y. Mishima, S. Ishino and S. Iwata, An Approach to Inand consequently make use of the graphics capability. formation Processing of Phase Diagrams, Mater. Sci. Eng., We anticipate that phase diagram compilations will soon 11, p 163-176 (1973). be updated immediately upon publication of new data. The new experimental data will be combined with older work 9. B. Sundman and J. Agren, A Regular Solution Model for and with the best optimized thermodynamic data to pro- Phases with Several Components and Sublattices, Suitable for Computer Applications, Report No. 6, Institute for duce a reevaluated phase diagram. The usual publication for Computer Applications, Report No. 6, Institute for media will be supplemented by an "update file" in the Metallograpfi, KTH Stockholm (1978). computerized phase diagram collection. Journals may be- 10. M.-L. Sabdungi and M. Blander, Theoretical Concepts Usegin to present phase diagram data in a format designed for ful in the Calculation or Storage of Phase Diagrams of Ionic entry into a computer file. Systems, NBS SP-496, p 1093 (1978). Much of what we have just described is still in the 11. Yu. P. Adler and V.C. Stein, Composition-Property Diaplanning stage and, hence, free to be expanded, modified, grams: Representation of Information for Computers, Inor discarded as unforeseen problems or new applications formation Storage and Retrieval, Vol. 4, p 329-332, Pergafor these methods become apparent. mon Press, New York (1969). We welcome ideas and suggestions for new applications of computerized phase diagrams, especially with 12. P. Nash, An Interactive Ternary Phase Diagram Display respect to evaluation methods and thermodynamic Program, Bulletin ofAlloy Phase Diagrams, to be published calculations. (1980); P. Nash and D.R.F. West, Met. Sci. (in press). 13. 0. Kubaschewski and C.E. Alcock, Metallurgical Acknowledgments Thermochemistry, 5th edition, Pergamon Press, New York This program is the result of collaboration of many (1979). contributors at NBS; Lawrence Bennett, John Cuthill l4. E.-Th. Henig, H.L. Lukas, B.B. Zimmerman and G. Petzow, and Russell Kirsch began the dialogue between the Alloy Optimization of Phase Diagrams by a Least Squares Data Center and the Center for Applied Mathematics, Method Using Simultaneously Different Types of Data, and Lydon Swartzendruber'9 wrote an early version of NBS SP-496, p 955 (1978). this program. Christoph Witzgall and Marjorie McClain provided the spline fitting routines. David Redmiles has 15. M. Hillert, Empirical Methods of Predicting and Representdone the computer programming of our present version ing Thermodynamic Properties of Ternary Solution Phases, of the interactive graphics program. We have had very Report No. TRITA-MAC-0143, Royal Institute of useful discussions with Lawrence Bennett, John Technology, Stockholm (1979). Cuthill, John Simmons and Ted Massalski. 16. S.K. Tarby, CJ. Van Tyne and M.L. Boyle, Further Investigation of the Determination of Solute Interaction Parameters by Analysis of Phase Equilibria Using a Linear References Programming Technique, Met. Trans., 8B, p 347 (1977). 1. J.R. Cuthill, D.J. Kahan, L.H. Bennett, H.D. Chafe, A.G. 17. H. Harvig, T. Nishizawa and B. Uhrenius, Application of Gray, E.L. Langer and H. Baker, Joint Program of Amer- Computer Methods for Optimizing the Thermochemical ican Society for Metals and National Bureau of Standards Evaluation of Equilibrium Data in Ternary Fe-C Alloys, for Compilation of Alloy Phase Diagrams, Interamerican in Metallurgical Chemistry, Proceedings of a Symposium Conference on Materials Technology, Sao Paulo, Brazil held at Brunel University and the National Physical (1978). Laboratory, U.K., 1971, H.M.S.O., London (1972). 18. C. de Boor, A Practical Guide to Splines, Springer-Verlag, 2. W.B. Pearson, Remarks on Producing and Publishing Crit New York (1978). ically Evaluated Data, Proceedings of Workshop on Applications of Phase Diagrams in Metallurgy and Ceramics 19. R.A. Kirsch and L.J. Swartzendruber, Interactive Graphic oNBS SP-496, p 720 (1978). DarminMtlDemonstration, NBS SP-496, p 265 (1978). 22 Bulletin of Alloy Phase Diagrams Vol. 1 No. 1

Cumulative Index i22 ad, PDBGA 27-28 Be.Nb...........................PDBBA 129-134 Bk-Mo...........................IAEA No. 7 220... *** * ****......... BAPD 8t6) 26-28 Be-Ni............................PDBBA 1,34-144 Br-Au.................................... PDBGA 37.................... BAPD 7(4), 338-340 Be-Np..................................PDBBA 145 Br-Be.................................PDBBA 30-31 - *...-.............-....-** BAPD 6(4) 34 Be-O....................BAPD 6(6) 553-558, Br-Mo.....................-IAA No. 7 220-222 -...........................*BAPD 5(5) 451 PDBBA 146-152 C-Au*....................BAPD 5(4) 378-379, -....-............BAPD 5i()564-570 Be-Os............................PDBBA 152-153 PDBGA 38-39 -~BAPD (5.......................D5 )6 451 Be-P.....................................PDBBA 154 C-Be............................BAPD 8(6) 31-33 Lj -.....................B APD 6(5) 452-454 Be-Pa...................................PDBBA 155 C-Ce........................BAPD 7(b) 437-438 - BAP....................BA D 7(2) 144-149 Be-Pb...................................PDBBA 156 C-Dy........................BAPD 7(5) 439-440 -o...........................IAEA No. 7 217 Be-Pd....................BAPD 8(41 389-392, C-Er........................BAPD 75) 440-442 q -.........................BAPD 6(l) 26-29 PDBBA 157-160 C-Eu.......................BAPD 7(5) 442-443 -.....b....... -.......... BAPD 6) 454 Be-Po...................................PDBBA 161.................................. PDTIA 8rB......................BAPD 8(6 534-536 Be-Pt.......................BAPD 8(4) 392-395, C-Gd........................BAPD 7(56 443-445................................ PDBTA 33-: PDBBA 162-164 C-Ge*......BAPD 5(5) 484-486, 6(4) 325................................... PDBBA 4-8 Be-Pu............................PDBBA 165-168 C-Ho........................BAPD 7(56 445-446.... BAPD 1(1) 49-50, 4(1) 50-55, Be-Rb...BAPD 6(1I 33-34, PDBBA 169 C-La*......................BAPD 7(61 446449 4(2; 145, 4(3) 248, PDBBA 9-14 Be-RE...........................PDBBA 170-175 C-Lu'*......................BAPD 7(6) 555-556 m................................... PDBBA 16 Be-Re..........-................PDBBA 175-177 C-Mo......................IAEA No. 7 222-225 r..................................... PDBBA 16 Be-Rh................................... PDBBA 178 C-Nb................J. Nucl. MaLir., 148 1-16 -..................................... PDBBA16 Be-Ru............................PDBBA 179-181 C-Nd........................BAPD 7(6) 557-558 u......BAPD 2(4) 478-479, PDBBA Be-S..............................PBB 181-182 C-Pr........................BAPD 7(61 5r8-559 17-21, PDBGA 28-31 Be-Sb.............................PDBBA 182-183 C-RE.......................BA.PD 7(5F 421436 I................................. PDBBA 21-26 Be-Sc....................................PDBBA 184 C-Sc..........................BAPD 7(61.559-560 a............................... PDBBA 26-28 Be-Se...................................PDBBA 185 C-Si'.......................BAPD 5(5) 486-489 i.................................PDBBA 28-30 Be-Si.............................PDBBA 186-188 C-Sm.......................BAPD 7(6 560-562;r................................ PDBBA 30-31 Be-Sn............................PDBBA 189-190 C-Tb........................BAPD 7(61 562-563 -................................. PDBBA 31-,33 Be-Sr.............................PDBBA 191-192 C-Ti.................................. PDBTA 47-51 a............................... PDBBA 33-37 Be-Ta............................PDBBA 193-196 C-Tm -.......................BAPD 7 6) 563-564 d.........BAPD 7(4) 355, PDBBA 38 Be-Tc.....................BAPD 7(4) 355-356, C-V*........................BAPD 6(2) 115-124 e............................... PDBBA 3840 PDBBA 196-197 C-Y..........................BAPD 7(6) 564-.568 1................................ PDBBA 40-44 Be-Te............................PDBBA 197-198 C-Yb........................BAPD 7(6) 568-570 mn................................... PDBBA 44 Be-Th............................PDBBA 198-2(00 Ca-Au...............................PDBGA 39-42.............................. PDBBA 4445 Be-Ti...........................PDBBA 210-205, Ca-Ba*....................BAPD 74) 3:38-340...................... BAPD 7(1) 15-18, PDBTA 40-43 Ca-Be................................PDBBA 33-37 PDBBA 56-59 Be-U..............................PDBBA 205-210 Ca-Ce'.....................BAPD 8(6) 511-512 s...... BAPD 6(1) 29-30, PDBBA 60 Be-V..............................PDBBA 198-200 Ca-Cr.............................BAPD 6(4) 336 u.......BAPD 1I 1) 50-52, 2(1 27-28 Be-W'*...................BAPD 7f4) 356-358, Ca-Cs.............................BAPD 6(2) 168 8(3) 269-282, PDBBA 60-76 PDBBA 213-216 Ca-Cu'....................BAPD.5(6) 570-576.................................. PDBBA 77-81 Be-Y..............................PDBBA 216-218 Ca-Dy.......................BAPD 8(6) 512-5 13 e.................................PDBBA 81-89 Be-Yb............................PDBBA 218-219 Ca-Er..............................BAPD 8(6)513................................aPDBBA 96-98 Be-Zn............................PDBBA 219-222 Ca-Eu'*.....................BAPD 8(6) 513-514 e................................PDBBA 98-99 Be-Zr..........................-PDBBA 223-229 Ca-CGd..............................BAPD 8(6 ) 515 -................PDBBA 100-103 Bi-Ag........................BAPD 1(2 62-64 Ca-K.................................BAPD 6( 1) 34 if............................PDBBA 103-107 Bi-AI*........................ BAPD 11i 54-56, Ca-La*.........'.........BAPD 8(6) 515-516 g...................................PDBBA 108'5(3 247-250 Ca-Li.......................BAPD 8(2) 125-127............................... PDBBA 109-1 10 Bi-Au*...........BAPD 2t4) 479481, 4;4) Ca-Mg.........................BAPD 8( 1 58-65............................. PDBBA 110-112 401407, PDBGA 32-37 Ca-Mo...........................IAEA No. 7 225.............................PDBBA 112-113 Bi-Be.................................PDBBA 28-30 Ca-Na*........................BAPD 6(1) 35-37 -..........BAPD 6(1) 30, PDBBA 113 Bi-Cu*...... BAPD 1(1) 57, 5(2,) 148-155 Ca-Nd*.....................BAPD 8(6) 517-518 i.......................BAPD 6(l) 30-32, Bi-Ge*.....................BAPD 7(6) 535-540 Ca-O*......................BAPD 6(4) 337-342 PDBBA 114-115 Bi-Mg*....................BAPD 6(6) 528-53.3 Ca-Pt.......................BAPD 8(6) 518-519 -g........................BAPD 8(1) 57-58, Bi-Mo............................/AEA No. 7 219 Ca-Rb...............................BAPD 6(1) 37 PDBBA 115-117 BI-Ni*.....................BAPD 6(4).345-347 Ca-RE....................BAPD 8(6) 5 10-5 1 in...........................PDBBA 118-119 Bi-Pa.......................BAPD 2(4) 484-485 Ca-Sim.............................BAPD 8( 6 519 0o......................PDBBA 119-123 Bi-Pb...........................BAPD 1(2) 67-70 Ca-Sr*.....................BAPD 7(5) 455-457...................... BAPD 8(2) 136-139, Bi-i*......................BAPD 6(4) 3.59-36i 1 Ca-Ti................................ PDBTA 53-5.3 PDBBA 123-127 Bi-Th...........................BAPD 3( 1; 96-98 Ca-Y*.......................BAPD 8(61 519-520 a'......................BAPD 6(1) 32-33, Bi-Ti*....................BAPD 5(6) 610-613, Ca-Yb'*.....................BAPD 8(6) 521-522 PDBBA 127-129 PDBTA 44-46 Cd-AIl'.......................BAPD 1W( 60-62, 2 K Bulletin of Alloy Phase Diram,, ASM INTERNATIONAL, Metals Park, OH. LAEA No. 7 5 Moh#1denwn: Ph9vic-Chernicl dr~ies of Ift. Comlpoulnds and~c Allays, Speejal 1.'.sue No. 7, Int~ernational Aioiu~ic Energy AgencyV, VTienna (I980(,, JMR K r Intrnational Me-'n"iew~s, The Metals Society, London, and ASM INTERNYATIONAL, Metals Park. OH. JAPD *e Joumn-n of Allay PhwIIe DiagLrwzsinitute of Metals, Calcutta. PDBBA es Phase Dialgrams of Binwy Beivliumn Alloysr, ASM INTERN~ATIONAL, Metals Park. OH. *P/urs-s DigRi-amLS of Binaty Gold AIllYS, ASM IN~TERN AIlONAL, Metals Park, OH. PDBTA P/wse DIoIr-ant.T ofr Bir:(an' Alloy~s, ASM INJTERNATIONAL, Metals Park, OH. Pha-'ze Di~pugi-im of Ternary Iron AliMas', AtSM IN IERNATI ONA.L iA, OH. TIE~M Trnusactions of the Indian ILlli 4of etal~q, Indian Institute of Metals. Calcutta;. Bulletin of Alloy Phaee Diagrams Vol. 8 No. 6 1987i 59 1

jAcT; L/33S-5 f1 x 4SD C-Cr.V 82-11-0737 C-Zr H. Holleck, Ternary Carbide Systems of High-Melting Transi- See General and Miscellaneous 82.11 -0 706 and 2 1 - 707. tion Elements.-II., Metall., 35(12), p 1246-1253 (1981) in German. Cd-Pd 82. 1-06,82 Y. -Maa, A. Mikula. Y. A. Chang, and W. Schuster. Phase StaC-Cr-W bility Investigations of the Palladium-Cadmium System. See C-Cr-V 82-11-0737. I.-Thermodynamic Studies, Metall. Trans. A, i.3Ai7, p 1115-1121 (19S2). C-Cr-Zr See C-Cr-V 82-11-0737. 82-1 1-0f83 J.P. Neumann, A. Mikula, and Y.A. Chang, Phase Stability C-Fe 82-11-0617 Investigations of the Palladium-Cadmnium System. II.Z.,Kiedrzynski, Ultrasonic-Thermal Studies of Fe + C Alloys Structural Studies, Metall. Trans. A,.3A(7), p 112:3-1126 for Eutectic Surroundings and for Hypereutectic Com- (1982). positions of the Fe-C System, Bull. Acad. Pol. Sci. Tech., 28(9/10), p 507-514 (1980). Cd-Se-TI 82-11 -0634 S. K. Karimov, S. Gaforov, and S. Sultonov, Phase Equilibria in 82-11-0618 the Systems Cd-Tl-CVi(Cv'-Se, Te), [zv. Akad. Nauk SSSR, Z. Kiedrzynski, Ultrasonic-Thermal Studies of Changes in Neorg. Mater., 17(8), p 1346-1349 (1981) in Russian. Fe + C Alloys With Compositions Within the Hyperperitectic-Hypoeutectic Range for Conditions Tending to Equili- Cd-Te-TI brium, Bull. Acad. Pol. Sci. Tech., 28(9/10), p 515-522 (1980). See Cd-Se-T 82-11i -0634. 82-11-0686 Ce-Ni-Sn B. Chicco and W. R. Thorpe, Experimental Determination of the See La-Ni-Sn 82-12-1187. Austenite'+ Liquid Phase Boundaries of the Fe-C System, Metall. Trans. A, 13A(7), p 1293-1297 (1982). Co-Cr-Fe 82-11-0).559 C. Allibert, C. Bernard, G. Effenberg, H. -D. Niissler. and P.J. 82-11-0741 Spencer, A Thermodynamic Evaluation of the Fe-Co-Cr SysT. Nishizawa and M. Hasebe, Computer Calculation of Phase temrn, Calphad, 5(4), p 227-237 (1981). Diagrams of Iron Alloys; Tetsu-to-Hagane, J. Iron Steel Inst. SeC-e 82-11-0741. Jpn., 67(14), p 2086-2097 (1981) in Japanese. Co-Dy-Sn 82-11-0743 See Co-Sn-Y 82-33-1668. T. Okamoto, Z. Morita, A. Kagawa, and T. Tanaka, Partition of Carbon Between Solid and Liquid in Fe-C Binary System, Co-Er-Sn Tetsu-to-Hagane, J. Iron Steel Inst. Jpn., 68(2), p 244-250 See Co-Sn-Y 8233-1668. (1982) in Japanese. Co-Fe-Nb 82-1 07 50 See C-Fe 82-11-0741. L.A. Panteleimonov, O.G. Burtseva, and V.V. Zubenkov, Physico-Chemical Investigations of the Eighth Group Elements Doped by Niobium, Vestn. M.oskovskogo Univ. (Khim. ), ~~~~C-Fe-O-S~ 82441~-0 ~174 ~ 23(1), p 62-64 (1982! in Russian. E. K. Borodulin, G. K. Moiseev, and N. A. Vatolin. Modelling the Equilibrium in the Iron-Carbon-Silicon Dioxide System, Co-Fe-Zr 82-11-0747 Dokl. Akad. Nauk SSSR 259(3), p 596-599(1981) in Russian. Co-Fe-Zr 82-1.1.0747 Dok Akad Nauk SSSR, 259(3), 596-599(1981) in Russian. L. A. Panteleimonov, O. G. Burtseva, and V. V. Zubenkov, The C-Fe-W Iron-Cobalt-Zirconium System, Vestn. Muskovskoga UniL; See C-Fe 82 -11-0 741. (Khim.), 22(6), p 609 (1981) in Russian. C-Mo-Zr 82-12-1196 Co-Ho-Sn 0. Matsumoto, Y. Yaguchi, T. Kajiwara, M. Konuma, and See Co-Sn-Y 82-33-1668. Y. Kanzaki, Preparation and Properties of a Ternary Cubic Solid Solution in the Mo-Zr-C System, High Temp. Sci., Co-Lu-Sn 14(3), p 161-169 (1981). See Co-Sn-Y 82-33-1668. C-Na-O 82-11-0598 Co-Mo-O 82-11-0584 A. A. Gokhale and D. L. Johnson, Recomputation of Phase Equi- A. Svoboda, S. Windisch, and H. Nowotny, Investigations of the libria in the Sodium-Carbon-Oxygen System: Effect of Oxy- Ternary System Chromium-Molybdenum-Oxygen, High gen, Metall. Trans. A, 13A(6), p 1101-1102 (1981). Temp. High Pressures, 13(4), p 427-434 (1981). C-Nb-Ta Co-Nb-Ni See General and Miscellaneous 82-11-0689, 82-72-0383. See Co-Fe-Nb 82-11-0750. C-Ni-Pu 82-11-0690 Co-Ni-S 82-11-0583 Y. Arai, Y. Suzuki, T. Sasayama, and H. Watanabe, Ternary Y. Y. Chuang, K. C. Hsieh, and Y.A. Chang, Extension of the Compounds PuLNiC2 and PuCoC2, J. Nucl. Sci. Technol., 19(3), Associated Solution Model to Ternary Mietal-Sulfur Melts: p 83-86 (1982). Ni-Co-S at 1273 ~K. Calphad, 5(4), p 277-289 (1981). C-Os-U Co-Re-Y 82.11.014 SeeBe-Os 82-42-1116. S.T. Samyratov, U.M. Makanov, I.G. Sokolova, and E.M. Sokolovskaya, Interaction Between the YCo2 and YRe: Phat4;5 C-Os-W Vestn. Moskouskoga Univ. (Khim.), 23(1), p 61-62 i 19,2) in See Be-Os 82-42-1116. Russian. 302 Bulletin of Alloy Phase Diagrams Vol. 3 No. 3 1982

UDC 669. 112 681.3 1L 7~t'i~ (D4RL'Xl' - <'jIi: (2) Computer Calculation of'Phase Diagrams of Iron Alloys'Taiji Nis ziz -XVA and AIitsu!'iro IHASEBn. 23 I, c:. 1 (0).! U i,,t 4: -) 1- <' /.),, --.. 5. - t(Ji,z01lt KJ7 y; 5 - 1 2~-y)fr_- C, - 5.1I1 Fe C F,;.(? l(e-N,/:-,, v1' -(' ): t.tg':l'q: ~,'.5-: i- Jl': i' ~', U' "- A,-;, / I') —L. i1" / t,',.' U)(,J'),,,.,' fjj),J'L',\' "". - u'~:,';~. ) "i!.:,h -i':E['ZI" i' t.,'"~' 11'J'i.:-"/,'.'!jJz) ""'% 1) z.'d, (;1RRx33'.,_. F | B __ FN% F | t _ / I 101 | * 7 V L {4 * t J12 /+o i -I > / Wi'IL:',"'ti:,-ti,',)'-.-,)) ""';IL<I u~.L /dfFJ,'/ M.\N I-.:5,,I,;'. 0.,X i ~ J i23'(l 0,1. [__ _-['_] 2_ _ _-e I,;(.',, "",'i' r.t 2...,(1) 0;l. r)l I:;,,,, 3:'t'I -t'I"::;_ (i.,\1. 1'1 ( \. il,, 11 I1) Si - -\ - C) Fl 7:. I' ) ~ii I I I i..K.')t,9 70!, j i |,! I;. "'1,',, "i 1: di',; i w I;, 3.1!Titi i'.': -t -');'~i2, 1 3 I;':','': I:,J ".ii'.,1,,i-', 2 2.: t,,.-':',,,'2 i:,'l''-,i i " -; ( 1"\.,''', 1, "''! -!

~,.~, i'. L?, " " -:' 9087 ~~ ~'i..... I;~~~~~~~~~~~~~~~~~~~~~~~~~~F r~ j~~~~~~~~~~~~~~~~~~~~s )~~~~~~~~~~~~~~~~~~~~~~6 xx~~~~~~~~~~~~~~~~f' W ~/~~~~~~~~~~' - "x~~~~~~~~~~~~~~~~, 1% ~ f (~1,',~~~~~~~~~~~~~~~~~7'-J. d (2>~~~ ~ ~~~~~~~,'.!.~~"~:'.: —' ~~~~~~1~~~~ II) I i.'ct In.: Hu'"),,:(i VI 2 (2-6 J.~~~~~~~~~. i 101 I., 0., d.I. 3. - A-.?, > >I "' tI I. "!: Nit S I.Al 27~~~~~~-~I (t F CC'I1: t~~~~~~~~~"Ii.I ~.: ('., Ii' I' c.,(' l!I:': I.-t.( \I."': I (O' \\',:',., /(-:)?. i'.' —>'-''t:<' "'(f"21,",',, }'~;t,'' >0 i' j.IjI'&, ]'" 1 1! - ~t "~,':,"'-.": "':'?.... N,~~~~~~~~~~~~I5-2 l3q:7 It.;:,l2 I.t X 3.,. ~~~~~~~ i~ ~~~~~~~~~C~ H - d,' ~~~~~~~~~~~~~~~~~~~~~3 iI;.- [<. 2; IU R t ) ( I I ~.,., ~~, (,.' t t,:i~ Ic~~~~~~... i'. _ii'.9 i~~~~~~~~~~~~~,'{'~)f',!:}..'fj,'~ *'I~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~''''1 1' "'', --' I'' I' ['i i{, T l''- L I'':( t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,,..!.~~~~~~~~~~~~~~ ~~,, _ i~ ~~~~~~~~~~~~~~~.j,.jv f.- I, I,,:< >,::: ~ ~ i:' -1'i. -I') ~. ~~~~~'S r~~~~~~ll~ ~ ~ ~ t~'t` ~~~~~~~I \~~~~~*I.. jlwr~~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,,,.Ii:,,,'I r. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,.i ~ ~ ~:4:',I'~',',1, ]! I~.

2t18! i (7'(1 I!8'.:: a3 3 3,.,. _ i - \~' L _ __ _ _ _ _ _ _ _ _ nt;.. rs,, it1(,>\ \ a\ (r a' 1,)(', -'' j I'''0C - I 1 \ (I _ I __ c'e ~ ~ ~.!. 0i~ 15:,'; "' ~ jJ i e' iii I) ta.' at'. Cr.;t., o 1t',:,2 I:~'X.':_....': i' ij l,,''!(i )' *;i'' (-' I;-.:'-.j N: i I Z; a;;'|i.' L. {,,?', |" tj/ ~-lj t,-, -, t;,"'' -' -;"' /''!. -' i,'',. I.:~;,i " ~!'.'''; "l ~':; *,; t }!,lil |i4l..,;;., I t z, }, t >,, t I I 1{ 1,- ), i..,, "..... ~......~', t ~~. I~": " "!',;' i'i.!?, it"ii"!;.'i'~iL.,.'}.'' ".(.

i'~. "' --'.i!!'!j w!'.J,')::! - -'...('2!)t8 N11 I 1 (tf Il t()() /!,; 2'|. q F,. 1 " O',i0 4) LK () -,ci: ~(` 4 17/2'C j t;")) _976~C / 14' e 1:' 3K" )0 5u i j, ) (:27 1'c X /; i ( I) I~;'x u',%. lI' (o;') e tl (.i:,p) ". t' I.I i'.jl' (,;;',!l. EL ) I.,) I.2xt0 -, I.J I".t l;'/Z:.'['la;5';',lil, Si, Ni, (Cr, lo, (CI.,:, r0-'. l. t/:tf' -t, l N, \.Nh, \', (: J) 10 )) fJ' l1': )) Fc-X- Y *3 ";1~-4'.~j~K-, 0~-L,.. "-j i &' 5.2.2 ~Fe-X-Y 3' I ",, NMii 3 ~ K Si I v~ ~ Cr......:.. 3 t:fY.J!I I. L Fe-S.-Mn \1,'2/t",,, (:tu 3 \- t~,, -,'Q)ft I vsto'C,!',- W -;:oU), 1e Cr-j99!c C, C,.i9, lt(1 ()o4"~, lFe (Cu -NIii), Fer_ 1~~~~~~~~~,.17

20(90 _ iA' 67'- i1981): I' /',5 4 i"i' -''''0' -'~ r!? -- "%: 1'C Be Solubilitv in a:()0 -- 180 C 14) 9 -I'e-C -;;~~~~~~910O 10 390'( 4. 2'; 1.c-{ a, 7, lte:{ j,4)~3:}l':,, 01){0-.. 1 700' (''.34) 35):36):1),t " l"' a{: J]'!'.i 5(5() 1 150~ (; 3) 51) 52:) 2! Solubilttv i,t i t 91()'' 11, 41).'2 ^') i I.'e S t;N,' ( 1't'2N)} 3() —-7 50~::36 4')'2' F1e —() c,,., I: 0, l 1304, I "o()0, V apor 2-()0 2 100~C 53) 1'-.\,,, L, Ac:. FA':\1 iA.\l c 2{00- 1 700' C, 54) 55) 42 6.'t,.,t —,' 910 — 1 390YC. 49) Fle —Si,;, L, FSi,:.eSi, l c.3Si7,'Si 2()() 1 600~C 56) a, I, Fe,.Si, leSi, Si(:,'<{.}; ) 1 180 — 1 600(C 57) -;',:~....'910 — 1 390~ C 49)!26 Ie -P -, L, FeP, e,, eP, P, leP 200- 1 600('C 58) Solubility in t.50() 1 100"I C 1)'4 13,'26 J"'.... -Z'/ 910- I 390(C: 49) Fc- S,' L, le_- aS 300 —. 1600'C 59)':285 "H: a,, L, FeS: <-50 ato0 870- 1 600C 60) Fe-l'i a, L,, i,''i 200- 2 200~C 61) 62) Solubility in a 500- 1 310"C 14) 91 --- 1 39~( 49) i'426 fi6: FIe-V at, a 200 —- 1 200"'( 63) 64) 910- 1 390WC 49):.. 26 ).t!'c -(:r L, ar 200- 1900~C 4) 65) a( I:300-. 1 800 C 66) 4,16, 26, ));'>i i'.'Ji;" [::[0::!:','.$ 1 520- 1 900~C 6 7) ~;:' 13'-10- 1 390 C 4) 68) 1'' ll \. N,:.1il 2(00- 1 600"(C 69) t -, 1 200- I 600'C 4) 97,,; I.:?.{?, tliH:,i j- ) 1 250() 1 50()0 "(' 70) at,;'910 C -'c l 17) 68) F.''-((, t,,,:, L 2()0- 1600I ( 49);2) 65) 71) i)7 ltc Ni <, -, I, l~Ni3 200 — 1 7()00 65) at.;' L 200()- I 600 C): 27' "', [,, K')-,T l!!-') 1 4(00- I 600()W(: 67) /,.;-!910W':'/ I,' 17) FIe -CU, y, L 500 100 160WCC 13j 72) L4j13, 29:;Uh(,, L 850(- 1 580WC 73),-.; 200 — 1 l(00"C' 11). r,', 1 300- 1 4()00 ~C 74) 910 — 1 400:'C 49) 26 Ftc Ni), r, L,,r, Lcc:Nb, 1l2N)3 00 — 2 500'C 62) 75) F"c Nl o,, (1,,, (l3N) 200 -2700~C 62) 75) a, r. a,,,l:e1 o)3, N Io, l Je,7l.lo) 900- 1 500~C 76).Solubility in a 500- 1 500'C 14); -- -/ 910- 1 390 Cl 49) 263 Fe —Ru a,;, E, L 200- 2300~C 77) 78) [A 29;.h-!,'( l-c-Sri r, L, FesSn, FeaSn2, Fe,. 6,Sn,,:s FeSn, 300 — 1 600~C 79) L<26, 29~<!!( Fc'Fn2 n F' / — F' 910 — 1 390~C 17) 49) Fe-Sb Solubility in a 500 — I OO~C 1) -', -' 910 — 1 390~C 17) 49) <:26 o!({ Fe-\ a,;, L, t (Fe3\'2) 200- 3 700~(C 62) 75) 8)) a,,,(FesXN'2) 930- 1 550C) 81) z124'! Solubility in a 500- 1 500W'C 14);/L- 7' 910- 1 300~C 49) -,'',,,'''.:7 ~',p. 1' liquid 111

J2 z &.i 9' ix.'- 2! v )' t - t (2 ) )2091 -t)) /. (;w. nv.\1rz: l'ralns. Met. Soc. A\IIMN:, 239 * 4it1 -i.19673,. 68; 245(1969), p. 1083 IX I';~ j:, ~i 41 i'" iO.' N t - *[\~~~ \ i t t ~~~~~(tt98() i- 1;) 480 1) I -12;. B. 13. NCl.ELt. \N and R. J. FARRARO: Acta \ I I M Slet., 28(19803(, p. 417 4'i Ml. l.l i-RT;tl(t AldM..JARl.: NMt. Tranls., \ \: I I 6A(19)75), p. 5353 1 \",,, / j / j,! 44) (C. l',R:' I ranls. AIMIE, 167(1916), p. 513 4\ 11'. ( )1.N tall i l, 69(1949), p. t68.. 61; \. IV. ANInREWS: JISI, 184(19)6), p. 414 \7: 17.,1. I,:KlI.[.Y aunt If". MttFr;:-1orIFRy: J.1SI, \ 1', 201(1963), p. 227 8-t) filil.' 11.,',:14: J 25(1961) p. 707. 49);., (,,3X', ('Li)2 1 _',i III ut 50) L. KAUFMAN arid II. Ni.soR: Calplhad, 2 h',',(1978\, p. 295 51) Il. IAIRVIG: Jernkont. Ann., 155(1971),p. 157 52) Il. (;AYE and C. II. P. Li,tis: Met. Trans., -- ____ ___6A(1975), p. 1049 | 53) L. 1KI FMAN anld II. NESOR: Calpllad, 2 (1978), p. 35 54) l,. KAUFMAN anlld H. NFsoR: Met. T'rans., 5.:l h I I 1 ^ r T —-(19741), p. 1623'.. 55) L. KAUFMAN and 11. NEsoR: Calphad, 2 (1978), p. 325 )21 |1~~~ (.;!,j,,59) 56),. KAUFMAN: Calplhald, 3(1979), p. 45 57) R1. ScMlno: Calphad, 4(1980), p. 101 58) P'. J. SPENCERK and 0. KU ASCIIEWSKI: Arch. 6. $ > ct ( lLisenh:ottew.. 49(1978), p. 225 59) f. C. SIARMAN and Y. 1. CIANG: Met. Trans.,. apa, o(10a(1979), p. 103 60) M. ILPERr and L. -. SKAAFFANSSON: Met. )ir ) 1Trans., 6B(1975), p. 37 K x. M.1.,, 5,i l 6. 4 t4_, 6 /u-' "t' 5 61) L. KAUFMAN and H. NESOR: Treatise on0 Solid I h\l) CL4'i;'1h I to) State (Chemistry, ed. by N. R. HANNAY, NY, 1A?L 11I1 AI) I ))(El -j+ 9 < - ~[ J; (1975), p. 179 LPlenum Press].li ~L - }l f J) ( C, 1 -, K A) R 62) L,. KAUFMAN and H. NFSOR: Calphiad, 2 t (1978), p. 55 63) P. J. SPENCER ard F. H. PUTLAND: JIS, 211 (1973), p. 293 64)'. J. SPE.NCER and J. F. COUNSELL: Z. Meta-, i1t32'I) I J-: 1 k -i}, 53 (1967), p. I586 Ilk., 64(1973), p. 662 T3, L S. DR)KEN alld f. W. (URRY: T'rals. Met. 65) L. KAUFmAN and H. NESOR: Z. Metalik., 64 Soc. AIME, 191(1951), p. 1015 (1973), p. 249 3:.4 1f. G.;BENZ arid.1. F. 1:/.irrovi: Trans. Met. 66) 1t. MhLLER arid 0. KUBASCHEWSKI: H igh Soc. A'IME, 221(1961), p. 323 Temp. -High Press., 1(1969), p. 543 35. J. (CHIPIMAN: IMet. Trans., 3(1972), p. 55 67) M. V. RAO and W.. TILLER: Mater. Sci. 3t6l J. A(;REN: Met. 1Trains., 10A(1979). p. 1847 EIng., 14(1974), p. 47:37 L. J. I)rJKS'RA: Trans. ^AIMNF, 185t1949), 68) (G. KIRCHNER, T. NISHIZAWA, and B. UHRE-. 2.52 NiL1S: Met. Tranls., 4(1973), p. 167 38 C. \WEFk: Trans. AIME, 18861950)P, p. 1242 69) L. KAUFMAN: Calphad, 2(1978), p. 117 39: L. S. D)ARKE:N anld R. IW. (GURRY: Physical 70) fl. V. RAo and TV. A. TILLER: Mater. Sci..Cl.;ist ni M et. als, 1953). p. 181 M(.raw - E:ng., 15(1974), p. 87:l$ Bk I 71 ),. lsAUFMAN and H. NESOR: A.nn, Rev. - 19

20)2; 9, 67 jt 1!818) ( 1 4', r,.i, t }* (,,;) ) i'(CSi, L- U', "C''K1L t 1 ^ 1 400 Fe.' 40 60 80 Ru Fe 20 40 60 80 Sn Ru (at %O Sn (at! L.' 29 F eCr, Fe-(Cu, Fe-Ru &:;'O: Fe2 -'-Sn t) I>,.t'kl -L:4 (F' -Cr,.-" C, )4' 16 ~ () NI.ter. Sci., ed R. ltIUclNe, P'alo Alto, USA, 481 BISRA and Institute of Nletalsl 3, 1973), p. I 78) 1. KAMUFAN and If. B-RNSIIN: (Colnptnuer 72) 0. KunBAsCIEh-VSKI, J. F I. SMI. and D. M. Calctlation of Phase l)iagralmls, (197()), B.,iLLN: Z. Metallk., 68(1979), ). 495 \[Acadenic Pressi 7*) f'.. 1.INI)QVIST filda B. UIIRFINILS: (Ca1l)lpld, 4 79) [1. /). NUSSLER, O. (GOI1,C-(:K, nIId /). 1. 1980), p. 193 SPENCER: Calphad, 3(1979),. p. 19 7-4) G;. KIRCGIINE:R, II. I.\RVI(;, K.-R. Moouis'r, and 80) B. UAIRENIUS a1nd1 L. KAUFM.A\N: Calphad, 3 Mt. I l L ER:' Arch. Eisenhalttenw.. 44 (1973), ( 1979), p. 223 p. 227 81) B. U1IRENIUS: Calphad, 4(1980), p. 173 75r), 1.. 1, \1.MA.\ N a1i 1 i 11. NF.soR:'l Met. Trans., 6A t-) 2),l!,,'i, -"1 t l,,; I'i';.', A, 38 197.75), ). 2123 (1974), p. 46 ti, (;. IlRCIINL'.R, 11. t!.\RV(;, all I. lI:IVNIo s: 8'3) 1. tUlREN:UltSs: 1,Ll(clhability (loniepts withl l't. lis., 4( 19)73), p. 11t59.'\pl)lications to Steel, Cdi, I)y. ). [ l)oAV: 77 1...K x. N:'\ l sical Nleldltrv, olt' Nlairtent- wl(l,/. S. IIEK.\I.IA Y, 1971), t). 51 \N11.| sit':l,'t!:iliI', 1('),r t N,)... 1965),)). 1) 81),.1.\(;r:N: 0Re)o)t ]o)yal lst. l' Ol'ologV

7;:!, i';','- j),~t: -'': ~ —;.g ~( (2) 2093 5 l i, / " i i f;'. 5' i.-C. f, 1,J'L -j ) Fe -C-Bt a, B. L, 0, (, N C..(',6 1 21' 4)00,- I 100(: 82) L<30.n Fe-C( Si a,,, ( 700-_ I 100'(' 83) 84) [.134 4 F C.-( -'Ii (t, ), L, 2(1:('21i), liC]*?;~:O78':fl' I 300- 3 000'C(' 61) F e-(' \C r,;,, (o \ 800-.- I 100(IOW 83)'.344.!I'.'c (C' (:r ~r, a'., \tl. ~ (6s, N17C(' j(;0(). I 100"C. 83) 85) 86) (5',, \1.,(: 5, N17(.3 1 ()00 ( 87) 1 3-1 3'4: a' / 71,-..).77()_: C 88) lc (C.II (a, 1), I..: (s C60()- I 10()0 C 83) 89)'zi3-t1,!j t,;' 700()- 770'(: 90) 1' (I' Ni, it, /) 700,- 1 100() 83) (r, 7300C 91) F,' (' (':, (:,', / ) 750-1 100()''C 83) - 34-!,' (-c (' \I ) \, C,.. /)(,NI:C',,(:2 700- 1 000" 83) 92) -'<i32, 34.!)(,l,;, C, l N, ( 1' Xl(',:($\l(' ) l1 t)000 93) 94) 1', (. W,% ta,;', / /, l"('a~V2, \:, Ns(' L,' I 000- 1 500"C 81),5'33, 34;!!i (:;., /t, \\( 700-. 1 I()0C 83),,. 1, \', N.( I"c, \ 1 000C( 94), C ('' \V, //, \1(, \123(5 )00() — 1 100".W 95) IC ( N \10 \V.\. (, \16C,. X:J(:) (000(.( 943) 1:'2\~ C\ //:,7 C __ _t % ( a ) Yr8Iifffit ( I, ) it -_ xr e t: I-t,-,o) B I )BI/j? [<30 Fe-C-B - ) 7<' t,' TRITA\-MAC-0125, Stockholm, (1977), 87) T. NItsnZAWWA and B. UItRENIUS: Scand. J. {quoted in(83) 1 Met., 6(1977), p. 67 U85)?. I.UNI)BERG, M. NALIJI.NSTI'R6M, and B. 88) *R. C. SHARMA, G. R. PtURDY, and J. S. [U;RE11Ts: Clalphad, 1(1977), p. 159 KIRKALDY: Met. Trans., 1OA(1979), p. 1119 86) Al. W\ALDENSI'R()M nld B. UIIRENIUS: Scand. 89),MA. HILLERT and M. WALDENSTR6M: Calphad, J. lMet., 6t1977), p. 202 1 (1977), p. 97; Met. Trans., 8A(1977), p..5 21

20()94: 67 t, 1!91) I'.,14','r i: I I'(.( I!','{j i, i{t1 20' ~,.',,v'; C,t%.(b) 1,. 1 1'i J / 4F-B4C IJI i y + X f/,*//~~,'I I 2,. IW. / i' erj /' 1M; ", I..',.:"/.-<:"" I i IC Fe2CS Fe 0., 1t 15 2 C ~,t' ) 750' C C (wt%) cX333 Fe-.C-\W;~,)dt-,0.;Lii. 1). - 22 —

.'t 1-;.it' J. ~-:'C! ) -- q.7# trff ( 2 ) 2095 ts Siln (b' - t % -.,:?;"., 5,; 8 (ti,!? 3 4 5 6 7 8;".' -2. 3-8 7 2 3 4 5 78 100? e 1../024 3 Mn x 4 x 8 3 3 4 5 0 7'' i ar/a,, a'0// 19') —..s, 4' B() /. l}. (G;ILMOURX, (,. R. PURDY, anld J. S. rr3 9A ( 1978), P. 7C NI,'t. ()lllt., 120l973), 1). 391 cations to Steel, edl. by D. v. DAN.F, and J. C.' (. (.{.T1 l.11)itK1:( -1S/ (1978), P. 82 [AIME] /i' "" -IJ Md ILIIh UnI S. KIRKALDY 1'377)!.. 201 99) 7'. CHART F. PUTLAND, and A. D1 NSDA9E: 934 T. \ISlllZ.A%%'A: Scan(h) l1J. N(etP.ES, Q). 4t CaaS phad, 4(1980), P. 27 81) 1,. L'113 Fe-S Mnd H. HARVIG: Metal SCi., 0).1. HIL an 100) d L. — I. STAFFANSON: Met. 91975) f L. 6.. Trans., 7B 4 5 (197 6), p. 420 IxI-,~t try: N~et. Traitl s. 811) J. K.AIKMN al d H. NESOR: Nlet. Trans., 6A 317; I 9, p. 1(195. n 2 9 I-,'. 1s. 102) 1. ANSARA,. C P3RNARD, L. KAUFAMN, and P. A::-11/ S (Ncr.:.C.,l-,iad, 2(1978), p:7 (,. 1 i, i.. IS;I{<FE \1 /!.1..1 (. SECE lR Clp, 217 (1K7 iu/. It': K let.'fran1s... 3(1972), I A. 1455 918) J. S. K IIK^ LrYv, B. ii. REOMSON, and EM A. 2'3

2096?X L i:: 67 i (1981) I4', Fc.\1 ('r *r, L I.5()()00 — 1 71()(' 7.5) l' —-.\1 Ni ( 1 1 ('.\12, Fl. \1z, 1"',\!5 (. 0 —, I -10)()"(' ) 1i.\, N i 3\l.e Si ( (1,'.,, l:ci, ('.Si, CrSi 4)00-.-9())00 ( 99) f. 36.' -!!;[ I SCi S i. a3, i', Ni Si, Ni5Si )0 -500C( 99() lFc X-. a,; L, It i S 1t(00 )() (' C()10) A15 Ii. I', \V-(;l ~:')()0- -!3)(ll (0 (it) 1IT2) Fe (r.l;:' 1(),Xllu 7 l) —l5() (C 1(03}) 1" (Cr ('O,., /,1 1()()-I 50 )()( 11()) I(.) 3:;1 ":'!,t. ". 1~ I 20)(l' ( C 65) 71) 0l;i) " ('S —Ni,t;, /,, o, Ni a' ia -t()-. 40 I0 ) 600 (' 11)5) 1()7)'7, 8;;,!,,,, 1,,, 8)0 1-.- I 500'(' 4) t.;'.,a -(00' —.-600'( 99) (t, 1 100 —. 1 200 K 108) 10(9) I.. ('.1 \1(o It,; o,, I'1'Nt 2) 650-.. I 700"C, 75) c' ('Cr W\ i' l 3\V) I 100-l 1 700( 75) F. NIt ( Cti, L 600 — 1 300'(( 4 ) 38 -!''c (') Ni et, 6 (i00-.800C~(' 65) 71) 105) I:, Ni-t i 7, 1. 400-. 1 400~('C 4),.i39 m li'; l: lsi)ility gal) 850-. 1 400'C 109) Y-c Mo W\ a, 7''t(cXa2), R(le. 7X) I 1 00 —. 1 300W(' 76) l:.Si-(Cr-Ni r,,; /. 527 C 99) it I1t'd, I, t ~ hcl),,,,,, 1,;;qt; 1;!.;' / -,?' 1 // /..16 -( (:.,Si;.,;i!! 99) 22 197-1), l). 523 1(17) l,. KAu I xN, J. S. \'TKI., ool.1. 1'. MNl11rl,!.-!'4;..' - i:; t:; -.. i:,ti i;t-.D(OwNIK: (u.lphad, 1 (1977, 1). 281 1977 I lJ )-....1.)8 l1. I0I8) f., rl i r and Aft. \VA,.lFNsFR \iim: SCi('l(l. 105' 1 KAIT[MAN Mtlid 11. Niusoia N!. Trimstis!o., J1A. Nlct., 6(1977) 1). 211 (1974), 1). 1617 1)09) I. 1. (.()N',S.:, 1E. B. I,:s,; tt!(l J..'[~:Nt;:.r' 106) 1'. (. C(IRTr J. I'. ('ttsL., (;. 1). JONI.S. NIctallurgical (Clht)istry, cd. bv 0. K ulixs( 11twIt'. Si.oc,(;, and P. J. SiNCF'tR Intern. Met. sm. (1972). ). 451 11N!%()Io 1]'v., 20()19.75,, ). 37 11)) v"i'-:.1.. I I 4',r;, ^:.', 18(19)7!)), - ). 7()6 24

-- -~~~~~~~~~~~~~I Xs: _ _ ~ ~~~ ~ ~ ~~~ ~ ~ ~~~ ~ ~ ~~~ ~ ~ ~~~ ~ ~ ~~~ ~ ~ ~~~ ~ ~~~~ ~ ~~~~ ~ ~~~~ ~ ~~~ ~ ~~~~ ~ ~~~ ~ ~~~ ~ ~~~ ~ ~~~ ~ ~~~ ~ ~~~ ~ ~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~_ ~-.Z, -'.2,.X,~.

CREEP AND VISCOELASTICITY EXAMPLE

p E-3NC) 1 4 - U r)- q.q s.1, 000':,;'1: 0(0)( "A') T: i'' I:'f~.E!.eLt'i C OfN "'4 M c:),,c (i; T ) (1: i( _)( ) 0.- 0 dz:':4.S ) CN "'C.J 1U- T C. C)i! ~~,J C ( (.)I C T (C)C)C.' ('.,- Jl. C,,- d. Li -EI....s:'-'"s:-')- JA Ij. u —.1 -L'l T tL4: JE)t S'-3 1-, e u A 3 A- FDEl 14 _JW

S'e]. tct Cornstre: n-_t c., onpro por t. i on.a. i n';r. - (?-. )) J 1. Ilat::.' we 3. 1 M o d 1: i S: e' l f i c-:- c I E:L G F:' a C a 1 c. ae 1. I G F: a -.J 81. 8 138:.: UU) C) rfia we I I oI C3 de].: Ca'l c.U ted E 1. G F Spec i f i, Ged 1;. (3-.. 181 f 3.182.1 t) t)() Mav wel. 1 Model -Cal cul ated val ues: E i GPa n 1, G,-'a —-s 1 81.8182 10. 0();

Maxwell Model / Data(x) & Appr(-) 1,4G..-n-' 1~~~~~~~~~~~6.~~~~~~~~~~~~ ~~mm a 23,,._.. ~...,~~~~~~~~~~~~~~~~W" mmmmm 1,06~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~..... an 0,? 1.,.,.............,/.,.~1 —"8,54.~~~~~~~~~~~~~~~~~~~~~~~~~~~~i ~,37~~~~~~~~~~~~~~~~~~~~~~~~~~l imam~~~~~~~~~~~~~~~~~~{: a;..'..,: ~:~,

V/c i t Cci1 (Xx C.al cl L.tI L I,:. G.F: C l Ic-..t.'Elc... V C IV'sc,)cd1.-e I.:: C.-'..a I c u t t — el dE 1' a C a — ac u ]. a't: r —~ d"'.....:- -........ ER C-i e d,..'2. 725. 1 e.. Ycoi c.t. I!Vciel Cal cul at ed El., GF'a peci f i e(:l r'!., (.F:'a —; 72. 7248 1. x 9 4 i jt tModrl el: Specr if i. ed E1., G'a Call a cU 1. t ed n. l' —-s 72.724 1 1. h4.

if r rm E *,,, Cr, u~~~~~~~~~~~~~XA I.~ r' ~I lh,: 1;~~1 i r i ~i~ V add#P P" Cu ~~~~~ rr r~~ j~~~~~~~~~ a F4Fil:II~~~~~~~~~~~~~~~~~~~~ r~ ~ ~ o'', rrr:~ 1 I ~~~~~, 1 t~ I (. I/ ti:.II:S TUII~'yuDI~rr laL~ Ku-~=Lat~X -~~~~;;C;oyLutlWr T~C. Ll:I "I.i:-~~ -~~ ~;~t/ r~ r r I ~.L~:~:~E.r~. rX, i~:.:.lt~LS.ua~~~~~x1'v R mu.~~~~OZ' 3.~~~~~P1 33~~~~~~~~~~~~t (-)~~XddV ~~ / I~P0H ~~i8io8

M! v i:_ 1 -- cj. t,'..CJd e'. 1. l c:l ate!:i E1, GFl'a1 la. cul at:ed nl., 1G''a —Es Cal cull atC ed E2. I3F -... -l l " ted.2 C~'~ ~ ~ ~ ~~~~11g'.. -C.:.q... g.t -'7.,... c::' -.l a -L:d E I, la,F e c i 5f:i e cl n I, C-'F-<_ Cal cul ateG:3 E,, ti F: i::!..: -. i.].l E(i E-' G! L- C.-.( t C),C) C), C)). C) -1 (")' 7 i 1 I'lat wve. 1. l — Voj i. t Mod el Eec: iC:i ed E 1,GF'a Specrifie cd n1GF a-~ c.i cl ated E2.,Gt. c. I -a r:.lat.e d E''GSI la i -.,) ) ) 500.): r0 C) 7 C)1 1,. Mla: vel 1 1 -Voi g -t Model. p ec i f i e d E 1, G a pc: p e f i e d n 1 G, FGPa-s c - a 1 c ia t e d E2 Ga.... —.!)0l )t n 0 0 - 7 0 1.2 1 2 FPress Retuzrrn to FProc'.eed

114G IA ie1 11PiA y flrdeII Data(x) & x(p( 1,46 puw —-- 1~~~~~~~~~~~~mmrn1,23 ~s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i~~~~~~~~~arkl ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ fdl memo ~ ~ ~ ~ m.1.1. V. ~ ~ ~ ~ ~ ~ ~'r --- 1123~~~~~~~~~~~~~~~~11 1IIL ~,~~~~~~~~~~~~. SI~~~ I~~~~~~~~~~jl~~~~~~~I G.54 r'~~~~~ I1 * 1 ~ ~ ~ ~ ~ 1.,~ ~~~~~~~~~~~~~~~~~ ~~ - ~1.L**,, II:~~~~~~~~~~~~~~~~~~I

-a,- --- " - lm- -*..- N- a.. B - J Z, mm m m m m mm't r r s r rTs J' - - - m...qJ; —..- ~j f f,~'..-U S st~~~~~~~~~~~' 131) m~~~~ /~~~m Jr,~~~~~~~~~~~~~~~~~~~~~_,~ i~~ j~~~~~~~~~~~ ~...~ I'. k'4.j. * 4~~~~~~~~~~~, =S~~ _.. I, - s _4 * I~~~~~~~~~~~~~~~~~'. I~~~~~~~~~~~~~~~~~~~~~m~ I~~~~~ 1~ e —,,,e a /... j I' D I - | II ~ - -' -'r~_'-.Z: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Sc;.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _ _ _ ~'_ "~E ~ X ii PC~~;\YL~iih=3 > { __i i.... r,, j J 3l~ i,!~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~" -.,-......_';= 4,I Ll~i -; X 4 3'..~~~~~~~~~~~a ~i I -,...~S -. - -r, q 1 Ui I'..Y:J I ~i t__E jZ, I _- t g.- _ {. _ t J.,.. 2r i X *_ )L h

~~~~~~~~~~~~~~~~~~~~-9C )C 3"C, —.')UTI —.. Ji m:'==..:. )C,'C 9 l6 t&, L.I........::... i:c y LI; Y(,.)0'2S''.:.8 h[ L. T{.l p:'a,-|::: c~~~jc~~~~si~~~~r') 0(' (-r.~''1 ":;~i (. i t 7 8 $ l t., -'8; F ( )<::)()f3"t<X-;...... L..,, 2.1..: \ ( - 3 ()("I C. Cl'".., T'" i'::,"'::";' (, (" il" " (" (E!) )'=,(!' {'l) U!'}-l t [.3 S? -.' J T....!./: a.....o. oooo......... 1'-I: 8 ).,? S': E))-:) I-. l A - it. LA 6..,A..) - L.! ED....

True Stress vs. True Strain a Data(x) & ~ ppr(-) 633"' S 452 t mm e~362 U %taid R~ rce M~~~~~~~~~~~e. pt~~~~~~~~~n a18 ~~6 G.11 G.17 G.23 G128 G.34 G.4~~~~~~~~~~~~~~) ~~~.45 ~~~i ~~M~+6 Sta nCRtPrce

CREEP AND VISCOELASTICITY PROGRAM LISTING

PROGRAM Viscoelasticity Models; CONST Undefined= 1.OE-50; Title = 14; Regular = 7; Highlite = True; Normal = False; CR = True; NoCR = False; Maxwell = 1; Voigt = 2; MaxwellVoigt= 3; ERR=1.OE-5; KN=0; MAXL=50; TYPE String255 = String[255]; String80 = String[80]; VAR Xarray,Yarray,Y1,B0,XTransY,Times,Stresses,Strains,SpecPar: Array [0..20] of Real Partodet,Applications: Array [0..20] of string[80]; X,XTrans,XTransX,XTransXInv: Array[1..20,1..20] of Real; XConv,YConv: Array [1..20] of integer; GridCode,Comb,NumofPar,A, C, I, Z,Ml,M,Input,DataPoints: Integer; Code,Quit: Boolean; Xmax,Xmin,Ymax,Ymin,Q1,Det,SingleB0,El,E2,nl,n2: Real; Indata: TEXT; Appltype,Filename,Ylable: String[20]; Titlenames,Xlable,Titlename: String[80]; X1:ARRAY [1..2,1..1000] OF REAL; B:ARRAY [1..10] OF REAL; G:ARRAY [1..11] OF REAL; EE:ARRAY [1..1000] OF REAL; FAIL, J, K, N INTEGER; E,Y,Q:REAL; PROCEDURE WriteAt(X,Y: Integer; Highlite,UseCR: Boolean; TheText: string255); BEGIN IF Y < 0 THEN Y:= 12; IF X < 0 THEN X:= (80-Length(TheText)) DIV 2; GotoXY(X, Y); IF Highlite THEN TextColor(10); IF UseCR THEN Writeln(TheText) ELSE Write(TheText); TextColor(Regular); END; PROCEDURE Proceed; VAR PosY: Integer; BEGIN WriteAt(-1,25,Highlite,NoCR,'Press Return to Proceed'); PosY:=WhereY; Readln; GotoXY(1,PosY); DelLine; END; PROCEDURE Header; BEGIN Window(15,6,72,25); Clrscr; TextColor(Title); Writeln (' ***************************************************'); Writeln(' *); Writeln (' *);

Writeln('* UNIVERSITY OF MICHIGAN *'); Writeln('* Department of Mechanical Engineering Writeln('* * Writeln('* ME 251 *'); Writeln(' *'); Writeln('* Models for Writeln('* Rate & Temperature Dependent Behavior *'); Writeln(' * Writeln('* Writeln(' ***************************************************'); TextColor(Regular); Window(1, 1,80,25); END; PROCEDURE Yes_No_Answer(Var code: Integer); VAR Answer: String[80]; BEGIN Readln (Answer); IF Length(Answer)=0 THEN Code:=2; IF (Answer='yes') OR (Answer='y') THEN Code:=1; IF (Answer='no') OR (Answer='n') THEN Code:=2; END; PROCEDURE Introduction choice(Var W: Integer); VAR Code: Integer; BEGIN REPEAT Write('Do you wish to read the introduction? (no):'); Yes No Answer(code); CASE Code OF 1: BEGIN W:=40; Code:=3; END; 2: Code:=3; ELSE BEGIN WriteAt(-1,25,Highlite,CR,'Must answer yes or no and hit return'); GotoXY(15,18); DelLine; GotoXY(1,1); InsLine; GotoXY(1,20); InsLine; GotoXY(15,19); Code:=10; END; END; UNTIL Code=3; Clrscr; END; PROCEDURE Introduction; VAR Choice: Integer; BEGIN Introduction choice(Choice); IF Choice=40 THEN BEGIN TextColor (Title); Writeln ('INTRODUCTION'); Writeln; TextColor (Regular); Writeln('This program computes the Modulus of Elasticity, E, and the'); Writeln('viscosity coefficients for the Maxwell, the Voigt, and the'); Writeln('Maxwell-Voigt models.'); Writeln; Writeln('The program also plots the different behaviors associated with'); Writeln('each model, as well as Stress Relaxation for the Maxwell model'); Writeln; Writeln('The maximum numbers of data points allowed=20'); Writeln; Writeln('User is cautioned to carefully interpret results'); Proceed; END;

END; PROCEDURE Initialize_Data_Array; VAR W Integer; BEGIN FOR W:=0 to 20 DO BEGIN Applications[W]:='No Change'; Stresses[W]:=0; Strains[W]:=0; Times [W]:=0; END; END; PROCEDURE Stress_ExampleData; VAR W: Integer; BEGIN Appltype:=' Stress'; Applications[1]:='Pos Step'; FOR W:=2 to 4 DO BEGIN Applications[W]:='No Change'; Stresses[W]:=100; END; DataPoints:=4; Stresses[1]:=100; Strains[l]:=0.2; Strains[2]:=1.0; Strains[3]:=1.2; Strains[4]:=1.4; Times[1]:=0; Times[2]:=0.02; Times[3]:=0.04; Times[4]:=0.1; END; PROCEDURE SelectNumberData Points; VAR Codestr: String[80]; Error: Integer; BEGIN REPEAT Error:=0; WriteAt(-1, -1,Normal,NoCR,'Select Number of Data Points (3):'); ClrEOL; Readln (Codestr); IF Length(Codestr)=0 THEN BEGIN Error:=0; DataPoints:=3; END; Val (Codestr,DataPoints,Error); IF (DataPoints>20) OR (DataPoints<0) THEN Error:=l; IF Error<>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCr,'Selection type must be an integer less than 20'); Delay(1000); DelLine; END; UNTIL Error=0; END; PROCEDURE Read Times; VAR Timestr:string[80]; Error:integer; BEGIN REPEAT Readln(Timestr); Val (Timestr,Times[i],Error); IF Length(Timestr)=0 THEN Error:=l; IF Times[I]<0 THEN Error:=l; IF Error <>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(24,13); Clreol; END; UNTIL Error=0;

END; PROCEDURE Read Stresses; VAR Stressstr:string[80]; Error:integer; BEGIN REPEAT Readln(Stressstr); Val(Stressstr,Stresses[i],Error); IF Length(Stressstr)=0 THEN Error:=1; IF Stresses[I]<0 THEN Error:=1; IF Error <>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(42,13); Clreol; END; UNTIL Error=0; END; PROCEDURE Read Strains; VAR Strainsstr:string[80]; Error:integer; BEGIN REPEAT Readln (Strainsstr); Val (Strainsstr, Strains [i],Error); IF Length(Strainsstr)=0 THEN Error:=1; IF Strains[I]<0 THEN Error:=1; IF Error <>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(60,13); Clreol; END; UNTIL Error=0; END; PROCEDURE Select_Application_Type; VAR Applstr: string[80]; Error: integer; BEGIN REPEAT Clrscr; Error:=1; WriteAt(-1,24,Highlite,NoCR,'Application Types:'+'Positive-Step(P) Negative-Step(N)'); WriteAt(-l,-l,Normal,NoCR,'Select type of Application input (P):'); Readln (Applstr); IF Length(Applstr)=0 THEN BEGIN Error:=0; Applications[I]:='Pos Step' END; IF (Applstr='Positive') OR (Applstr='P') OR (Applstr='p') THEN BEGIN Error:=0; Applications[I]:='Pos Step'; END; IF (Applstr='Negative') OR (Applstr='N') OR (Applstr='n') THEN BEGIN Error:=0; Applications[I]:='Neg Step'; END; UNTIL Error=0; END; PROCEDURE Input_Data_Format_per_Reading; BEGIN Appltype:='Stress'; Clrscr; TextColor(Title); WriteAt(-1,-l,Normal,CR,'Application Time, ks Stress,MPa' Strain'); GotoXY(6, 13); TextColor(Title); Write (I,'.'); TextColor(Regular); Write(Applications[I]);

GotoXY(24,13);Read Times; IF Applications[I]<>'No Change' THEN BEGIN GotoXY(42,13);Read Stresses; END ELSE Stresses[I]:=Stresses[I-I]; GotoXY(60,13);Read Strains; END; PROCEDURE Input_Data; BEGIN I:=1; Select_Application Type; Input_Data_FormatperReading; FOR I:=2 to DataPoints DO BEGIN Applications[I]:='No Change'; Input_Data_Format_per Reading; END; END; PROCEDURE Read_Code(VAR Code,Q: Integer); VAR Codestr: String[80]; Error,PosX,PosY: Integer; BEGIN PosX:=WhereX; PosY:=Wherey; REPEAT ClrEOL; Readln (Codestr); IF length(Codestr)=0 THEN BEGIN Error:=0; Q:=45; END; Val (Codestr,Code,Error); IF Error<>0 THEN BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Selection type must be an integer'); Delay(1500); DelLine; GotoXY(PosX,PosY); END; UNTIL Error=0; END; PROCEDURE PrintData; VAR POSY,POSYY: Integer; BEGIN IF DataPoints<=20 THEN BEGIN Window (, 1,, 80,25); Clrscr; PosY:=(21-DataPoints) DIV 2; TextColor (Title); WriteAt(-1,PosY,Normal,CR,'The current values are:'); Writeln; TextColor (Title); WriteAt(-1,PosY+2,Normal,CR,'Application Time,ks Stress,MPa'4' Strain FOR I:=1 to DataPoints DO BEGIN PosYY:=PosY+3+I; GotoXY(6,PosYY); TextColor (Title); Write (I,'.');TextColor (Regular);Write (Applications [I]:9); GotoXY(21,PosYY); Write (Times [I]:10:4); GotoXY(40,PosYY); Write(Stresses[I]:10:4); GotoXY(58,PosYY); Writeln(Strains[I]:10:4); END; END ELSE Select Number Data Points; END;

PROCEDURE Edit_Individual_Readings; VAR P,W, Code, A, PosY: integer; Answer:string[80]; BEGIN REPEAT Print Data; PosY:=WhereY+1; Writeln; WriteAt(-1,PosY,Normal,NoCR,'Select variable to be modified,'+'by entering corresponding number:'); ClrEOL; Read code(I,W); IF I<1 THEN A:=2 ELSE A:=l; IF (I>DataPoints) OR (W=45) THEN A:=3 ELSE A:=A; CASE A OF 2: BEGIN WriteAt(-1,25,Highlite,NoCR,'Code out of range'); Delay(1500); DelLine; END; 3: BEGIN WriteAt(-1, 25,Highlite,NoCR,'Code out of range'); Delay(1500); DelLine; END; ELSE IF I=1 THEN BEGIN Select_Application_Type; InputData_Format_per Reading; END ELSE InputData_Format_per Reading; IF I<>Datapoints THEN BEGIN FOR P:=I+1 to Datapoints DO BEGIN IF (Appltype='Stress') AND (Applications[P]=' No Change') THEN Stresses[P]:=Stresses[P-1]; END; END; REPEAT Print Data; Code:=4; WriteAt(-1,25,Normal,NoCR,'Do you wish to edit another variable? (no):'); ClrEOL; Yes No Answer(code); CASE Code OF 1: Code:=3; 2: BEGIN Code:=3; W:=45; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END; UNTIL W=45; END; PROCEDURE AddReadings; VAR P,W,Code,A,PosY,J:integer; TempApplications: Array[1..20] of String[80]; TempTimes,TempStrains,TempStresses: Array[1..20] of Real; BEGIN W:=4; REPEAT Print Data;

PosY:=WhereY+l; Writeln; WriteAt(-1, PosY,Normal,NoCR,'Select Reading to be added,'+'by entering corresponding number:'); ClrEOL; Read code(J,W); IF (J<=DataPoints) AND (J>O) THEN BEGIN FOR I:=J to DataPoints DO BEGIN TempApplications[I]:=Applications[I]; TempTimes[I]:=Times[I]; TempStresses[I]:=Stresses[I]; TempStrains[I]:=Strains[I]; END; FOR I:=J to DataPoints DO BEGIN Applications[I+1]:=TempApplications[I]; Times [I+1]:=TempTimes [I]; Strains [I+1]:=TempStrains [I]; Stresses[I+1]:=TempStresses[I]; END; DataPoints:=DataPoints+l; END; TempStresses[I]:=Stresses[I]; TempStrains[I]:=Strains [I]; Strains [I+1 ]:=TempStrains [I]; Stresses [I+1]:=TempStresses [I]; IF J>DataPoints THEN DataPoints:=J; IF (J<1) OR (J>20) OR (W=45) THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Negative Numbers or Number greater than 20'+ not accepted'); Delay(1500); DelLine; END ELSE BEGIN I:=J; IF J=1 THEN BEGIN Select_Application_Type; InputData Formatper_Reading; END ELSE BEGIN Applications[J]:='No Change'; InputData_Format_per_Reading; END; IF I<>Datapoints THEN BEGIN FOR P:=I+1 to Datapoints DO BEGIN IF (Appltype='Stress') AND (Applications [P]='No Change') THEN Stresses[P]:=Stresses[P-1]; END; END; REPEAT Print_ Data; Code:=4; WriteAt(-1,25,Normal,NoCR,'Do you wish to add another variable? (no):'); ClrEOL; Yes No Answer(Code); CASE Code OF 1: Code:=3; 2: BEGIN Code:=3; W:=45; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END; UNTIL W=45; END; PROCEDURE Delete_Readings; VAR

P,W,Code, PosY, J:integer; BEGIN W:=4; REPEAT Print Data; PosY: =WhereY+1; Writeln; WriteAt(-1,PosY,Normal,NoCR,'Select Reading to be deleted,'+'by entering corresponding number:'); ClrEOL; Read code(J,W); IF (J<=DataPoints) AND (J>=1) OR (W=45) THEN BEGIN DataPoints:=DataPoints-1; FOR I:=J to DataPoints DO BEGIN Applications[I]:=Applications[I+1]; Times [I]:=Times [I+1]; Stresses[I]:=Stresses[I+1]; Strains[I]:=Strains[I+1]; END; FOR P:=J to Datapoints DO BEGIN IF (Appltype='Stress') AND (Applications[P]='No Change') THEN Stresses[P]:=Stresses[P-I]; END; REPEAT Print Data; Code:=4; WriteAt(-1,25,Normal,NoCR,'Do you wish to delete another variable? (no):'); ClrEOL; Yes No Answer(Code); CASE Code OF 1: Code:=3; 2: BEGIN Code:=3; W:=45; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Reading not defined'); Delay(1500); DelLine; END; UNTIL W=45; END; PROCEDURE Menu Edit Data; VAR J,W: Integer; BEGIN REPEAT Clrscr; Window(29,10,80,25); Clrscr; TextColor (Title); Writeln('Edit Data Menu'); Writeln; TextColor (14); Write('l'); TextColor(Regular); Writeln(' Edit Individual Reading'); TextColor(14); Write('2'); TextColor(Regular); Writeln(' Add Reading'); TextColor(14); Write('3'); TextColor(Regular); Writeln(' Delete Reading'); TextColor(14); Write('4'); TextColor(Regular); Writeln(' Return to Main Menu'); Writeln; Write('Enter selection here:'); Read Code(J,W);

CASE J OF 1: BEGIN Clrscr; Edit Individual_Readings; END; 2: BEGIN Clrscr; Add_Readings; END; 3: BEGIN Clrscr; DeleteReadings; END; 4: Writeln; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-4'); Delay(1500); DelLine; END; END; UNTIL J=4; END; PROCEDURE Exit; VAR Code: integer; Answer:String[80]; BEGIN REPEAT WriteAt(-l,-1,Normal,NoCR,'Exiting program? (yes):'); ClrEOL; Readln (Answer); IF Length(Answer)=0 THEN Code:=1; IF (Answer='yes') OR (Answer='y') THEN Code:=1; IF (Answer='no') OR (Answer='n') THEN Code:=2; CASE Code OF 1: BEGIN Quit:=true; Code:'=3; END; 2: Code:=3; ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END; PROCEDURE Loading_Data_File; BEGIN Clrscr; WriteAt (-1,-1,Normal,NoCR,'Name of Input File:'); ReadLn (Filename); Assign (Indata, Filename); {$I-} Reset(Indata); {$I+} IF IOResult<>0 THEN WriteAt (1,25, Highlite,NoCR,'This File cannot be opened.') ELSE BEGIN I:=0; Readln (Indata,Appltype); IF Appltype='Stress' THEN BEGIN IF I<20 THEN BEGIN WHILE NOT EOF(Indata) DO BEGIN I:=I+1; Readln(Indata,Applications[I]); Readln(Indata,Times [I]); Readln(Indata,Stresses[I]); Readln(Indata, Strains [I]); DataPoints:=I;

END; END; Close (Indata); END; END; END; PROCEDURE Input_Option; VAR Y,W: Integer; Stop: Boolean; BEGIN Stop:=False; REPEAT Clrscr; TextColor (Title); Writeln('**INPUT OPTION**'); TextColor (Regular); Writeln(' Choose an option'); TextColor (Title); Write(' l');TextColor(Regular);Writeln(' Input Data Directly');TextColor (14); Write (' 2');TextColor(Regular);Writeln(' Load Input Data File');TextColor(14); Write (' 3');TextColor(Regular);Writeln(' Load Example Data'); Writeln; Write('Enter selection here:'); Read Code(Y,W); CASE Y OF 1: BEGIN Input:=1; Stop:=true; Window(1,1,80,25); Clrscr; Select_Number_Data_Points; Input_Data; END; 2: BEGIN Input:=2; Stop:=true; Window(1,1,80,25); Loading_Data_File; END; 3: BEGIN Stop:=true; Window(1,1,80,25); Clrscr; Stress_Example_Data; Print_Data; proceed; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-3'); Delay(1500); DelLine; END; END; UNTIL Stop=true; END; PROCEDURE Saving_CurrentData; BEGIN WriteAt(-l,-1,Normal,NoCR,'Name Input File to be saved:'); Readln (Filename); Assign (Indata, Filename); Rewrite (Indata); Writeln (Indata,Appltype); For I:=l to DataPoints DO BEGIN Writeln(Indata,Applications[I]); Writeln(Indata, Times[I]); Writeln (Indata, Stresses [I]); Writeln(Indata, Strains[I]); END; Close (Indata); END; FUNCTION Power(mantissa,Exponent:Real): Real; BEGIN Power:=Exp(Ln (Mantissa) *Exponent); END; PROCEDURE NonproportionalConstant_Q; VAR Qstr: String[80];

Error: Integer; BEGIN REPEAT WriteAt(-l,-l,Normal,NoCr,'Select Constant of Nonproportional Behavior,Q-(1):'); Readln (Qstr); IF Length(Qstr)=0 THEN BEGIN Ql:=l; Error:=0; END; Val (Qstr, Ql, Error); IF Q1=0 THEN Error:=1; IF Error<>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Invalid Q.'); Delay(1000); DelLine; GotoXY(1,12); Clreol; END; UNTIL Error=0; END; PROCEDURE SelectNumParameterstodetermine; VAR Codestr: String[80]; Error: Integer; BEGIN REPEAT Error:=0; WriteAt(-l,-l,Normal,NoCR,'Select Number of Parameters to determine-(3):'); ClrEOL; Readln (Codestr); IF Length(Codestr)=0 THEN BEGIN Error:=0; NumofPar:=3; END; Val (Codestr,NumofPar, Error); IF (NumofPar>4) OR (NumofPar<0) THEN Error:=l; IF Error<>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCr,'Selection type must be an integer less than 4'); Delay(1000); DelLine; END; UNTIL Error=0; Clrscr; END; PROCEDURE Parameterstodetermine; VAR Partodetstr: String[80]; W,B,Error: Integer; Duplicate: Boolean; BEGIN FOR W:=l to 20 DO BEGIN Partodet [WI:='initializing'; SpecPar [W]:=0; END; IF C=1 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Parameter Selection: El nl'); TextColor (Title); WriteAt(-1,7,Normal,NoCR,'Model: Elastic Modulus El in series with viscosity nl') IF C=2 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Parameter Selection: El nl'); TextColor (Title); WriteAt(-l,7,Normal,NoCR,'Model: Elastic Modulus El in parallel with viscosity nl IF C=3 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Parameter Selection: El nl E2 n2'); TextColor(Title); WriteAt(-1,7,Normal,NoCR,'Model: E1 in series with'+' E2 & n2 in parallel, also in series with nl'); END; FOR W:=l to Numofpar DO BEGIN Error:=1; REPEAT GotoXY(24,12); Write(W); CASE W OF

l:Write('st'); 2:Write('nd'); 3:Write('rd'); ELSE Write('th'); END; WriteAt (-1,-l,Normal,NoCr,'Parameter to Determine:'); Clreol; Readln (Partodetstr); IF (Partodetstr='El') OR (Partodetstr='el') THEN BEGIN Duplicate:=False; FOR B:=l to W DO BEGIN IF Partodet[B]='El' THEN Duplicate:=True; END; IF Duplicate=True THEN BEGIN WriteAt(-1,18,Highlite,NoCR,'E1 has already been chosen'); Delay(1500); DelLine; END ELSE BEGIN Partodet[W]:='El'; SpecPar[2]:=Undefined; Error:=0; END; END; IF (Partodetstr='nl') OR (Partodetstr='N1') THEN BEGIN Duplicate:=False; FOR B:=1 to W DO BEGIN IF Partodet[B]='nl' THEN Duplicate:=True; END; IF Duplicate=True THEN BEGIN WriteAt(-1,18,Highlite,NoCR,'El has already been chosen'); Delay(1500); DelLine; END ELSE BEGIN Partodet [W]:='nl'; SpecPar [3]:=Undefined; Error:=0; END; END; IF (Partodetstr='E2') OR (Partodetstr='e2') AND (C=3) THEN BEGIN Duplicate:=False; FOR B:=l to W DO BEGIN IF Partodet[B]='E2' THEN Duplicate:=True; END; IF Duplicate=True THEN BEGIN WriteAt(-1,18,Highlite,NoCR,'E1 has already been chosen'); Delay(1500); DelLine; END ELSE BEGIN Partodet[W]:='E2'; SpecPar[4]:=Undefined; Error:=0; END; END; IF (Partodetstr='n2') OR (Partodetstr='N2') AND (C=3) THEN BEGIN Duplicate:=False; FOR B:=l to W DO BEGIN IF Partodet[B]='n2' THEN Duplicate:=True; END; IF Duplicate=True THEN BEGIN WriteAt(-1,18,Highlite,NoCR,'El has already been chosen'); Delay(1500); DelLine; END ELSE BEGIN Partodet[W]:='n2'; SpecPar[5]:=Undefined; Error:=O; END; END; UNTIL Error=O; END; Comb:=1; FOR W:=2 to 5 DO BEGIN IF SpecPar[W]=Undefined THEN Comb:=Comb*W; END; END; PROCEDURE Select_SpecPar; VAR W,L: Integer; SpecParstr:string[80]; Error:integer; BEGIN GotoXY(1,25); ClrEOL; IF C<>3 THEN L:=3 ELSE L:=5; FOR W:=2 to L DO BEGIN GotoXY(1,12); ClrEOL; IF SpecPar[W]=0 THEN BEGIN CASE W OF 2: BEGIN WriteAt(29,-1,Normal,NoCR,'Specify value of E1 in GPa:'); ClrEOL; END;

3: BEGIN WriteAt(27,-l,Normal,NoCR,'Specify value of nl in GPa-s:'); ClrEOL; END; 4: BEGIN WriteAt(29,-l,Normal,NoCR,'Specify value of E2 in GPa:'); ClrEOL; END; 5: BEGIN WriteAt(27,-l,Normal,NoCR,'Specify value of n2 In GPa-s:'); ClrEOL; END; END; REPEAT Readln (SpecParstr); IF Length(SpecParstr)=0 THEN BEGIN Error:=1; END; Val (SpecParstr, SpecPar [W],Error); IF SpecPar[W]<=0 THEN Error:=1; IF Error <>0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(56,12); ClrEOL; END; UNTIL Error=0; END; END; E1:=SpecPar[2]; nl:=SpecPar[3]; E2:=SpecPar[4]; n2:=SpecPar[5]; END; PROCEDURE XTranspose; VAR PAR: Integer; BEGIN FOR PAR:=1 to NumofPar DO BEGIN FOR I:=l to DataPoints DO BEGIN XTrans [PAR, I]:=X[I, PAR]; END; END; END; PROCEDURE XTransposeX; VAR P,PAR: Integer; BEGIN FOR P:=1 to NumofPar DO BEGIN FOR PAR:=1 to NumofPar DO BEGIN XTransX[P, PAR]:=0; FOR I:=l to DataPoints DO BEGIN XtransX[P, PAR]:=XTransX[P,PAR]+XTrans[P,I]*X[I,PAR]; END; END; END; END; PROCEDURE Detof XTransX; VAR L,W,P,K,J: Integer; NDet,PDet: Array[1..4] of Real; BEGIN IF NumofPar=2 THEN L:=0 ELSE L:=NumofPar-1; FOR W:=0 to L DO BEGIN PDet[W+1]:=1; NDet [W+1]:=1; FOR P:=1 to NumofPar DO BEGIN K:=P+W; IF K>NumofPar THEN K:=P-(NumofPar-W); PDet[W+1]:=PDet [W+l] *XTransX[P,K]; J:=NumofPar-(P-l)+W; IF J>NumofPar THEN J:=W-(P-1); NDet[W+1]:=NDet [W+1] *XTransX[P,J]; END; END; Det:=0; IF NumofPar=2 THEN L:=1 ELSE L:=NumofPar;

FOR W:=1 to L DO BEGIN Det:=Det+PDet [W] -NDet [W]; END; END; PROCEDURE Inverse XTransX; VAR Sign,P,PAR,J,Jl,W,Wl,K,L,M,X,Y,U, Z: Integer; Cofactor: Real; NDet,PDet: Array[1..4] of Real; CofactorMatrix: Array[1..3,1..3] of Real; BEGIN FOR PAR:=1 to NumofPar DO BEGIN FOR P:=1 to NumofPar DO BEGIN W1:=1; J1:=0; FOR W:=1 to NumofPar DO BEGIN IF W<>P THEN BEGIN Y:=W; FOR J:=1 to NumofPar DO BEGIN IF J<>PAR THEN BEGIN X:=J; J1:=Jl+l; IF Jl>NumofPar-1 THEN BEGIN W1:=W1+1; Jl:=1; END; CofactorMatrix [W1, J1]:=XTransX[X, Y]; END; END; END; END; IF NumofPar<>2 THEN BEGIN IF NumofPar=3 THEN L:=0 ELSE L:=NumofPar-2; FOR W:=0 to L DO BEGIN PDet[W+1]:=1; NDet[W+1]:=1; FOR J:=1 to NumofPar-1 DO BEGIN K:=J+W; IF K>NumofPar-1 THEN K:=J-(NumofPar-l-W); PDet [W+1]:=PDet [W+1] *CofactorMatrix [J, K]; M:=NumofPar-l-(J-1)+W; IF M>NumofPar-1 THEN M:=W-(J-1); NDet[W+1]:=NDet [W+1] *CofactorMatrix[J,M]; END; END; Cofactor:=0; IF NumofPar=3 THEN L:=1 ELSE L:=NumofPar-1; FOR W:=1 to L DO BEGIN Cofactor:=Cofactor+PDet[W]-NDet[W]; END; END; Sign:=l; FOR L:=1 to P+PAR DO BEGIN Sign:=-l*Sign; END; IF NumofPar<>2 THEN XTransXInv [P,PAR]:=Sign*Cofactor/Det ELSE XTransXInv[P,PAR]:=Sign*CofactorMatrix[1,1]/Det; END; END; END; PROCEDURE XTransposeY; VAR P: Integer; BEGIN

FOR P:=1 to NumofPar DO BEGIN XTransY[P]:=O; FOR I:=l to DataPoints DO BEGIN XTransY[P]:=XTransY[P]+XTrans[P,I]*Yl[I]; END; END; END; PROCEDURE B0 XTransXInv XTransY; VAR P,PAR: Integer; BEGIN FOR P:=1 to NumofPar DO BEGIN BO[P]:=O; FOR PAR:=1 to NumofPar DO BEGIN BO[P]:=BO[P]+XtransXInv[P, PAR]*XTransY[PAR]; END; END; END; PROCEDURE LinearRegressionXY; BEGIN XTranspose; XTransposeX; Det ofXtransX; IF Det<>O THEN BEGIN InverseXTransX; XTransposeY; BO XTransXInvXTransY; END; END; PROCEDURE OnePar_XY_LinearRegression; VAR XTXInverse: Real; BEGIN XTranspose; XTransposeX; IF XTransX[1,1]<>O THEN BEGIN XTransposeY; SingleBO:=l/XTransX[1,l]*XTransY[l]; END; END; PROCEDURE Proceed_Graph; BEGIN WriteAt(67,25,Highlite,NoCR,'CR to Proceed'); Readln; END; PROCEDURE TitleLables; VAR Grid: String[80]; Finish: Boolean; BEGIN Write('Title for graph:'); Readln (Titlename); IF Length(Titlename)=0 THEN Titlename:=Titlenames; Write('Lable for the x-axis(Time/ks):'); Readln (Xlable); IF Length(Xlable)=0 THEN Xlable:='Time, ks'; Write('Lable for the y-axis(Strain):'); Readln(Ylable);

IF (Length(Ylable)=0) AND (C<>4) THEN Ylable:='Strain'; IF (Length(Ylable)=0) AND (C=4) THEN Ylable:='Stress/MPa'; Repeat Write('Grid scale (no)'); Readln (Grid); IF Length(Grid)=0 THEN GridCode:=l; IF (Grid='no') or (Grid='n') THEN GridCode:=l; IF (Grid='yes') OR (Grid='y') THEN GridCode:=2; Case GridCode of 1: Finish:=True; 2: Finish:=True; ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no'); Delay(1500); DelLine; END; END; UNTIL Finish=True; END; PROCEDURE Print TitleLables; VAR XlableCent,YlableCent,b: Integer; YChar: String[1]; BEGIN TextColor (Title); WriteAt(-l, 1, Normal, NoCR, Titlename); XlableCent:=3+((76-Length(Xlable)) DIV 2); WriteAt (XlableCent, 25, Normal, NoCR, Xlable); YlableCent:=2+(20-Length(Ylable)) DIV 2; For B:=1 to Length(Ylable) DO BEGIN YChar:=Copy (Ylable, B, 1); WriteAt(l, YlableCent+b, Normal,NoCR, YChar); END; END; PROCEDURE Axis; BEGIN Draw(42,11,42,181,1); Draw(40,179,632,179,1); END; PROCEDURE Grid; VAR M, L: Integer; BEGIN L:=11; For M:=1 to 7 DO BEGIN Draw (40, L, 632, L, 1); L:=L+24; END; L:=101; For M:=1 to 10 DO BEGIN Draw(L,11,L,181,1); L:=L+59; END; END; PROCEDURE Divisions; VAR M, L: Integer; BEGIN L:=11; For M:=1 to 10 DO BEGIN

Draw (40, L, 44, L, 1); L:=L+24; END; L:=101; For M:=1 to 10 DO BEGIN Draw (L, 177, L, 181, 1); L:=L+59; END; END; PROCEDURE Define_XYPlotting_ Matrices; BEGIN IF C<>4 THEN BEGIN FOR I:=l to DataPoints DO BEGIN Xarray[I]:=Times[I]; Yarray[I]:=Strains[I]; IF (I=l) AND (C=2) AND (Times[I]=0) THEN Yarray[I]:=0; END; END ELSE BEGIN IF Times[DataPoints]<>0 THEN Yarray[1]:=Stresses[l]*Exp(-El*Times[DataPoints]/nl) ELSE Yarray[1]:=0; Xarray [1]:=Times [1]; FOR I:=2 to DataPoints DO BEGIN Xarray[I]:=Times[I]; Yarray[I]:=Stresses[I]; END; END; END; PROCEDURE XYMaxMin; VAR M,L:Integer; BEGIN Xmin:=Xarray[1]; Ymin:=Yarray[1]; Xmax:=Xarray[DataPoints]; Ymax:=Yarray[DataPoints]; FOR M:=1 to DataPoints DO BEGIN IF Xarray[M]<Xmin THEN Xmin:=Xarray[M]; IF Yarray[M]<Ymin THEN Ymin:=Yarray[M]; IF Xarray[M]>Xmax THEN Xmax:=Xarray[M]; IF Yarray[M]>Ymax THEN Ymax:=Yarray[M]; END; END; PROCEDURE ScalesXY; VAR M, L: Integer; Xscalenumbers,Yscalenumbers:Array[1..11] of REAL; XIncrement, YIncrement:Real; BEGIN IF GridCode=2 THEN Grid ELSE Divisions; XIncrement:= (Xmax-Xmin)/10; YIncrement: =(Ymax-Ymin)/7; Xscalenumbers [1]:=Xmin; For L:=2 to 11 DO Xscalenumbers [L]:=Xscalenumbers [L-1]+XIncrement; Yscalenumbers [1]:=Ymin; FOR L:=2 to 8 DO Yscalenumbers [L]:=Yscalenumbers [L-l ]+YIncrement; GotoXY(5,24); Write (Xscalenumbers [1]:4:2); GotoXY(12,24); Write (Xscalenumbers [2]:4:2);

GotoXY(19,24); Write (Xscalenumbers [3]:4:2); GotoXY(27,24); Write (Xscalenumbers [4]:4:2); GotoXY(34,24); Write (Xscalenumbers [5]:4:2); GotoXY(42,24); Write (Xscalenumbers [6]:4:2); GotoXY(49,24); Write (Xscalenumbers[7]:4:2); GotoXY(56,24); Write (Xscalenumbers [8]:4:2); GotoXY(63,24); Write (Xscalenumbers [9]:4:2); GotoXY(70,24); Write (Xscalenumbers[10]:4:2); GotoXY(76,24); Write (Xscalenumbers[11]:4:2); M:=2; For L:=1 to 8 DO BEGIN GotoXY(2,M); Write(Yscalenumbers[9-L]:4:2); M: =M+3; END; END; PROCEDURE XY Conversion; VAR M,L: Integer; BEGIN FOR M:=1 to DataPoints DO BEGIN XConv [M]:=Trunc(42+(590/(Xmax-Xmin) *(Xarray[M] -Xmin))); YConv [M]:=Trunc(179-(168/(Ymax-Ymin)* (Yarray [M] -Ymin) ) ); END; END; PROCEDURE PrintExes; VAR M, L Integer; BEGIN FOR M:=1 To DataPoints DO BEGIN Draw (XConv [M] -2, YConv [M] +2, XConv [M] +2, YConv [M] -2, 1); Draw (XConv [M] -2, YConv [M] -2, XConv [M] +2, YConv [M] +2, 1); END; END; PROCEDURE Functions Appr; VAR M,L: Integer; XapprIncr:Real; Xappr,Yappr: Array [1..101] of Real; XapprConv,YapprConv: Array [1..101] Of Integer; BEGIN Xappr[1]:=Xmin; XapprIncr:=(Xmax-Xmin)/100; FOR M:=2 to 101 DO Xappr[M]:=Xappr[M-l]+XapprIncr; FOR M:=1 to 101 DO BEGIN CASE C OF 1: Yappr[M]:=(Stresses[1]/E1)+(Power(Stresses[1]/nl,1/Q1)*Xappr[M]); 2: Yappr[M]:=(Stresses[1]/E1)*(1-Exp(-El*Xappr[M]/nl)); 3: Yappr[M]:=(Stresses[1]/E1)+(Stresses[l]*Xappr[M]/nl)+(Stree[]/E2)*(1-Exp

4: Yappr[M]:=(Stresses[1])*Exp(-El*Xappr[M]/nl); END; XapprConv[M]:=Trunc(42+(590/(Xmax-Xmin)*(Xappr[M]-Xmin))); YapprConv[M]:=Trunc(179-(168/(Ymax-Ymin)*(Yappr[M]-Ymin))); END; FOR M:=2 to 101 DO BEGIN L:=M-1; IF (XapprConv[L]>=42) AND (YapprConv[L]>=11) THEN Draw(XapprConv[L],YapprConv[L],XapprConv[M],YapprConv[M],1); END; END; PROCEDURE Plot DataPoints Function; BEGIN ClrScr; CASE C OF 1: Titlenames:='Maxwell Model / Data(x) & Appr(-)'; 2: Titlenames:='Voigt Model / Data(x) & Appr(-)'; 3: Titlenames:='Maxwell-Voigt Modell / Data(x) & Appr(-)'; 4: Titlenames:='Stress Relaxation - Maxwell Model'; END; TitleLables; Hires; PrintTitleLables; Axis; Define_XY_Plotting_ Matrices; XYMaxMin; ScalesXY; XY Conversion; IF C<>4 THEN PrintExes; Functions Appr; Proceed_Graph; TextMode; END; PROCEDURE Set Up; BEGIN FOR Z:=l to N DO BEGIN X1 1, Z]:=Times[Z]; X1[2,Z]:=Strains[Z]/Stresses[Z]; END; IF C=2 THEN BEGIN CASE NumofPar OF 1: BEGIN M:=1; M1:=2; IF Comb=l THEN B[1]:=200 ELSE B[1]:=30; END; 2: BEGIN M:=2; M1:=3; B[1]:=200; B[2]:=30; END; END; END; IF C=3 THEN BEGIN CASE Comb OF 2: BEGIN M:=1; M1:=2; FOR Z:=1 to N DO BEGIN X[Z,1]:=Stresses[Z]; Y1[Z]:=Strains[Z]-(Stresses[Z]*Times[Z]/nl)-(Stresses[Z]/E2)*(1-Exp(-E2*Times[Z]/ END; OneParXYLinearRegression; B[1]:=1/SingleB0; END;

3: BEGIN M:=1; M1:=2; FOR Z:=1 to N DO BEGIN X[Z,1]:=Stresses [Z] *Times [Z]; Y1[Z]:=Strains[Z]-(Stresses[Z]/E1)-(Stresses[Z]/E2)*(1-Exp(-E2*Times[Z]/n2)); END; OneParXY_LinearRegression; B[1]:=1/SingleB0; END; 4: BEGIN M:=1; M1:=2; B[1]:=200; END; 5: BEGIN M:=1; M1:=2; FOR Z:=1 to N DO BEGIN X[Z,1]:=-E2*Times[Z]; Y1[Z]:=Ln(1- (Strains[Z]*E2/Stresses[Z])+(E2/El)+(E2*Times[Z]/nl)); END; OneParXYLinearRegression; B[1]:=l/SingleB0; END; 6: BEGIN M:=2; M1:=3; B[2]:=30; B[1]:=200; END; 8: BEGIN M:=2; M1:=3; B[1]:=200; B[2]:=200; END; 10: BEGIN M:=2; M1:=3; B[1]:=100; B[2]:=30; END; 12: BEGIN M:=2; M1:=3; B[1]:=30; B[2]:=200; END; 15: BEGIN M:=2; M1:=3; B[1]:=30; B[2]:=30; END; 20: BEGIN M:=2; M1:=3; B[1]:=200; B[2]:=30; END; 24: BEGIN M:=3; M1:=4; B[1]:=200; B[2]:=30; B[3]:=200; END; 30: BEGIN M:=3; M1:=4; B[1]:=200; B[2]:=30; B[3]:=30; END; 40: BEGIN M:=3; M1:=4; B[1]:=200; B[2]:=200; B[3]:=30; END; 60: BEGIN M:=3; M1:=4; B[1]:=30; B[2]:=200; B[3]:=30; END; 120: BEGIN M:=4; M1:=5; B[1]:=200; B[2]:=30; B[3]:=200; B[4]:=30; END;

END; END; END; PROCEDURE F; VAR S: REAL; BEGIN IF C=2 THEN BEGIN CASE NumofPar OF 1: BEGIN IF Comb=2 THEN BEGIN S:=(1/B[l])* (1-Exp(-B[1] *Xl[l[1,K]/nl) ); E:=X1[2,K]-S END ELSE BEGIN S:=(1/E1)*(1-Exp(- El*XI [[1,K] /B[1])); E:=X1[2,K]-S END; END; 2: BEGIN S:=(1/B[1]) * (1-Exp(-B[1]*X[1,K]/B[2])); E:=X1 [2,K]-S END; END; END; IF C=3 THEN BEGIN CASE Comb OF 2: BEGIN S:=(1/B[1])+(Xl[[1, K]/nl)+(1/E2)*(1-Exp(-E2*X [1,K]/n2)); E:=X1[2,K]-S END; 3: BEGIN S:=(1/E1)+(Xl[1,K]/B[1])+(1/E2)*(1-ExP(-E2*Xl[1,K]/n2)); E:=X1[2, K]-S END; 4: BEGIN S:=(1/E1)+(Xl[l[,K]/nl)+(1/B[1])*(1-Exp(-B[1]*X[1,K]/n2)); E:=X1[2,K]-S END; 5: BEGIN S:=(1/E1)+(X1[ 1,K]/nl)+(1/E2)*(1-Exp(-E2*Xl[l,K]/B[l])) E:=X1[2,K]-S END; 6: BEGIN S:=(l/B[1])+ (X[1,K]/B[2])+(l/E2)*(1-Exp(-E2*Xl[1,K]/n2)); E:=X1[2,K] -S END; 8: BEGIN S:=(1/B[1])+(Xi[[1, K]/nl)+(1/B[2] )*(1-Exp(-B[2]*Xl[l,K]/n2)) E:=X1[2,K]-S END; 10: BEGIN S:=(1/B[1])+(Xl[l, K]/nl)+(1/E2)* (1-Exp(-E2*Xl[lK]/B[2])) E:=X1[2,K]-S END; 12: BEGIN S:=(1/El)+(Xl[[1,K]/B[1])+(1/B[2])(1-Exp(-B[2]*Xl[l,K]/n2)); E:=Xl[2,K]-S END; 15: BEGIN S:=(1/E1)+(Xl[l[,K]/B[1])+(1/E2)*(1-Exp(-E2*Xl[l,K]/B[2])); E:=X1[2,K]-S END; 20: BEGIN S:=(1/El)+ (X1 [1, K]/ nl)+((1 /B[1])* (1- Exp(-B[1] *Xl[l,K]/B[2]); E:=X1[2,K]-S END; 24: BEGIN S:=(1/B[1 )+(X1[1,K]i/B[2] )+((1/B[3])* (1-Exp(-B[3]*Xl[lfK]/n2)); E:=X1[2,K]-S END; 30: BEGIN S:=(1/B[1])+(X1[1,K]/B[2])+(1/E2) *(1-Exp (-E2*Xl[I' K]/B[3])); E:=X1[2,K]-S END; 40: BEGIN S:=(1([1] )+(X [1,K]/nl)+ (1/B[2 ]) * (1-Exp(-B[2] *Xl [1,K]/B [3])); E:=X1[2,K]-S END; 60: BEGIN s: (/Ens(1[, ]/B[ rn o1 /B[rllX lE t Rv8t-Fx(B2*lpK/

E:=X1[2,K]-S END; 120: BEGIN S:=(1/BEl] )+(Xl[lK]/BB213)+/B[)(1 )*(1-Exp(-B[3]*Xl[lK/B[4]) E:=X1[2,K]-S END; END; END; END; PROCEDURE SUM; BEGIN Q:=0.0; FOR K:=1 TO N DO BEGIN F; EE[K]:=E; Q:=Q+E*E END; END; PROCEDURE PD; BEGIN IF C=2 THEN BEGIN CASE NumofPar OF 1: BEGIN IF Comb=2 THEN G[l]:=(-l/SQR(B[1]))+(l/SQR(B[l])+Xl[lK]/(nl*B[1))*Exp(-B[1]*Xl[lK]/n1) ELSE G[l]:=-(Xl[1,K]/SQR(B[1l]))*Exp(-El*Xl[l[,K]/B[l]) END; 2: BEGIN G[1]:-(-l/SQR(B[1]))+(1/SQR(B[1])+Xl[1,K]/(B[2]*B[1]))*Exp(-B[l]*Xl[1,K]/IE G[2]:=-(Xl[1,K]/SQR(B[2]))*Exp(-B[1]*Xl[l,K]/B[2]); END; END; END; IF C=3 THEN BEGIN CASE Comb OF 2: BEGIN G[1]:=-/SQR(B[l]); END; 3: BEGIN G[l]:=-Xl[l1,K]/SQR(B[1]); END; 4: BEGIN G[l]:=(-l1/SQR(B[l]))+,(l/SQR(B[l])+Xl[lK]/(n2*]B[1))*Exp(-I[]*Xl[l,K]/n2) END; 5: BEGIN G[1]:=-(Xl[l, K]/SQR(B [l] ) ) *Exp(-E2*X1 [1, K]/B[l]); END; 6: BEGIN G[1]:=-1/SQR(B[l]); G[2]:=-Xl[1,K]/SQR(B[2]); END; 8: BEGIN G[l]:=-l/SQR(B[1]); G[2]:=(-l/SQR(B[2]))+(l/SQR(B[2])+Xl[lK]/(n2*]B[2))*Exp(-B[2]*Xl[lK]/n2) END; 10: BEGIN G[1]:=-1/SQR(B[1]); G[2]:=-(Xi[1,K]/SQR(B[2]))*Exp(-E2*Xi[1,K]/B[2]); END; 12: BEGIN G[1]:=-X1 [1,K]/SQR(B[1]); END; 15: BEGIN

G[1]:=-Xl[1, K]/SQR(B [1]); G[2]:=-(Xl[l, K]/SQR(B[2 ]))*Exp(-E2*Xl[l END; 20: BEGIN G[l]:=(-l/SQR(B[ l]))+( 1/SQR(B[1])+Xl[l G[2]:=-(Xl[l[, K]/SQR(B[2]))*Exp(-B[1]*Xl END; 24: BEGIN G[1]:=-l/SQR(B[l]); G[2]:=-X1[1,K]/SQR(B[2]); G[3]:=(-1/SQR(B[3]))+(1/SQR(B[3])+XIn l[l] END; 30: BEGIN G[1]:=-l/SQR(B[1]); G[2]:=-Xl[1,K]/SQR(B[2]); G[3]:=-(Xl[1,K]/ SQR( B[3]))*Exp(-E2*Xltl END; 40: BEGIN G[1]:=-l/SQR(B[1]); G[2]:=(-1/SQR(B[2]))+(1/SQR(B[2])+X[l (B[3*B[21))*Exp(-B*X K] / G[3]:=-(Xl[l, K]/SQR(B[3 ]))*Exp(-B[2]*X/ END; 60: BEGIN G[1]:=-Xl[l1,K]/SQR(B[l]); G[2]:=(-1/SQR(B[2]))+(1/SQR(B[2])+Xl[lK]B[3*B[2))Exp(-B[2]*X[1K] / G[3]:=-(Xl[[, lK]/SQR(B[3]))*Exp(-B[2]*X END; 120: BEGIN G[1]:=-l/SQR(B[1]); G[2]:=-Xl [1,K]/SQR(B [2]); G[31:=(-1/SQR(B[3]))+(1/SQR(B[3])+Xi[(-B *X K]/E G[4]:=-(X[1,K]/ SQR(B[4 ]))*Exp(-B[3]*; END; END; END; END; PROCEDURE GNM; LABEL 1,8,20,21,23,27,28,29,30; VAR BO:ARRAY [1..5] OF REAL; H:ARRAY [1..6] OF REAL; A:ARRAY [1..5,1..6] OF REAL; AO:ARRAY [1..5,1..6] OF REAL; L, I1,I2: INTEGER; D,DO,W,QO: REAL; BEGIN L:=0; FAIL:=0; D:=0.01; SUM; 1: L:=L+1; QO:=Q; FOR I:=l TO M DO BEGIN BO[I]:=B[I]; FOR J:=1 TO M1 DO AO[I,J]:=0.0; END; FOR K:=1 TO N DO BEGIN PD; G[M1]:=EE[K]; FOR I:=l TO M DO BEGIN Q:=G[I]; FOR J:=I TO M1 DO A0[I,J]:=A0[I,J]+Q*G[J]; END; END;

FOR I:=1 TO M DO BEGIN Q:=A0 [I, I]; IF Q<=0.0 THEN GOTO 27; H[I]:=1.0/SQRT(Q) END; FOR I:=l TO M DO BEGIN Q:=H[I]; Ii:=I+l; IF Il<>M1 THEN BEGIN FOR J:=I1 TO M DO A0[I,J]:=A0[I,J]*Q*H[J] END; A 0 [I,MM1]]*Q; END; IF D>=2.OE-7 THEN D:=D/10.0; W:=1.0; D0:=D; 8: FOR I:=l TO M DO BEGIN FOR J:=1 TO M1 DO A[I,J]:=A0[I,J]; END; FOR I:=l TO M DO A[I,I]:=D+1.0; FOR I:=l TO M DO BEGIN Il:=I+l; IF (Il<>M1) THEN FOR J:=I1 TO M DO A[J,I]:=A[I,J]; IF A[I,I]=0.0 THEN GOTO 27; Q:=1.0/A[I,I]; FOR J:=I1 TO M1 DO A[I,J]:=A[I,J]*Q; IF Il<>M1 THEN BEGIN FOR K:=I1 TO M DO BEGIN Q:=A[K,I]; FOR J:=K TO M1 DO A[K,J]:=A[K,J]-Q*A[I,J]; END; END; END; FOR I2:=1 TO M DO BEGIN I:=M-I2+1; IF (I<>M) THEN BEGIN Il:=I+l; FOR J:=I1 TO M DO A[I,M1]:=A[I,Ml]-A[J,M1] *A[I,J]; END; G[I]:=A[I,M1]*H[I]; B[I]:=B0[I]+G[I] END; SUM; IF D0<D THEN GOTO 20; FOR I:=l TO M DO BEGIN IF (ABS(G[I])/(ABS(B[I])+0.001)>ERR) THEN GOTO 20 END; GOTO 30; 20: IF Q>=Q0 THEN GOTO 21; IF L < MAXL THEN GOTO 1; GOTO 29; 21: IF D >= 20.0 THEN GOTO 23; D:=D*10.0; GOTO 8; 23: W:=W/4.0; IF W=0.0 THEN GOTO 28;

FOR I:=l TO M DO B[I]:=BO[I]+W*G[I]; SUM; IF Q<QO THEN GOTO 1; GOTO 23; 27: FAIL:=-1; 28: FAIL:=FAIL-1; 29: FAIL:=FAIL-1; 30: E:=Q; END; PROCEDURE NLSE; BEGIN N: =DataPoints; Set_Up; GNM; IF C=2 THEN BEGIN CASE NumofPar OF 1: BEGIN IF Comb=2 THEN BEGIN El:=B[1]; Clrscr; TextColor (Title); WriteAt(-1,-l,Normal,NoCR,' Voigt Model: Calculated El,GPa Specified r GotoXY(31,13);Write(E1:10:4); GotoXY(52,13); Write(nl:10:4); Proceed; Plot DataPointsFunction; END ELSE BEGIN nl:=B[1]; Clrscr; TextColor (Title); WriteAt(-l,-1,Normal,NoCR,' Voigt Model: Specified El,GPa Calculated r GotoXY(31,13);Write(E1:10:4); GotoXY(52,13); Write(nl:10:4); Proceed; Plot DataPointsFunction; END; END; 2: BEGIN El:=B[1]; nl:=B[2]; Clrscr; TextColor (Title); WriteAt (-1,-1,Normal,NoCR,' Voigt Model: Calculated El,GPa Calculated GotoXY(31,13);Write(El: 10:4); GotoXY(52,13); Write(nl:10:4); Proceed; PlotDataPointsFunction; END; END; END; IF C=3 THEN BEGIN CASE Comb OF 2: BEGIN E1:=B[1]; Clrscr; TextColor (Title); WriteAt(-l,ll1,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-1,-l,Normal,NoCR,'Calculated El,GPa Specified nl,GPa-s'+' Specified E2,GPa Specified n2,GPa-s'); GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPointsFunction; END; 3: BEGIN nl:=B[1]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-l,Normal,NoCR,'Specified El,GPa Calculated nl,GPa-s'+ Specified E2,GPa Specified n2,GPa-s'); GotoXY(4,13);Write(El:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 4: BEGIN E2:=B[1]; Clrscr; TextColor(Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-1,-1,Normal,NoCR,'Specified E1,GPa Specified nl,GPa-s'+' Calculated E2,GPa Specified n2,GPa-s');

GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2: 10:4); GotoXY(67,13); Write(n2:10:5); Proceed; PlotDataPoints Function; END; 5: BEGIN n2:=B[1]; Clrscr; TextColor (Title); WriteAt(-l,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-1,Normal,NoCR,'Specified E1,GPa Specified nl,GPa-s'+' Specified E2,GPa Calculated n2,GPa-s'); GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 6: BEGIN E1:=B[1]; nl:=B[2]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-l,Normal,NoCR,'Calculated E1,GPa Calculated nl,GPa-s'+' Specified E2,GPa Specified n2,GPa-s'); GotoXY (4,13);Write (El1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 8: BEGIN El:=B[1]; E2:=B[2]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-1,Normal,NoCR,'Calculated El,GPa Specified nl,GPa-s'+' Calculated E2,GPa Specified n2,GPa-s'); GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPointsFunction; END; 10: BEGIN E1:=B[l]; n2:=B[2]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-1,-1,Normal,NoCR,'Calculated E1,GPa Specified nl,GPa-s'+ Specified E2,GPa Calculated n2,GPa-s'); GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 12: BEGIN nl:=B[1]; E2:=B[2]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-1,Normal,NoCR,'Specified E1,GPa Calculated nl,GPa-s'+' Calculated E2,GPa Specified n2,GPa-s'); GotoXY (4,13);Write (E1:10:4); GotoXY(26, 13); Write(nl:10:4); GotoXY (44,13);Write (E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPointsFunction; END; 15: BEGIN nl:=B[l]; n2:=B[2]; Clrscr; TextColor (Title); WriteAt(-1, 11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-1,Normal,NoCR,'Specified E1,GPa Calculated nl,GPa-s'+' Specified E2,GPa Calculated n2,GPa-s'); GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 20: BEGIN E2:=B[1]; n2:=B[2]; Clrscr; TextColor(Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-1,-1,Normal,NoCR,'Specified E1,GPa Specified nl,GPa-s'+ Calculated E2,GPa Calculated n2,GPa-s');

GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 24: BEGIN E1:=B[1]; nl:=B[2]; E2:=B[3]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-1,-l,Normal,NoCR,'Calculated El,GPa Calculated nl,GPa-s'+' Calculated E2,GPa Specified n2,GPa-s'); GotoXY(4,13);Write(El: 10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 30: BEGIN E1:=B[1]; nl:=B[2]; n2:=B[3]; Clrscr; TextColor (Title); WriteAt (-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-l,Normal,NoCR,'Calculated El,GPa Calculated nl,GPa-s'+' Specified E2,GPa Calculated n2,GPa-s'); GotoXY(4,13);Write(El:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44, 13);Write (E2:10:4); GotoXY(67,13); Write (n2:10:5); Proceed; Plot_ DataPoints Function; END; 40: BEGIN El:=B[1]; E2:=B[2]; n2:=B[3]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-1,-l,Normal,NoCR,'Calculated E1,GPa Specified nl,GPa-s'+ Calculated E2,GPa Calculated n2,GPa-s'); GotoXY(4,13);Write (E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44, 13);Write (E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPoints Function; END; 60: BEGIN nl:=B[1]; E2:=B[2]; n2:=B[3]; Clrscr; TextColor (Title); WriteAt(-l,ll,Normal,CR,'Maxwell-Voigt Model:'); WriteAt(-l,-1, Normal,NoCR,'Specified E1,GPa Calculated nl,GPa-s'+' Calculated E2,GPa Calculated n2,GPa-s'); GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY(44,13);Write(E2:10:4); GotoXY(67,13); Write(n2:10:5); Proceed; Plot DataPointsFunction; END; 120: BEGIN E1:=B[1]; nl:=B[2]; E2:=B[3]; n2:=B[4]; Clrscr; TextColor (Title); WriteAt(-1,11,Normal,CR,'Maxwell-Voigt Model:'); WriteAt (-1,-1,Normal,NoCR,'Calculated E1,GPa Calculated nl,GPa-s'+' Calculated E2,GPa Calculated n2,GPa-s'); GotoXY(4,13);Write(E1:10:4); GotoXY(26,13); Write(nl:10:4); GotoXY (44,13);Write(E2:10:4); GotoXY (67, 13); Write(n2:10:5); Proceed; PlotDataPointsFunction; END; END; END; END; PROCEDURE XY Maxwell 1Par; BEGIN IF DataPoints>0 THEN BEGIN IF Comb=2 THEN BEGIN IF Stresses[1]<>0 THEN BEGIN FOR I:=l to DataPoints DO

BEGIN X[I,1]:=Stresses[I]; Y1l[I]:=Strains[I]-(Power(Stresses[I]/SpecPar[3],1/Ql)*Times[I]); END; OneParXY LinearRegression; El:=1/SingleBO; Clrscr; TextColor (Title); WriteAt (-1, -1,Normal,NoCR,'Maxwell Model: Calculated El,GPa Specified nl,GP& GotoXY(31,13);Write(E1:10:4); GotoXY(52,13); Write(nl:10:4); Proceed; Plot DataPoints Function; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'No Appropriate Data To Calculate El'); Delay(1000); DelLine; END; END ELSE BEGIN IF Stresses[l]<>O THEN BEGIN FOR I:=l to DataPoints DO BEGIN X[I,1]:=Power(Stresses[I],l/Ql)*Times[I]; Yl[I]:=Strains[I]-Stresses[I]/SpecPar[2]; END; OnePar XY LinearRegression; nl:=l/Power(SingleBO, 1/Q1); Clrscr; TextColor(Title); WriteAt (-1,-1,Normal,NoCR,'Maxwell Model: Specified E1,GPa Calculated nl,GPE GotoXY(30,13);Write(E1:10:4); GotoXY(53,13); Write(nl:10:4); Proceed; Plot DataPoints Function; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'No Appropriate Data To Calculate nl'); Delay(1000); DelLine; END; END; END; END; PROCEDURE XY Maxwell 2Par; BEGIN IF (DataPoints>l) AND (Stresses[l]<>O) THEN BEGIN FOR I:=l to DataPoints DO BEGIN X[I,1]:=Power(Stresses[I],l/Ql)*Times[I]; X[I,2]:=Stresses[I]; Yl[I]:=Strains[I]; END; LinearRegression XY; nl:=Power(1/B0[1],Q1); E1:=1/B0[2]; Clrscr; TextColor (Title); WriteAt(-1l,-l,Normal,NoCR,'Maxwell Model-Calculated values: E1,GPa nl,GP GotoXY(44,13);Write(E1:10:4); GotoXY(59,13); Write(nl:10:4); Proceed; PlotDataPointsFunction; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Not Enough Available Data To Calculate El & nl'); Delay(1000); DelLine; END; END; PROCEDURE Stress Relaxation; BEGIN IF Stresses[l]<>0 THEN BEGIN C:=4; NumofPar: =2; SpecPar[2]:=0; SpecPar[3]:=0; WriteAt(-1,7,Normal,NoCR,'Maxwell Model: Elastic Modulus E1 in series with viscoa Select_SpecPar;

Plot DataPoints Function; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'No Appropriate Data Available'); Delay(1000); DelLine; END; END; PROCEDURE Comp_Submenul2; VAR T,W: Integer; Stop: Boolean; BEGIN Stop:=False; REPEAT Clrscr; TextColor(Title); Writeln('CHOICE OF PARAMETER DETERMINATION'); TextColor(Regular); Writeln(' Choose an option'); TextColor(Title); Write(' 1');TextColor(Regular);Writeln(' Determine 1 Parameter by specifying the TextColor(14);Write(' 2' );TextColor(Regular); Writeln(' Determine both parameters'); Writeln; Write('Enter selection here:'); Read Code(T,W); CASE T OF 1: BEGIN Stop:=true; Window(1, 1,80,25); Clrscr; NumofPar:=1; Parameters to_determine; Select_SpecPar; IF C=1 THEN XY Maxwell 1Par; IF (C=2) AND (Stresses[1]<>O) THEN NLSE; IF Stresses[1]=0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'No Appropriate Data to Calculate Parameters'); Delay(1000); DelLine; END; END; 2: BEGIN Stop:=true; NumofPar:=2; Window(1, 1,80,25); Clrscr; IF C=1 THEN XY Maxwell 2Par; IF (C=2) AND (Stresses[1]<>O) THEN NLSE; IF Stresses[1]=0 THEN BEGIN WriteAt(-1,25,Highlite,NoCR,'No Appropriate Data to Calculate Parameters'); Delay(1000); DelLine; END; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-2'); Delay(1500); DelLine; END; END; UNTIL Stop=true; END; PROCEDURE Comp_Submenu3; VAR T,W: Integer; Stop: Boolean; BEGIN Stop:=False; REPEAT Clrscr; TextColor(Title); Writeln ('CHOICE OF PARAMETER DETERMINATION'); TextColor (Regular); Writeln(' Choose an option'); TextColor(Title); Write(' l');TextColor(Regular);Writeln(' Determine n parameters by specifying tTextColor(14);Write(' 2');TextColor(Regular); Writeln(' Determine Elastic Modulus-l & viscocity-1 assuming linear response'); Writeln; Write('Enter selection here:'); Read Code(T,W);

CASE T OF 1: BEGIN IF Stresses[1]<>O THEN BEGIN Stop:=true; Window(1,1,80,25); Clrscr; Select NumParameters to determine; IF (NumofPar<>4) AND (NumofPar<>O) THEN BEGIN Parameters to_determine; Select_SpecPar; END ELSE Comb:=120; IF NumofPar<>O THEN NLSE; END ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'No Appropriate Data to Calculate Parameters'); Delay(1000); DelLine; END; END; 2: BEGIN Stop:=true; NumofPar:=2; Ql:=l; Window(1,1,80,25); Clrscr; C:=1; XYMaxwell_2Par; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-2'); Delay(1500); DelLine; END; END; UNTIL Stop=true; END; PROCEDURE Menu Computations; VAR J,W: Integer; BEGIN REPEAT Clrscr; Window(29,10,80,25); Clrscr; TextColor (Title); Writeln('Computations Menu'); Writeln; TextColor (14); Write('l'); TextColor(Regular); Writeln(' Maxwell Model (Newtonian or Non-Newtoni TextColor(14); Write('2'); TextColor(Regular); Writeln(' Voigt Model (Newtonian)'); TextColor(14); Write('3'); TextColor(Regular); Writeln(' Maxwell-Voigt Model Newtonian'); TextColor(14); Write('4'); TextColor(Regular); Writeln(' Stress Relaxation'); TextColor (Title); Write('5'); TextColor(Regular); Writeln(' Return to Main Menu'); Writeln; Write('Enter selection here:'); Read Code(J,W); CASE J OF 1: BEGIN C:=I; Clrscr; Window(1,1,80,25); Nonproportional_Constant_Q; Clrscr; Window(21,10,80,25); Comp_Submenul2; END; 2: BEGIN C:=2; Clrscr; Window(21,10,80,25); Comp_Submenul2; END; 3: BEGIN C:=3; Clrscr; Window(7,10,80,25); Comp_Submenu3; END; 4: BEGIN C:=4; Clrscr; Window(1,1,80,25); Stress Relaxation; END;

5: Writeln; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-5'); Delay(1500); DelLine; END; END; UNTIL J=5; END; BEGIN LowVideo; Clrscr; Header; Introduction; Quit:=False; Initialize_Data_Array; REPEAT {start main menu} Clrscr; Window(29,10,80,25); Clrscr; TextColor(Title); Writeln(' **MAIN MENU**'); TextColor(Regular); Writeln(' Choose an Option'); Writeln; TextColor(Title); Write (' l');TextColor(Regular);Writeln(' List Current Data');TextColor(14); Write (' 2');TextColor(Regular);Writeln(' Input Data');TextColor(Title); Write (' 3');TextColor(Regular);Writeln(' Edit Data'); TextColor(Title); Write (' 4');TextColor(Regular);Writeln(' Save Current Data'); TextColor(14); Write(' 5');TextColor (Regular);Writeln(' Computations & Plots');TextColor (Title) Write(' 6');TextColor (Regular);Writeln(' Exit Program'); Writeln; WriteAt(-1, 21,Normal,NoCR,'Enter selection here:'); ClrEOL; Z:=0; Read Code(Z,A); Writeln; CASE Z OF 0: Writeln; 1: BEGIN Print Data; Proceed; END; 2: BEGIN Input_Option; END; 3: Menu EditData; 4: BEGIN Window(1, 1, 1,80,25); Clrscr; Saving_CurrentData; END; 5: Menu_Computations; 6: BEGIN Window(1,1,80,25); ClrScr; Exit; END; ELSE BEGIN WriteAt(-1,25,HighLite,NoCR,'Code outside of range'); Delay(1500); DelLine; END; END; UNTIL Quit=true; END.

TWO DIMENSIONAL MOHR'S CIRCLE EXAMPLE

o()( C'Cl) C' (3(0( )O(C ( ( ()')' 7, Axj. AS'C} (A.')ssa4;S ieaEDL4(S (A) ssa~J.S IeJJ4ON (X)ssaE31S I-'JJJ~oN:aJeJ SeallTeA 4Ue lJ lIL L41.........................M.~. got fi; "it UOI4U4aUO I Ai i 1,e."',,-"' uo T Ad uenuoD us x a; anr~rs~i i

The IF'rinrciad]3. Stresses are25. c'?90.2. and 1 6. 9()98 Tl-he An rle between t he Frin. nc: i pa l Pa.Flanes and the hor z c on a! r:l.-:. 7175 degrees and 55.2825 degrees The Maxim um Shear Stress is,: 5. 57C)2 Angles between the hocrizonta l &t the planes where this ma(imurX m oc:cuIrsii': aIl-ve: I 3. 2825 degrees and 103.2'25 degrees The Stresses along the plane defined by angle Theta are: Theta Normal Stress Shear Stress Stheta Ttheta;:U.:))0000 25. j5801 — 4 6651

itle 1 for, a. p h: Iloe for the, -a xis (INorml Stress): le f:or the y —a:is(Shear Stress): i s (yes): id scale (no): sect Sx to Sy(yes):

"Novo Im~~~~~~~~~~~~~~~~~I K f~~~~~~~~Sav~~~~~~~~~a P ~9 % Pr r~K' 3'~ 6~ a~Iflli — Wm~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~m /aa %I~~~~~~~~~~~~~~~~~~~~~~~~~' vow ~w wwwal Ka U S u~~~~~~ -I U, 5UU~-w" 7 II' a~~~~~~~~~~~~~~~~~~~~~~~~~I r'l~~~~~~~~U ge IU ai~~~~~~~~~~~~~

TWO DIMENSIONAL MOHR'S CIRCLE PROGRAM LISTING

PROGRAM MohrsCircle; CONST Title = 14; Regular = 7; Highlite = True; Normal = False; CR = True; NoCR = False; TYPE String255 = String[255]; String80 = String[80]; VAR {Main Program} Z: Integer; Quit: Boolean; {Input Data} Data,Sx, Sy,Txy: Real; {Calculations} S1,S2,Anglel,Angle2,Angle3,Angle4,Tmax: Real; {Graphs} Ylable: String[20]; Titlename,Titlenames,Xlable: String[80]; SxSyCode,AxisCode,GridCode: Integer; Xmax,Xmin,Ymax,Ymin: Real; Xarray,Yarray: Array [0..360] of Real; XConv,YConv: Array [0..360] of Integer; {Useful Procedures Throughout the Program} PROCEDURE WriteAt(X,Y: Integer; Highlite,UseCR: Boolean; TheText: string255); BEGIN IF Y < 0 THEN Y:= 12; IF X < 0 THEN X:= (80-Length(TheText)) DIV 2; GotoXY(X, Y); IF Highlite THEN TextColor(10); IF UseCR THEN Writeln(TheText) ELSE Write(TheText); TextColor(Regular); END; PROCEDURE Proceed; VAR PosY: Integer; BEGIN WriteAt(-1,25,Highlite,NoCR,'Press Return to Proceed'); PosY:=WhereY; Readln; GotoXY(1,PosY); DelLine; END; PROCEDURE Yes No Answer(Var code: Integer); VAR Answer: String[80]; BEGIN Readln (Answer); IF Length(Answer)=0 THEN Code:=2; IF (Answer='yes') OR (Answer='y') THEN Code:=l; IF (Answer='no') OR (Answer='n') THEN Code:=2; END;

PROCEDURE Read_Code(VAR Code: Integer); VAR Codestr: String[80]; Error,PosX,PosY: Integer; BEGIN PosX:=WhereX; PosY:=Wherey; REPEAT ClrEOL; Readln (Codestr); IF length(Codestr)=0 THEN Error:=0; Val(Codestr,Code,Error); IF Error<>0 THEN BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Selection type must be an integer'); Delay(1500); DelLine; GotoXY(PosX,PosY); END; UNTIL Error=0; END; {Header} PROCEDURE Header; BEGIN Window(15,6,72,25); Clrscr; TextColor (Title); Writeln (' ***************************************************'); Writeln('* *,); Writeln('* *'); Writeln('* UNIVERSITY OF MICHIGAN *'); Writeln('* Department of Mechanical Engineering Writeln('* ME 251 Writeln ('* * Writeln('* Mohr's Circle for *'); Writeln('* a Two Dimensional Stress System *'); Writeln('* * Writeln('* * Writeln('* by Diana Rincon *'); Writeln('* * ); Writeln('* *'); Writeln (' ***************************************************'); TextColor(Regular); Window(1, 1,80,25); END; {Positive Sign Convention Used} PROCEDURE Arrows(A,B,Color: Integer; X dir: Boolean); VAR Incl,Inc2: Integer; BEGIN IF X dir=True THEN BEGIN Incl:=5; Inc2:=2; Draw (A-Incl,B-Inc2,A,B,Color); Draw(A,B,A-Incl,B+Inc2,Color); Draw(A-Incl,B+Inc2,A-Incl,B-Inc2,Color); END ELSE BEGIN Incl:=2; Inc2:=5; Draw(A-Incl,B-Inc2,A,B, Color); Draw(A,B,A+Incl,B-Inc2,Color); Draw(A+Incl,B-Inc2,A-Incl,B-Inc2,Color); END; END;

PROCEDURE Sign_Convention; BEGIN GraphColorMode; WriteAt(8,1,Normal,NoCR,'Positive Sign Convention'); WriteAt(12, 7,Normal,NoCR,'Stheta'); WriteAt (21, 6, Normal,NoCR,' Ttheta' ); WriteAt (10, 18, Normal, NoCR,'Theta'); WriteAt(32, 13,Normal, NoCR,'Sx'); WriteAt (28, 18,Normal, NoCR,'Txy' ); WriteAt(23, 20,Normal,NoCR,'-Tyx'); WriteAt (17, 25, Normal, NoCR,'Sy' ); Draw (205, 55,205,145,2); Draw(205,145,55,145,2); Draw(205,138,198,138,2); Draw(198,138,198,145,2); Draw(55,145,205,55,2); Draw(210,60,210,140,1); Arrows(210,140,1,False); Draw(205,100,245,100,1); Arrows (245,100,1, True); Draw(200,150,60,150,1); Arrows(200,150,1, True); Draw(130,145,130,185,1); Arrows (130,185, 1, False); Draw (60,135,198,52, 1); Draw(192,53,198,52, 1); Draw (198, 52,194,56, 1); Draw (194,56,192,53, 1); Draw(130,100,113,58,1); Draw(112,64,113,58,1); Draw(113, 58,117,61,1); Draw (117, 61,112,64, 1); WriteAt(27,25,Highlite,NoCR,'CR to Proceed'); Readln; END; (Introduction) PROCEDURE Introduction choice(Var q: Integer); VAR Code: Integer; BEGIN REPEAT Write('Do you wish to read the introduction? (no):'); Yes No Answer(code); CASE Code OF 1: BEGIN q:=40; Code:=3; END; 2: Code:=3; ELSE BEGIN WriteAt(-1,25,Highlite,CR,'Must answer yes or no and hit return'); GotoXY(15,18); DelLine; GotoXY(1,1); InsLine; GotoXY(1,20); InsLine; GotoXY(15,19); Code:=10; END; END; UNTIL Code=3; Clrscr; END; PROCEDURE Introduction; VAR Choice: Integer; BEGIN Introduction choice(Choice); IF Choice=40 THEN BEGIN TextColor(Title); Writeln(' INTRODUCTION');

Writeln; TextColor (Regular); Writeln('This program resolves stresses and strains in directions different'); Writeln('from those along which stresses and strains are known.'); Writeln; Writeln('The user, after defining the general two dimensional stress system'); Writeln('having Sx, Sy, Txy, can ask the program to solve for the following:') Writeln(' -the principal stress and its plane directions'); Writeln(' -the maximum shear stress and its plane directions'); Writeln(' -the shear and normal stresses for a specified angle Theta' Writeln(' -All the stress states, as Theta is varied, through Mohr's' Writeln(' Circle. The user is reminded that any angle on the circle' Writeln(' corresponds to twice the angle Theta on the real system.' Writeln; Writeln('The general two dimensional stress system will be graphically shown.' Writeln('This will facilitate to describe the sign convention employed, where' Writeln('positive shear stresses produce Clockwise system rotation and positi; Writeln('angle Theta means CounterClockwise rotation.'); Writeln; Proceed; Sign_Convention; END; END; {Initialize Data} PROCEDURE Initialize Data; BEGIN Sx:=0; Sy:=0; Txy:=0; END; {Inputing Data} PROCEDURE ExampleData; BEGIN Sx:=25; Sy:=20; Txy:=5; END; PROCEDURE Read_Data(PosX: Integer); VAR Datastr:string[80]; Error:integer; BEGIN REPEAT Readln(Datastr); IF Length(Datastr)=0 THEN Error:=l; Val(Datastr,Data, Error); IF Error <>0 THEN BEGIN WriteAt (-1,25,Highlite, NoCR,'Invalid data.'); Delay(1000); DelLine; GotoXY(PosX,13); Clreol; END; UNTIL Error=0; END; PROCEDURE Input_Data; BEGIN Clrscr; TextColor(Title); WriteAt(24,11,Normal,CR,'Normal Stress(x) Normal Stress(y) Shear Stress(xy)' TextColor(Title); WriteAt(24,12,Normal,CR,' Sx Sy Txy GotoXY(6,13); TextColor(Title); Write('Data'); GotoXY(24,13); Read Data(24); Sx:=Data; GotoXY(43,13); ReadData(43); Sy:=Data; GotoXY(63,13); Read_Data(63); Txy:=Data;

END; PROCEDURE PrintData; BEGIN Window(l,1, 80,25); Clrscr; TextColor (Title); WriteAt(-1, 12,Normal,CR,'The current values are:'); Writeln; TextColor(Title); WriteAt(-1,14,Normal,CR,'Normal Stress(x) Normal Stress(y) Shear Stress(xy) TextColor (Title); WriteAt(-1,15,Normal,CR,' Sx Sy Txy GotoXY(14,16); Write(Sx:10:4); GotoXY(34,16); Write(Sy:10:4); GotoXY(54,16); Writeln(Txy:10:4); END; PROCEDURE Input_Option; VAR Y: Integer; Stop: Boolean; BEGIN Stop:=False; REPEAT Clrscr; TextColor(Title); Writeln(' **INPUT OPTION**'); TextColor (Regular); Writeln(' Choose an option'); TextColor (Title); Write(' 1');TextColor (Regular);Writeln(' Input Data Directly');TextColor (14); Write (' 2');TextColor(Regular);Writeln(' Load Example Data'); Writeln; Write('Enter selection here:'); Read Code(Y); CASE Y OF 1: BEGIN Stop:=true; Window(1, 1, 80,25); Clrscr; Input_Data; END; 2: BEGIN Stop:=true; Window(1,1,80,25); Example_Data; Print_Data; Proceed; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-2'); Delay(1500); DelLine; END; END; UNTIL Stop=true; END; {Edit Data} PROCEDURE EditData; VAR Q, Code, PosY: integer; Answer:string[80]; BEGIN REPEAT Q:=0; Print Data; PosY:=WhereY+l; Writeln; WriteAt(-1,PosY,Normal,NoCR,'Select variable to be modified,'+'(Sx Sy Txy):'); ClrEOL; Readln (Answer); IF (Answer='Sx') OR (Answer='sx') OR (Answer='SX') THEN

BEGIN ClrScr; WriteAt(-1,13,Normal,NoCR,'Input new value for Sx:'); ClrEOL; Read Data(WhereX); Sx:=Data; END; IF (Answer='Sy') OR (Answer='sy') OR (Answer='SY') THEN BEGIN ClrScr; WriteAt(-1,13,Normal,NoCR,'Input new value for Sy:'); ClrEOL; Read_Data(WhereX); Sy:=Data; END; IF (Answer='Txy') OR (Answer='txy') OR (Answer='TXY') THEN BEGIN ClrScr; WriteAt(-1,13,Normal,NoCR,'Input new value for Txy:'); ClrEOL; Read_Data(WhereX); Txy:=Data; END; REPEAT Print Data; Code:=4; WriteAt(-1,25,Normal,NoCR,'Do you wish to edit another variable? (no):'); ClrEOL; Yes No Answer(code); CASE Code OF 1: Code:=3; 2: BEGIN Code:=3; Q:=45; END; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; UNTIL Q=45; END; {Calculations} PROCEDURE Stresseson Inclined Plane; VAR Theta,STheta,TTheta: Real; BEGIN {Ask User to define the plane by angle(Theta) between plane and horizontal} Clrscr; TextColor (Title); WriteAt(-1,13,Normal, CR,'Angle(Theta) between plane and horizontal:'); GotoXY(61,13); Read Data(61); Theta:=Data; {Calculate Normal Stress(STheta) & Shear Stress(TTheta) along defined plane} STheta:=1/2*(Sy+Sx)+1/2*(Sy-Sx)*COS(PI/180*2*Theta)+Txy*SIN(PI/180*2*Theta); TTheta:=1/2*(Sy-Sx)*SIN(PI/180*2*Theta)-Txy*COS(PI/180*2*Theta); {Print Results on Screen} ClrScr; TextColor (Title); WriteAt(-1,-1,Normal,CR,'The Stresses along the plane defined by angle Theta are: TextColor(Title); WriteAt(-1,14,Normal,CR,' Theta Normal Stress Shear Stress TextColor(Title); WriteAt (-1, 15,Normal, CR,' Stheta Ttheta GotoXY(11,16); Write(Theta: 10:4); GotoXY(31,16); Write(STheta:10:4); GotoXY(52,16); Write(TTheta:10:4);

Proceed; END; PROCEDURE Calculate_Principal_Stresseses_andPlanes; BEGIN IF Sy<>Sx THEN BEGIN Anglel:=180/(2*PI)*ARCTAN(2*Txy/(Sy-Sx)); Angle2:=Anglel+90; END; S1:=1/2* (Sy+Sx)+1/2*SQRT(SQR(Sy-Sx)+4*SQR(Txy)); S2:=1/2*(Sy+Sx)-1/2*SQRT(SQR(Sy-Sx)+4*SQR(Txy)); END; PROCEDURE Printing_Principal_Stresseses_and_Planes; BEGIN TextColor(Title); WriteAt(-1, -l,Normal,NoCr,'The Principal Stresses are:'); GotoXY(23,13); Write(S1:10:4); GotoXY(34,13); Write('and',S2:10:4); TextColor(Title); WriteAt(-1, 15,Normal,NoCr,'The Angles between the Principal Planes and the horizc GotoXY(13,16); IF Sy<>Sx THEN Write(Anglel:10:4,' degrees'); GotoXY(34,16); IF Sy<>Sx THEN Write('and',Angle2:10:4,' degrees'); Proceed; END; PROCEDURE Calculate Maximum ShearStressand Planes; BEGIN IF Sy<>Sx THEN BEGIN Angle3:=180/(PI*2)*ARCTAN(2*Txy/(Sy-Sx))+45; Angle4:=Angle3+90; END; Tmax:=1/2*SQRT(SQR(Sy-Sx)+4*SQR(Txy)); END; PROCEDURE Printing_Maximum_Shear_Stress_and_Planes; BEGIN Clrscr; TextColor (Title); WriteAt(-1,-l,Normal,NoCr,'The Maximum Shear Stress is:'); GotoXY(54,12); Write(Tmax:10:4); TextColor (Title); WriteAt(-1, 14,Normal,NoCr,'The Angles between the horizontal & the planes where t:' occurs are:'); GotoXY(18,15); IF Sy<>Sx THEN Write(Angle3:10:4,' degrees'); GotoXY(39,15); IF Sy<>Sx THEN Write('and',Angle4:10:4,' degrees'); Proceed; END; {Mohr's Circle} PROCEDURE Proceed_Graph; BEGIN WriteAt(67,25,Highlite,NoCR,'CR to Proceed'); Readln; END; PROCEDURE TitleLables; VAR Grid,Axis,SxSy: String[80]; Finish: Boolean; BEGIN Write('Title for graph:'); Readln (Titlename); IF Length(Titlename)=0 THEN Titlename:=Titlenames; Write('Lable for the x-axis(Normal Stress):'); Readln(Xlable);

IF Length(Xlable)=O THEN Xlable:='Normal Stress'; Write('Lable for the y-axis(Shear Stress):'); Readln (Ylable); IF Length(Ylable)=O THEN Ylable:='Shear Stress'; Repeat Write('Axis (yes):'); Readln (Axis); IF Length(Axis)=O THEN AxisCode:=2; IF (Grid='no') or (Grid='n') THEN GridCode:=l; IF (Grid='yes') OR (Grid='y') THEN GridCode:=2; Case AxisCode of 1: Finish:=True; 2: Finish:=True; ELSE BEGIN WriteAt(-1,25,Highlite, NoCR,'Must answer yes or no'); Delay(1500); DelLine; END; END; UNTIL Finish=True; Finish:=False; Repeat Write('Grid scale(no):'); Readln(Grid); IF Length(Grid)=O THEN GridCode:=l; IF (Grid='no') or (Grid='n') THEN GridCode:=1; IF (Grid='yes') OR (Grid='y') THEN GridCode:=2; Case GridCode of 1: Finish:=True; 2: Finish:=True; ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no'); Delay(1500); DelLine; END; END; UNTIL Finish=True; Finish:=False; Repeat Write('Connect Sx to Sy(yes):'); Readln(SxSy); IF Length(SxSy)O0 THEN SxSyCode:=2; IF (SxSy='no') or (SxSy='n') THEN SxSyCode:=l; IF (SxSy=-'yes') OR (SxSy='y') THEN SxSyCode:=2; Case SxSyCode of 1: Finish:=True; 2: Finish:=-True; ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no'); Delay(1500); DelLine; END; END; UNTIL Finish=True; END; PROCEDURE PrintTitleLables; VAR XlableCent,YlableCent,B: Integer; YChar: String[l]; BEGIN TextColor(Title); WriteAt (-1, l, Normal,NoCR, Titlename); XlableCent:=3+((76-Length(Xlable)) DIV 2); WriteAt(XlableCent,25,Normal,NoCR,Xlable); YlableCent:=2+(20-Length(Ylable)) DIV 2; For B:=l to Length(Ylable) DO BEGIN YChar:=Copy(Ylable,B, 1); WriteAt (1, YlableCent+b, Normal, NoCR, YChar); END; END;

PROCEDURE Grid; VAR M,L,K,N: Integer; BEGIN L:=11; For M:=1 to 8 DO BEGIN FOR K:=40 TO 69 DO BEGIN N:=K+5; Draw(K, L,N,L, 1); K:=N+14; END; L:=L+24; END; L:=42; For M:=1 to 11 DO BEGIN FOR K:=11 TO 29 DO BEGIN N:=K+2; Draw(L, K, L, N, 1); K:=N+6; END; L:=L+59; END; END; PROCEDURE Divisions; VAR M,L,Xaxis: Integer; BEGIN L:=11; Xaxis:=Trunc (42+ (590/(Xmax-Xmin)* (0-Xmin))); For M:=1 to 10 DO BEGIN Draw (Xaxis-2, L, Xaxis+2,L, 1); L:=L+24; END; L:=42; For M:=l to 11 DO BEGIN Draw(L, 93,L,97,1); L:=L+59; END; END; PROCEDURE XYMaxMin; BEGIN Ymin:=-l*Tmax; Xmin:=S2; Ymax:=Tmax; Xmax:=S1; END; PROCEDURE Axis; VAR Xaxis: Integer; BEGIN IF AxisCode=2 THEN BEGIN Xaxis:=Trunc (42+(590/(Xmax-Xmin) * (0-Xmin))); IF (Xmin<0) AND (Xmax>0) THEN Draw(Xaxis, 11,Xaxis,179,1); Draw(40,95,632,95,1); END; END; PROCEDURE ScalesXY;

VAR M, L: Integer; Xscalenumbers,Yscalenumbers:Array[1..11] of REAL; XIncrement, YIncrement:Real; BEGIN IF GridCode=2 THEN Grid ELSE Divisions; XIncrement:= (Xmax-Xmin)/10; YIncrement:= (Ymax-Ymin)/7; Xscalenumbers [l]:=Xmin; For L:=2 to 11 DO Xscalenumbers [L]:=Xscalenumbers [L-1]+XIncrement; Yscalenumbers [1]: =Ymin; FOR L:=2 to 8 DO Yscalenumbers [L]:=Yscalenumbers [L-1]+YIncrement; GotoXY(5, 24); Write (Xscalenumbers [1]:4:2); GotoXY(12,24); Write (Xscalenumbers [2]:4:2); GotoXY(19,24); Write (Xscalenumbers [3]:4:2); GotoXY(27,24); Write (Xscalenumbers [4]:4:2); GotoXY(34,24); Write (Xscalenumbers [5]:4:2); GotoXY(42,24); Write (Xscalenumbers [6]:4:2); GotoXY(49,24); Write (Xscalenumbers [7]:4:2); GotoXY(56,24); Write (Xscalenumbers [8]:4:2); GotoXY(63,24); Write (Xscalenumbers[9]:4:2); GotoXY(70,24); Write (Xscalenumbers [10]:4:2); GotoXY(76,24); Write (Xscalenumbers[11]:4:2); M:=2; For L:=1 to 8 DO BEGIN GotoXY(2,M); Write (Yscalenumbers [9-L]:4:0); M:=M+3; END; END; PROCEDURE XYConversion; VAR L: Integer; M: Real; BEGIN FOR L:=0 to 360 DO BEGIN M:=L*PI/180; Xarray[L]:=1/2*(S1+S2)+1/2*(Sl-S2)*COS(M); Yarray[L]:=1/2*(S1-S2)*SIN(M); XConv[L]:=Trunc(42+(590/(Xmax-Xmin)*(Xarray[L]-Xmin))); YConv[L]:=Trunc(179-(168/(Ymax-Ymin)*(Yarray[L]-Ymin))); END; END; PROCEDURE Print Exes; VAR M,L: Integer; BEGIN

Draw(XConv [M] -2, YConv [M]+2, XConv[M] +2, YConv [M]-2,1); Draw(XConv [M] -2,YConv [M] -2, XConv [M] +2, YConv [M] +2,1); M:=90; Draw(XConv [M] -2,YConv [M] +2, XConv [M] +2,YConv [M] -2, 1); Draw(XConv [M] -2,YConv [M] -2,XConv [M] +2,YConv [M] +2, 1); M:=180; Draw (XConv [M] -2, YConv [M] +2, XConv [M] +2,YConv [M] -2,1); Draw(XConv[M]-2,YConv[M]-2,XConv[M]+2,YConv[M]+2,1); IF Anglel>0 THEN M:=Trunc(360-Anglel*2) ELSE M:=Trunc(-Anglel*2); Draw(XConv [M] -2, YConv [M] +2, XConv [M] +2, YConv [M]-2,1); Draw(XConv [M] -2, YConv [M]-2, XConv[M] +2, YConv [M] +2,1); IF Angle2>0 THEN L:=Trunc(360-Angle2*2) ELSE L:=Trunc(-Angle2*2); Draw(XConv[L]-2,YConv[L]+2,XConv[L]+2,YConv[L]-2,1); Draw(XConv[L]-2,YConv[L]-2,XConv[L]+2,YConv[L]+2,1); IF SxSyCode=2 THEN Draw(XConv[L],YConv[L],XConv[M],YConv[M],l); END; PROCEDURE Trace; VAR M,L: Integer; BEGIN FOR M:=1 to 360 DO BEGIN L:=M-1; IF XConv[L]>=42 THEN Draw(XConv [L],YConv [L],XConv [M],YConv [M],1); END; END; PROCEDURE Plot Circle; BEGIN ClrScr; Titlenames:=-'Mohr s Circle'; Title Lables; Hires; Print TitleLables; XY MaxMin; IF Xmax<>Xmin THEN BEGIN Axis; ScalesXY; XYConversion; PrintExes; Trace; END ELSE WriteAt(-l,-1,Normal,NoCR,'Mohr's Circle is a point'); Proceed_Graph; Textmode; END; PROCEDURE Menu_Computations; VAR J Integer; BEGIN REPEAT Clrscr; Window(29,10,80,25); Clrscr; TextColor (Title); Writeln('Computations Menu'); Writeln; TextColor (14); Write('l'); TextColor(Regular); Writeln(' Stresses on an Inclined Plane'); TextColor(14); Write('2'); TextColor(Regular); Writeln(' Principal Stress & Planes'); TextColor(14); Write('3'); TextColor(Regular); Writeln(' Maximum Shear Stress'); TextColor(Title); Write('4'); TextColor(Regular); Writeln(' Mohr's Circle'); TextColor (Title); Write('5'); TextColor(Regular);

Writeln(' Numbers 2-4 Above'); TextColor (Title); Write(' 6'); TextColor(Regular); Writeln(' Return to Main Menu'); Writeln; Write('Enter selection here:'); J:=0; Read Code(J); CASE J OF 0: Writeln; 1: BEGIN Clrscr; Window(1,1,80,25); Stresses on Inclined Plane; END; 2: BEGIN Clrscr; Window(1,1,80,25); Calculate Principal_Stresses_and_Planes; Printing_Principal_Stresses_and_Planes; END; 3: BEGIN Clrscr; Window(1,1,80,25); Calculate Maximum ShearStressand Planes; Printing_Maximum_Shear_Stress_and_Planes; END; 4: BEGIN Clrscr; Window(1,1,80,25); Calculate Principal Stressesand Planes; Calculate Maximum ShearStressand Planes; Plot Circle; END; 5: BEGIN Clrscr; Window(1,1,80,25); Calculate_Principal Stresses and Planes; Calculate Maximum Shear Stressand Planes; Printing_Principal_Stresses and_Planes; Printing_Maximum_Shear_Stress_andPlanes; PlotCircle; END; 6: Writeln; ELSE BEGIN Writeln; WriteAt(-1,25,Highlite,NoCR,'Code outside of range 1-6'); Delay(1500); DelLine; END; END; UNTIL J=6; END; {Exit} PROCEDURE Exit; VAR Code: integer; Answer:String[80]; BEGIN REPEAT WriteAt(-1,-1,Normal,NoCR,'Exiting program? (yes):'); ClrEOL; Readln (Answer); IF Length(Answer)=0 THEN Code:=l; IF (Answer='yes') OR (Answer='y') THEN Code:=l; IF (Answer='no') OR (Answer='n') THEN Code:=2; CASE Code OF 1: BEGIN Quit:=true; Code:=3; END; 2: Code:=3;

ELSE BEGIN WriteAt(-1,25,Highlite,NoCR,'Must answer yes or no and hit return:'); Delay(1500); DelLine; END; END; UNTIL Code=3; END; {Main Program} BEGIN LowVideo; Clrscr; Header; Introduction; Quit:=False; Initialize Data; REPEAT {start main menu} Clrscr; Window(29,10,80,25); Clrscr; TextColor(Title); Writeln('**MAIN MENU**'); TextColor(Regular); Writeln(' Choose an Option'); Writeln; TextColor (Title); Write(' l');TextColor(Regular);Writeln(' Positive Sign Convention Used'); TextColor (14); Write(' 2');TextColor(Regular);Writeln(' List Current Data');TextColor(14); Write(' 3');TextColor (Regular);Writeln(' Input Data');TextColor(Title); Write(' 4');TextColor(Regular);Writeln(' Edit Data'); TextColor(Title); Write (' 5');TextColor(Regular);Writeln(' Computations');TextColor(Title); Write(' 6');TextColor(Regular);Writeln(' Exit Program'); Writeln; WriteAt (-1,21,Normal,NoCR,'Enter selection here:'); ClrEOL; Z:=0; Read Code(Z); Writeln; CASE Z OF 0: Writeln; 1: BEGIN Window(1,1,80,25); Clrscr; Sign_Convention; END; 2: BEGIN Print Data; Proceed; END; 3: BEGIN Input_Option; END; 4: Edit Data; 5: Menu_Computations; 6: BEGIN Window(1,1,180,25); ClrScr; Exit; END; ELSE BEGIN WriteAt(-1,25,HighLite,NoCR,'Code outside of range'); Delay(1500); DelLine; END; END; UNTIL Quit=true; END.

UNIVERSITY OF MICHIGAN 3 Illlll10ll3695llli 63! 9 l4llll 3 9015 03695 5394