You are on page 1of 494

Intermediate Attack in Crevice Corrosion by Cathodic Focusing

A Dissertation Presented to the Faculty of the School of Engineering and Applied Science University of Virginia

In Partial Fulfillment of the Requirements for the Degree

Doctor of Philosophy(Materials Science and Engineering) by Kevin C. Stewart

August 1999

ii APPROVAL SHEET This Dissertation is submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy (Materials Science and Engineering)

______________________ Kevin C. Stewart

This dissertation has been read and approved by the examining committee:

______________________ Robert G. Kelly (Advisor)

______________________ William C. Johnson (Committee Chairman)

______________________ Andrew C. Hillier

______________________ Robert J. Ribando

______________________ Narasi Sridhar Accepted for the School of Engineering and Applied Science:

iii ______________________ Richard W. Miksad Dean, School of Engineering and Applied Science

Abstract
Intermediate attack (IA) is an interesting phenomenon in crevice corrosion. The typical morphology of crevice attack shows an unattacked region near the crevice mouth, a region of extensive damage at slightly greater depths and an additional unattacked region at still greater depths. This pattern suggests that crevice corrosion is governed by the interaction between two forces. One force accelerates corrosion with increasing depth into a crevice. The other force acts to retard dissolution as distance from the crevice mouth increases. This second, ameliorative force, is not accounted for in conventional theories of crevice corrosion. Traditionally, the exciting force in crevice corrosion is thought to be either acidification due to metal cation hydrolysis, the Critical Crevice Solution Model, (CCS ), or depolarization of a passivated material, the Critical Potential Drop Model (IR*). One potential mitigating force for corrosion is reduction in driving force due to resistive potential drop. This explanation lacking in that IR losses can only depolarize a material to its open circuit value. Corrosion rates can be significant even at open circuit in the highly aggressive, acidic chloride environments which are thought to exist in crevices. A superior theory to explain IA is the Cathodic Focusing (CF) model which is developed in this dissertation. It accounts for the chemical effects of cathodic reactions inside a crevice. These reactions are especially important in those regions of the crevice that are at or near the open circuit potential. Many of the likely cathodic reactions generate hydroxyl ions

iv which will raise the local pH. This pH rise can be very protective of the crevice material. In order to test and explore the suitability of the CCS and IR* models to predict IA a new code for modeling crevice corrosion was needed. This dissertation presents the background and verification of CREVICER, a new code for modeling crevice corrosion. The code is a 2-D(+), temporal FEM code for the generation and transport of electrochemical species. One of the codes major strengths is that it is object-oriented and thus can be easily modified to model many different material-environment systems of crevice corrosion or environmental cracking. This dissertation concludes by using CREVICER to compare each of the three theories, CCS, IR*, and CF, and their ability to model IA. The superior performance of the CF model suggests that alkalinization is the ameliorative force in crevice corrosion and that there is the possibility of augmenting the alkalinization to reduce or prevent crevice corrosion.

Acknowledgements
I would like to thank some of the many people who have lent me a hand during my decade in the Department of Material Science and Engineering here at UVA. Rob, Dot and Connor Kelly for not only was Robs door open, so was the Kelly home. Ray Taylor and Louie Scribner for bringing me into the CESE and helping me grow through all (emphasis on all) the newbie mistakes. Lisa Young and Meredith Leggat for letting me crash on various items of their furniture when I was homeless. Lisa DeJong for bringing the CREVICER code into form that is usable by someone other than ourselves and experimentally verifying the code in ways that are beyond my ability. Ray Kilmer, Steve Smith, Jeff Poirier, Rusty Wright, Peter Schare and everyone else who taught me to weigh, mix, saw tighten or scan safely and accurately. Mom, Dad, Sean and Mara for whom when is finally now. Some peoples lives have character, mine is full of characters. A few of those who graced my life in Charlottesville: Brian Connolly was always ready to talk about corrosion, the world or history. Rob Leggat participated actively, if unknowingly, in the sport of kings when he first arrived. Id like to think that negative reinforcement turned him into the careful, wary researcher he is today. Chad Hunter and Ted Sheridan introduced me to the other sport of kings. Daryl Little and Kevin Cooper tolerated many slurs on our great neighbor to the north. Guys, In case we really are warming, save a place for me. Amber Mierisch. In the battle of man verus nature I suppose someone has to root for the opposing team. Youd be a fair referee because you make people back up their numbers. George Young and Steve Yu. You helped me improve my reflexes, hand-eye coordination and predictive capabilities. If we are ever invaded by aliens, the world will thank you. Lysle Montes. Size does not count for as much as heart in either life or the weight room and yours makes you stand tall in both places. Dave Kolman, Markus Wittman and Rob Cook. Experimental verification is always a good thing. The mint could have been lying about the melting temperature of pennies. Jen Lillard and Doug Wall pioneered the concept of finding a school you liked and sticking with it. In your footsteps have I followed.

vi

Table of Contents
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii List of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.1 Phenomenology of Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.2 Importance of Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.3 Causes of Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.4 Unanswered Questions about Crevice Corrosion . . . . . . . . . . . . . . 10 1.3 Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3.1 Difficulties with Experimentation in Crevice Corrosion . . . . . . . . 12 1.3.2 Increasing the Utility of Experimental Data . . . . . . . . . . . . . . . . . . 13 1.3.3 Acting as a virtual experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.4 Scope of Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

vii 2.1 Basic Electrochemistry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.1 Electrochemical Reactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.2 Thermodynamics of Electrochemical Reactions . . . . . . . . . . . . . . . 22 2.1.2.1 Thermodynamic Effects of Concentration . . . . . . . . . . . . 23 2.1.2.2 Thermodynamic Effects of Potential . . . . . . . . . . . . . . . . 25 2.1.3 Half-cell Kinetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.1.3.1 Activation Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.1.3.1.1 Butler-Volmer Equation . . . . . . . . . . . . . . . . . . 35 2.1.3.2 Mass Transfer Control . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 2.1.4 Polarization Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.2 Theories of Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.2.1 CCS Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.2.2 IR* Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.2.3 Comparison of Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.3 Principles of Modeling Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . 60 2.3.1 Governing Equations Commonly Used in Crevice Corrosion . . . . 61 2.3.1.1 Chemical Transport Processes . . . . . . . . . . . . . . . . . . . . . 61 2.3.1.1.1 Convection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 2.3.1.1.2 Diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 2.3.1.1.3 Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 2.3.1.2 Mass Transport Equation . . . . . . . . . . . . . . . . . . . . . . . . . 68

viii 2.3.1.3 Conservation of Mass . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.3.1.4 Electrical Transport Processes . . . . . . . . . . . . . . . . . . . . . 73 2.3.1.5 Alternate Approach to Calculating Electric Field . . . . . . 79 2.3.1.6 Charge Neutrality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 2.3.2 Examination of Terms Used in Crevice Corrosion Modeling . . . . 84 2.3.2.1 Use of Concentration rather than Activity in Diffusion . . 84 2.3.2.2 Transport Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 2.3.2.2.1 Ion/Ion Interaction Effects . . . . . . . . . . . . . . . . 89 2.3.2.2.1.1 Empirical Correlation . . . . . . . . . . . . . 89 2.3.2.2.1.2 Use of Activity Coefficients for Diffusivities . . . . . . . . . . . . . . . . . . . . 95 2.3.2.2.2 Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 2.3.2.2.3 Porosity/Tortuousity . . . . . . . . . . . . . . . . . . . . . 97 2.3.2.3 Generation of Chemical Species . . . . . . . . . . . . . . . . . . . 98 2.3.2.3.1 Heterogeneous Reactions . . . . . . . . . . . . . . . . . 99 2.3.2.3.1.1 Stoichiometric Dissolution . . . . . . . 104 2.3.2.3.2 Homogeneous Reactions . . . . . . . . . . . . . . . . . 106 2.3.2.3.2.1 Hydrolysis . . . . . . . . . . . . . . . . . . . . 107 2.3.2.3.2.2 Chemical Precipitation/Hydrolysis . 120 2.3.2.3.2.3 Homogeneous Oxidation . . . . . . . . . 121 2.3.2.4 Potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

ix 2.3.2.4.1 Electrochemical Potential . . . . . . . . . . . . . . . . 122 2.3.2.4.2 Solution Potential . . . . . . . . . . . . . . . . . . . . . . 123 2.3.2.4.3 Diffusion Potential . . . . . . . . . . . . . . . . . . . . . 126 2.3.3 Common Simplifications in Modeling Crevice Corrosion . . . . . . 138 2.3.3.1 Elimination of Thermodynamic Variables . . . . . . . . . . . 140 2.3.3.1.1 Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . 140 2.3.3.1.2 Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 2.3.3.2 Simplification of Chemical Effects . . . . . . . . . . . . . . . . 146 2.3.3.2.1 Transport Coefficients . . . . . . . . . . . . . . . . . . 146 2.3.3.2.2 Dilute Solution Approximation . . . . . . . . . . . 147 2.3.3.2.3 Generation Rates . . . . . . . . . . . . . . . . . . . . . . . 147 2.3.3.2.4 Hydrolysis Reactions . . . . . . . . . . . . . . . . . . . 148 2.3.3.3 Simplification of Potential Effects . . . . . . . . . . . . . . . . . 149 2.3.3.3.1 Assuming No Migration . . . . . . . . . . . . . . . . . 149 2.3.3.3.2 Assuming No Diffusion Potential . . . . . . . . . . 149 2.3.3.3.3 Assuming Charge Neutrality . . . . . . . . . . . . . . 149 2.3.3.3.4 Generation Rates . . . . . . . . . . . . . . . . . . . . . . . 150 2.3.3.4 Ignoring Temporal Effects . . . . . . . . . . . . . . . . . . . . . . . 150 2.3.3.5 Simplifying Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . 151 2.3.4 Methods of Solution for Crevice Corrosion Models . . . . . . . . . . . 153 2.3.4.1 Analytic Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

x 2.3.4.1.2 Misuse of Analytic Solutions . . . . . . . . . . . . . 155 2.3.4.2 Numerical Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 2.3.4.2.1 Finite Difference Method . . . . . . . . . . . . . . . . 159 2.3.4.2.2 Boundary Element Method . . . . . . . . . . . . . . . 163 2.3.4.2.3 Finite Element Method . . . . . . . . . . . . . . . . . . 163 2.3.4.3 Issues in Choosing Methods of Solution . . . . . . . . . . . . 167 2.4 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

3 Definition of the CREVICER Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 3.1 General Aspects of Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 3.2 Object Oriented Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 3.3 Finite Element Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 3.3.1 Spatial FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 3.3.1.1 Limitations of Spatial FEM . . . . . . . . . . . . . . . . . . . . . . 221 3.3.2 Temporal FD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 3.3.2.1 Limitations of Temporal FD . . . . . . . . . . . . . . . . . . . . . 228 3.4 Applications of FEM to Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . 229 3.5 Program Structure and Simplifications Used in CREVICER . . . . . . . . . . . 232 3.5.1 Program Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 3.5.2 Simplifications in CREVICER . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 3.5.2.1 Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

xi 3.5.2.2 Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 3.5.2.3 Heterogeneous and Homogeneous Reactions . . . . . . . . 242 3.5.2.4 Derived Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

4 Model Verification and Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 4.1 Comparisons of CREVICER to Analytic Solutions . . . . . . . . . . . . . . . 247 4.1.1 Test Cases Evaluating Potential . . . . . . . . . . . . . . . . . . . . . . . . . . 249 4.1.1.1 One-D Crevice With Active Tip and Passive Flanks . . . 249 4.1.1.2 One-D Crevice With Active Flanks and Passive Tip . . . 256 4.1.1.3 Case 3 - One-D Crevice With Active Flanks and Active Tip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 4.1.1.4 Case 4 - One-D Crevice With Active Tip and Varying Solution Conductivity . . . . . . . . . . . . . . . . . . . . . . . . . . 270 4.1.1.5 One-D Crevice With Active Walls, Passive Tip and Varying Solution Conductivity . . . . . . . . . . . . . . . . . . . 277 4.1.1.6 Case 6 - Two-D Crevice With Passive Walls and Active Tip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 4.1.1.7 Case 7 - Two-D Crevice With Active Walls . . . . . . . . . 292 4.1.1.8 Case 8 - One-D Wedge with Varying Height and Active . Tip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 4.1.1.9 Case 9 - One-D Wedge With Varying Height and Active

xii Sides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 4.1.2 Test Cases Evaluating Mass Transport . . . . . . . . . . . . . . . . . . . . . 313 4.1.2.1 Case 10 - One-D Mass Transport of Chemical Species . 313 4.1.2.2 Case 11 - One-D Mass Transport of Chemical Species With Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 4.1.3 Test Case Evaluating Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 4.1.3.1 Case 12 - Transient Diffusion of Chemical Species . . . 328 4.2 Limitations of Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 4.2.1 Discretization Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 4.2.2 Peclet Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 4.2.3 Courant Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

4.2.4 dI/dE Stability Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 4.2.5 Variable Coefficient-Induced Stability Limitations . . . . . . . . . . . 338

5 Intermediate Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 5.1 Phenomenology of Intermediate Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 5.2 Standard Theories Applied to IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 5.2.1 CCS Theory Applied to IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 5.2.2 IR* Theory applied to IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 5.2.3 IA as a Transient Phenomenon . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 5.3 Hydrolysis Reactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

xiii 5.4 Cathodic Focusing Theory of IA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 5.5 Modelling of IA by IR*, CCS and CF by CREVICER . . . . . . . . . . . . . . . . 367 5.5.1 IA by the IR* Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 5.5.2 CCS Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 5.5.3 IA by the CCS model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 5.5.4 IA by the CF Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403

7 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 7.1 Code Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 7.2 Model Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 Appendix A: CREVICER Code Printout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 Appendix B: constant.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 Appendix C: tchem.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 Appendix D: tchem.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 Appendix E: taspecie.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 Appendix F: taspecie.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 Appendix G: tallspec.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446

xiv Appendix H: tallspec.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 Appendix I: treactio.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 Appendix J: treactio.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Appendix K: tmateria.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 Appendix L: tmateria.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Appendix M: fem.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 Appendix N: fem.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 Appendix O: solver.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 Appendix P: solver.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516 Appendix Q: chemtest.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 Appendix R: nosq8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 Appendix S: elsq8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541

xv

List of Tables
Chapter 2 1. Formation Quotients for Chromium Species . . . . . . . . . . . . . . . . . . . . . . . . . 109 2. Formation Quotients for Aluminum Species . . . . . . . . . . . . . . . . . . . . . . . . . 111 3. Diffusivities of Various Ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 4. Diffusion Potentials for Various Salts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 5. Data and Symbols for Literature Review Table . . . . . . . . . . . . . . . . . . . . . . . 170 6. Literature Review Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

Chapter 3 7. Types of Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 8. Parameter Values of Kt and used to Select Time Solution Method . . . . . . 226 9. Relation of Courant Number to Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 10. Correspondence Between FEM Coefficients and Physical Terms (Electrical Transport) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 11. Correspondence Between FEM Coefficients and Physical Terms (Chemical Transport) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

Chapter 4 12. Model Conditions for Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

xvi 13. Goodness of fit for Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 14. Model Conditions for Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 15. Goodness of fit for Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 16. Model Conditions for Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 17. Goodness of fit for Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 18. Model Conditions for Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 19. Goodness of fit for Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 20. Model Conditions for Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 21. Goodness of fit for Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 22. Model Conditions for Case 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 23. Goodness of fit for Case 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 24. Model Conditions for Case 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 25. Goodness of fit for Case 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 26. Model Conditions for Case 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 27. Goodness of fit for Case 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 28. Model Conditions for Case 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 29. Goodness of fit for Case 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 30. Model Conditions for Case 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 31. FEM Parameters in Terms of Physical Constants for Case 10 . . . . . . . . . . 316 32. Goodness of fit for Case 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 33. Model Conditions for Case 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

xvii 34. FEM Parameters in Terms of Physical Constants for Case 11 . . . . . . . . . . 323 35. Goodness of fit for Case 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 36. Model Conditions for Case 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

Chapter 5 37. Equilibrium pHs for Various Cations when Created Electrochemically . . 358 38. Composition of the Stainless Steel 304 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 39. Model Parameters for Modeling IA by the IR* Model . . . . . . . . . . . . . . . . 368 40. Polynomial Coefficients for fit of Valdes-Moldon Data . . . . . . . . . . . . . . . 369 41. Model Parameters for Modeling the CCS Model . . . . . . . . . . . . . . . . . . . . 375 42. Model Parameters for Modeling IA by the CCS/IA Model . . . . . . . . . . . . . 382 43. Model Parameters for Modeling IA by the CF Model . . . . . . . . . . . . . . . . . 391

xviii

List of Figures
Chapter 1 1.2.1(a) Schematic of Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.1(b) Terms and Directions of Crevices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Chapter 2 2.1.3(a) Effect of Potential on Kinetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.1.4(a) Evans Diagram of a Single Reaction . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.1.4(b) Evans Diagram of Two Reactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.1.4(c) Evans Diagram of an Active/Passive Metal . . . . . . . . . . . . . . . . . . . . . . 45 2.2.1(a) Illustration of CCS Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.2.1(b) Schematic of CCS Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.2.2(a) Illustration of IR* Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.2.2(b) Schematic of IR* Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 2.3.1.4(b) Translation of Areal into Volume Flux . . . . . . . . . . . . . . . . . . . . . . . . 78 2.3.2.2.1.1(a) Dependence of Equivalent Conductivity on Ionic Strength . . . . . 92 2.3.2.2.1.1(b) Dependence of Diffusivity on Concentration . . . . . . . . . . . . . . . . 93 2.3.2.2.1.1(c) Dependence of Activity on Molality . . . . . . . . . . . . . . . . . . . . . . . 94 2.3.2.3.1(a) Methods of Approximating Polarization Curves . . . . . . . . . . . . . . 103 2.3.2.3.2.1(a) Speciation of Chromium Hydrolysis Products . . . . . . . . . . . . . . 118

xix 2.3.2.3.2.1(b) Speciation of Chromium Hydrolysis Products . . . . . . . . . . . . . . 119 2.3.2.4.2.(a) Relationships between s, metal, and E . . . . . . . . . . . . . . . . . . . . . 125 2.3.2.4.3.(a) Illustration of Diffusion Potential Causes . . . . . . . . . . . . . . . . . . . 136 2.3.2.4.3.(b) Diffusion Potential for Reservoirs of Different Ratios of NaCl . . 137 2.3.4.2.1(a) Illustration of Explicit, Implicit and Crank-Nicolson Methods . . . 162 2.3.4.2.3(a) Shape and Pyramid Functions for FEM . . . . . . . . . . . . . . . . . . . . . 166

Chapter 3 3.2(a) Illustration of an Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 3.2(b) Illustration of Encapsulization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 3.2(c) Illustration of Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 3.2(d) Illustration of Classes of Information in CREVICER . . . . . . . . . . . . . . . 215 3.3.1(a) Illustration of a 2-D FEM Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 3.5.1(a) Illustration of Data Flow in CREVICER . . . . . . . . . . . . . . . . . . . . . . . 237 3.5.1(b) Objects of CREVICER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

Chapter 4 4.1.1.1(a) Crevice Geometry for Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 4.1.1.1(b) Potential Distribution for Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 4.1.1.2(a) Crevice Geometry for Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 4.1.1.2(b) Potential Distribution for Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

xx 4.1.1.3(a) Crevice Geometry for Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 4.1.1.3(b) Potential Distribution for Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 4.1.1.4(a) Crevice Geometry for Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 4.1.1.4(b) Potential Distribution for Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 4.1.1.5(a) Crevice Geometry for Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 4.1.1.5(b) Potential Distribution for Case 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 4.1.1.6(a) Crevice Geometry for Case 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 4.1.1.6(b) Surface Plot of Potential Distribution for Case 6 . . . . . . . . . . . . . . . 290 4.1.1.6(c) Potential Distribution for Case 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 4.1.1.7(a) Crevice Geometry for Case 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 4.1.1.7(b) Surface Plot of Potential Distribution for Case 7 . . . . . . . . . . . . . . . 298 4.1.1.7(c) Potential Distribution for Case 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 4.1.1.8(a) Crevice Geometry for Case 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 4.1.1.8(b) Potential Distribution for Case 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 4.1.1.9(a) Crevice Geometry for Case 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 4.1.1.9(b) Potential Distribution for Case 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 4.1.2.1(a) Crevice Geometry for Case 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 4.1.2.1(b) Concentration Distributions for Case 10 . . . . . . . . . . . . . . . . . . . . . . 319 4.1.2.2(a) Crevice Geometry for Case 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 4.1.2.2(b) Concentration Distributions for Case 11 . . . . . . . . . . . . . . . . . . . . . . 326 4.1.2.2(c) Migration, Diffusion and Total Fluxes for Case 11 . . . . . . . . . . . . . . 327

xxi 4.1.3.1(a) Crevice Geometry for Case 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 4.1.3.1(b) Concentration Distributions for Case 12 . . . . . . . . . . . . . . . . . . . . . . 333

Chapter 5 5.1.1.1(a) Schematic of Crevice Corrosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 5.1.1.1(b) Photograph of Creviced 304 Sample . . . . . . . . . . . . . . . . . . . . . . . . . 345 5.1.1.1(c) Terms Used to Describe Crevice Corrosion . . . . . . . . . . . . . . . . . . . 346 5.2.1(a) IA by the CCS Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 5.2.2.(a) IA by the IR* Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 5.3(a) OH- Consumption and Speciation via hydrolysis of Cr+3 at Different pHs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 5.3(b) OH- Consumption via Hydrolysis of 304 and its Components at Different pHs 362 5.3(c) pH of 304 and its Components When Dissolved Electrochemically at Different Fractional Cathodic Currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 5.4.1(a) IA by the CF Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 5.5.1(a) Geometry for Model of IA by the CCS Mechanism . . . . . . . . . . . . . . 371 5.5.1(b) Polarization Curve for Model of IA by the CCS Mechanism . . . . . . . 372 5.5.1(c) Resulting Current and Potential Distributions for Model of IA by the CCS Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 5.5.2(a) Geometry for Model of CCS Mechanism . . . . . . . . . . . . . . . . . . . . . . 377 5.5.2(b) Polarization Curves for Model of CCS Mechanism . . . . . . . . . . . . . . 378

xxii 5.5.2(c) pH Distribution at Different Times for Model of CCS Mechanism . . 379 5.5.2(d) Dissolution Current Density Distribution at Different Times for Model of CCS Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 5.5.3(a) Geometry for Model of CCS/IA Mechanism . . . . . . . . . . . . . . . . . . . 384 5.5.3(b) Polarization Curves for Model of CCS/IA Mechanism . . . . . . . . . . . 385 5.5.3(c) E Distribution at Different Times for Model of CCS/IA Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 5.5.3(d) pH Distribution at Different Times for Model of CCS/IA Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 5.5.3(e) Dissolution Current Density Distribution at Different Times for Model of CCS/IA Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 5.5.3(f) Quasi-Polarization Curves at Different Times for Model of CCS/IA Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 5.5.4(a) Geometry for Model of CF Mechanism . . . . . . . . . . . . . . . . . . . . . . . 395 5.5.4(b) Polarization Curves for Model of CF Mechanism . . . . . . . . . . . . . . . 396 5.5.4(c) E Distribution at Different Times for Model of CF Mechanism . . . . . 397 5.5.4(d) pH Distribution at Different Times for Model of CF Mechanism . . . 398 5.5.4(e) Dissolution Current Density Distribution at Different Times for Model of CF Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 5.5.4(f) Quasi-Polarization Curves at Different Times for Model of CCS/IA Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400

xxiii 5.5.4(g) Distribution of Cathodic/Anodic Current Ratios at Different Times for Model of CF Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 5.5.4(h) pH Distribution at Different Times for Model of CF Mechanism for 5 cm crevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402

xxiv

List of Symbols
a . . . . . . . . . . . . . . . . . . . . . . . . . . . . tabulated constant for hydrolysis reactions [unitless] a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . stoichiometeric coefficient for species A [unitless] ai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . activity of species i [unitless] a/oi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . atomic fraction of species i [unitless] A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . corroding surface area [m2] A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reacting species [unitless] Ab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Frequency Factor for back reaction [m/s] Af . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Frequency Factor for forward reaction [m/s] b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . tabulated constant for hydrolysis reactions [l/mol] b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . stoichiometeric coefficient for species B [unitless] B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reacting species [unitless] 0 B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coefficient of Debye-Huckel Limiting Law

c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . stoichiometeric coefficient for species C [unitless] cp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . specific heat of water 4.184 [J/g-K] C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reacting species [unitless] Ci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . concentration of species i [mol/m3] Cmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . maximum concentration [mol/m3] Cmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . minimum conductivity [mol/m3] LC i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . gradient of concentration of species i [mol/m4]

xxv Di . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . diffusivity of species i [m2/s] Di0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . diffusivity of species i at infinite dilution [m2/s]

E . . . . . . . . . . . . . . . . . . . electrochemical potential of the reaction across an interface [V] Eeq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . equilibrium potential [V] P E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . electric field [V/m]

F . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Faradays constant = 96,487 [C/eq] Fi,mig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . force for migration of species i [N] g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . gravitational acceleration [m/s2] Gi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . molar Gibbs free energy of species i [J/mol] G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . change in Gibbs Free Energy [J/mol] G0a* . . . . . . . . . . . standard Gibbs free energy of activation for an anodic process [J/mol] G0c* . . . . . . . . . . standard Gibbs free energy of activation for a cathodic process [J/mol] Ga* . . . . . . . . . . . . . . . . . Gibbs free energy of activation for an anodic reaction [J/mol] Gc* . . . . . . . . . . . . . . . . . Gibbs free energy of activation for a cathodic reaction [J/mol] h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . height of the volume [m] i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . current density across an interface [A/m2] i0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . exchange current density [A/m2] I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ionic strength [eq2/mol-l] Ian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . total anodic current [A]

xxvi Ica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . total cathodic current [A] Javg . . . . . . . . . . . . . . . . . . . flux of atoms from the alloy on an averaged basis [mol/m2-s] Jel . . . . . . . . . . . . . . . . . . . . . . . . . net electric current density vector in solution [A/m2]

Jel,i . . . . . . . . . . . . . . . . . . . electrical current density vector due only to species i [A/m2] Ji . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . flux of species i across an interface [mol/m2-s] Ji Ji,force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . total flux of species i [mol/m2-s] . . . . . . . . . . . . . . . . . . . . . . . . . . flux vector of species i due to a force [mol/m2-s]

Ji,conv . . . . . . . . . . . . . . . . . . . . . . . . flux vector of species i due to convection [mol/m2-s] Ji,diff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . flux of species i due to diffusion [mol/m2-s] Ji,m ig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . flux of species i due to migration [mol/m2-s] Jtip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . current density at a crack tip [A/m2] kf . . . . . . . . . . . . . . . . . . . . . . . rate constant for the heterogeneous forward reaction [m/s] kb . . . . . . . . . . . . . . . . . . . . . . . . . rate constant for the heterogeneous back reaction [m/s] Kxy . . . . . . . . . . . . . . . . . . . . . . . . . . tabulated constant for hydrolysis reactions [unitless] K1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . coefficient of analytic solution [varies] K2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . coefficient of analytic solution [varies] m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . molality of the solution [mol / 1000g water] mH O
2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . areal mass density of water [g/m3]

mx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . concentration of the anion in hydrolysis [M] p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . energy flux [J/m2-s]

xxvii P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . change in pressure [Pa] Phydro . . . . . . . . . . . . . . . . . . . . . . . . . . . change in pressure due to hydrostatic effects [Pa Pinter . . . . change in pressure caused by sustaing the additional gas/liquid interface [Pa] q . . . . . . . . . . . . . . . . . . quantity of water formed or lysed by self-dissassociation [mol/l] qi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . charge on species i [C] Qxy . . formation quotient of the hydrolysis product with x cations, y hydroxyls [unitless] R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . universal gas constant, 8.314 [J/mol-K] Re . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . generation rate of electrical charge [C/m3-s] Ri . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rate of generation of species i [mol/m3-s] T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . temperature [K] t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . time [s] ~ 2 ~ ui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . is the mobility tensor [m -mol/J-s] ui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mobility constant for species i [m2-mol/J-s] vb . . . . . . . . . . . . . . . . . . . . . velocity of the backward heterogeneous reaction [mol/m2-s] vf . . . . . . . . . . . . . . . . . . . . . . . velocity of the forward heterogeneous reaction [mol/m2-s] v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . velocity vector of the solution [m/s] v i,force . . . . . . . . . . . . . . . . . . . . . . . . . . . . velocity vector of species i due to a force [m/s] v i,diff . . . . . . . . . . . . . . . . . . . . . . . . . . . velocity vector for species i due to diffusion [m/s] v i,m ig . . . . . . . . . . . . . . . . . . . . . . . . . . . velocity vector of species i due to migration [m/s] x . . . . . . stoichiometric coefficient for the metal cations involved in a hydrolysis reaction

xxviii x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . position [m] x0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . crevice length [m] [X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . concentration of species X [ mol/l] y . . . . stoichiometric coefficient for the hydroxyl ions involved in the hydrolysis reaction z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . valence of the metal cation [eq/mol] z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . number of electrons transferred [eq/mol] zavg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . average charge number for the alloy [eq/mol] zi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . charge number for species i [eq/mol]

Greek Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . symmetry factor [unitless] i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . activity coefficient of species i [m3/mol] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Change in parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dielectric constant of solution [F/m] r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . relative dielectric of water 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dielectric of free space[F/m] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . overpotential, E - E0 [V] r . . . . . . . . . . . . . . . . . relative viscosity of the solution compared to pure water at 22 C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . crack opening angle [rad] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . solution conductivity [-m]-1 (x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . solution conductivity at position x [-m]-1

xxix max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . maximum conductivity [-m]-1 min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . minimum conductivity [-m]-1 + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ionic conductivity for the cation [m2 / -eq] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ionic conductivity for the anion [m2 / -eq] i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ionic conductivity for the species i [m2 / -eq] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ionic conductivity [m2 / -eq] i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . chemical potential of species i [J/mol] i . . . . . . . . . . . . . . . . . . . . . . chemical potential of species i in the standard state [J/mol] i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . stoichiometric coefficient for species i el . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . electric charge density in solution [C/m3] DH2O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . density of water = 1000 [kg/m3]
0

Chapter 1: Introduction

This chapter serves to frame the work of this dissertation and place it in context. It starts with a brief overview of corrosion and its costs. The focus then shifts to the particular form of corrosion studied in this project: crevice corrosion. A discussion of the phenomenology, importance, causes, and outstanding questions on crevice corrosion leads into the purposes and goals of this dissertation in modeling crevice corrosion. The chapter ends by summarizing the work done for this project.

1.1 Corrosion

Metallic corrosion is the process which changes metals from their technologically useful reduced form to their thermodynamically stable oxidized form. This phase change can mechanically weaken a part, alter its appearance, or contaminate a product stream. The costs of corrosion were estimated to be 4% of the GDP [1]. In 1997 this translated to over $320 Billion in costs from downtime, replacement costs, and other corrective actions. Corrosion has many forms. Its causes range from high temperature oxidation to improper galvanic coupling and it occurs in environments as diverse as seawater to sulfur- and chloride-contaminated atmospheres. A major method of classifying corrosion is by the form of attack. Corrosion can be broadly characterized as either general or localized. General attack

2 results in relatively even surface wastage of a material. From a corrosion mitigation perspective, it is relatively benign since it is easy to detect and to predict its course. More insidious are the various forms of localized attack. Pitting, intergranular attack and crevicing are particularly damaging since they are less easy to predict and are difficult to detect. A single crack can destroy a wing spar that is otherwise intact. Likewise, a single hole can destroy a pipeline, even if the overall wall thickness is unaffected elwewhere. This dissertation is focused on crevice corrosion.

1.2 Crevice Corrosion

Crevice corrosion is a subset of the phenomenon of localized attack. This section addresses the following questions: What is crevice corrosion? Why is it important? How does it happen? and What still needs to be known?

1.2.1 Phenomenology of Crevice Corrosion Crevice corrosion is a type of localized attack. It is differentiated from pitting or other forms of localized attack in that an external crevice former is required to initiate corrosion on a surface in an environment in which it would otherwise be immune. Figure 1.2.1(a) from Jones[1] shows a typical example of crevice corrosion. The stainless steel specimen is immersed in an environment and covered with an electrolyte. On the uncovered surface there is no attack, but underneath the crevice former the material is heavily corroded. Pitting is related to crevice

3 corrosion in that an occluded region is also formed, but a pit generates the required geometry spontaneously instead of relying on an outside former as in crevice corrosion.. The depth of attack under the crevice former varies. Near the mouth, little attack occurs. With increasing distance into the crevice, the amount of material lost increases until a peak is reached and then the depth of attack slowly decreases to zero with further travel into the crevice. The geometrical terms and directions are illustrated in Figure 1.2.1(b) for both crevices and the related geometry of cracks. One typical aspect of crevice corrosion is that there is a time delay, or initiation time, between the formation of the crevice and the start of attack. Once initiated the crevice is said to propagate. Initiation is the generation of conditions that are sufficient to attack the metal. Propagation depends on sustaining those conditions. Changes in geometry, such as if rapid corrosion were to widen the mouth of a crevice, can make the damaging electrical or chemical conditions unsustainable and stop the crevicing. Another aspect of crevice corrosion is the unevenness of attack seen in Figure 1.2.1(a). The differing amounts of metal loss along the crevice wall imply that the conditions inside the crevice are not uniform. Just as a crevice may vary considerably from the bulk, the interior of a crevice may contain great differences in pH, electrolyte composition and potential. Typically, the electrolyte in a crevice is thought to be a concentrated metal salt solution of low pH. The stainless steel specimen is only corroded underneath the crevice former. Some aspect of the occluded site which is produced under the crevice former makes the conditions there much more aggressive than those on the unblocked, or boldly exposed, surface. It is this

4 combination of the divergence of internal conditions from the bulk and the obscuring effect of the crevice former that makes crevice corrosion such a damaging form of attack. The presence of unattacked regions at both the mouth and base of the crevice is referred to as intermediate attack (IA) in this project. The major contribution of this thesis is in presenting modifications of existing theories of crevice corrosion to account for IA and in developing the Cathodic Focusing (CF) model as an alternate explanation.

7 1.2.2 Importance of Crevice Corrosion Crevice corrosion is an important area of corrosion research because, whereas the overall process is thought to be understood, exact answers about the likelihood, timing, and rate of attack are not available. Since the conditions in a crevice can become significantly more aggressive than those in the bulk environment if unfavorable geometries are present it is difficult to perform accurate material selection to choose the cheapest material that will have adequate performance. The other difficulty posed by crevice corrosion is that any inspection of a part is hampered by the presence of the crevice former. Subsection 1.2.4 describes the questions that are active areas of research in crevice corrosion. As a precursor to that discussion, a short mention of the basic outlines of the theories concerning the factors that govern crevice corrosion is in order.

1.2.3 Causes of Crevice Corrosion Some combination of chemical and electrical changes inside an occluded site makes the conditions locally more aggressive than the bulk environment. There are two main theories to explain the initiation of crevice corrosion. One, the Critical Crevice Solution (CCS) model, ascribes primacy to the chemical changes in a crevice. The other, the Critical IR Drop Model (IR*) assigns dominance to the electrical changes inside the occluded site. Most modern models, including that of this dissertation, combine elements of both. The CCS model explains the deletory effects of an occluded region in terms of it acting as a barrier to chemical transport. The theory was first proposed as the Acid Hydrolysis theory

8 by Hoar[2] and later codified for stainless steels by Fontana and Green[3]. Oldfield and Sutton finally placed the model in its currently recognized form by quantifying the earlier qualitative model[4]. They proposed a definite criteria for the start of attack and a methodology for applying the model. The basic process of the CCS model for the initiation of crevice corrosion on stainless steels is: Deoxygenation of the crevice; Anodic dissolution of metal inside the crevice supported by cathodic reactions on the boldly exposed surface; Hydrolysis of the resulting metal cations lowering the pH; and Ingress of Chloride ions to balance the charge of the more slowly moving metal cations. By the logic of the CCS model, the conditions inside the crevice are the result of an interplay between the generation of chemical species inside the crevice and their transport out of it. Any lag in the removal of dissolution products, such as imposed by a crevice former, allows the metal cations to accumulate. These cations hydrolyze and form metal hydroxides. This process lowers the solution pH. Simultaneously negatively charged anions, such as chloride, migrate into the crevice to balance the excess positive charge from the metal cations. The net result is an acidic chloride solution which more aggressive than the previous solution. As result of the change in chemistry the dissolution rate increases. The process is autocatalytic. CCS explains several aspects of crevice corrosion. The unattacked region at the crevice mouth is caused by mass transport out of the crevice preventing the development of a sufficiently aggressive solution. The time delay before initiation is needed to develop a concentrated electrolyte. The resulting solution is the expected acidic chloride solution. One

9 area which is not explained is the lack of attack at the greatest crevice depths. This theory and its strengths and weaknesses are described more fully in subsection 2.2.1. The major competing theory with the CCS model is the IR* model. Pickering proposed it as an initiating mechanism for crevice corrosion on active-passive metals whose bulk conditions are held anodically in the passive region. The thrust of the theory is that crevice corrosion can start on passivated metals if the crevice former acts as a barrier to electrical transport. In the IR* theory, a crevice deoxygenates, localizing the anodic and cathodic reactions to the crevice interior and boldly exposed surface respectively. This results in a net current flow from the crevice interior out to the boldly exposed surface. As this current crosses the electrically resistive crevice electrolyte, potential drop due to IR occurs. If sufficient potential drop occurs to lower the potential of the metal from the bulk potential (safely in the passive region) to the active nose of the material, rapid attack will ensue. According to this theory, the conditions in the crevice are determined by the interplay between current generation and crevice resistance, which is a product of geometry and conductivity. Whereas the IR* model can explain the uncorroded areas at the mouth (inadequate potential drop to depassivate surface) and at the base (lack of driving force to corrode at a rate greater than the corrosion current) it fails to account for the time delay before initiation. This theory is treated in greater detail in subsection 2.2.2. The CCS and IR* models are complementary halves that can be used to qualitatively explain crevice corrosion. Though the basic outline of crevice behavior is known, several

10 questions remain.

1.2.4 Unanswered Questions about Crevice Corrosion While much progress has been made in understanding crevice corrosion, several questions remain: What are the factors controlling initiation?, Which of the observed changes in crevice conditions are results rather than causes of crevice corrosion? and What determines the rates of attack in the crevice and the resulting crevice shape changes? Example systems have been presented for each of the two models.[5, 6] Outside of these systems there does not seem to be a hard and fast rule about which theory dominates under different conditions. Modern modeling efforts include both effects[7-10] An important issue that both models do not address is the effects of geometry with a crevice. A prime example would be subcrevices[9]. Corrosion initiates first at a crevice since it is the most occluded site on a surface. It is likely that subcrevices initiate first within a crevice since they are more restricted than neighboring areas within the site. Similar problems such as the variations within a crevice caused by heterogeneities such as pits and second-phase particles have led to a push to monitor the local conditions inside crevices[11]. Even for crevices of perfect geometry, there is still uncertainty as to the proper scaling factor to use to translate between real crevices with gaps on the order of 0.1 to 10 m and easily observable ones with gaps of several hundred ms.[12] Furthermore, even within the framework of CCS, a number of species have been put forth as bad actors[13-15]. If metal cations or sulfur species control the corrosion process rather

11 than pH or chloride content, then different approaches must be used to try to prevent corrosive attack. A barrier to understanding the various factors that control crevice corrosion under different conditions is the problem of separating causes of initiation from the results of propagation. If solution from a fully corroded sample is analyzed and found to be highly acidic and chloride rich, then there is no easy way to tell if those conditions arose before or after initiation. Finally, there is a decided gap between understanding the corrosion process conceptually and translating that knowledge into useful engineering practice. Life-prediction seeks to answer the questions of if and/or when a particular geometry will initiate, and if initiated will the conditions be self-sustaining.[16-19] Modeling is required to address these unanswered questions about the controlling factors of crevice corrosion and also to use the models to produce useful predictions for engineering purposes.

1.3 Modeling

Modeling of the corrosion process has yielded much information about crevice corrosion, and has the promise to give much more insight. Modeling can provide answers for systems that are difficult to monitor experimentally, it can expand the usefulness of data collected at discrete points and can perform what-if scenarios that would be impossible to do

12 experimentally. The caveat is of course that a model can only be verified by comparison to experimental data. The hope is that if a model is verified under conditions that can be measured experimentally, it can be safely extrapolated to other conditions.

1.3.1 Difficulties with Experimentation in Crevice Corrosion There are many difficulties in obtaining information about the chemical and electrical distributions inside a crevice. The geometries are exceedingly tight and the insertion of electrically and chemically sensitive probes can influence the corrosion process. Because of the small crevice gaps there is little solution available for analysis. For a crevice with a relatively loose 10 m gap, there are only 10-3 ml of solution per cm2 of crevice area. A related difficulty in obtaining experimental data is the problem of scaling factors. Not only is there some confusion about the length to width factors that should be used to scale a real crevice to one that is easily measured, it is not clear which characteristics of the crevice need to be scaled. If subcrevices dominate to corrosion process, then scaling the average gap may produce results that do not correlate with the physical system. This is especially true if the scaling process allows new transport mechanisms such as natural convection to appear. Finally, there is a lot of apparent variability in crevicing behavior. The point of such tests as multiple crevice assemblies is to get statistically significant results about crevice corrosion. Nominally identical crevices on the same piece of metal simultaneously in the same environment will not necessarily have the same resistance to crevicing. Whereas it is difficult to ascertain what is occurring within a crevice, a number of

13 measurements can be made about the crevice as a whole. The net anodic current from the crevice, the overall pH, the initiation time and possibly some internal measurements can be taken. Modeling provides a tool to leverage these results into a better picture of the whole process inside the crevice.

1.3.2 Increasing the Utility of Experimental Data The experimental data that is collected on a particular crevice is necessarily limited in scope. For instance, potentials are measured at discrete points rather than continuously. Modeling can fill in the blanks around such data. A model need only be calibrated at a few points and can then be used to provide data with as much spatial or temporal information as is needed. In addition to providing more detail about experiments that have been done, modeling can perform experiments that can never be done.

1.3.3 Acting as a Virtual Experiment One difficulty in deducing the interactions of the numerous variables affecting crevice corrosion is that it is difficult to experimentally vary only a single parameter. A supporting electrolyte that is added to minimize the potential gradient may also inadvertently affect the corrosion behavior. For instance, chloride, despite its high mobility, would be a singularly poor choice for a supporting electrolyte! Any parameter of a model can be changed independently. Ionic mobilities, valences, corrosion rates and hydrolysis coefficients can all be scaled at will in

14 a model to perform what if analyses. Such investigations can act as a guide to direct future experimentation. This investigation created a platform for modeling crevice corrosion that was designed to exploit these strengths of modeling. It allows modeling of any time or space scale (subject to calculation time limits), can act to flesh out a few experimentally obtained points and allows any type of what-if scenario to be played out with its variables.

1.4 Scope of Work for this Dissertation

There are two major results from this thesis. The first was the creation of CREVICER a modular true two spatial dimension and temporal code for solving crevice corrosion problems. All crevicing processes involve an interplay between chemical and electrical transport and generation. The differences only appear in the specific behaviors of individual metals and ions. CREVICERs main strength is that it can be customized to model nearly any material/environment system. This code is a significant advance over current models for the solution of crevice corrosion in that it models two free spatial dimensions with allowance for changes along a third axis. It also allows unlimited versatility in including polarization curves. The effects of chemistry, temperature, and pressure can be accounted for, though no work presented in this dissertation uses the effects of temperature or pressure. This versatility is achieved is through the modular structure of the object-oriented code.

15 As is discussed in section 3.2 object-oriented design (OOD) is a methodology breaks a program into discrete independent units called objects. These objects can be reprogrammed at will without introducing errors into other parts of the code. The second achievement of this dissertation was the use of CREVICER to suggest a new mechanism to explain the phenomenon of intermediate attack in crevices. Significant corrosion near a crevice mouth will introduce large amounts of current that polarize parts of the crevice nearer the base to near the open circuit potential. Metal dissolution near the open circuit potential has radically different effects on solution chemistry than dissolution at high anodic overpotentials. Metal cations hydrolyze and this has the effect of lowering pH. Cathodic reactions such as the Hydrogen Evolution Reaction (HER) and Oxygen Reduction Reaction (ORR) generate a single hydroxyl per electron consumed and this chemical production has an alkalinizing effect. As will be discussed in section 5.3 this process can turn portions of the crevice alkaline if significant amounts of the required cathodic current to support the dissolution reactions are supported locally. At open circuit, the metal is no longer coupled to the crevice exterior and all of the required current is met locally. This alkalinizing effect can lead to the localization of attack near the crevice mouth. This model has been named the Cathodic Focusing (CF) model. Before any serious discussion of the CREVICER code or the CF model is presented some coverage of the background for crevice corrosion modeling is presented.

16

Chapter 2: Background

OVERVIEW As was seen in Chapter 1, crevice corrosion is an important form of attack. Occluded site geometries allow conditions that are significantly more aggressive than the bulk to form and this can destroy materials which would otherwise be virtually immune to a particular environment. It is this uncertainty about the durability of metals in the presence of crevices which makes the study of localized corrosion of such great interest. It has been a long-held goal of crevice corrosion modeling to produce codes which are accurate enough to screen proposed material/environment/geometry combinations for incompatibilities and life-span. Currently, engineers must sail between the Scylla of underestimating the potency of occluded sites in causing corrosion and the Charybdis of overselecting an alloy composition and incurring excess costs. Beyond the concrete goals of material selection, model development serves several largely scientific aims. Constructing a model is a process in abstraction. A model seeks to capture the relevant properties of a system and make predictions about its future behavior. A model that cannot anticipate future occurrences has failed to capture some of the pertinent details of the subject under study. In that sense, modeling crevice corrosion is a good vehicle for evaluating the theories that have been developed to account for the phenomenon. If models based on the CCS or IR* theories for the initiation of crevice corrosion fail to predict some

17 aspect of the attack, then there are either problems in the implementation of the model or the theory is lacking in some regard. The problem of intermediate attack in crevice corrosion which is discussed in Chapter 5 highlights one area where the current theories fall short. A working model of crevice corrosion can also serve lesser purposes than acting as an arbiter of a particular theorys aptness. A good model, validated experimentally, can perform experiments that cannot be done in practice. A problem in physically testing the relative importance of different factors on crevice corrosion is that the characteristics of the components, such as ui and Di for chemical species, cannot be changed independently. Substituting SO4-2 for Cl- as the anion component of the supporting electrolyte to reduce the diffusion potential can have significant effects on the behavior of the rest of the system since Clis known to be an aggressive anion. Corrosion rate, hydronium activity and pitting potential are all aspects of crevicing behavior which are strongly affected by the concentration of chloride. In a computer, each of these variables can be adjusted at will and independently. This allows the individual effects of model parameters to be separated out. Another area where models can excel is in collecting data with more resolution than can be done physically. Sensors have finite size and cost. Instrumenting a crevice or crack currently has strong restrictions on the number and types of sensors that can be inserted into such a small geometry. VLSI fabrication techniques hold promise is easng those limits somewhat.[12] There is the additional complication that the sensors may interact with the corrosion event, destroying the process they were intended to monitor![11] The final area where models can exceed physical systems is in long-duration testing.

18 For most large engineering structures it is impractical for the evaluation stage to last as long as the design life of the building or vehicle. It is only of the slowest of projects that can afford to wait for 20-40 years to check the corrosion resistance of the design. The problem of nuclear waste disposal requires designers to take a millenial view of the life of the storage containers.[1719]

This chapter addresses the background necessary to preface the later discussion of the particular code developed for this dissertation - CREVICER. The four subsequent sections address basic electrochemisty, the main theories of crevice corrosion, the theory and practice of modeling those theories and conclude by reviewing the relevant literature on crevice corrosion modeling and mechanisms. Electrochemistry shares with its parent field of chemistry an interest in the equilibrium states of reactions and the kinetics that control the approach to those values. It differs in that electron transfer is of primary importance. Metal dissolution is a good example of an electrochemical reaction. Neutral metal atoms must be stripped of electrons to become soluble in water. The occurrence or nonoccurrence of such processes is determined by the thermodynamic states of the reactants defined by the species involved and their activity. For the chemical species the activity is related to concentration. For electrons, potential is the determining factor. The rate at which dissolution occurs is a kinetic phenomenon. Some factors which affect the net rate of a reaction are the driving force, temperature and any barrier layers that may be present on the surface. In corrosion terms thermodynamics determines immunity and

19 kinetics determines corrosion rate. Section 2.1 provides a grounding in the essentials of electrochemistry from a corrosion standpoint. Once the rough framework for electrochemistry is developed a summary of the basic theories of crevice corrosion can be presented. Crevice corrosion occurs when an occluded site produces conditions in an environment which is otherwise benign that attack the underlying metal. Two major theories of crevice corrosion have gained credence over the years. The first is the Acid Hydrolysis / Fontana and Greene model or, in its currently accepted form, the Critical Crevice Solution (CCS) model. The CCS model assigns primary importance to chemistry changes in the occluded site. A competing theory, the IR* model applies to active/passive metals and assigns primary importance to potential in controlling the rate and location of attack. Section 2.2 goes into greater detail on these theories and their implications. Crevice corrosion modeling is the nuts and bolts of implementing the theories presented in section 2.3. In order to effectively model crevice corrosion not only must the correct governing equations be used but the assumptions and limitations must be understood as well. In order to solve the governing equations a number of approximations must be made. Such simplifications are determined in part by the method of solution used. Section 2.3 provides the basis for all of the later discussion of crevice corrosion modeling, both in the work of this thesis and in the review of previous researchers efforts. Finally, section 2.4 is a review of the literature on modeling crevice corrosion. It is organized according to the types of models and the simplifications used in their solution.

20

2.1 Basic Electrochemistry

Electrochemistry is essentially chemistry with a focus on electron transfer. Corrosion in turn is a subset of electrochemistry because it is concerned with elemental metals that must be ionized before they can become soluble or precipitate into metal oxides, hydroxides or other compounds. The corrosion process is the destruction of the elemental metal. This section illustrates the basics of electrochemistry that are needed for use in corrosion modeling. It covers the basic terminology of electrochemical reactions, the thermodynamics and kinetics of reactions, how groups of reactions operate in concert on an interface and finally provides some orientation on the usual representations of kinetic data, polarization curves.

2.1.1 Electrochemical Reactions Electrochemical reactions involve electron transfer. An example would be the oxidation of a metal in hydrochloric acid shown below. Me % zHCl X MeClz % z H 2 2

(1)

Where: z is the number of electrons transferred

Each metal atom loses z electrons. The resulting cation joins with chloride ions to form a metal salt. The electrons freed in the dissolution process reduce H+ to form hydrogen gas. A full electrochemical reaction, such as shown in Equation 1 neither generates nor

21 consumes electrons. It can be viewed as consisting of two half-cell reactions. Anodic half-cell reactions free electrons, cathodic ones consume them. On a freely corroding surface the supply of electrons consumed and generated must exactly balance. A simple example of anodic halfcell reaction is shown below. Me X Me z% % ze & (2)

It is convenient to express the rate of this reaction as a current density since there is a linear correspondence between the flux of ions and the flux of electrons. Two common cathodic reactions are the hydrogen evolution reaction (HER) and the oxygen reduction reaction (ORR). The HER can occur in any aqueous system. 2 H % % 2 e & X H2 (3)

In the HER protons are paired with electrons to form atomic hydrogen. These atoms then combine chemically to form hydrogen gas. Protons (in the form of hydronium, H3O+) are always available in solution because of the self-disassociation of water. Water molecules lyze into hydronium and hydroxyl. Therefore, there is always a ready supply of materials for this reaction. Consuming protons via the HER has the effect of raising the pH of the solution. The ORR can only occur in aqueous solution in the presence of oxygen. 2 H2 O % O2 % 4 e & X 4 OH & (4)

A single molecule of oxygen is combined with two water molecules and four electrons

22 to produce four negatively charged hydroxyls. Oxygen is only sparing soluble in water at room temperature and pressure. It solubility is only 8 ppm.[20]. Because of this, the supply of oxygen at an interface is easily depleted and the reaction can become limited by the mass transport of oxygen to the surface. This reaction also raises the pH of the solution by generating hydroxyls.

2.1.2 Thermodynamics of Electrochemical Reactions The direction in which an electrochemical reaction proceeds spontaneously is determined by thermodynamics. A reaction goes in the direction that minimizes its Gibbs Free Energy. The following discussion is based on Newman[21] and illustrates the reasons why potential and chemical concentration are needed in modeling crevice corrosion. A representative chemical reaction can be written as below: aA X bB % cC (5)

Where: A,B,C are the reacting species a,b,c are the respective stoichiometric coefficients

The change in Gibbs Free Energy for the above reaction can be found by using the stoichiometric coefficients and the molar Gibbs free energies of the individual species. ) G' j <iG i
i

' bG B % cG C & aG A

(6)

23 Where: G i Gi is the total change in Gibbs free energy [j/mol] is the stoichiometric coefficient for species i [unitless] is the molar Gibbs free energy of species i [J/mol]

The value of G determines the direction that the reaction proceeds in. If the change in Gibbs Free Energy is positive the reaction proceeds to the left, i.e., B and C will be consumed to generate A. If it is negative, the opposite will happen. A will be destroyed to create B and C. The reason that a given reaction will go in different directions in different situations is that Gi is not a constant. It has a functional dependency on the thermodynamic state. In addition to being a function of temperature and pressure, the molar Gibbs Free Energy of a species depends strongly on the species concentration.

2.1.2.1 Thermodynamic Effects of Concentration The chemical potential, i , of a pure species is identical to its molar Gibbs free energy[22].The chemical potential depends on the species and its activity as shown in the following equation. i ' i % RT ln(ai) ' i %RT ln((i C i)
0 0

(7)

Where: i is the chemical potential of species i [J/mol]

24 i0 is the chemical potential of species i in the standard state [J/mol] R T i Ci is the universal gas constant [J/mol-K] is the absolute temperature [K] is the activity coefficient of species i [m3/mol] is the concentration of species i [mol/m3]

Assuming for simplicity in this illustration that i = 1 and using Equation 7, we can write the change in Gibbs free energy in Equation 6 as: ) G ' b B % b RT ln(C B ) % c C % c RT ln(C C) & a A % a RT ln(C A ) '
0 b B 0 0 0

0 c C

&

0 a A

% RTln

C B @C C CA
a

(8)

The change in Gibbs free energy has the form of a constant, determined by the species involved, plus a variable portion that depends on the concentrations. Because the stoichiometric coefficients and the chemical potentials in the standard state are fixed, the concentrations of the species CA , CB , and CC determine the direction in which the reaction will proceed. The previous discussion dealt only with reactions between chemical species. In electrochemical reactions electrons are transferred. Their availability is determined by the potential and this is discussed in the next subsection.

25 2.1.2.2 Thermodynamic Effects of Potential Electrons are active participants in electrochemical reactions. They can be treated as a chemical species if their chemical potential is written as -zFE[23] e & ' &z F E (9)

Where: ez is the molar Gibbs free energy of the electrons [J/mol] is the number of electrons transferred in the reaction [eq/mol] F E is Faradays constant 96,487 [C/eq] is the potential [V]

For the simple electrochemical dissolution reaction in Equation 2 the change in G would be : ) G ' Me %z & zFE & Me (10)

Where: G is the change in Gibbs Free Energy [J/mol]

Me+z is the chemical potential of the metal cation [J/mol] E Me is the potential across the solid/liquid interface [V] is the chemical potential of the solid metal [J/mol]

26

The chemical potential of the metal cation, Me %z , depends in part on the concentration of ions in solution as shown in the previous subsection. The chemical potential of the reduced metal solid phase, Me , is a constant since the activity for solid products is always unity. The availability of electrons for the reaction is controlled by the potential at which the reaction occurs. This factor is easily controlled and determines the direction in which the reaction proceeds. One potential which is of particular interest is the one at which the reaction is at equilibrium. This potential is called the reversible potential and is denoted as E0. It occurs where the change in Gibbs free energy is zero. 0 ' Me %z % RT ln(CMe %z) & zFE 0 & Me & RT ln(Cm e)
0 0

(11)

This equation can be solved to express the reversible potential for a reaction in terms of the thermodynamic constant for the species involved and, assuming that the activity coefficients are uniformly one, their concentrations. This is called the Nernst Equation. Me %z & Me zF
0 0

E '

C %z RT ln Me zF CMe

(12)

Where: E0 is the reversible potential [V]

27 The reversible potential for any half-cell electrochemical reaction can be can be calculated from a suitably modified version of Equation 12. Only half-cell reactions have reversible potentials. When electrons are transferred in a full-cell reaction irreversible work is performed. From an examination of Equations 11 and 12 it is apparent that at potentials below E0 the cathodic, or electron-consuming direction is favored and that at potentials above E0 the anodic or electron-freeing direction is preferred. Thermodynamics can only make statements about the direction in which a reaction will occur. It says nothing about the rate at which a reaction occurs. That discussion is the domain of kinetics.

2.1.3 Half-cell Kinetics Kinetics determine the rate at which a reaction occurs. This rate can either be controlled by the energy available to drive electron transfer, activation control, or the rate at which reactants can either arrive at or leave from the interface, mass transfer control. The following section is based on Bard and Faulkner[24], the equations have been modified for clarity in this context and notation.

2.1.3.1 Activation Control An electrochemical reaction, such as Equation 2, has two rate constants. One affects the reactions in the forward direction, the other, the reverse direction. This is shown in the

28 equation below.

kf Me W Me z% % ze & kb Where: kf

(13)

is the rate constant for the heterogeneous forward reaction [m/s]

kb

is the rate constant for the heterogeneous back reaction [m/s]

The net rate at which a reaction occurs is the difference in the rates of metal oxidation and reduction. These rates are simply the concentrations of the species times the probability per unit time of the reaction occurring. Ian zFA Ica zFA

v f ' k fCMe '

(14)

v b ' k b CMe z% '

(15)

Where: vf is the velocity of the forward heterogeneous reaction [mol/m2-s] vb is the velocity of the backward heterogeneous reaction

29 [mol/m2-s] Ian Ica is the anodic current [A] is the cathodic current [A]

The rate constants kf,and kb can be deduced from an examination of free energy curves. The Gibbs free energies of the reduced metal atom and the oxidized metal ion can be shown as a function of the reaction coordinate. This is shown in Figure 2.1.3(a). The energy barrier to go from the Me to the Me+z + ze- state has a height of G0a. Likewise the barrier to go from the oxidized to the reduced states has a barrier height of G0c. The laws of thermodynamics discussed in the last section determine the Gibbs free energies of the endpoints of the reaction coordinates and thus the direction in which the reaction will occur. The shape of the curves between those points affects only the rate at which equilibrium will be approached. To go from one state to the other an atom must acquire sufficient energy to jump surmount the energy barrier. High barriers can only be crossed by the most energetic of atoms and thus act to slow the rate of the reaction. Applying a potential to the reaction changes the availability of electrons and shifts the Gibbs free energy curve of the oxidized states. In addition to changing the thermodynamic equilibrium between the two states, this affects the kinetics by changing the heights of the kinetic barriers. Applying a positive potential decreases the availability of electrons and lowers the energy of the oxidized states. This increases the energy barrier going from the oxidized to the reduced states and lowers the barrier going from the reduced to the oxidized states.

30 The magnitude of the decrease in the energy barrier for the reaction in the anodic direction can be calculated by the following equation as shown in Figure 2.1.3(a). )G a ' )G0a & (1&")zFE
( (

(16)

Where: Ga* is the Gibbs free energy of activation for the anodic reaction [J/mol] G0a* is the standard Gibbs free energy of activation for the anodic process [J/mol] z F E is the symmetry factor [unitless] is the number of electrons transferred [eq/mol] is Faradays constant [C/eq] is the applied interfacial potential [V]

Likewise, the increase in the energy barrier for the reaction going in the cathodic direction. )Gc ' )G0c % "zFE
( (

(17)

Where:

Gc*

is the Gibbs free energy of activation for the cathodic

31 reaction [J/mol] G0c* is the standard Gibbs free energy of activation for the cathodic reaction [J/mol]

The symmetry factor apportions zFE between reducing the barrier for the reaction in the anodic direction and increasing it going in the cathodic direction. Alternately, for a negative E it would apportion the zFE between increasing the height of the energy barrier for the anodic reaction and decreasing for the cathodic reaction. If the intersection of the curves was symmetrical, then the value for would be 0.5. For most reactions it lies between 0.3 to 0.7[24]. In order to convert the barrier heights into reaction rates an Arrhenius form must be assumed for the rate constants as shown in the equations below.
)G a RT
(

&

&

)G0a RT

k f ' A fe

' A fe

(1&")zFE RT

(18)

&

)G c RT

&

)G0c RT

k b ' Abe

' Abe

&"zFE RT

(19)

Where: kf kb is the forward rate constant [m/s] is the backward rate constant [m/s]

32 Af, Ab are the frequency factors for the forward and back reactions [m/s] E R T is the interfacial potential for the reaction [V] is the Universal gas constant 8.314 [J/mol-K] is the absolute temperature [K]

It is only the second exponential term in each equation that is potential dependent. The form for the rate constants can be simplified to a constant and a single exponential.
(1&")zFE RT

kf '

0 kf e

(20)

kb ' Where: kf0 kb0

0 kb e

&"zFE RT

(21)

is the heterogeneous rate constant for oxidation [m/s] is the heterogeneous rate constant for reduction [m/s]

While this form appears to be acceptable, there is a hidden problem in that E as it appears in this equation is not referenced to any standard state. To get around this problem a standard rate constant must be defined. We can define a reference potential E0 at which the forward and backward reactions occur at equal rates when the concentrations of the reactants are equal. These reaction rates are defined as the standard rate constant k0.

33
(1&")zFE 0 RT &"zFE 0 RT

'

0 kf e

'

0 kb e

(22)

Where: E0 k0 is the reversible potential [V] is the standard rate constant

These terms can be substituted into equations 18 and 19 to yield the following final forms for the forward and backward rate constants.
(1&")zF(E&E 0) RT

kf ' k e

(23)

kb ' k e

&"zF(E&E 0) RT

(24)

34 2.1.3.1.1 Butler-Volmer Equation The Butler-Volmer Equation relates the net current to the overpotential and groups the various physical constants into two: the symmetry factor, , and the exchange current density, i0. This derivation starts with Equations 14 and 15 and a statement that the net current is the difference of the anodic and cathodic currents. I ' Ia & Ic ' zFA k fCMe & k b CMe %z (25)

Where: I Ia Ic is the net current [A] is the anodic current [A] is the cathodic current [A]

Substituting Equations 23 and 24 into Equation 25 and grouping like terms yields the following.
(1&")zF(E&E 0) RT &"zF(E&E 0) RT

I ' zFAk 0 CMee

& CMe z%e

(26)

The utility of this equation is limited by the need to use the concentrations of the oxidized and the reduced species at the surface. To put it into truly useful form, a series of substitutions must be made. The first step is to define an equilibrium potential, Eeq, so that when the potential is

35 equal to Eeq, the net current is equal to zero. When the net current is zero, Equation 26 allows us to make the following relationship between the concentrations of the various species.
&"zF(E eq&E 0) (1&")zF(E eq&E 0)

CMe z% e

RT

' CMe e

RT

(27)

Where: Eeq is the equilibrium potential [V]

The only unknowns in this equation are the concentrations of the reacting species, CMez+ and CMe.. Their ratio can be expressed in terms of the number of electrons transferred, Faradays constant, the temperature, the gas constant, the reversible potential and the previously defined equilibrium potential.
zF(E eq&E 0)

CMe z% CMe

' e

RT

(28)

Even though the net current at E = Eeq is zero, both Ia and Ic have finite values. Their magnitude is defined as i0, the exchange current density.
&"zF(E eq&E 0)

i0 '

Ia A

'

Ic A

' zFk 0 CMe z%e

RT

(29)

Where:

36 i0 is the exchange current density [A/m2]

From Equation 29 we can express the exponential in terms of the ratio of the reactant concentrations raised to the - power. Substituting Equations 28 into 29 yields the following expression for the exchange current density. Ic A
&"

i0 '

' zFk 0 CMe z%C Me

1&"

(30)

Equation 25 can now be written in terms of current density. This is generally called the Butler-Volmer equation.
(1&")zF0 RT &"zF0 RT

i ' i0 e

& e

(31)

Where: is the overpotential, E - E0 [V]

At low overpotentials, values of E within tens of millivolts of E0, the values of the anodic and cathodic currents are nearly equal and an expansion of the exponential terms shows that the current potential relationship is nearly linear. At higher overpotentials the appropriate current begins to dominate and the net current asymptotically approaches an exponential dependence on overpotential. The purpose of this derivation was to show that the current is a strong function of potential, especially at higher overpotentials. This is seen in the exponential terms in Equation

37 31. The net current also depends on the concentrations of the reactants. That functionality is incorporated into the exchange current density, i0. These dependencies must be accounted for in any model of crevice corrosion. The exponential dependence of current on potential poses some special mathematical difficulties as discussed in subection 4.2.4. Butler-Volmer kinetics are the simplest theory used to represent reactions on surfaces. They assume that the concentrations of the reactants are constant and are neither depleted nor enriched no matter the reaction rate. This assumption is discussed in the next sub-section. In addition to ignoring the mass transport of the reacting species, the theory assumes that the surface remains the same at all potentials. In reality, the character of the surface is potential dependent. Oxides and other layers may be deposited or removed. Typically, such effects are measured rather than modeled. The current-potential relationship of a metal in an environment can be measured directly. The trace of the relationship is called a polarization curve and is discussed in subsection 2.1.4.

2.1.3.2 Mass Transfer Control As a reaction proceeds it consumes reactants and generates products. Either a lack of reactants or a surfeit of products can impede a reaction and slow its rate. The magnitude of this slowing can be found by using the limiting current densities for both the anodic and cathodic reactions. Equation 32 below is taken from Bard and Faulkner[24]. A complete derivation is given there.

38 i ' i0 i il,c
&"zF0 RT

1 &

&

1 &

i il,a

&"zF0 RT

(32)

Where: il,c is the the limiting current density for the cathodic reaction [A/m2] il,a is the the limiting current density for the anodic reaction [A/m2]

When a reaction is mass transport limited the reaction rate is restricted by the speed with which ions can be moved either from or to the interface. This rate at which ions can be transferred depends on the surface and bulk concentrations, the transport coefficients, and for charged species any assisting or delaying potential field.

2.1.4 Polarization Curves A polarization curves shows the relationship between net current and potential. Typically, this behavior is plotted on a semi-logarithmic plot with potential on the y-axis and the magnitude of the net current on the logarithmic scale. This presentation may seem slightly odd as potential is usually thought of as the independent variable, but it is a convention of electrochemistry to plot the data in this fashion. Figure 2.1.4(a) shows a polarization curve of the Butler-Volmer Kinetics developed in

39 Equation 31. The dotted line represents the current due to the anodic reaction of metal dissolution. The dashed line shows the magnitude of the current caused by the cathodic metalplating reaction. The magnitude is plotted since negative currents cannot be shown on a logarithmic axis. The magnitude of the net current is the difference between the anodic and cathodic currents. At low overpotentials the net current is small. At larger overpotentials the magnitude of the current asymptotically approaches either the anodic or cathodic halfcell current. The slope of the half-cell currents is determined by the symmetry factor, , and the number of electrons exchanged, z. When a polarization curve is measured the potentiostat (via the counter electrode) acts to either supply or remove electrons from the surface under study. If such a source or sink is not available, then the potential of the surface is determined by the conservation of charge. In systems such as reference electrodes where only single reaction is present, a freely corroding surface will take on the reversible potential. Such a system was illustrated as in Figure 2.1.4(a). Notes that this implies that on an isolated surface where only a single electrochemical reaction is possible, the lack of a counter electrode means no net reaction can occur. Unfortunately, most surfaces however have two or more electrochemical reactions occurring on them simultaneously and they can corrode without the presence of a separate counter electrode. A corroding metal has two or more electrochemical reactions occurring on it simultaneously. The construction of a polarization curve for this case is shown in Figure 2.1.4(b). For the purposes of discussion the metal surface has two purely Tafel reactions occurring on it. One reaction is the metal dissolution/plating reaction developed earlier. The

40 other reaction is the Hydrogen Evolution Reaction (HER) which was first presented in Equation 3. It is so named because it usually occurs in the cathodic direction and converts protons from the self-hydrolysis of water into atomic hydrogen. If only the metal dissolution reaction were considered, the potential of the free surface would be the reversible potential of that reaction E0,Me/Me+z. Likewise, if the HER were the only reaction the potential of the surface would be E0,H/H+. When the two reactions occur on the same surface the potential must reach a value where the total number of electrons consumed is equal to the number generated. The potential at which this occurs is the corrosion potential, Ecorr. The rate of each half-cell reaction at this potential is the corrosion current, icorr. An important distinction is that whereas both surfaces with single electrochemical reactions, such as reference electrodes, and the more typical surfaces with multiple reactions, will reach a free potential where the net current is zero, the net reaction rates are very different in the two cases. For a surface with a single reaction, no net current means no net reaction. For surfaces with more than one reaction, at zero current both half-cell reactions can be proceeding at very high, yet equal, rates. The Tafel reactions that have been described previously cannot be used to describe all electrochemical reactions. In addition to ignoring the effects of mass transport as shown in Equation 32, the theory ignores the effects of changes in the surface state. At certain potentials films can form on a corroding surface. If such films produce a continuous layer over the surface, they can greatly impede the dissolution reaction or the cathodic reactions required to support it. Typically these films are metal oxides, although metal sulfides or salts can also form and have similar effects.

41 Figure 2.1.4(c) shows a polarization curve for an active/passive metal. As the metal is polarized above its corrosion potential, Ecorr, the dissolution rate increases. At the primary passivation potential, Epp, a protective metal oxide begins to form. Further increases in potential increase the area of this film, and actually decrease the current coming from the surface. This effect is counter-intuitive. At potentials between Epp and Eflade an increase in driving force causes a decrease in reaction rate. This effect is due solely to the kinetic barrier imposed by the growing oxide film. When the Flade potential, Eflade, is reached, the film covers the entire surface and further increases in potential have no effect on the current. This lack of potential dependence continues until the overpotential becomes so great that it destabilizes the film. This destabilization can happen either locally and cause pitting or uniformly and cause transpassive behavior. In the former case the critical potential is called Epit, in the latter Etp. The current generated at a metal/solution interface is a complicated function of potential, chemistry, and surface state. Analytic representations of the relationship are only possible for the simplest cases. A model of crevice corrosion must have some method of representing the possible polarization curves. The various techniques that can be used are discussed in section 2.3.

Summary This section has covered the basics of thermodynamics and kinetics as applied to corrosion. This grounding in the influences of potential and chemistry on reaction rates is a necessary prelude to a discussion of the theories on the controlling factors of crevice corrosion.

42 Crevice corrosion can be viewed as an autocatalytic phenomenon. The right (or depending on your point of view, wrong) geometry for a particular material/environment combination will spontaneously generate and sustain the conditions for a dramatic increase in corrosion rate. The next section discusses the various theories as to why and how crevice corrosion occurs.

46

2.2 Theories of Crevice Corrosion

The simplest definition of crevice corrosion is that the presence of an occluded geometry causes rapid corrosion of a material in an environment to which it would otherwise be relatively immune. The aggressive geometry is often called an occluded site because it acts to restrict a volume of solutions access to the bulk environment. Some characteristic of the occluded site allows the conditions there to become progressively more damaging to the underlying metal. There are two main theories to explain how the conditions change to cause crevice corrosion: the Critical Crevice Solution (CCS) and Critical Potential Drop (IR*) models. They differ in assigning paramount importance to changes within the crevice in chemistry and interfacial potential respectively.

2.2.1 CCS Model The CCS model for the initiation of crevice corrosion assumes that the paramount function of the crevice former is to act as a barrier to chemical flux. The effects of potential on corrosion rate are ignored. The theory was first proposed by Fontana & Greene[3] to explain the crevice corrosion of stainless steels. It was later refined and quantified by Oldfield and Sutton who gave the theory the name by which is usually referred - the Critical Crevice Solution model. The basic gist of the model is that slowly diffusing metal cations accumulate in the occluded site, attract rapidly moving chloride ions, and hydrolyze to form a hydrochloric acid solution. This acid is more aggressive than the bulk electrolyte and causes an increase in

47 corrosion rate and in turn more hydrolysis. The process feeds on itself and destroys the underlying substrate. Fontana and Greene represented the process as occurring four steps. 1) Deoxygenation: The free oxygen within the occluded site is consumed. Oxygen is only sparingly soluble in room temperature water (8 ppm) and the original charge in the crevice is rapidly used up. It is not replenished because any O2 molecules which start to diffuse down the long diffusion path of the occluded site are consumed near the mouth. The net effect is that the cathodic reactions to support dissolution in the crevice occur outside the crevice because it is easier to move electrons through the metal substrate than ions through solution. This separation is vital because the common cathodic reactions or HER and ORR generate alkalinity as was shown in section 2.1. If cathodic reactions occurred in the crevice they would offset the acid generation that is step 2 in the process. 2) Hydrolysis: Metal cations have a tendency to form metal hydroxides as will be discussed in subsection 2.3.2.3.2.1 and section 5.3. This chemical reaction has the effect of lowering the pH. The occluded site places a large diffusion path between the crevice depths and the bulk environment. Because of this barrier the metal cations accumulate and the drop in pH is concomitantly greater. This effect is only visible because the cathodic reactions are occurring elsewhere. 3) Chloride Ingress: Because only anodic reactions are occurring in the crevice only positive charge is being injected into solution there. This positive charge

48 generation must be matched by charge transport. Either positive charge must flow out of the crevice or negative current must flow into it. Chloride ions will flow into the crevice to balance the positive charge. Chloride acts to destabilize the passive film, acting along with the increased acidity to increase the corrosion rate. 4) Autocatalytic: The acid generation by metal hydrolysis and rise in chloride levels to balance the charge act to raise the corrosion rate. This leads in turn to more hydrolysis and more chloride and the process takes off in an autocatalytic manner. This process is illustrated in Figure 2.2.1(a).

Another way of viewing the CCS process is to visualize how the conditions change inside a crevice and how that interacts with the relevant polarization curves. Figure 2.2.1(b) helps in this process. Part (a) is a schematic of the crevice. It is a one-dimensional crevice and is open at one end. Three points, the circle, square, and triangle are marked at increasing distances from the mouth. For the sake of simplicity, the only chemical parameter considered in this case is pH. The pH distribution inside the crevice is shown in part (b). The points marked there correspond with the positions in (a). The pH drops continuously from the mouth to the base. The effects of changes in solution chemistry appear in the polarization curve of a material in that environment. Part (c) shows the polarization curves for the metal at pHs 3,5, and 7. Since the CCS theory ignores the effect of potential, the conditions for each of the reference

49 points occur at the crevice potential Ecrev on the appropriate polarization curve. From the information in (a), (b) and (c) the current as a function of position can be calculated and is displayed in part (d). The current increases continuously from the mouth to the base. Indeed, it should be noted that these conditions are actually producing an exponentially increasing current since the current axis in (d) is logarithmic. CCSs strengths are that it explains the relative susceptibilities of various stainless steel alloys to crevice corrosion and it accounts for the initiation time. A stainless steels susceptibility can be found by comparing the aggressiveness of the solution a metal salt of the alloy makes and the metals resistance to acidic chloride environments. If a metal is resistant to a saturated solution of its own salt, then it will not corrode according to the CCS model. The initiation time arises from the amount of dissolution that must occur before a sufficiently aggressive solution is achieved. The principal problem with the CCS model is that ignores the effects of potential on generation. Potential has a large effect on reaction rate. The derivation of the Butler-Volmer kinetics given in subsection 2.1.3.1.1, although of limited applicability, shows that the chemical effect appears only in the pre-exponential whereas the potential appears in the exponent itself. Aqueous solutions are resistive. Current flow through solution will cause a potential drop. At small current densities it may be appropriate to ignore this ohmic potential, but as the crevice initiates the current (and thus the potential drop) will increase by several orders of magnitude. The implications of this are discussed in depth in the next subsection, 2.2.2, on the competing IR* theory of crevice corrosion.

50 In addition to affecting the rate of the anodic dissolution reaction, lowering the metal potential inside the crevice can also speed the rate of the cathodic reactions. While it requires a special set of circumstances above and beyond potential drop to actually cause any portion of a crevice to be polarized cathodically, cathodic reactions are also influenced by overpotential. Decreases in positive overpotentials cause exponential increases in cathodic current. Evidence of cathodic reactions occurring inside crevices was found by Pickering and Frankenthal[25] where they observed bubbles of hydrogen gas being generated at the base of crevices. A final limitation on the CCS model is that ignoring potential not only affects generation within crevice, it affects the mass transport of the charged species. The potential field of a crevice held anodically will speed the egress of positive cations as well as the ingress of negative cations.

53 2.2.2 IR* Model The IR* model for the initiation of crevice corrosion assumes that the paramount function of the crevice former is to act as a barrier to electrical flux. The theory ignores the effects of the accumulation of chemical products within the crevice. It was put into its generally recognized form by Pickering[10] The steps of the IR* process for the initiation of crevice corrosion on active/passive metals are shown in Figure 2.2.2(a). 1) Separation of Anodic and Cathodic Sites: This can be caused by oxygen depletion inside the crevice or if the entire surface is being polarized anodically by another electrode. Until this occurs no there is no net current flowing from any surface since the anodic and cathodic reactions are everywhere equal. 2) Flow of Anodic Current from Crevice: Positive current flowing into solution from the metal surfaces inside the crevice must cross the electrically resistive solution. 3) Resulting Potential Difference: The net current flow over the electrical resistance causes a potential difference to arise between the crevice and the cathodic sites on the boldly exposed surface.

The effect of this resulting potential difference depends on the nature of the polarization curve for the material/environment system. For a metal that exhibits Tafel behavior, potential drop is always protective because it lowers the driving force for dissolution. For an active/passive metal, such as the one shown in Figure 2.1.4(c), that is held in its passive region

54 the effects of potential drop can be disastrous. This is illustrated in Figure 2.2.2(b) Part (a) is a schematic of the crevice. It is a onedimensional crevice and is open at one end. Three points, the circle, square, and triangle mark increasing distances from the mouth. The electrolyte is assumed to remain of constant composition. Current flow from the sources within the crevice causes potential drop. The resulting potential distribution within the crevice is shown in part (b). The points marked there correspond with the positions in (a). No importance should be attached to the depicted slopes of the potential distribution. Obviously they depend on the currents generated as well as the intra-crevice solution resistances. The only statement that can be made is that the potential will decrease monotonically. An active/passive polarization curve for this material shown in part (c). From the potentials of part (b) the current densities at each point an be found. These are shown in part (d). The critical amount of potential drop which must occur to initiate crevice corrosion is the difference between the potential at the mouth and the Flade potential. This difference is called IR* and it lends its name to the entire theory. The position within the crevice at which the critical IR* is achieved depends on the crevice geometry and solution conductivity. Both of these parameters change during the course of a crevicing event. Increasing the solute concentration of the electrolyte will raise the conductivity and push the active site deeper into the crevice. Changes in crevice geometry will have a tendency to drive the active site deeper by widening the crevice as well as a small offsetting tendency to draw the site to the mouth by increasing the area available for corrosion.

55 IR depends on the total amount of current, so a larger geometric area will produce more current and thus pull the active site forward. The strength of the IR* model is that it can predict the location and morphology of attack and has been shown to operate in systems where there is no possibility of significant changes in composition[5]. The IR* model is able to predict IA as will be discussed in subsection 5.2.2. The weaknesses of the model are that it can only be operative for active-passive metals and that it cannot rationalize the observed incubation times. Potential distributions should be established nearly instantaneously because the propagation of an electric field in any reasonable dielectric is very rapid.

58 2.2.3 Comparison of Models The CCS and IR* models stress the importance of different aspects of crevice corrosion. The principal differences between the models are that IR* is limited to only activepassive systems and that CCS can explain the presence of incubation times. Various changes in experimental parameters will have differential effects if one or the other of the theories is dominant. A supporting electrolyte will have a tendency to shift the location of attack deeper into the crevice or prevent it entirely if IR* is dominant. If CCS, which assumes no potential variations within a crevice, is dominant then independently changing the solution conductivity should have no effect. Another change which would affect the crevice resistance would be features that changed the crevice profile such as precipitation or subcrevices. Reducing the crevice gap in such a manner would tend to increase the aggressiveness according to both the IR* and the CCS theories. Increasing the isolation of the crevice will either increase the metal ion content in the crevice or reduce the potential. Finally, crevices corroding according to the CCS model can be differentially affected in a buffering agent is used. This technique was used by Pickering[5] to prove that the CCS was not operative in the exemplar crevices he used to prove the applicability of the IR* mechanism. Both of the dominant models to explain crevice corrosion make qualitative predictions about changes, chemical or electrical, in the crevice environment. The equations governing the transport of chemical species and electrical charge through aqueous solutions have been studied since Faraday. It is a natural development to attempt to represent these theories in terms of

59 models. The goal is always a mathematical model which accurately represents the physical situation and is useful in predicting the likelihood, location, and time of attack for use as a design tool. Additionally, these models can be useful in an abstract sense for evaluating the theories about crevice corrosion themselves, since a functioning model tends to suggest the accuracy of the underlying assessment of the corrosion process

60

2.3 Principles of Modeling Crevice Corrosion

The corrosion rate of any material is determined by its chemical environment and electrochemical potential. Modeling of crevice corrosion is aimed at understanding and predicting the changes in those factors in the crevice environment, both in space and time. Section 2.3 discusses the basic principles that are used to make such predictions. It provides an overview of the equations used in modeling, examines in depth the factors that affect each term in those equations, provides a compact summary of how those terms are simplified to make the equations tractable and ends with a quick primer on the numerical methods used to solve the problems posed by crevice corrosion. Subsection 2.3.1 examines the origins and derivations of the commonly encountered governing equations used in modeling crevice corrosion. These equations are derived from the basic flux equations for chemical and electrical species in aqueous solutions. Subsection 2.3.2 provides a more in-depth look at the individual terms that go into the equations. It explains the common use of concentration rather than activity in diffusion equations, the hydrolysis reactions which are commonly encountered, and the meaning of potential in various contexts. Subsection 2.3.3 summarizes the different types of simplifications which are commonly used in crevice corrosion modeling and explains their individual strengths and weaknesses. The last subsection, 2.3.4, concludes by discussing the various types of mathematical techniques which are used to solve the equations derived in 2.3.1.

61 2.3.1 Governing Equations Commonly Used in Crevice Corrosion Modeling of crevice corrosion is a search to understand and simulate the chemical and electrical changes which occur inside occluded sites. The equations which determine the rate of change of chemical concentration or electrical charge density are both derived from their underlying flux relationships. It is useful to go through this process for both the transport of chemical species and the motion of electrical flux. Initially the focus will be on the commonly encountered forms of the equations. Subsections 2.3.2 and 2.3.3 will discuss the assumptions that are implicit in these equations.

2.3.1.1 Chemical Transport Processes Chemical species can be transported by three separate mechanisms: Convection: The motion of a species that is being carried by the bulk flow of the electrolyte. The motion of sand particles along a beach is caused by convection. Diffusion: The motion of a chemical species down a gradient in Gibbs Free Energy. The motion perfume of molecules through still air is an example of diffusion. Migration: The motion of a charged chemical species under the influence of an electrical field. The motion of electrons through a light bulb when it is powered is an example of migration. At their heart, each of the three processes can be represented in a similar fashion. This

62 similarity is used in deriving the flux relationships for each of the forces. The derivations are based on the class notes for MS 792 - Diffusional Processes in Materials.[26] The motion of a chemical species is a flux. A flux has magnitude and direction (it is a vector) and is commonly expressed in terms of quantity per area per time. A general equation for a flux is given below: Ji,force ' C i v i,force (33)

Where:
2 Ji,force is the flux vector of species i due to force [mol/m -s]

Ci

is the concentration of species I [mol/m3]

v i,force is the velocity vector of species i due to force [m/s]

Simply stated, the flux of a species, i, due to a force is the product of the concentration of species i and the velocity of the species imparted by that force.

2.3.1.1.1 Convection Convective transport occurs when a chemical species is carried along by a flowing electrolyte. Barring other forces, each molecule in a solution will tend to have the same velocity - that of the solution as a whole. The flux equation for convection follows directly from Equation 34.

63 Ji,conv ' C i v (34)

Where: Ji,conv is the flux vector of species i due to convection [mol/m2-s] v is the velocity vector of the solution [m/s]

While convective flow is easy to visualize, it is rarely used in modeling. Generally, the only force present to cause bulk fluid flow would be the occurrence of density changes as the crevice solution becomes concentrated in metal ions and neutralizing negative anions. This force is small. Typically, it is thought that the solution inside of occluded sites will remain stagnant because the extremely small height of a typical crevice and the lack of a significant driving force. An exception to the above rule is encountered in studies of the crack environment in corrosion fatigue. The cyclical force applied to such cracks alternately opens and closes the site. This provides a crack pumping mechanism that forces convection[27]. When the maximum applied stress is applied the crack flexes and opens to its largest volume. When the stress is removed or reversed the material springs back to its original shape and the crack volume decreases. This ejects any excess solution that was drawn in on the previous application of stress. Depending on the magnitude of the stress and the frequency with which it is applied this may be a significant effect.

64

2.3.1.1.2 Diffusion Diffusional transport occurs when a chemical species travels from an area where it has high chemical activity to one where it has low activity. This movement happens spontaneously. To calculate the velocity due to a force it is convenient to represent the velocity of the species as the product of a driving force and a mobility constant that scales the resulting velocity to the force applied. For diffusion, the scaling factor is mobility and the driving force is the gradient of chemical potential ~ ~ v i,diff ' &ui @ Li Where: v i,diff ~ ~ ui Li is velocity vector for species i due to diffusion [m/s] is the mobility tensor [m2-mol/J-s] is the gradient of chemical potential of species i [J/molm] In general, the mobility is a second rank tensor. In liquids, however, the mobility has no directional dependence. In other words, the mobility of a species i is a scalar, ui. This allows the flux caused by diffusion to be represented as: Ji,diff ' &C i ui Li (36)

(35)

65 Where: Ji,diff ui is the flux of species i due to diffusion [mol/m2-s] is the mobility constant for species i [m2-mol/J-s]

Equation 36 is not the commonly encountered expression for the diffusive flux of a species. That more recognized form is given below and will be used to develop the mass transport equation. Ji,diff ' &Di LC i (37)

Where: Di LC i is the diffusivity of species i [m2/s] is the gradient of concentration of species i [mol/m4]

Given the proper set of assumptions, Equations 35 and 36 are equivalent. This is shown in subsection 2.3.2.1.

2.3.1.1.3 Migration Migration occurs when a charged species is propelled by an electric field. Neutral species, such as water or O2 , do not migrate. The velocity of an ion due to migration can be found by dotting the mobility tensor and the force due to migration.

66 ~ ~ v i,m ig ' &ui @ Fi,m ig Where: v i,m ig ~ ~ ui is velocity vector for species i due to diffusion [m/s] is the mobility tensor [m2-mol/J-s]

(38)

Fi,m ig is the force for migration of species i [J/mol -m]

A charge in an electric field experiences a force equal to the magnitude of the charge times the electric field as shown in the equation below. P Fi,m ig ' qi E (39)

Where:

qi P E

is the charge on species i on a molar basis [C/mol] is the electric field vector [V/m]

The charge can be found on a molar basis from the charge number of each species and Faradays constant. q i ' zi F (40)

Where:

67 zi F is the charge number for species i [eq/mol] is Faradays constant 96,487 [C/eq]

The electric field is found from the gradient of the solution potential, LNs . The solution potential is defined and differentiated from the electrochemical potential, E, in section 2.3.2.

P E ' LNs

(41)

Where: LNs is the gradient in solution potential [V/m]

The velocity imparted to a chemical species can be found by substituting in Equations 39, 40 and 41 into 38 and scaling the force caused by migration by the mobility. ~ ~ v i,m ig ' &ui @ ziF LNs Where: v i,m ig is the velocity of species i due to migration [m/s] ~ ~ The mobility factor is again ui and the force is equal to - ziF LNs . As was mentioned previously, in aqueous solution the mobility of a given species is a constant in all directions. Thus, ui can be used in place of the mobility tensor. When the resulting velocity is used in Equation 33 the flux equation for migration is found.

(42)

68 Ji,m ig ' &C i zi F u i LNs (43)

Where: Ji,m ig is the flux of species i due to migration [mol/m2-s]

2.3.1.2 Mass Transport Equation The three transport processes of convection, diffusion, and migration represented in Equations 33, 36, and 43 are combined to create the mass transport equation. Ji ' C i v & Di LC i & zi F u i C i LNs (44)

It should be noted at this point that the second two terms, diffusion and migration, are really just separate aspects of one transport process, motion under a gradient of Gibbs Free Energy. Separating the effect of the gradient in solution potential from the gradient in concentration is a matter of convenience and custom[21].

2.3.1.3 Conservation of Mass The concentration any species in an infinitesimal volume of solution depends on the net flux of the species into or out of the volume and the generation or consumption of the species in the volume. Since the net flux out of a volume is the negative of the divergence of the flux, the rate of change of concentration for a species with time can be written as below.

69 MC i Mt Where: ' &L @ Ji % Ri

(45)

MC i Mt

is the rate of change for the concentration of i with time [mol/m3-s]

3 & L @ J is the divergence of the flux of species i [mol/m -s]

Ri

is the rate of generation of species i [mol/m3-s]

Equation 45 can be applied to each of the flux equations for the three transport processes to yield their individual contributions to the rate of change of the concentration of species i. It should be noted that the concentration, Ci, and the transport coefficients, ui, and Di, are all differentiable scalar functions of position. Each has a unique value at any point, but the values may change from point to point. This property is self-evident for the concentration, but is not immediately obvious for the transport coefficients. It is only a common assumption that the transport coefficients are simple constants, unaffected by solution composition. Subsection 2.3.2.2 discusses this assumption and the conditions under which it is appropriate in greater depth. Accounting for the differentiable scalars, mass transport equations can be written for each of the transport processes. For convection:

70 MCi,conv Mt ' &L @ Ji,conv % Ri ' &L @ C iv i % Ri ' & C i L @ v & v @ LC i % Ri (46)

For diffusion: MCi,diff Mt

' &L @ Ji,diff % Ri ' &L @ &Di LC i % Ri ' Di L @ LC i % LC i @ LDi % Ri (47)

For migration: MCi,m ig Mt

' &L @ Ji,m ig % Ri ' &L @ &C iziFLNs % Ri ' zi F u i C i L @ LNs % zi F u i LC i @ LNs % zi F C i Lu i @ LNs % Ri (48)

Before the above three equations are combined, one simplification is possible. The continuity equation[21] is a mass conservation equation which expresses the fact that a flowing fluid will not separate and generate voids. Mathematically, it expresses this as that the divergence of the solution velocity of a fluid is equal to zero. Another way of stating the theorem is that there is can be no net outflow of fluid from any point. This expression holds for incompressible fluids.

71 L@v ' 0 (49)

This simplification is strictly true, and can be used to produce the unabridged mass transport equation. MC i Mt

2 2 ' &v @ LC i % Di L C i % LC i @ LDi % zF ui C i L N % zF ui LN @ LC i % z F C i LN @ Lui % Ri

(50)

Several approximations are often used to simplify this equation still further. One relates the LaPlacian of the solution potential to the charge density in solution and the dielectric constant of the fluid. Equation 51 is also called Poissons Equation. If the charge density is assumed to be zero, it becomes the LaPlace equation. Del ,

2 L Ns ' &

. 0

(51)

Where:
2 2 L Ns is the LaPlacian of the solution potential [V/m ]

el

is the electric charge density in solution [C/m3] is the dielectric constant of the solution [F/m]

This approximation is discussed more in section 2.3.3.3.3. It is only true in bulk solution. In the double layer, the first several monolayers of solution at an interface, there are large charge separations. Outside of those few hundred angstroms, the approximation holds.

72 The final two simplifications which are possible are to assume that the transport coefficients are constants and therefore their gradients are equal to zero. LDi ' 0 (52)

Lui ' 0

(53)

A final assumption that is usually invoked in modeling of crevice corrosion is that there is no convection inside the crevice. v ' 0 (54)

Using the four assumptions of Equations 51, 52, 53, and 54 reduces Equation 50 to the following familiar form. Equation 55 is the governing equation for the accumulation of chemical species within a volume. MC i Mt

' Di L C i % z F u i LNs @ LC i % Ri

(55)

The governing equation for the chemical concentration is a second-order partial differential equation. The second order term is due to diffusion, the first order term is due to migration and the zeroeth order term is due to generation. If convection were considered that flux would add an additional first order term. For a system of n species this equation can be applied independently to n-1 of them.

73 The reason it cannot be applied to the nth species as well is discussed at the end of this subsection under the topic of Charge Neutrality. Essentially, there is an additional constraint imposed by charge neutrality that reduces the number of degrees of freedom by one. One of the terms that go into this transport equation is the gradient of solution potential. The governing equation used to determine the solution potential field, and thus the gradient, is developed in the next topic.

2.3.1.4 Electrical Transport Processes Electrical charge moves through aqueous solutions by the transport of charged ions. Free electrons, the charge carriers in metals and n-type semiconductors, are not available to carry charge in water. The following derivation is based on the assumption, discussed in section 2.3.2.4.3, that there is no diffusion potential. Without a diffusion potential the solution potential is determined solely by net current flow. Accounting for the effects of diffusion potential would result in a minor reformulation of these equations and add an obscuring layer of complexity. Just as in Equation 45 for the mass transport of chemical species the rate of accumulation of electrical charge equal to the sum of the flux of electrical current out of a volume of solution and the rate of generation of charge in solution. MDel Mt Where:

' & L @ Jel % Re

(56)

74 MDel Mt Re is the density of electric charge in solution [C/m3] is the generation rate of electrical charge [C/m3-s]

The electric flux through solution is determined by the electrical conductivity and the electric field. The electric field is the gradient of the solution potential. This is a restatement of Ohms Law. Jel ' &6 LNs (57)

Where: Jel is the net electric current density vector in solution [A/m2] is the solution conductivity [-m]-1

Electrical charge is not created in solution. It only arises from an electrochemical interface. To find Re which is the rate of introduction of electrical charges into a volume, we must divide the total current flowing into an infinitesimal by its volume. This is illustrated in Figure 2.3.1.4(a) for the general case. The governing equations for the mass transport of electrical charge as well as chemical species assume that generation is occurring evenly throughout the volume. In a crevice all of the charge and many of the chemical species are generated at interfaces. It is a simple procedure of geometry to scale the total flux by the total volume for each infinitesimal. For the simple crevice with one active side shown in Figure 2.3.1.4(a) total flux is the

75 product of the area of the infinitesimal volume and the flux density. j J i ' A @ Ji (58)

Where:

j Ji is the total flux of i into a volume [mol] A is the area of the reacting surface [m2]

For a cylinder, volume is the product of the area of one face and the height. V' A @ h (59)

Where: V is the volume [m3]

Equations 58 and 59 can be used to find the generation rate expressed in term of volume rather than area. A @ Ji A@h Ji h

Ri '

'

(60)

Where: Ri is the generation rate per volume [mol/m3]

This equation shows the effect of height on generation. The generation rate of chemical

76 species on a volume basis is inversely proportional to the height of the crevice. For a crevice of constant reaction rate, halving the average height will result in a doubling of the generation rate. This doubling affects not only the maximum values achieved but the rate at which they are approached. A similar analysis can be performed for electrical current to find the rate of charge generation. Re ' iA i ' hA h

(61)

Where: i A h is the current density across an interface [A/m2] is the corroding surface area [m2] is the height of the volume [m]

Equations 57 and 61 can be substituted into Equation 56 to get MDe Mt i h

' &6 L Ns %

(62)

At steady-state, the rate of change of the charge density is zero and this equation can be used to solve for the solution potential distribution. Since this governing equation is used even for systems where the interfacial current density is zero, it is useful to transfer the h dependence to the terms which are always present. Multiplying both sides by h allows the effects of changes in height on the potential distribution to be accounted for in all cases. This

77 yields the final form for the governing equation for potential distributions. MDe Mt

2 ' &6 h L Ns & i

(63)

Interestingly, this equation shows one of the pitfalls associated with assuming charge neutrality. Equation 51 shows that the LaPlacian of s is proportional to e. If the charge density is assumed to be zero, Equation 63 can lead to a contradiction. At steady-state the rate of change of the charge-density is zero. If the charge density is assumed to be zero then Equation 51 states that the LaPlacian of the solution potential is also zero. If two of the terms in Equation 63 are zero, the the third, the current density on the crevice walls, i, must also be zero. Since a steady-state can be reached when i is non-zero, L2 N cannot be always equal to s zero. As will be discussed later in this subsection, an assertion of charge neutrality is actually applied only to the concentrations of chemical species, not to electrical charge. Insignificant deviations from charge neutrality in terms of species concentrations still allow enough charge density to balance the i term in Equation 63 above.

79 2.3.1.5 Alternate Approach to Calculating the Electric Field Watson and Postlethwaite[28] used an alternate method to calculate the gradient in s. This approach is shown here only as a different method of calculating the potential inside a crevice. It was not used in the modeling for this dissertation. Since electrical current is carried in solution only by ions, the total electrical current can be calculated from the sum of the individual ionic fluxes. Jel ' F j zi Ji
i

(64)

If the individual flux equations are substituted into Equation 64 the following representation is achieved.
2 Jel ' F v j zi C i & Fj zi Di LC i & F 2 LNsj zi u i C i i i i

(65)

If J el

is known then Equation 65 can be solved for L2 N . s Jel


2 zi u i C i

v j zi C i % Fj
i i 2 zi u i C i

j zi Di LC i & F j zi u i C i
2 i i

LNs ' &

F 2j
i

(66)

It is not immediately obvious why Jel

is easily available in the general case.

2.3.1.6 Charge Neutrality Applying only the governing equations for chemical and electrical flux developed earlier in this subsection can produce a physically non-realizable situation. Different rates of transport

80 for different species can mathematically produce a macroscopic charge separation. Such charge separations do not occur in real electrochemical systems because, as will be seen in this subsection, appreciable accumulations of charge produce very large potential differences. Ions would quickly migrate under the resulting electric fields to reduce the excess charge. To counter the artifact of large-scale charge separation, one species has its governing equation that was produced by the chemical flux equation replaced with a statement of charge neutrality. This statement fixes the concentration of one species to neutralize any charge produced by the free species in order to eliminate any large deviations from charge neutrality. As will be discussed later in this subsection it does not imply that LaPlaces equation replaces Poissons. A commonly-made assumption in modeling crevice corrosion is that electrolyte maintains charge neutrality. Poissons equation (Equation 51, repeated below) relates the density of free charge in solution to the second derivative of the solution potential. De ,

2 L Ns ' &

(51)

The second derivative of s can be used to calculate the magnitude of e. Equation 181 in Case 2 of section 4.1.1.2 gives a formula for s inside a one-dimensional crevice of constant height, h, constant conductivity, , constant corrosion flux, Jwalls, along the walls of length x0 and having a mouth potentiostatically controlled at a potential of 0. These conditions are illustrated in Figure 4.1.1.2(a) and discussed at length along with a derivation of the potential equation in Case 2 of section 4.1.1.2.

81 Ns(x) ' & Jwalls 26h x2 % Jwallsx 0 6h x % N0

(181)

The LaPlacian of s is given below. 2 L Ns(x) ' & Jwalls 6h

(67)

Combining Equations 51 and 67 and solving for e yields the following expression: De ' & Jwalls 6h ,

(68)

The value for the dielectric constant of water is related to the dielectric of free space by the relative dielectric for water. , ' ,r ,0 (69)

Where: r 0 is the relative dielectric of water is the dielectric of free space [F/m]

Combining Equations 68 and 69 and using the relative dielectric of water, 78, the dielectric of free space 8.854 10-12 [F/m], and the physical characteristics of the crevice from Case 2 of section 4.1.1.2 given in Table 14, the charge density can be found. De ' & 10 7.629991 @10
&5

@ 78 @ 8.8514 @ 10&12 ' 9.05 @10&5 [C/m 3 ]

(70)

82 Since the only charge carriers in aqueous solution are ions, this charge density can be related to the charges carried by the concentrations of the individual species in solution. De ' F j zi C i
i

(71)

Setting Equations 70 and 71 equal to each other and assuming that all of the deviation is caused an excess or deficiency in the concentration of one species reveals the magnitude of the deviation of in terms of the change in concentration of the species. Jwalls 6h 1 z iF

)C i ' &

,r,0 @

(72)

Where: )C i is the change in concentration of species i required to alleviate any charge imbalance [mol/m3]

For a monovalent anion like chloride, the excess concentration required to create the charge calculated in Equation 70 is one M. The net result is that for the kinds of electric fields encountered in crevice corrosion, the solution is essentially charge neutral when considered from the standpoint of the concentrations of the species. The deviation in charge is not large enough to cause a noticeable change in the concentration of the chemical species for electrolytes with solutes in the millimolar range or greater. For such solutions the charge

83 neutrality equation, Equation 73 below, holds and is commonly used. In highly pure environments, such as those encountered in the PWR reactors, the deviation may need to be considered and the approximation may not be suitable. j zi C i ' 0
i

(73)

It must be noted that if Equation 73 is enforced on a solution of n species, then only n-1 of the species are independent variables. The nth variables concentration is determined by the other n-1. Its concentration is either augmented or depleted to maintain charge neutrality.

Summary There are three types of governing equations that are used in modeling crevice corrosion. A governing equation based on the movement of chemical flux, Equation 44, can be applied to each chemical species save one. The potential field can be found for use in the transport equations by applying a governing equation, Equation 63, based on the flux of electrical current. Finally, a statement of charge neutrality, Equation 73, can be used to determine the concentration of one species in order to eliminate any charge differences caused numerically by the application of the chemical transport governing equations to the other species. A number of approximations and assumptions went into the governing equations of this section. The next subsection goes into more detail about the assumptions that are involved.

84 2.3.2 Examination of Terms Used in Crevice Corrosion Modeling This subsection examines some of the terms and assumptions that are often used in modeling crevice corrosion. Issues in mass transport, chemical generation, and potential are elaborated on, with an emphasis on the underlying assumptions of the parameters in the governing equations. In mass transport the topic of using LC i rather than Li bears some

discussion, as do the transport coefficients. Generation and the choices made in how to represent polarization data can have large effects on the chemical concentration fields which are developed, as can the homogeneous reactions such as hydrolysis. Finally, the issue of potential is addressed. The term is used to represent a number of different potentials and this subsection defines the standard used throughout this dissertation.

2.3.2.1 Use of Concentration Rather than Activity in Diffusion It is gradients in chemical potential that actually drive diffusion. However, the commonly encountered form of the diffusion equation involves gradients in concentration. This sub-subsection follows the series of steps and approximations that are done to make this transformation. The process gives insight into the limitations of the method and it will serve to place the next sections literature review in context. This section starts at Equation 36 Ji,diff ' &C i ui Li (36)

and ends with Equation 37, which is the commonly encountered form

85 Ji,diff ' &Di LC i (37)

The first steps in this transformation involve finding an expression for the gradient in chemical potential which is amenable to conversion to the gradient in concentration. The expression for the chemical potential for species i is[22] i ' i % RT ln(a i)
0

(74)

Where: i i
0

is the chemical potential of species i [J/mol] is the chemical potential of species i in the standard state [J/mol]

R T ai

is the universal gas constant, 8.314 [J/mol-K] is the temperature [K] is the activity of species i [unitless]

The chemical potential of a species is equal to the chemical potential of that species in its standard state plus the product of the universal gas constant, the absolute temperature, and the natural logarithm of the activity of the species. Equation 74 can be used to find an alternate representation for the gradient of i.

86 0 Li ' L(i % RT ln(ai)) ' RT L ln(a i) ' RT Lai ai (75)

A drawback to this formulation is that it has substituted a dependence on Lai for the dependence on Li . The value of the single ion activity is no more easily accessible to experiment or theory than is the chemical potential. It is fruitful to use an alternate formulation that expresses ai in terms of concentration, Ci, and the activity coefficient i. ai ' (i C i (76)

Where: i is the activity coefficient [m3/mol]

Using this expression in Equation 75 yields the following relationship 0 Li ' L(i % RT ln((i C i)) ' RT L ln((i C i) ' RT (( LC % C i L(i) (iC i i i (77)

This form is potentially more useful, since it contains LC i , but it still contains a

87 dependence on i and L(i . The scaling factor to convert Ci to ai is easier to use than ai was previously. A better formulation which is much closer to the desired form is obtained below. Mi MC i

Li '

LC i

'

M( RT (i % C i i LC i MC i (iC i Mln(i RT 1 % LC i MlnC i Ci

(78)

'

When this expression is substituted into Equation 36 for the diffusive flux we get an expression very close to that used in Equation 37. Ji ' &C i u i Li ' &C i u i Mln(i RT LC i 1 % MlnC i Ci Mln(i MlnC i LC i (79)

diffusion

' &ui RT 1 %

This expression can be converted to Equation 37 by a substitution and a simplification. First, the substitution is to change the transport coefficient. The Nernst-Einstein equation[21] relates the diffusivity to the mobility, the gas constant and the temperature. Di ' uiRT (80)

The required assumption is that the activity coefficient, i, is independent of Ci.

88 M ln(i M lnC i ' 0

(81)

Putting the substitution of Equation 80 and the assumption of Equation 81 into Equation 79 yields Equation 37, also known as Ficks first law, which is repeated below. Ji ' &Di LC i (37)

diff

Ficks first law is a valid approximation only if the activity coefficient is independent of concentration. This assumption is true at low concentrations by the dilute solution approximation[21]. This approximation is discussed in the following subsection.

2.3.2.2 Transport Coefficients As was seen in subsection 2.3.1, the transport coefficients are very important in modeling the behavior of electrochemical species in aqueous solution. The typical assumption made is that mobility is a constant, independent of pressure, temperature, and electrolyte composition and that the diffusivity is related to it by the Nernst-Einstein Equation which was first presented in the previous subsection as Equation 80. Di ' uiRT (80)

This expression is only strictly true in dilute solutions. Dilute solutions are those in which the solute interacts only with the solvent. As the solute concentration increases, the

89 individual solute atoms begin to interact and the relationship breaks down. Further complicating effects arise if the viscosity of the crevice solution changes with composition and also if precipitation within the crevice produces a tortuous path. Each area is discussed in the following three subsections.

2.3.2.2.1 Ion/Ion Interaction Effects Once inter-solute interactions become appreciable the Nernst-Einstein relationship no longer applies. Two approaches have been used to finding the diffusion coefficients in concentrated solutions. One is an empirical relation developed from the changes in conductivity observed in concentrated electrolytes[29]. The other method uses a formula that accounts for the effects of changes in the activity coefficient, i [30].

2.3.2.2.1.1 Empirical Correlation Figure 2.3.2.2.1.1(a) is reproduced from Gartland[29]. It presents the relative equivalent conductivities, , for a variety of metal chlorides as a function of ionic strength and uses the equivalent conductivity at I = 1 as a reference point. The ionic strength is defined by the following equation: 1 2 I ' j zi C i 2
i

(83)

Where:

90 zi is the charge number for species i [eq/mol]

The zi2 term means that higher-valence ions have a greater effect on the ionic strength. A 1 M solution of AlCl3 will have an ionic strength of six, while a 3 M solution of NaCl will have an ionic strength of only three. The equivalent conductivity of the metal salt is the sum of the ionic conductivities for its constituent cations and anions, + and -. 7 ' 8% % 8& (84)

Where: + is the ionic conductivity [m2 / -eq] is the ionic conductivity for the cation [m2 / -eq] is the ionic conductivity for the anion [m2 / -eq]

The ionic conductivities are related to the charge number and the mobility of the species. 8i ' F 2 |zi| u i (85)

Where: i is the ionic conductivity for the species i -eq] [m2 /

91 If zi is assumed to be constant then any changes in must be due to changes in ui. Gartland fit a third order polynomial to the data in Figure 2.3.2.2.1.1(a) and obtained a decay function g(I) which was used to account for changes of mobility with increasing solution ionic strength. g(I) ' 0.8375 % 0.16 I % 0.0015 I 3 &1 (86)

Gartland does not use the decay function to model the changes in diffusivity. Figure 2.3.2.2.1.1(b) illustrates the diffusivities for two metal salts over a range of molarities. The diffusivities do vary with electrolyte composition, but the size of the changes, ~ +- 10% of the magnitude, is small. Because the diffusivities are relatively constant, the diffusion coefficients are found from the Nernst-Einstein relationship using the mobility at infinite dilution[29]. A more mechanistic approach was used by Tester[30]. It is developed in the next section.

95 2.3.2.2.1.2 Use of Activity Coefficients for Diffusivities Tester presented a model for the diffusivity which incorporates the effects of the activity coefficient[30]. An advantage of this method is that it provides a link to the thermodynamic literature which focuses on calculating activity coefficients. The relationship used is given below: Di
0

Di '

0r

1 % m

d ln(i dm

(87)

Where: Di0 r is the diffusivity of species i at infinite dilution [m2/s] is the relative viscosity of the solution compared to pure water at 22 EC m is the molality of the solution [mol / 1000g water]

The relationship of i to molality can be found by a number of techniques. One commonly used approximation is the Debye-Huckel equation[10]. I 1 %
0 ai B

log((i ) ' & A zi

0 % BI I

(88)

Where: A ai0 is a coefficient of the Debye-Huckel limiting law is the ion size parameter for species i

96 0 B is a coefficient of the Debye-Huckel limiting law

The Davies equation has the same form as Equation 88 with ai0B = 1 and B = 0.3. This is similar to the method used by Sharland[6]. Figure 2.3.2.2.1.1(c) is a reproduction of Figure 2 from Walton[10] . It plots the log of the activity coefficient for CaCl2 calculated by both the Davies and B-dot Debye-Huckel equations and compares them to experimental data collected by Staples and Nuttal. A more accurate and complicated method was presented by Song[31]. Interestingly, though no direct comparison was made between the work of Gartland and Tester, an examination of Waltons curve in Figure 2.3.2.2.1.1(c) suggests that the diffusion coefficient should have the same shape as the data presented by Gartland in Figure 2.3.2.2.1.1(b). Testers model considered only diffusion. No mention was made of a method to extract the mobility from the diffusivity.

2.3.2.2.2 Viscosity Viscosity changes in the crevice solution will affect the mass transport coefficients. Equation 87 from the work of Tester[30], repeated below for clarity, shows that for all other factors being held equal, changes in the relative viscosity will scale the effective diffusivity of species i, Di, inversely. Di
0

Di '

0r

1 % m

d ln(i dm

(87)

97 2.3.2.2.3 Porosity/Tortuosity Precipitation within a crevice will have an adverse effect on the transport coefficients. In the liquid phase, transport is relatively easy. In the solid, the diffusivities will be several orders of magnitude smaller. Based on the geometry of the precipitates in the crevice one of two cases will apply. Either the liquid will be the continuous phase or the precipitation will be so great that the solid becomes the continuous phase. The following equations are adapted from the work of Hamilton on thermal conductivity[32]. If the liquid forms the continuous phase and has a diffusivity more than 100 times greater than the diffusivity in the solid, then the effective diffusivity can be found by the following equation. Di,eff ' Di,l(1&V s) (89)

Where: Di,eff Di,l Vs is the effective diffusivity of the crevice [m2-s] is the diffusivity of species i in the liquid phase [m2-s] is the volume fraction of precipitates [unitless]

The great difference in diffusivities makes the effective diffusivity independent of the precipitate morphology. Equation 89 is a simplification of the full equation which must be used if the precipitate forms the continuous phase. The complete equation is given below.

98 Di,s % (n&1)Di,l & (n&1)V s(Di,l&Di,s) Di,s % (n&1)Di,l % V s(Di,l & Di,s)

Di,eff ' Di,l

(90)

Where: Di,s n is the diffusivity of species i in the solid phase [m2-s] is a constant for the system under study [unitless]

The value of n depends on Di,s, Di,l and the shape of the particle. It can usually be assumed that n is equal to 3. Equally important to the transport terms in determining the chemical concentration fields inside a crevice are the rates of generation of chemical species. The underlying information that goes into representing hetero- and homogeneous generation rates are presented in the following two topics.

2.3.2.3 Generation of Chemical Species There are two components to the rate of generation of chemical species, Ri. There are heterogeneous electrochemical reactions that occur at an interface and there a number of homogeneous chemical reactions that occur throughout the crevice solution. This subsection addresses each type of reaction and the methods which must be used to account for them in modeling crevice corrosion.

99 2.3.2.3.1 Heterogeneous Reactions Heterogeneous electrochemical reactions can be entered into a model in one of two fashions. The dependence of the reaction rate on potential and the secondary factors such as chemical environment, temperature and pressure can be entered from first principles. The calculations used in section 2.1.3.1 for Tafel behavior would be examples of this type. Anodic dissolution behavior is often complicated by additional factors such as film formation that prevent such simple representations of the current-potential relationships. A different approach is to incorporate experimentally obtained polarization data into a model. Some representation of the I vs E data must be made to do this. The tradeoff in representing polarization data is fidelity, accuracy to the measured curve, versus calculation speed and storage space. A second tradeoff is that not all of the approximating schemes are amenable to analytic solution techniques. Analytic solution techniques generally require more simple representations of the boundary conditions than are allowable with numerical methods. This issue is discussed in greater detail in subsection 2.3.4. Figure 2.3.2.3.1(a) illustrates a typical polarization curve for an active-passive metal and four different methods for representing it. There are four common ways of simplifying the representation of a polarization curve such as the one shown in Figure 2.3.2.3.1(a). Passive only: The polarization curve can be approximated as simply a single current, independent of potential, that is equal to the passive current density. The prime advantages of such a simplification are speed and

100 suitability for use in analytic solutions. This simple method of representing a metals polarization behavior may be acceptable for analyzing the initiation of crevice corrosion. By definition, a passive current density is relatively constant over some potential range for a material in an environment. If the model is only meant to describe the case in which the entire crevice remains in that safe zone, then this approximation is good. Obviously, once the metal initiates the model then does a very poor job of representing the current over some portion of the crevice. However, an initiation model is only concerned with the steps leading up to initiation, and not what happens afterwards. The later steps are the domain of propagation models.

Passive/Active Transition: A slightly more realistic approach to modeling a polarization curve is to use two current densities, a passive and an active one, and a transition potential. Such a representation captures the grossest features of an active/passive polarization curve. No other detail is translated into the model. Although this method seems very simple, it is still unsuitable for use in analytic solutions. The discontinuity at the transition potential is not amenable to non-computational solution techniques.

101 Piecewise: A piecewise model approximates a polarization curve as a series of straight lines. This method has the advantage that the accuracy can be refined as much as needed by increasing the number of line segments used in the approximation. Essentially, the passive/active transition method is a special case of this method. Accordingly, this method too is incompatible with analytic solutions. The greater fidelity to the polarization curve is paid for twice. Each time the polarization curve is accessed a small search procedure must be performed to find the correct line segment. This search procedure becomes more burdensome as the number of line segments increases. The other price is exacted only once, when the model is first created. Unless the raw polarization data are used, there are no methods of automatically creating line segments and the procedure has to be done by hand.

Polynomial: A good tradeoff between accuracy and compactness is sometimes a polynomial representation. A high order polynomial can be fit to a polarization curve. This method is suitable for use in either analytic or numerical solutions. Fitting a polynomial can be done automatically, smooths out noise on the experimental curve and produces a continuous representation. The storage space and calculation time required for such a representation is small compared to the time

102 required to search out the proper interval and solve the appropriate line for a piecewise approximation.

A number of methods can be used to allow a crevice corrosion model to incorporate polarization data. When possible, polarization curves can be constructed from the physical characteristics of the system. In all cases it is possible to represent an experimentally obtained polarization curve in some fashion. Generally, the simpler, faster techniques are less accurate.

104 2.3.2.3.1.1 Stoichiometric Dissolution An experimentally-obtained polarization curve measures current density versus potential. The governing equations for the accumulation of chemical species require that this electrical current be converted to fluxes of the individual chemical species. If the dissolving metal is an alloy a decision must be made: is the alloy dissolution stoichiometric? An alloy is typically composed of a matrix and various precipitates, inclusions, and constituents. If each atom dissolves according to its atomic fraction in the alloy as a whole, then the material dissolves stoichiometrically. To do this the particles must dissolve at the same rate as the matrix and the elements in the matrix must not preferentially dissolve. These caveats might seem overly strict, but in practice if a material is undergoing general attack at an appreciable rate, then it is dissolving stoichiometrically. If a material is dissolving evenly, the non-dissolving components would have to diffuse away from the surface to allow non-stoichiometric dissolution. Obviously uneven corrosion, such as intergranular attack, can be non-stoichiometric without having to redistribute atoms. The following equations give a methodology for converting a current density to a flux density for an individual species. The average dissolution rate of atoms for an alloy can be found from Faradays law below. Javg ' i zavg F (91)

Where: Javg is the flux of atoms across an interface from the alloy on

105 an averaged basis [mol/m2-s] i zavg is the current density from the alloy [A/m2] is the average charge number for the alloy [eq/mol]

The average charge number for the alloy can be found with the following formula. zavg ' j zi a/oi
i

(92)

Where: zi a/oi is the charge number for species i [C/eq] is the atomic fraction of species i [unitless]

The atomic fraction of each species is found by using the weight fraction, fi, of each component. Alloy compositions are usually given in weight fractions. fi a/o i ' aw i j
i

fi aw i

(93)

fi awi

is the weight fraction is the atomic weight of species i

The flux of atoms on an alloy-averaged basis calculated in equation 91 can be apportioned amongst the various chemical components by using the atomic fraction, a/oi.

106 Ji ' a/o i Javg (94)

Where: Ji is the flux of species i across an interface [mol/m2-s]

The fluxes from non-stoichiometric dissolution must be calculated by different means. The generation of chemical species inside a crevice does not have to occur only at an interface. A number of homogeneous reactions are possible and the various types of such reactions are discussed in the next subsection.

2.3.2.3.2 Homogeneous Reactions Homogeneous reactions create chemical species throughout a volume of solution, rather than only at a metal/solution interface. Such reactions do not violate mass conservation. They merely convert one species into another. An example would be the precipitation of a metal salt from a supersaturated solution. Soluble Fe+2 and Cl- are converted into solid FeCl2 but the total amounts of Fe and Cl (in all forms) remain the same. There are three main types of homogeneous reactions that need to be considered in modeling crevice corrosion - hydrolysis, precipitation, and homogeneous oxidation. Hydrolysis is the tendency of metal cations to form metal hydroxides in aqueous environment. Precipitation reactions generate solid products when a solution becomes saturated. Electrochemical species can also be oxidized or reduced in bulk solution.

107 2.3.2.3.2.1 Hydrolysis The major group of homogeneous reactions that must be considered when crevice corrosion is modeled is the hydrolysis of metal cations. The primary reference text on the subject is Baes and Mesmer[33]. The numerical data presented in this subsection are all drawn from that work. Another useful reference is Buchheit et al [34] which covers many of the manipulations. Hydrolysis reactions occur when metal cations form metal hydroxides in aqueous solution. A bare metal cation has a tendency to acquire a shell of water and hydroxyl ions. This complex acts as its own molecule and has its own characteristic charge and transport coefficients. It should be noted that hydrolysis reactions do not change the valence of the underlying cations. The valence of a cation can only be changed by reduction or oxidation as discussed later in this subsection. Two equivalent representations for this process are shown below. xMe z% % yOH & Mex(OH)y
(xz&y)%

(95)

Where: x is the stoichiometric coefficient for the metal cations involved in the hydrolysis reaction y is the stoichiometric coefficient for the hydroxyl ions involved in the hydrolysis reaction z is the valence of the metal cation

108 and
%(zx&y)

xMe %z % yH2 O Mex(OH)y

% yH %

(96)

They differ only in that Equation 95 omits the fact that if OH- is consumed water will self-dissociate to replace the hydroxyl and free additional hydronium. The equilibrium concentrations of the various species are determined by the formation quotient, Qxy. [Mex(OH)y
%xz&y

Qxy '

][H % ]y

[Me %z]x

(97)

Where: Qxy is the formation quotient of the hydrolysis product involving x cations and y hydroxyl ions [unitless] [X] is the concentration of species X [ mol/l]

The equilibrium concentrations determined thermodynamically by Equation 97 are not reached instantaneously. There is a finite formation time for the creation of the metal hydroxide, especially for polynuclear products. Polynuclear hydrolysis products involve two or more metal cations. In the notation of Equations 95 and 96, x is greater than one for polynuclear hydrolysis products. Such reactions may take several days to achieve equilibrium[33]. The formation of mononuclear hydrolysis products is much more rapid and a common simplification is to only consider the formation of mononuclear products.

109 Baes and Mesmer[33] provide thermodynamic data for the hydrolysis of many elements. These data can be used in two ways. The first is to determine the speciation of a cation over a range of pHs. At any pH a cation can exist in multiple hydrolysis states. The ratio of the concentration of these states is determined by the formation quotients for the various reactions. Different data are available for the hydrolysis of different species. For a species like Cr+3 the data are simply tabulated as in Table 1 below.

Reaction Cr 3% % H2 O CrOH 2% Cr 3% % 2H2 O Cr(OH)2


%

Quotient Q11 Q12 Q13 Q14

Log Value -4.0(0.3) -9.7 -18 -27.4

Cr 3% % 3H2 O Cr(OH)3 Cr 3% % 4H2 O Cr(OH)4


&

Table 1.Values for the formation quotients of the various Cr species Equation 95 or 96 can be applied once per species and the resulting set of equations can be solved simultaneously using the formation quotients of Table 1 to calculate the relative abundance of the various Cr+3 species. This is illustrated in Figure 2.3.2.3.2.1(a). At low pHs, pH < 2, the relative scarcity of OH-s prevents almost all individual cations from hydrolyzing. As the pH rises, greater amounts of hydroxyl are available for incorporation into hydrolysis complexes and higher-order species such as Cr(OH)2+ and Cr(OH)3 appear. At the highest

110 pHs, pH > 11, Cr(OH)4- begins to dominate. Slightly different, more accurate data are available for species such as Al+3. The formation quotients have a dependence on the overall solution composition. The data for the formation quotients of species such as Al+3 include a dependence on I, the ionic strength as shown in Equation 98. Log Qxy ' Log Kxy % a I 1/2 /(1%I 1/2 ) % bm x (98)

Where: I mx Kxy, a, and b is the ionic strength [eq2/mol-l] is the concentration of the anion [M] are tabulated constants

The ionic strength was defined in Equation 83 which is repeated here for convernience: 1 2 I ' j zi C i 2
i

(83)

For a salt composed of two monovalent ions, the ionic strength is equal to the concentration of the salt. Values for the various constant Kxy, a and b are give in Table 2 below. The values from Table 2 are used to generate the plot in Figure 2.3.2.3.2.1(b). Just as was shown in the corresponding figure for Cr+3 hydrolysis products, at low pHs, pH < 3, the relative scarcity of

111 OH-s prevents most individual cations from hydrolyzing at all. As the pH rises, greater amounts of hydroxyl are available for incorporation into hydrolysis complexes and higher-order species such as Al(OH)2+ and Al(OH)3 appear. At the highest pHs, pH > 9, Al(OH)4dominates.

Reaction Al 3% % H2 O AlOH 2% Al 3% % 2H2 O Al(OH)2


%

Log Kxy -4.97 -9.3 -15.0 -23.0

a -2.044 -3.066 -3.066 -2.044

b 0.52 0.55 0.45 0.36

Al 3% % 3H2 O Al(OH)3 Al 3% % 4H2 O Al(OH)4


&

Table 2. Values for the formation quotients of the various Al species

While the information on speciation is useful, of more concern is the pH change caused by the introduction of metal cations into solution. The acidification the metal cations cause is a primary factor in the initiation of crevice corrosion according the CCS mode for crevice initiation as discussed in subsection 2.2.1. The procedure for calculating the acidification caused by adding a mix of metal cations in various hydrolysis states to an aqueous solution of arbitrary initial pH is relatively straightforward. There are three relationships that need to be used: one relates the total metal ion concentration, [Me]total to the concentrations of [H+] and [Me+z], a second calculates the

112 amount of [H+] freed by hydrolyzing [Me+z], and the final one calculates the amount of water that must by lyzed or created to form equilibrium with the self-disassociation of water. The general procedure is to iteratively solve for the concentration of [H+] to find a stable pH. The equilibrium, stable pH is the one which when used to determine the speciation of the metal cations is in turn produced by the freeing of [H+] which results from that speciation. The procedure discussed here considers only solutions of a single metal cation and its products, i.e. mononuclear hydrolysis.

Finding an Equivalent Chemistry for Hydrolysis Mass transport and electrochemical production of chemical species in a crevice can produce concentrations of metal ions and hydrolysis products that are not in equilibrium. The first step to finding the resulting pH after equilibrium is reached is to convert the solution to an equivalent solution of unhydrolyzed [Me+z] and acidified or alkalinized water. The goal is to convert a complex set of concentrations of hydrolysis products back to a situation which is akin to adding a metal salt to an aqueous solution with an arbitrary starting pH. The total metal cation concentration can be found by summing over all of the hydrolysis products denoted by the x,y pairs below. [Me]total ' [Me %z] % j x @[Mex(OH)y
(x,y)

%xz&y

(99)

If all of the hydrolysis products were converted into [Me+z] large quantities of [OH-] would be released. The total amount of hydroxyl after the freeing process is found by the

113 following equation. [OH ] ' [OH ]0 % j y @ [Mex(OH)y


(x,y) & &

%xz&y

(100)

The final step involved in finding the equivalent starting solution is to use the selfdisassociation of water to rebalance the concentrations of [H+] and [OH-]. Not only can mass transport destroy the equilibrium, but the process of unhydrolyzing the hydrolysis products generates large amounts of [OH-] without a corresponding decrease in [H+]. Simple algebra can correct this deficiency. The formula for the self-disassociation of water is:1 [H % ]@ [OH & ] ' 10&14 (101)

If this product is greater or less than 10-14 then water will either break apart or form from its components until the product is rebalanced. Since we are adding [OH-], some of what is added will combine with [H+] to satisfy Equation 101. [H& q]@[OH& q] ' 10&14 (102)

Where: q is the quantity of water formed [mol/l]

Note: The ion concentrations denoted by [X] are given with units of molarity, rather than [mol/m3] used elsewhere in the thesis for Ci. This is to provide agreement with published work on hydrolysis.

114 Equation 102 can be rewritten as a quadratic equation. q 2 % (&[H % ]&[OH & ])q % [H % ][OH & ] & 10&14 ' 0 (103)

If this equation is solved for q, [H % ]%[OH & ] K ([H % ]%[OH & ])2 %4(10&14 & [H % ][OH & ]) 2

q '

(104)

There are two roots to this equation. Since negative concentrations of hydroxyl or hydronium are impossible, q must always be smaller than the lesser of [H+] and [OH-]. Thus, only the negative root has any physical significance. Depending on the value of [H+] [OH-] one of the following three cases will apply [H+] [OH-] = 10-14: The concentrations of [H+] and [OH-] are in equilibrium. In this case the discriminant is equal to ([H]+[OH])2 and therefore q will equal zero. No adjustment need be made to the concentration of either species. [H+] [OH-] > 10-14: There is an excess of [H+] and [OH-]. The discriminant will be less than ([H]+[OH])2 and q will be greater than zero. A positive q will form water and reduce the concentrations of [H+] and [OH-]. [H+] [OH-] < 10-14: There is a lack of [H+] and [OH-]. The discriminant will be greater than ([H]+[OH])2 and q will be less than zero. A negative q will split water and increase the concentrations of [H+] and [OH-]

115 Once the starting solution has been changed into an equivalent solution of [Me+z] at the proper pH, then the solution can be rehydrolyzed to find the resulting pH.

Hydrolyzing a solution of known [Me]total and starting pH There are only two free variables when mixing a quantity of [Me+z] into water to find the final pH, the total amount of [Me+z] added and the starting pH. The final concentrations of all the species involved are predetermined by thermodynamics. The concentration of each hydrolysis product is determined by the concentrations of [Me+z] and [H+]. The concentration of [Me+z] is determined by [Me]total and the concentration of the other hydrolysis products. Finally, the concentration of [H+] is determined by the starting pH and the concentrations of the hydrolysis products. It is an iterative search process to find the correct pH for the resulting solution. This process is listed below. 1. Select a trial [H+]trial as a starting point. 2. Using that [H+] find the resulting concentrations of hydrolysis products. Equation 97 relates the concentration of metal hydrolysis products to [H+] and [Me+z] through the formation quotient. Since the [Me]total is defined, [Me+z] is not free according to the following equation. [Me %z] ' [Me]total & j x @ [Mex(OH)y
(x,y)

%xz&y

(105)

Reorganizing Equation 97 for a system of only mononuclear products (x = 1) produces the following representation.

116
%z&y [Me(OH)y ]

'

[Me %z]Q1y [H % ]y

(106)

Restricting the system to only mononuclear products allows use of this simple method to find [Me+z] [Me]total 1 % j
y

[Me %z] '

Q1y [H % ]trial
y

(107)

No matter how [Me+z] is found, Equation 106 allows all of the hydrolysis products to be calculated using that value and the trial [H+]trial. 3. Using the concentrations for the hydrolysis products found in (2), calculate what the concentration of [H+] should be with the following formula. [H % ] ' [H % ]0 % j y @ [Mex(OH)y
(x,y)

%xz&y

(108)

Where: [H+]0 is equal to the starting, not trial, pH 4. Adjust [H+] based on the self-disassociation of water using Equation 104 to obtain [H+]result . 5. Compare the resulting [H+]result to the trial [H+]trial. Based on their relative values, act according to the following options. [H+]result = [H+]trial: The trial [H+] was the correct [H+]. The problem is solved.

117 [H+]result < [H+]trial: The trial [H+] was too high. Restart from step 1 with a higher pH (lower [H+]) as the trial value. [H+]result > [H+]trial: The trial [H+] was too low. Restart from step 1 with a lower pH (higher [H+]) as the trial value.

Hydrolysis reactions are important in the modeling crevice corrosion. They determine the pHs that are achieved inside the crevice and act to respeciate metal cations that are generated at electrochemical interfaces.

120 2.3.2.3.2.2 Chemical Precipitation/Dissolution A solution can only hold a finite amount of solute. Chemical dissolution or precipitation does not change the valence of the ions involved. The amount of an ionic solute that can be dissolved is found through the use of the solubility product, K, for the molecule in question[20]. K is equal to the product of the concentrations of the individual ions that make up the molecule. It must be less than the solubility product constant, Ksp, for more of the chemical to dissolve. Ksps are tabulated for many species and can also be calculated from tables of solubility data. If the K is greater than the Ksp then some of the molecule will precipitate out of solution to lower the concentrations of the constituent ions and reduce K. An example is shown for the solubility of AgCl. AgCl(s) X Ag % % Cl & (109)

K '

[Ag % ][Cl & ] [AgCl]

(110)

Where: K is the solubility product [various units]

The concentrations of any solid phases are always assumed to be unity. Ksp depends on the molecule in question and the temperature of the solution. An advantage of using Ks to determine solubility is that the approach still works when multiple molecules that share common ions are simultaneously in solution.

121 The solubility of non-ionic solids or gasses, such as O2, must be found from tabular data.

2.3.2.3.2.3 Homogeneous Oxidation The homogeneous chemical reactions of the previous subsection did not change the valence of any of the ions. Electrochemical reactions, which do transfer electrons, can also happen homogeneously. Obviously, homogeneous electrochemical reactions can only occur between two soluble species. If one of the species were insoluble a metal-solution interface would form and the reaction would be a heterogeneous one. An example of an electrochemical reaction that can happen homogeneously is given below. Fe %2 X Fe %3 % e & (111)

E0 for this reaction is 0.770 V NHE[20] so a strong oxidizer is needed in solution to drive the reaction. This reaction will occur in oxygenated water. Since crevices are often considered to be deoxygenated, this particular reaction is not usually considered to take place there. The reaction, or other homogeneous reactions, may occur in the bulk environment.

2.3.2.4 Potential The is a large possibility for confusion in the use of the term potential when modeling crevice corrosion. There are at least three major types of potential that are commonly used in describing crevice corrosion: the electrochemical potential, E, the solution potential s, and the

122 diffusion potential, diff. The electrochemical potential is an interfaces potential relative to some reference. It controls the rate at which reactions occur on a surface. The solution potential is the potential at some point in solution. Solution potential is important in the mass transport of chemical species because the gradient of s affects the migration rate. Finally, the diffusion potential is caused by the charge separations that can occur when a salt composed of ions with different diffusivities is transported. These individual potentials are explained in greater detail in the following sections.

2.3.2.4.1 Electrochemical Potential The electrochemical potential, E, is the potential between a metal/solution interface surface and the end of the structured water, or double layer, adjacent to it. It the potential across this interface that controls the rate of reaction on that surface. The Butler-Volmer Equation, which was first presented as Equation 31, shows this relationship. That equation is repeated here in slightly different form as the expression for the overpotential has been expanded.
(1&")zF(E&E 0) RT &"zF(E&E 0) RT

i ' i0 e

& e

(112)

E is measured by comparing the potential of the metal versus a reference electrode in solution. It is easily accessible and commonly reported. It is only in the context of mass transport that additional potentials need to be defined. For instance, the migration of charged

123 species in solution depends on the gradient of potential in solution. E is measured across an interface. Though it is related the potential in solution, it cannot be used interchangeably. The nature of the relationship between E and s is explored in the next section.

2.3.2.4.2 Solution Potential Migration depends on the gradient of potential in solution. The solution potential at any point, s , is the potential that would be measured by a reference electrode at that point compared to a reference electrode at some standard point for the experiment. It is the gradient of this quantity which is used in mass transport. E and s are related as shown in Figure 2.3.2.4.2(a). Part (a) of the figure represents a simple crevice of constant height, h, corroding at the base and filled with an electrolyte of constant composition and conductivity, . Positive cations move in the -x direction. This movement constitutes a positive current flowing out of the crevice. A metal is a conductor. It does not support an internal gradient in potential. Accordingly, in part (b) of Figure 2.3.2.4.2(a) the potential of the metal, metal, is shown as an isopotential surface. The solution potential decreases linearly from the base to the mouth according to the Ohms Law which first appeared as Equation 57. It is rearranged and repeated here.

124 Jel 6

LNs ' &

(113)

Where: LNs Jel is the gradient in solution potential [V/m] is the electrical current density [A/m2] is the solution conductivity [-m]-1

The electrochemical potential, E, is the difference between the metal potential, metal, and the solution potential, s . In the case of Figure 2.3.2.4.2(a) the crevice is anodic since current is flowing out of the crevice. The gradient of solution potential must be positive to force positive cations in the -x direction. Potential drop in solution, as will be discussed in section 5.2, reduces the driving force for dissolution, E, of the crevice from the mouth to the base. These processes are illustrated in Figure 2.3.2.4.2(a), part (b).

126 2.3.2.4.3 Diffusion Potential Two separate processes can contribute to the solution potential, s. One is an ohmic process in which the potential difference is caused by current across a solution resistance. This process was given in Equation 113. The other contribution, which was not considered, arises from the potential difference caused by the formation of net dipoles as the anions and cations move at different rates in solution and separate. A potential caused in this manner is a diffusion potential. Figure 2.3.2.4.3(a) illustrates the basic concepts of the diffusion potential. The diffusion potential can best be understood by going through the following derivation. The starting point is the mass transport equation, Equation 44 from section 2.3.1.2 Ji ' C iv & DiLC i & ziFuiLNs (44)

Where: Ci v Di zi F ui LNs is the concentration of species i [mol/m3] is the velocity of solution [m/s] is the diffusivity of species i [m2/s] is the number of equivalents for species i[eq/mol] is Faradays constant [C/mol] is the mobility of species i [mol-m2/J-s] is the gradient of solution potential [V/m]

127 The electrical flux for any species due to its chemical flux is found by multiplying the flux by the charge number and Faradays constant. Converting this chemical flux into an electrical one (and assuming that there is no convection) produces the following equation.
2 Jel,i ' ziFJi ' & ziFDiLC i & zi F 2 uiC iLN

(116)

Where: Jel,i is the electrical current density vector due only to species i [A/m2]

The total electrical flux, Jel , can be found by summing over all of the chemical species present in solution.
2 Jel ' j ziFJi ' &F j ziDiLC i & F 2 LNsj zi u iC i n n n i'1 i'1 i'1

(117)

The conductivity, 6, of a solution is defined as[21] : 6 ' F 2 j z i u iC i


n 2 i'1

(118)

If Equation 118 is substituted into Equation 117 the following expression for the total electrical current is produced.

128 Jel ' &F j ziDiLC i & 6LNs


n i'1

(119)

This equation can be rearranged to solve for LNs Jel 6 Fj ziDiLC i 6

LNs ' &

&

(120)

This formula clearly illustrates that there are two components that make up the solution potential, only the first of which was used in the derivation of subsection 2.3.1.4. The first part is caused by IR losses. The second arises because of differences in the diffusivities of the individual components of the solution. This decomposition is shown below. LNs ' LNohmic % LNdiffusion (121)

Where: LNohmic is the ohmic contribution to LNs caused by IR drop [V/m]

LNdiffusion

is the contribution of diffusion potential to LNs caused by differing Dis of the ions in solution [V/m]

129 The ohmic contribution is equal to: Jel 6

LNohmic ' &

(122)

The above equation is the same as Ohms Law, which was given in Equations 57 and 113 in slightly different formats. The contribution of diffusion potential is given as: Fj ziDiLC i LNdiffusion ' & 6

(123)

It is apparent from Equation 123 that if the diffusivities of all species in solution are equal, then the gradient of LNdiffusion is zero. The other conclusion is that whereas does not affect the relative contributions of the ions to the diffusion potential, it does scale inversely with the total diffusion potential. In order to estimate the size of the diffusion potential for the diffusion of various salts, the following derivation is useful.

Estimating the Magnitude of the Diffusion Potential Figure 2.3.2.4.3(a) illustrates steady-state diffusion between two reservoirs. A linear concentration gradient is established between the two points and the differing diffusivities of the cation/anion pair (in this case, NaCl) cause the diffusion potential to occur. The previous expression relates the gradient of the diffusion potential to the physical properties of the ions,

130 the concentration gradients, and the conductivity. The conductivity of the solution varies linearly with position from max, where the concentration of each component of the salt is Cmax, to min where the concentrations are Cmin. This is shown in the equation below. 6 ' 6 max & 6min x0 x % 6min

(124)

Where: max min x0 is the maximum conductivity [-m]-1 is the minimum conductivity [-m]-1 is the crevice length [m]

Both s can be related to the solution chemistry by Equation 118. By assuming that zi, Di, and LC i are constant, then substituting Equation 124 into Equation 123, and finally integrating and solving for the constant of integration yields the solution for the diffusion potential as a function of position.
x0

Ndiffusion(x) '

m 6 max & 6min &


0

Fj ziDiLC i x0 x % 6min ln

dx (125) x0 x % 6min & ln(6min )

' &

Fj ziDiLC ix 0 6 max & 6min

6 max &6min

It is interesting to note that under these conditions, a linear concentration gradient,

131 constant coefficients, the difference in diffusion potential between the two reservoirs is independent of x0. This length invariance happens because the constant gradient of Ci depends on x0 and the integral is taken over x0. Cmax & Cmin x0

LC i '

(126)

Where: Cmax Cmin is the maximum concentration [mol/m3] is the minimum concentration [mol/m3]

Equation 125 can be used to predict the diffusion potentials that arise between solutions of differing compositions if the connecting gradients in composition are linear. Data for the ions present in several common salts are given in Table 3 which is taken from the CRC Handbook[20].

132

Species Cations K+ Na+ Fe+2

zi [eq/mol]

Di [cm2/s]

1 1 2

1.96E-05 1.33E-05 7.18E-06

Anions ClSO4-2 CO3-2 -1 -2 -2 2.03E-05 1.06E-05 9.22E-06

Table 3. Data on chemical species used to calculate diffusion potentials. Taken from the CRC handbook[20. The data in Table 3 can be used to calculate the diffusion potentials that arise between the ends of linear concentration gradients connecting salt solutions of 1M and 1 mM. This was done for five common salts and the results are shown in Table 4.

133

Species NaCl KCl Na2SO4 FeCO3 FeCl2

Ndiffusion ' -36.8 mV -3.35 mV 38.7 mV -11.0 mV -67.0 mV

Table 4. Diffusion potentials for linear gradients between 1M and 1mM solutions of various salts The magnitudes of the diffusion potentials shown in Table 4 should be taken as rough guides. In particular, the linear concentration gradients that they depend on are unlikely to be met in practice. One aspect the table does point out is the relationship between the diffusivities of the ions and the size and magnitude of the diffusion potential. For example NaCl, where the Cl- diffuses more easily than the Na+, has a large negative diffusion potential for a negative concentration gradient. KCl, where the diffusivities of the ions are more closely matched, has a diffusion potential of almost zero. Finally, a solution of Na2SO4 whose SO4-2 anion is sluggish compared to the Na+, has a positive diffusion potential for a negative concentration gradient. The ratio of the most to the least concentrated solutions has an important effect on the diffusion potential. This can be seen by rewriting Equation 125 for the case where x = x0. Fj ziDi)C i
i

Ndiffusion(x'x 0 ) ' &

6max & 6 min

ln

6 max 6 min

(127)

134 Where: Ci is the change in Ci from one reservoir to the other [mol/m3] The equation can be used for a salt, such as NaCl, to evaluate the diffusion potential at a variety of concentration ratios. Figure 2.3.2.4.3(b) shows in part (a) that the diffusion potential is linear with the logarithm of the ratio. Part (b) illustrates that this relationship means that on a linear scale, the diffusion potential is relatively stable over a range of values, since it depends on only the logarithm of the ratio. On both scales, the diffusion potential at a ratio of 1:1 (no gradient) is zero. Real aqueous diffusion couples may differ from the conditions of these theoretical results in several ways: Non-linear concentration gradients: The formulas in this section are based on the assumption of linear concentration gradients. The examples in section 4.1 will show that many simple crevice geometries and boundary conditions can produce a higher order dependence of Ci on x. If all of the other terms in Equation 123 were held equal an x2 dependence for C would result in an x2 dependence for the diffusion potential.

Multiple anions and cations: The effects of multiple salts will not superimpose linearly, because the conductivity is based on all of the

135 ions in solution. Increased conductivity will decrease the magnitude of any diffusion potentials. Additionally, any remaining diffusion potentials may either offset or sum their effects.

Supporting electrolytes: Any factors that raises the solution conductivity, such a supporting electrolyte, will decrease the magnitude of any observed diffusion potentials.

The predicted results from Table 4 are likely to overestimate the diffusion potentials that will be observed. Still, they illustrate why salts such as KCl are often used in salt bridges. The closely matched diffusivities of the constituent ions produce a small diffusion potential even when connecting solutions of very different concentrations.

Summary This subsection has focused on examining in depth the terms that go into the governing equations which control crevice behavior. The next subsection focuses on the types of simplifications that are commonly applied to the governing equations in order to solve them.

138 2.3.3 Common Simplifications Used in Modeling Crevice Corrosion Most models for crevice corrosion make some simplifications to the governing equations developed in subsection 2.3.1. Such simplifications and assumptions are made for one of two reasons. Either some piece of information is not available to permit use of the complete solution or the assumption makes the problem easier to solve. The types of simplifications that are made can be classed into five broad groups summarized below. The first three relate to simplifications involving thermodynamic variables such as temperature and pressure, solution composition and potential. The last two relate to reductions of the dimensionality of the problem, both temporal and spatial. Elimination of Thermodynamic Variables: Temperature and pressure are two of the thermodynamic variables required to define the state of a material. In practice, changes in these variables are often ignored and the entire crevice is assumed to remain at standard temperature and pressure (STP). Simplifying Chemistry Effects: The dependency of the transport coefficients ui and Di on chemistry is often ignored. The transport equation itself is usually configured based on the dilute solution approximation that solute ions are not interacting. The generation equations also often reduce the complexity of chemistry effects. For heterogeneous reactions few codes account for either the effects of chemistry on generation or the chemical effects of cathodic reactions occurring inside the crevice. For

139 homogeneous reactions, the hydrolysis equations are often considered to only deal with mononuclear products. Other reactions such as precipitation or homogeneous oxidation are also often ignored. Simplifying Potential Effects: Occasionally models are constructed that ignore the effects of a gradient in solution potential on transport. Rarely is the diffusion potential taken into account. Additionally, the effects of an electrostatic potential that would be caused by charge separation are often thrown out and charge neutrality is assumed. Finally, the effect of electrochemical potential on generation is often simplified to make the governing equations easier to solve. Ignoring Temporal Effects: The effect of time on reaction rates is a difficult one to capture in a model of crevice corrosion. Temporal dependence based on the accumulation of chemical species from transport consideration is often included, but even this has the underlying assumption that all of the reaction rates are functions only of the electrochemical environment. Both hetero- and homogeneous reactions can have marked temporal dependence independent of changes in solution composition or interfacial potential. Simplifying Geometry: Every crevice corrosion model makes broad generalizations of physical geometries in order to make the problem tractable. The dimensionality of the model is usually reduced to one or

140 two dimensions and the scale modeled does not represent the fine detail present at the m level. If crevice behavior is heavily influenced by the tightest rather than the average geometry, then most crevice models may be missing a critical aspect of crevice geometry.

Some of the types of simplifications that are made were discussed during the development of the governing equations and the separate discussion of the terms that go into them. The following sections present the approximations in context with each other.

2.3.3.1 Elimination of Thermodynamic Variables Few models account for changes in temperature or pressure. Those that do generally translate all of the parameters to some higher temperature and perform an isothermal simulation at the new state.

2.3.3.1.1 Temperature As was seen in section 2.1 temperature plays a large role not only in determining the driving force for corrosion but in setting the rate constants. The reversible potential for metal oxidation given by the Nernst equation, first shown as Equation 12 from subsection 2.1.2.2, clearly shows the effects of temperature on the reversible potential and thus driving force.

141 Me & Me %z zF
0 0

E '

&

C %z RT ln Me zF CMe

(12)

The effect of temperature on corrosion kinetics can be seen in the Butler-Volmer equation, Equation 31, from subsection 2.1.3.1.

i ' i0 e

(1&")zF0 RT

& e

&"zF0 RT

(31)

When temperature effects are taken into account, it usually is by the device of translating all of the parameters to a higher temperature[8]. Essentially, the model is still run as an isotemperature system, merely with parameters that are appropriate to the higher temperature environment, such as critical water. Corrosion reactions are spontaneous and the energy they release appears as heat in the environment. Some corrosion systems, like thermite, are actually designed to be used as heaters for military and camping rations. Aside from such extreme cases, even commonly encountered systems can generate surprising amounts of heat. The following calculations show the heating which is possible for the corrosion of iron. This reaction is shown below from Jones.[1] Fe % 2HCl 6 FeCl2 % H2 (128)

142 The Gibbs Free Energy released by a reaction is given by the following equation. )G ' &zF E (129)

Where: G z E is the change in Gibbs Free Energy [J/mol] is the number of electrons transferred [eq/mol] is the electrochemical potential of the reaction [V]

For this reaction at pH = 0, E = -0.44 V. The total energy released per mole of Fe corroded is equal to: )G ' &2 @ 96487 @ &0.44 ' 85 kJ/mol

(130)

It takes one calorie (4.184 J) to raise one gram of water one degree centigrade at 0 C. The mass density of water per cm2 in a crevice of height 10 m is: mH O ' DH O @ h
2 2

' 1 g/cm 3 @ 10&3 cm ' 10&3 g/cm 2

(131)

Where: mH O is the areal mass density of water [g/m3] 2 The energy released by a corrosion rate of 1 mA/cm2 can be found by using Equation 64 from subsection 2.3.1.5 to convert to a flux density of iron and multiplying by Equation 130.

143

p ' '

i @ )G z iF (132)

1 mA/cm 2 @ 85 kJ/mol 2 eq/mol @ 96487 C/eq '0.44 mJ/cm 2 &s

Where: p is the energy flux [J/m2-s]

If all of the heat were transferred to the 10 m of solution present in the crevice, the rate of change of the temperature with time would be approximately as shown below. MT p 1 @ ' Mt m H O cp
2

'

0.44 mJ/cm 2 &s

10&3 g/cm 2 ' 0.11K/s

K&g 4.184J

(133)

Where: T t cp is the temperature of the solution [K] is the time [s] is the specific heat of water 4.184 [J/g-K]

This increase in temperature is a surprisingly high rate of change. Obviously not all of the heat generated at an interface goes into the solution. The iron substrate is thermally conductive, large and has a considerable heat capacity as well.

144 In addition to ignoring the full effects of temperature by assuming an isothermal experiment, the dependency of the governing equations and terms on pressure is often not taken into account.

2.3.3.1.2 Pressure Pressure is another thermodynamic variable whose effects are often ignored. Almost all of the data which go into crevice corrosion models are collected at the same pressure at which the model will be run, one atmosphere (105 Pascals). In thermodynamic terms, this is almost zero. The additional pressure which might be applied on a crevice in a normal laboratory environment is easily calculated. A sample immersed to a depth of 2 in (5 cm) in 15 C seawater would experience an additional pressure equal to )P hydro ' h DH O g
2

' 0.05m(1025kg/m 3 (9.8m 2 /s . 500 Pa

(134)

Where: Phydro is the change in pressure due to hydrostatic effects [Pa] h DH2O g is the depth of solution [m] is the density of water = 1000 [kg/m3] is the gravitational acceleration [m/s2]

This is an excess pressure of only 0.5%. In a laboratory environment, there is essentially

145 no additional pressure on a creviced sample. There are cases where extremely high pressures may be encountered along with crevice corrosion. One is in the ocean depths. Every 9.8 m of water equals an additional atmosphere of pressure (105 Pa) , so modeling of crevice corrosion on deep sea pipelines, oil rigs and wrecks could require an accounting of the effects of pressure. The other source of high pressure, surprisingly, can be gas bubbles. The pressure inside a bubble has to be higher than ambient to support the bubble and keep it from collapsing. This excess pressure increases greatly as the radius of the bubble decreases. This is seen in the following formula from Bikerman[35]. )Pinter ' 2( r

(135)

Where: Pinter is the change in pressure caused by sustaing the additional gas/liquid interface [Pa] r is the surface energy of the gas/liquid interface [J/m2] is the radius of curvature of the bubble [m]

Using the value of the surface energy for an air/water interface of 71.97 dynes/cm[20] the pressure change caused by a 1 m bubble can be found.

146 )Pinter ' ' 2( r 2 @ 7.197@10&2


&6

(136)

10 . 1.44@105 Pa

This pressure is in excess of one atmosphere. A commonly observed effect is that aerators in salt water cause salts deposits great distances above the waterline. The small bubbles explode with great force when they reach the surface. The total pressure exerted on a bubble is the sum of the hydrostatic and interfacial pressure contributions. )P ' )P hydro % )Pinter (137)

The thermodynamic variables are often ignored because much of crevice corrosion modeling deals with systems that are essentially isothermal and isobaric. This cannot be said about the next group of thermodynamic variables, the concentrations of the other species in solution. The composition of solution can vary greatly and the myriad ways in which chemistry effects are simplified merit their own section.

2.3.3.2 Simplification of Chemical Effects Chemistry plays an important role in transport and generation. In order to produce models which are easier to solve, many researchers simplify the role of chemistry and focus only on the effects of one or two chemical concentrations on the single parameter of

147 heterogeneous generation.

2.3.3.2.1 Transport Coefficients As was discussed in section 2.3.2.2 the dependency of the transport coefficients ui and Di on chemistry is often ignored. A typical assumption is that the mobility of a species is a constant and that the diffusivity of the species is related to it by the Nernst-Einstein relations given in Equation 80 from section 2.3.2.1 repeated below. Di ' uiRT (80)

As was discussed in subsections 2.3.2.2.1 - 3 solute/solute interactions, viscosity changes and geometry changes caused by precipitation can have an effect on the effective transport coefficients. Typically such effects are not included in models of crevice corrosion.

2.3.3.2.2 Dilute Solution Approximation As was discussed at length in subsection 2.3.2.1 the transport equation itself is usually configured based on the assumption that solute ions are not interacting. This assumption allows the diffusional flux to be calculated in terms of concentration gradients, a term which is experimentally accessible, instead of in terms of single ion activity or chemical potential, terms which are not easily measurable.

2.3.3.2.3 Generation Rates

148 The generation equations also often fail to fully reflect the dependence of corrosion rates on chemistry. Real systems exhibit corrosion rates which have very complex dependencies on solution composition. Three types of simplifications are made. The first is that variations in chemistry are considered to be the result of only one or two species such as H+ or Cl-. In many systems these two species may dominate, but other anions such as SO4-2, CrO4-2 or CO3-2 may play roles that are either detrimental or beneficial in arresting crevice corrosion. Some theories even implicate metal cations, such as Al+3, as bad actors in crevice corrosion.[14] The second type of simplification is that the behavior of a metal cannot be measured continuously over a range of solution compositions. Instead, it is measured at a number of finite points and the intervening behavior is inferred. A third role chemistry can play to affect corrosion rates is to deposit a salt film on a rapidly corroding surface. If the solubility limits for a metal salt are exceeded, a protective salt film can be deposited. This film will slow corrosion as long as it is present. The fourth and final assumption is to ignore the chemical effects of cathodic reactions occurring inside the crevice. Cathodic reactions such as HER and ORR, which were presented as Equations 3 and 4 in section 2.1, produce hydroxyl ions which tend to raise the pH. As will be seen in Section 5.4 this local production of alkalinity can have a dramatic effect on the crevicing behavior.

2.3.3.2.4 Hydrolysis Reactions

149 The effects of homogeneous reactions occurring in solution are often simplified to some extent. Hydrolysis reactions are the homogeneous reaction most often included into crevice models. Even these reactions, as was discussed in section 2.3.2.3.2.1, are usually reduced in complexity to some degree. The previously mentioned assumption is that the hydrolysis products are all mononuclear species. This is based on the idea that the equilibrium polynuclear products are slow to form. Another common simplification is to assume that the pH achieved by hydrolysis is determined solely by the most hydrolyzable species. For instance, in crevice corrosion modeling of stainless steels it is often assumed that the hydrolysis of Cr+3 dominates the resulting pH. In addition to solution chemistry, potential can have a large effect on the crevicing process.

2.3.3.3 Simplification of Potential Effects Different potentials affect crevice corrosion. Electrochemical potential controls the generation rates whereas solution and diffusion potentials affect transport. These effects are often simplified to some extent in order to produce tractable models..

2.3.3.3.1 Assuming No Migration For technical reasons that will be discussed in Section 4.2 the mass transport equations are much easier to solve if diffusion is the only flux considered. Some early crevice corrosion models were developed which only assumed diffusion as the transport mechanism[30, 36]. While

150 the presence of a strong supporting electrolyte may decrease the available potential gradient to drive migration, the process is always present while there is a net current out of the crevice[37]. The only condition under which there is no net current is when 100% of the cathodic current is met locally. As will be seen in section 5.4 this assumption prevents formation of an acidic environment because of the generation of OH- by the HER and/or ORR reactions given in Equations 3 and 4.

2.3.3.3.2 Assuming No Diffusion Potential The diffusion potential is rarely included in models of crevice corrosion. The rationale according to some authors is that pure diffusion cannot carry charge.[38]

2.3.3.3.3 Assuming Charge Neutrality As was seen in subsection 2.3.2 under realistic values for the potential field, the solution inside a crevice is nearly charge neutral. The assumption of charge neutrality does not in itself cause large problems. However, the mechanism used to enforce charge neutrality can introduce errors. Three separate ways can be used to maintain charge neutrality. The best way would be to modify the terms in the governing equations so that charge imbalances never occurred. It is not clear in a multicomponent system how to do this. The next most accurate way is to allow the charge imbalances which arise to remove themselves by migration under the influence of the resulting potential fields[28]. The drawback to the approach is that it is computationally slow. The simplest and least physically justifiable approach is to adjust the concentration of a non-

151 reacting ion maintain charge neutrality. This main advantage of this method is speed.

2.3.3.3.4 Generation Rates As was seen in section 2.3.2 some of the common methods for representing polarization curves eliminate or reduce the effects of electrochemical potential on the reaction rate. Temperature, pressure, chemical composition and potential are the thermodynamic variables affecting corrosion. A model of a crevice also includes dimensionality. There is a temporal dimension and several spatial dimensions to account for and these too are often approximated and simplified.

2.3.3.4 Ignoring Temporal Effects Some models are only designed to calculate steady-state conditions[39-42]. Such models are useful for examining repassivation or long-term behavior. Models which include the effects of time to watch the evolution in crevice behavior have a surprising number of time-invariant assumptions built into them. Applying the governing equations developed in subsection 2.3.1 accounts for chemistries and potentials which are created from an imbalance in transport out of and generation in a crevice. An unstated assumption though is that the thermodynamic variables, T, P, Ci and E uniquely determine the reaction rates. Unfortunately, both hetero- and homogeneous reactions can have a time dependence. Metal corrosion behavior is heavily influenced by the formation and removal of protective films.

152 Such barrier layers take finite amounts of time to grow or dissolve. Even if temperature, pressure and chemical environment are kept the same, a metals corrosion rate and open circuit potential will take some period of time to reach steady-state. The discussion in subsection 2.3.2.3.2.1 on hydrolysis pointed out that polynuclear hydrolysis products, those involving more than one metal cation, can take days to form. A model which uses only mononuclear hydrolysis is ignoring a temporal dependence of hydrolysis. No published model accounts for such effects. The final aspects of a crevice left to simplify are the spatial ones.

2.3.3.5 Simplifying Geometry Every crevice corrosion model makes broad generalizations of physical geometries in order to make the problem tractable. The first broad simplification is usually to reduce the dimensionality of the problem. Two- and even one-dimensional approximations are common. On its face, representing a crevice of 1 cm2 area and a nominal 10 m gap as a twodimensional area with constant height may seem appropriate since the dimensions in the plane are much larger than the height out of it. Consider, however, the factors that go into establishing that mean height. A crevice does not consist of two atomically flat planes suspended a few microns apart. Instead, two rough surfaces with features several microns high are pushed together with some force. If the crevice former is appreciably softer than the corroding substrate, then it may deform around the largest of the metals features. In any case, at some points where peaks meet the two materials

153 are intimate contact and at still others valleys may coincide to create a very wide gap. In reality, what on a cm scale seems to be a flat surface is really a convoluted, warped sheet of fluid. Corrosion occurs in a crevice because it is the tightest space on an object. It is likely that corrosion occurs first within a crevice at the most occluded point in the site. Another effect that is not often accounted for is a changing geometry. Laycock is one author who does examine changes in geometry[43]. Increases in the crevice gap as metal corrodes away are one example of such changes. Other types of change would be the formation of bubbles of evolved hydrogen gas or occlusions caused by precipitated films. This subsection has addressed the various methods that are used to simplify the thermodynamic variable of temperature, pressure, solution composition and potential as well as the dimensional questions of time and space. The next subsection concludes this section on modeling by discussing the techniques used to mathematically solve the governing equations after these simplifications are applied.

2.3.4 Methods of Solution for Crevice Corrosion Models Once the proper equations to represent the physical situation have been developed, a method of turning those equations into numerical results must be chosen. No matter which method is used, the goal is to solve for E(x,y,z,t) and Ci(x,y,z,t). These are the variables which (combined with temperature and pressure) govern not only the corrosion rate but also the mass transfer (and thus accumulation) of species within the crevice. Several issues must be considered when choosing a method of solution for use in a

154 crevice model. The major choice is between an analytic solution and a numerical one. All other things being equal, an analytic solution is preferable. An analytic solution gives the exact answer continuously over the variable space. Analytic solutions, once found, are easily calculated and give the functional dependencies of the individual variables. A numerical solution on the other hand gives approximate answers at discrete points within the range of variables used. Such solutions are slow to evaluate and it is a even more time-consuming process to find the sensitivities of a numerical model to the input parameters. The major drawback to analytic solutions is that large numbers of approximations must be made to reduce the governing equations to forms simple enough to be solved. Numerical solutions, despite their drawbacks, are very robust in the types of boundary conditions and behaviors they can incorporate.

2.3.4.1 Analytic Solutions An analytic solution produces a polynomial or other expression representing the potential or concentration field within a crevice. An examples would be Equation 203 from Section 4.1.1.7. Jwallsr 2 46h Jwallsrouter 46h
2

N(x) ' &

% N0

(203)

This equation gives the potential distribution at steady-state as a function of radius in a disc shaped crevice of height h, radius router, filled with a solution of conductivity , and having a flux along one face of magnitude Jwalls. The derivation is presented in Case 7 in section 4.1.1.7

155 and it is discussed and illustrated in greater detail there. Not all analytic solutions have the polynomial representation given above. The next equation represents the concentration of a species within a one-dimensional crevice with parallel sides of length xo, initially filled with a solution of concentration Ci0 whose ends are immersed in solutions of zero concentration at t=0. The derivation for equation 233 is presented in Case 12 in section 4.1.3.1 and it is discussed and illustrated in greater detail there. 4C i 1 (2n%1)2 B2 t (2n%1)Bx sin exp &D j 2 B n'0 2n%1 x0 x
0

C i(x,t) '

(233)

While more difficult to calculate than equation 203, this formulation still is very easy to work with. The effect of each variable is very clear in each solution and a great deal of insight can be gained by considering the effect of individual parameters, such as the crevice length x0, on the overall solution.

2.3.4.1.2 Misuse of Analytic Solutions One analytic solution in particular has been frequently misused in the modeling of crevice corrosion. Edwards[44] presented a proof that the concentrations of non-reacting species in solution depend exponentially on the potential in solution. Similar approaches were used by several other authors[45-47] . This proposition was refuted by Psaila-Dombrowski[48]. The original derivation and the Psaila-Dombrowski rebuttal are reproduced here for completeness. The explanation of the significance of the terms and the conditions under which

156 the solution is appropriate are new to this dissertation. Equation 44 is the flux equation for a chemical species. Ji ' C i v & Di LC i & zi F u i C i LNs (44)

At steady-state, chemical concentration is a constant. For species that are being neither generated nor consumed the flux must be equal to zero at steady-state. With the additional assumption that there is no convection this statement of zero flux for the non-reacting species can be written below. 0 ' & Di LC i & zi F ui C i LNs (138)

The equation can be rewritten by converting the grad operator for one-dimensional cartesian coordinates, using the Nernst-Einstein equation and rearranging. MC i Mx zi F RT M Ns Mx

' &

Ci

(139)

If the partial derivatives are changed to total derivatives and the like terms are grouped the following equation is created. d Ci Ci zi F RT

' &

d Ns

(140)

If the above equation is integrated and the conditions at the mouth are defined as s(x=0) = s0 and Ci(x=0) = Ci0 then the concentration can be found

157
& ziF RT (Ns(x)&Ns )
0

C i(x) '

0 Ci e

(141)

Unfortunately, the integration performed on Equation 140 depends on the unstated assumption that s was a variable only of x. In actuality the term is a function of chemistry and current and only through those terms is it a function of x. Psaila-Dombrowski presented the following argument[48]. The electrical flux can be found by summing the fluxes due to the individual ions. This was first done in Equation 117 in subsection 2.3.2.4.3.
2 Jel ' Fj zi Ji ' &F j zi Di L C i % j zi F u i C i L Ns i i i

(117)

The above can be solved for the gradient of s as was done in Equation 120 of subsection 2.3.2.4.3. The potential in the solution is equal to an ohmic component and one caused by the diffusion potential. Jel 6 Fj ziDiLC i 6

LNs ' &

&

(120)

For a one-dimensional cartesian system this equation can be substituted into Equation 139 MC i Mx Jel 6 Fj ziDiLC i 6

'

zi F RT

Ci

(142)

The partial derivative of Ci can be converted to a total derivative if and only if there are

158 no dependencies on variables other than x. Three conditions must be met:

1) There must be no diffusion potential. If Di is a constant for all anions and cations, then this condition is met 2) The electrical flux must not depend on chemistry or position. This can be met for modeled cases where the flux is a constant at the tip or along the walls. 3) must be a constant and cannot vary with position or chemistry. This condition can be met if there is a large supporting electrolyte.

These three conditions are fulfilled in the case presented in subsection 4.1.2.1 and the CREVICER model does fit to the exponential expression of Equation 141.

Summary The problem with analytic solutions arises with the assumptions that have to be made to permit their use. In general, the geometries have to be simple and the coefficients should either be constants or have easily expressed functional dependencies. An additional limitation is that each analytic solution is only appropriate to cases with exactly the same geometry and assumptions. These limitations will be more apparent after a discussion of the various numerical methods which are available.

159 2.3.4.2 Numerical Solutions A numerical solution uses a computer to approximate the governing equations which control crevice corrosion. Spatially, the crevice is defined as a series of discrete intervals or elements. Results are obtained at a finite number of points where the elements meet. Temporally, the crevice is evaluated as a series of snapshots in time. One advantage is that once a computer program for solving crevices numerically is created, it can be applied easily and automatically to a number of geometries by merely changing the input data. Another strength is that any sort of functional dependence that is definable can be used in the computer program. A final advantage is that the accuracy achieved can be increased to any desired level at the expense of increased computation time. One of the major disadvantages to numerical solutions is that the increase in accuracy is paid for by non-linear increases in computational time. Increasing the spatial resolution for twoor three-dimensional models increases the solution time by the square or cube of the increase in accuracy. The other disadvantage is that the effects of individual variables on the overall solution is not easily found. Several different types of numerical methods have been used in modeling crevice corrosion with respect to spatial dimensions. They can be broadly grouped as finite difference (FD) , boundary element (BEM) and finite element (FEM) methods of solution. Temporal problems can be solved either implicitly, using only spatial information at time = t to find the state at t+1, explicitly, where information at t+1 is used, or mixed which is some weighted average of the two. Each is given a short capsule summary in the subsequent sections.

160 2.3.4.2.1 Finite Difference Method Finite difference methods of solution solve partial differential equations by dividing the problem domain into a grid of points[49]. The differential equations are written for each mode as difference equations. An example equation which could be solved by finite difference methods is Fouriers law of heat conduction. MT M2 T ' k Mt Mx 2

(143)

Thus, the temporal differential becomes: T x &T x MT Mt )t


t%1 t

(144)

Where: Txt t is the temperature at point x at time t [K] is the change in time between t and t+1[s]

A similar process can be performed for the spatial differential. M2 T Mx 2 Tx%1 & 2Tx % Tx&1 ()x)2
t t t

(145)

Even when other methods are used to solve the problem spatially FD is usually used to

161 solve the problem temporally. The time dimension is a single axis and FD has good fidelity to such low order problems. The ease of calculation produced by an FD approach makes it the preferred method for such problems. The temporal solution can be either explicit, implicit or a mixture of the two. Explicit methods use only spatial information from time = t to find the field variable at a point at time = t+1. The method is simple to code and can be rapidly evaluated. Its drawback is that there are some limitation on the size of the steps in time and space that can be used and still maintain a stable numerical solution. This problem is discussed at length in section 3.2 on FEM. Implicit methods find the value of the field variable at time = t+1 in terms of the spatial information at time = t+1. This produces are group of n equation for n unknowns which must be solved simultaneously. The additional computational complexity is compensated for by increased stability. Mixed methods employ some average of the explicit and implicit techniques. The special mixed case where the two solutions are weighted equally is called Crank-Nicolson. Figure 2.3.4.2.1(a) illustrates the information in space and time that is used by each of the three techniques. It is adapted from Chapra and Canale[49]. Equation 138 can be placed into finite difference form by using equations 139 and 140. This is done first for an explicit and then an implicit formulation.
t%1

Tx

' Tx %

k)t )x
2

Tx%1 & 2Tx % Tx&1

(146)

The implicit formulation is: k)t )x


2

Tx ' &

Tx%1 %

t%1

1 % 2

k)t )x
2

Tx

t%1

&

k)t )x
2

Tx&1

t%1

(147)

162 The above is an expression with three unknowns. If it is applied to each node, it results in set of equations that can be solved simultaneously. Crank-Nicolson results when the spatial finite difference equation is the average of the two approaches. It is discussed more in section 3.2. The advantage of FD is that it is simple to implement. Its disadvantages are that since it is based on a grid it is poorly suited for irregular geometries and heterogeneous media. Also, unless the algorithms are modified to allow non-uniform gridding the method does not focus the computational effort to where it is most needed. An alternate method of solution for partial differential equations is the Boundary Element Method.

163 2.3.4.2.2 Boundary Element Method BEM transforms the differential equations that apply across the interior of a volume into integral equations that are applied over the boundary of the volume. It is an appropriate technique for isotropic, homogeneous volumes with a low surface-to-volume ratio[50]. The technique grids the surface of the volume and solves the integral equations there. For a homogeneous media, knowledge of the surface concentrations and potentials allows the value of the fields inside the volume to be evaluated. The major limitation of the technique is that it is not suited for volumes which have a very high surface to volume ratio. For such domains the finite element method is superior. BEM solves over the surface and yields information about the interior. FEM solves over the interior and produces information about the surface.

2.3.4.2.3 Finite Element Method FEM treats a volume as a collection of simple shapes in contrast to FDs approximation of a volume as a collection of points. The method makes an assumption about the shape of the distribution of the field variable between the nodes where it is evaluated. It then minimizes the error between this shape function and the true solution to find the best approximation to the exact solution. Figure 2.3.4.2.3(a) shows simple shape function for a one-dimensional problem. In this case the shape function is a straight line. It connects the node at Xi where the value of the field variable is Ti to the node at Xj where the value of the field variable is Tj. The value of the field

164 variable between nodes can be found by using the pyramid functions Ni and Nj. This is shown in equation form below. T e ' Ni Ti % N j Tj
e e

(148)

The values of the pyramid functions in this case are determined by the positions of the nodes and the x value of the point within the element being evaluated. Xj & X e Xj & Xi X e & Xi Xj & Xi

Ni '

, Nj '

(149)

This representation is used to find an approximate solution to the differential equation. As illustration, the application of FEM to a simple first-order differential equation will shown in the following example. The canonical equation is given below. d dT dT % M(x) % P(x)T % Q(x) ' 0 K(x) dt dx dx

(150)

If this differential equation is applied to T(e), the approximation of T presented in Figure 2.3.4.2.3(a), then the residual will be non-zero, re. d dT e dT e Ke % Me % P eT e % Q e ' r e dt dx dx

(151)

Ke, Me, Pe, and Qe are the values for the coefficients within the element. While they may vary from element to element, within each element they must be constant. It is not possible to make re equal to zero at every point. Only the exact solution has a zero residual everywhere. In the method of weighted residuals the integral of the residuals

165 multiplied by a weighting function over the element is set equal to zero. xl

Ri '

m x0

Wi r e dx ' 0

(152)

In Galerkin's method the weighting functions are the pyramidal functions xl

Ri '

m x0

N i r e dx

(153)

This can also be done for Rj. Once integrated Ri, and Rj, depend on Ti and Tj, and a constant. This can be expressed in matrix form as shown below. Bii Bij T C Ri 0 i & i ' ' Tj Cj 0 Rj Bji Bjj

(154)

The values of Bii, Bij, Bji, Bjj, Ci, and Cj, are given in Allaire[51] for one- and twodimensional problems. Each element produces an independent equation with one unknown for each node. The unknown is the value of the field element at the node. These equations can be solved simultaneously for the field variables. One advantage of FEM over BEM is that it is more suited for domains with high surface to volume ratios. Another factor which gives an edge to FEM is that crevices are highly heterogeneous. The generation rate varies strongly from point to point because of changes in

166 chemistry and potential. An advantage over FD is that the positions of the nodes are built directly into the equations. Practically, coding FD is only simpler when the node spacing is equal.

167 2.3.4.3 Summary: Issues in Choosing Methods of Solution Two main factors guide the choice of solution method for the differential equations governing crevice corrosion that were developed in subsection 2.3.1. The first is the functional dependency of the coefficients in the equations and the second is the shape of the domain that must be solved. The coefficients of the differential equation depend on the chemical and electrical generation rates, Ri and Rel, and the transport coefficients ui and Di. Essentially, analytic solutions are only practical for simple geometries and constant coefficients. Any irregularities in the geometry or dependence of the current on potential or chemistry make it difficult to find an analytic solution. When it is impossible to produce an analytic result, numerical methods can be used. FD is the simplest of the numerical techniques. Although it is easy to code, it is restricted in the geometries to which it applies and is somewhat wasteful of computational effort. BEM is a viable method for homogeneous domains with low surface-to-volume ratios. Crevices have high surface to volume ratios and are quite heterogeneous. The generation rate of chemical species and electrical current varies significantly within the crevice. FEM excels when working with heterogeneous media and high surface-to-volume ratios. A separate issue that does not differentiate between methods of solution is the trade-off between fidelity to the physical situation and ease of solution. A physical crevice has three spatial dimensions and changes in time. Any reduction in the dimensionality of the problem makes it much easier to solve by any of the analytical or numerical techniques described above. This section has focused on the differential equations that determine the chemical

168 concentration and potential fields inside crevices. It has derived the equations from the flux relationships, discussed the factors that affect the coefficients in those equations, described the kinds of simplifications that are made based on those factors and given a brief summary of the numerical methods that can be used to solve the equations. The next section will use this information to discuss the previous work that has been done in modeling crevice corrosion.

169

2.4 Literature Review


A number of authors have treated the problem of modeling crevice corrosion. This section will organize their work by their treatment of the different issues involved, rather than by the material/environment system that was modeled. An additional resource to this dissertation and its organization are the many literature review papers that have been produced. In 1987 Sharland reviewed the current modeling of crevices and pits[52]. Several years later Munn produced a similar review[53] Turnbull has been quite prolific, producing review papers on modeling of cracking[54, 55], occluded site chemistry[56], and pit propagation.[57-59] The major feature of this chapter is Table 6 which summarizes the modeling performed in over 55 papers. The papers chosen cover the bulk of modeling work done on crevices and pits. Some papers also come from the related areas of cracking and cathodic protection. The papers are organized by model and/or group. One model may be the focus of several papers as it is refined. Similarly, a group generally has a common approach to modeling that carries over through different models and researchers. Within each group the papers are organized in reverse chronological order with the most recent papers appearing first. The columns for the table and the abbreviations used in it are defined on the next page in Table 5. Notes on each paper follow Table 6 and are labelled alphabetically.

170 Column Reference Description Primary authors name and reference number. Secondary authors are included in the bibliography Material studied in model. Ag: Al: Cu: Fe: NA: Ni: SS: Ti: Zn: Silver Aluminum and alloys Copper and alloys Iron and steels Not applicable Nickel and alloys Stainless Steel Titanium and alloys Zinc and alloys Acetate containing Chloride containing Carbon dioxide-rich High purity water Not applicable Nitrate containing Sulfate containing Not clear from paper Analytic Boundary Element Finite Difference Finite Element Iterative technique Abbreviations

Mat

Env

Environment studied in model.Ac: Cl: CO2: H2O: NA: NO3: SO4: Type of method used to solve ? governing equations Anal: BEM: FD: FEM: Num: Dimensionality of crevice

Type

Dim

(cyl): Cyclindrical coordinates 1D: One dimensional 1D+: One free dimension + changes in second 2D: Two-dimensional 2D+: Two free dimensions + changes in third

171 Column Time Description Abbreviations Crank-Nicolson Explicit Implicit Steady-state No Yes No Yes No Yes Linear on some variable Constant Polynomial on some variable Exponential on potential No Not Applicable Poissons Equation Yes No Yes No Yes

Technique used to model time C-N: variations Exp: Imp: SS: Is diffusion considered as a flux mechanism? Is migration considered as a flux mechanism? N: Y: N: Y:

Diff Mig Conv BC

Is convection considered as a N: flux mechanism? Y: Representation of electrochemical flux Lin: Pass: Poly: Tafel: N: NA: Pois: Y:

CN

How is charge neutrality considered?

Ppt

Are chemical reactions other N: than hydrolysis Y: considered?(No pH effect) Is hydrolysis considered? N: Y:

Hyd Notes

Letter reference for notes following the table Table 5. Description of columns and abbreviations for Table 6.

Solution Method Reference Evitts et al [60] Watson[61] Evitts[62] Watson[9] Watson[28] Mat Ti Fe Ag,Ti SS,Ni SS,Ni Cl Cl Env Cl CO2 Type FD FD FD FD FD Dim 2-D 1-D 1-D 1-D 1-D Time Exp Exp Imp Exp Exp

Flux Diff Y Y Y Y Y Mig Y Y Y Y Y Conv N N N N N BC Pass Tafel Pass Pass Pass CN Pois Pois Pois Pois Pois

Chemical Ppt N N N N N Hyd Y Y Y Y Y Notes A B C D E

Georgiadou[24, 26, 62 3] Harb[63] Alkire[34] Alkire[64], Lott[15] Alkire[39] Alkire[33] Alkire[20] Herbert[14, 65] Alkire[66],Siitari[67] Alkire[35]

Cu Ni Cu SS Al NA Fe Al Al NA

Cl Cl SO4 Cl Cl NA SO4 Cl Cl NA

FD FEM BEM, FEM FD An FEM Num FD FD FEM

2-D 2-D 2-D 1-D (cyl) 1-D(cyl) 2-D 2-D 1-D (cyl) 1-D (cyl) 2-D

SS SS SS Imp SS SS SS C-N C-N Y

N Y NA Y Y NA Y Y Y NA

N Y NA Y N NA N Y N NA

Y N NA N N Y N N N NA

Tafel Tafel NA Poly Lin. NA Tafel Tafel Tafel Pass

NA Y NA Y Y NA Y Y Y NA

Y Y NA N N NA N N N NA

Y N NA N N NA N Y N NA

F G H I J K L M N O

Solution Method Reference Alkire[68] Mat Cu Env SO4 Type An,FD Dim 1-D Time C-N

Flux Diff Y Mig N Conv N BC Tafel ? CN

Chemical Ppt N Hyd N Notes P

Turnbull[8] Turnbull[69] Turnbull[70] Gangloff[71] Turnbull[72] Turnbull[46]

SS Fe Fe Fe NA Fe

H2O Cl Cl Cl NA Cl

Num ? ? ? ? ?

1-D+ 1-D+ 1-D+ 1-D 1-D+ 1-D

N N N N N N

Y Y Y Y Y Y

Y Y Y Y N Y

N Y Y N Y N

pass Tafel Tafel Tafel NA Tafel

N? Stated Stated Stated Stated Stated

Y Y Y N NA Y

Y Y Y Y NA Y

Q R S T U V

Sharland[6] Sharland[73] Sharland[40, 41]

SS SS,F e Fe

Cl Cl Cl

FD FEM Num

1-D 1-D 1-D

Exp? Exp? SS

Y Y Y

Y Y Y

N N N

Pass Tafel Pass

Y Y Y

Y Y Y

Y Y Y

W X Y

Oldfield[74] Oldfield[75] Oldfield[4]

Al SS SS

Cl Cl Cl

Num Num Num

1-D 1-D 1-D

Exp Exp Exp

N N Y

Y N Y

N N N

Pass Pass Pass

NA Y Y

Y Y Y

Y Y Y

Z AA AB

Solution Method Reference Gartland[7] Gartland[7] Gartland[76] Gartland[29] Bardal[77] Mat SS SS SS SS SS,F e Env Cl Cl Cl Cl Cl Type FD Anal FD FD BEM Dim 1-D 1-D 1-D 1-D 2-D Time Y Anal Exp Exp NA

Flux Diff Y NA Y Y NA Mig Y NA Y Y NA Conv N NA N N NA BC Poly Poly Poly Poly Poly ? NA ? Y NA CN

Chemical Ppt Y NA Y Y NA Hyd Y NA Y Y NA Notes AC AD AE AF AG

Walton[10] Walton[78]

SS,F e Fe

Cl, SO4 Ac

FD FD

1-D 1-D

Num N?

Y Y

Y Y

N N

Poly Poly

? ?

Y Y

Y Y

AH AI

Fu[38] Fu[37]

Ag Cu

NO3 Cl

FEM FEM

1-D 2D+

Exp? NA

Y NA

Y NA

N NA

Pass Poly

? NA

Y NA

Y NA

AJ AK

Edwards[44] Edwards[23]

SS,Al Al

Cl Cl

Anal Anal

1-D 1-D

SS SS

NA NA

NA NA

NA NA

NA NA

Anal Anal

NA NA

NA NA

AL AM

Solution Method Reference Gaudet[79] Tester[30] Mat SS,Ni SS,Ni Env Cl Cl Type Anal. Anal Dim 1-D 1-D Time Anal Anal

Flux Diff Y Y Mig N N Conv N N BC Tafel ? CN NA NA

Chemical Ppt NA NA Hyd NA NA Notes AN AO

Gravano[45] Galvele[42] Galvele[36]

Fe, Zn Fe, etc Fe, etc

Cl Cl Cl

FD ?Anal ?Anal

1-D 1-D 1-D

SS SS SS

Y Y Y

Y N N

N N N

Pass Pass Pass

? ? ?

Y Y Y

Y Y Y

AP AQ AR

Sridhar[19]

SS,Ni

Cl

FD

1-D

Imp

Pass

Make

AS

Lillard[80]

Ni

Cl

FEM

1-D

NA

NA

NA

NA

Der.

NA

NA

NA

AT

Munn[81, 82]

Fe,Zn

Cl

FEM

2-D+

SS

NA

NA

NA

NA

NA

NA

NA

AU

Bertocci[83]

Cu/A u

Cl

Anal

1-D

Tafel

AV

Solution Method Reference Laycock[43] Mat SS Env Cl Type FEM Dim 2D(cyl) Time Exp

Flux Diff Y Mig N Conv N BC Lin CN N

Chemical Ppt N Hyd N Notes AW

Shaw[84]

Ni

Cl

Anal

1D

NA

NA

NA

NA

Pass

NA

NA

NA

AX

Shuck[85] Shuck[86]

Cl Cl

Num Anal

2D+ 1D

Exp Anal

Y Y

Y N

Y N

Tafel ?

Y ?

N N

Y N

AY AZ

Psaila-Dombrowski[48] SS,Ni

H2O

FD

1D

Imp

Tafel

BA

Engelhardt[86]

Fe

Cl

Num

1D

SS

Pass

BB

Ateya[87] Xu[88]

Fe Fe

Cl NH4 Ac

Num FEM

1D 2D

Exp SS

N NA

N NA

N NA

Poly Poly

Y Y

N N

Y N

BC BD

Ateya[47]

Anal

1D

SS

NA

NA

NA

Tafel

BE

Table 6. Summary of Models Reviewed in this dissertation.

178 A)[60] A one-dimensional titanium crevice is coupled to a two-dimensional boldly exposed surface in room temperature 0.5 M NaCl in this model. The authors present data on the transient pH and chloride fields at selected points in the crevice as well as the spatial distributions at a few snapshots in time. Deoxygenation is allowed to proceed naturally. There appear to be some transient instabilities in the pH near the mouth that affect the model. The chemistry is predicted to become monotonically worse with longer time and greater depth into the crevice, but never to reach levels that would be damaging. No potential information is presented and it is unclear whether the chemical effects of cathodic reactions are included.

B)[61]

The model represents a one-dimensional crevice of pipeline steel in carbonaterich neutral waters. Sulfate and chloride are present at lower levels. Data for the transient concentrations of Fe+3, CO3-2, SO4-2 and pH at selected points is graphed. The crevice first appears to alkalinize and then acidify. A strength of the work is the detail used in calculating the formation of various carbonate species. The boundary conditions are purely Tafel-like for both anodic and cathodic reactions. The graphed data shows what appear to be numerical instabilities. One possible explanation for these transient spikes may be the micro-celled idea that the authors use. Apparently there is not a smooth transition from nearly purely cathodic to nearly purely anodic reactions.

179

C)[62]

This paper presents the model used in (A)-(E). Two cases are modeled, Ag dissolution in KNO3 and Ti crevicing in 0.1 M NaCl. In both cases the anodic dissolution was taken as a constant, independent of chemistry and potential. Transient data on the pH, O2 content and various chemical concentrations are shown. There do not appear to be any significant instabilities. The use of Poissons equation in this body of work to maintain charge neutrality is explained in detail. Essentially the authors would prefer to solve the differential equations in parallel with Poissons equation. Because of the large computational burden it is solved in series with the equations. Essentially, it is used to correct any charge imbalances produced by the model. No data are presented to show the different results that might be obtained if Poissons equation is strictly enforced or if it is occasionally enforced by either the serial Poisson or a brute force approach.

D)[9]

The sensitivity of a crevice to locally more constricted sites is evaluated by using the Watson-Postlethwaite model. The two materials considered were 316L and 625. Each was modeled in 1 M NaCl as a crevice 2.5 cm deep with a gap of 3.8 m and was considered to initiate when the pH dropped below some critical value. A subcrevice of 0.1 m was placed over approximately 10% of the crevice. The presence of a subcrevice was found to be extremely damaging.

180 E)[28] The original published work for this family of crevice corrosion models presents the results of modeling the crevice corrosion of 316L and 625. The model is a finite-difference one-dimensional model that incorporates hydrolysis and the consumption of O2. When examining the initiation of crevice corrosion it applies the CCS model. The crevices have the same geometry and solution as (D) without subcrevices. Here too the corrosion rate is assumed to be a constant.

F)[32]

This series of papers is a study of the anisotropic etching of copper foils[24, 26]. The dissolution of copper in 0.5 M HCl + 0.5 M KCl + (3.5M or 0.5 M) CuCl2. was modeled. The complete mass transfer equation was used as the authors included the effects of migration, diffusion, and convection. Homogeneous chemical reactions were also considered in this two-dimensional model. The authors used a FD method to find the steady state dissolution rate for two initial geometries. While this system is analogous in many respects to a crevice, the convective term was prominent only because the pit was very open and solution was flowed past the open mouth. Indeed, one of the goals of the chemical process being modeled is to use convection to maximize mass transfer from the pit base.

G)[63]

A two-dimensional FEM model was used to study the pitting corrosion of

181 nickel in 0.5M NaCl. The polarization curve used takes potential but not local chemistry into account. Charge neutrality is used as a governing equation. It replaces an Ohms law approach for the potential. The authors mention that they use a separate analytical solution for the potential field. It appears that, despite their claims, the authors have seven equations for only six unknowns. An important aspect of this work is that the transport is modeled in areas outside the occluded site as well as within it. The authors point out the concentration gradients extend far into solution. This is important because a common assumption is that the concentrations at the mouth are identical to the bulk composition.

H)[34]

This work is a precursor to the later papers of Georgiadou[24, 26, 32]. The dissolution of partially unmasked copper substrates in 1M H2SO4 was modeled using both BEM and FEM. The focus of this work is on convective mass transport rather than the resulting behavior of the pit.

I)[64]

A variation of the CCS model that uses a combination of Cl- and S2O3-2 ions to define the critical solution chemistry is used to model the initiation of crevice corrosion on 304. The experimental work supporting this modeling is presented in a companion paper[15]. The crevice modeled had a 1.27 cm radius and a uniform gap of 4 m, i.e., it is a one-dimensional crevice in cylindrical

182 coordinates. The metal was assumed to dissolve at a constant rate of 0.15 /cm2. The dissolution of the MnS particles is assumed to be potential dependent and follows a second-order polynomial. An implicit method is used to find the changes in concentration with time. The model consistently overestimates the observed initiation times[15], although the trends with increasing MnS are similar. Finally, there is a slight increase in the aggressiveness of the solution at intermediate distances into the crevice. This increase is caused by the potential dependence of the MnS dissolution. Ohmic drop into the crevice eventually slows MnS dissolution.

J)[39]

A circular crevice of 99.9% aluminum in modeled and compared to experiment for crevice heights of 0.1 to 0.7 mm and crevice radii from 6.35 to 12.7 mm. The work is a successor to Heberts[14, 65] The dissolution rate of aluminum in the passive region is assumed to be linear with overpotential. The criteria used for initiation was a variation of the CCS model in which the critical environment was 0.003 M Al+3.

K)[33]

Convective flow can greatly accelerate the removal of corrosion products from a localized site. This paper reports on studies calculating the degree of mixing for various flow regimes over several geometries. The surface of the pits were held constant at a saturated value and the steady-state concentration field within

183 the rest of the occluded site was found. If the Peclet number was less than or equal to 1, then the entire site remained almost entirely saturated. If it was greater than orequal to 100 the electrolyte was free of dissolution products.

L)[20]

Iron dissolution in flowing H2SO4 can be limited by the formation of salt films. The authors model potential distributions between two plates and calculate the maximum Reynolds number which allows precipitation to occur for both laminar and turbulent flow and ohmic and activation control. This combination of fluid flow and salt film precipitation is not likely to be encountered for crevice corrosion.

M)[65]

This paper presents an intermediate stage of investigation into the crevice corrosion of aluminum in 0.05 M NaCl. It falls between the later work of Alkire[39] and the earlier work of Alkire[67]. As in those two papers, the modeled crevice is a one-dimensional cylindrical crevice. The model is solved using a FD method and uses Crank-Nicolson to evaluate the time variations. The model produces initiation times for various crevice gaps. Data are presented which shows current spikes and pH drops at the initiation time. These effects do not appear to be consistent with the published boundary condition. The flux of aluminum dissolution is stated to be either zero or to depend linearly on potential. There is no listed corrosion rate for initiated

184 material.

N)[66]

This paper presents the initial work by Alkires group on modeling the crevice corrosion of aluminum. A FD approach is used to model accumulation of Al+3 ions in aqueous solution. The only transport mechanism considered is diffusion. Another contrast to the later work is that the dissolution condition for the aluminum includes the effects of pH. This aspect allows initiation to occur as part of a continuous process rather than a discontinuous one.

O)[35]

Plating is the inverse problem of corrosion. The deposition of metal on a surface does share in common with dissolution the need to account for changing chemical concentration and electrical fields. A FEM approach is used to model the growth of a metallic deposit. Butler-Volmer kinetics are used to describe the surface reactions. No chemical variation appears to be built into the reaction. The growth rate can be found from the current density. Temporal effects are accounted for by growing the surface. The distributions in the solution appear to be steady-state.

P)[68]

This paper models the forced dissolution of copper wire in Cu2SO4 in a lead in pencil arrangement. The model accounts for chemical transport by diffusion only. The dissolution rate accounts for chemistry changes and the effects of

185 ohmic drop inside and outside the pit and activation overpotentials. An additional factor considered in the model is the fact that the conductivity of concentrated solutions does not follow dilute solution theory. Instead the authors use a polynomial fit of experimental data on conductivity.

Q)[8]

In many ways a crack is similar to a crevice. The geometries are similar and calculations of chemical concentration and potential fields are integral to the problem. The author presents a model that addresses the cracking of sensitized stainless steel in a BWR. The modeled regions were cracks with both parallelsided and wedge-shaped geometries. Although the wedge-shaped opening is nominally two-dimensional, that second dimension only appears in the purely one-dimensional formulation of the governing equations as a modifier to the generation terms. This issue was discussed in Section 2.3.l.4 of this dissertation. For this reason, the approach is classified as one-dimensional +. Other complicating features accounted for in this model include the effects of stress on dissolution rate and temperature. The stress intensity is an input factor into the model and does not vary. The temperature problem is accounted for principally by translating the solubilities to 288 C. Neither the stress intensity nor the temperature are affected by the model. The model is also a steady-state code and does not calculate any transient information. There are no chemical effects allowed on the dissolution rate, but chemistry does affect the cathodic

186 reactions. pH effects are discussed only in the context that the sparing solubility of the corrosion products allows a conversion of metal anion flux into a flux of hydronium. Despite the title of the work, no data are presented on the chemistry or pH of the crack.

R)[69]

Turnbull and Ferris model corroding fatigue cracks in structural steel in seawater. The model is in most respects similar to work done earlier on cracks that were undergoing cathodic protection[70] and the comments on that paper in (S) apply here as well. The major difference is that without the alkalinizing effect of the cathodic reactions the crack tip pH remains nearly neutral to slightly alkaline.

S)[70]

The cracking of cathodically protected carbon steels in seawater is the problem modeled by Turnbull and Ferriss. The model includes the effects of mass transport by migration, diffusion, and convection. Convection is considered because these cracks are subjected to a cyclic stress that alternately opens and closes the crack. This motion creates a crack pumping effect that efficiently exchanges solution in the crack with that in the bulk. Chemical equilibria are enforced for the carbonate and carbonate ions as well as the deposition of calcium and magnesium compounds. Hydrolysis is considered as well. The chemical effects of the cathodic reactions are also included. One difficulty in

187 interpreting the paper is that the list translating the notation into chemical species is missing an entry. The equations are solved numerically, but the method is not defined in this paper. All solutions are presented as steady-state ones. A major conclusion is that cracks will become quite alkaline in pure water (pH~12) and that seawater will exert a buffering effect reducing this to approximately pH = 11.

T)[71]

Gangloff and Turnbull present a joint study comparing experimental data on cracking of the high strength steel 4130 in 3.5 wt% NaCl with crack length. Only migration and diffusion are used for the transport processes and the dissolution rate is Tafel-like. Hydrogen reduction is a prime area of focus in the paper and is affected by both potential and [H+] as was discussed in section 2.1. The major conclusion of the paper is that shorter cracks can have an order of magnitude greater generation rate of elemental hydrogen at the crack tip. If hydrogen is the bad actor in EAC, then this would explain the short crack effect that is often observed.

U)[72]

The author presents a focused examination of the effects of mass transport on corrosion fatigue cracks. The transport processes considered are convection and diffusion. The model is only operated where the ohmic drop is small and

188 migration can be safely ignored. Since the focus is on the relative contributions of diffusion and convection to mass transport rather than any specific chemistry the work is done without electrochemical boundary conditions or equilibria. The major conclusions of the work are that 1) Crack length is an important parameter in addition to K, 2) short cracks are dominated by diffusional transport, 3) Convection becomes more important in long fatigue cracks because the displacements are larger, and 4) Crack shape has a large effect on transport but not on the relative contributions of convection and diffusion.

V)[46]

This is an earlier version of the work in (R)[69] and (S) [70]. This version of a model representing the crack electrochemistry of corroding steels uses only the mass transport processes of migration and diffusion and ignores convection. Also the later additions of stress intensity on the dissolution rate were not added at this point. The dissolution rate is a Tafel equation and is independent of chemistry. The steady-state crack tip pH depends on the mouth potential. Without cathodic protection the crack tip is nearly neutral, with it the tip is alkaline.

W)[6]

The author presents a brief overview of the CHEQMATE model and shows its applications to several systems. The code allows mass transport by migration and diffusion. The type of electrochemical generation is not explicitly mentioned,

189 but all three cases shown used only a passive current density. The hydrolysis, chemical equilibria, and precipitation are included through the use of PHREEQUE, a geochemical code. One strength of the code is that it uses a correction for the thermodynamic information in concentrated solutions. A modified form of the Davies equation, presented in this dissertation in subsection 2.3.2.2.1.2, is used. The major limitations of this model appear to be the restricted form for the anodic dissolution current and the exclusion of the chemical effects of cathodic reactions.

X)[73]

The authors present a one dimensional FEM model of crevice corrosion. The model accounts for migration and diffusion. Despite the fact that the flux equation is written in two-dimensional form, it appears that the model is strictly one-dimensional. The electrochemical generation terms are Tafel expressions and hydrolysis is performed. The chemical effects of cathodic reactions are not included. Poissons equation is used to find the potential distribution and charge neutrality is also invoked. Section 2.3.1.6 of this dissertation discusses the apparent contradiction between these two equations. No statement is made as to how charge neutrality is maintained. The model is compared to the work of Beavers and Thompson[89] and Alavi and Cottis. For both sets of data the model is quite accurate in predicting the ohmic potential drop at steady-state but less successful in predicting the observed pHs and current distributions

190 over time. The authors point out that cathodic reactions inside the site might account for the discrepancy.

Y)[40, 41]

These papers present the model used later in (W) and (X). The model is a onedimensional FEM model that incorporates migration and diffusion for transport processes, Tafel-like behavior for electrochemical reactions and allows hydrolysis and chemical equilibria to occur. It is not clear what method is used to account for time variations in chemistry and potential within the occluded region. Although charge neutrality is listed as a governing equation, no mention is made of how it is applied.

Z)[74]

This model for the crevice corrosion of various aluminum alloys in seawater uses predictions of the temporal changes in chemistry and potential to predict when an alloy will pit. According to this theory the effect of a crevice is to acidify the local environment. Rather than directly attacking the metal, the increasing acidity acts as a chemical potentiostat and by increasing the kinetics of the HER (discussed in section 2.1). Increasing the cathodic kinetics will raise the corrosion potential. The criteria for initiation used in this paper is when the corrosion potential exceeds the pitting potential. The transport mechanism allowed is migration. The corrosion current is strictly passive whereas the HER kinetics are sensitive to both chemistry and potential. Only two of the

191 mononuclear hydrolysis products for aluminum are considered. AlCl3 is mentioned in the text as a possible precipitate, but is not listed in the governing equations. The models inclusion of the chemical effects of cathodic reactions is problematic. OH- production from the HER is listed a reaction that is considered. Indeed, it is stated that this is the primary cathodic reaction inside the crevice. Acidification does not occur at the open circuit potential for reasons that will be discussed in section 5.3. Instead the alkalinizing effect of the cathodic reactions will raise the pH. In short, acidification has a limited ability to raise the corrosion potential in a freely corroding crevice because the buildup of OH- will poison the reaction and prevent acidification.

AA)[75] This paper compares predictions of the Oldfield-Sutton model[4] to the experimental data for several stainless steels in seawater. The inputs to the model are the composition of the alloy, its passive current density, and the required critical crevice solution in terms of pH and Cl-. In this paper the model is used only to rank the relative resistance of the different alloys, so no transport is allowed or used. A further simplification is that all the alloys were assumed to have a passive current density of 0.1 A/cm2. The paper shows that a mechanistic model can also be used to generate qualitative data on alloy performance for use as a screening tool.

AB)[4]

This is the seminal paper for the CCS model of crevice corrosion. The authors

192 take the qualitative description of Fontana & Greene[3] for the initiation of crevice corrosion and turn it into a predictive model. Migration is the only transport mechanism considered. Alloy dissolution is assumed to be only a passive current density and no cathodic reactions are assumed to occur within the crevice after the initial charge of O2 is depleted. The crevice is not subdivided into different regions and the process is solved numerically. A strength of the model is the variety of hydrolysis reactions that are considered. Estimates are shown for the ranges over which the assumption of no diffusion is appropriate.

AC)[7]

Two models are used in this paper. One is a numerical model and the other is an analytic simplification. The analytic model is covered separately in (AD). The model allows the migration and transport of chemical species of the crevice. The electrochemical boundary conditions which are included are very sophisticated. Polarization curves are approximated piecewise with linear segments. Several curves are entered to account for the effects of pH changes on polarization behavior. A further modification of the polarization with chemistry is that when the solution becomes supersaturated a salt film is allowed to precipitate and slow the corrosion rate exponentially. No mention is made of the concentrated solution thermodynamics shown in other presentations of the same model[29]. However, the extremely low pHs shown (pH < -1) strongly

193 suggest that the activity coefficient of H+ is being modified. This model also predicts intermediate attack. Two effects in this model can slow the dissolution rate. The first is a potential drop. The second is the salt film mechanism. The authors state that it is the salt film which stops dissolution at the crevice depths. It is unclear why the effects of potential, which are already included in their model, are ignored. No accounting for the chemical effects of cathodic reactions is made. Charge neutrality is not mentioned.

AD)[7]

A simple analytic model for use in predicting the corrosion inside a crevice is also presented in this paper. The crevice is assumed to consist of three regions, a passive region near the mouth, a corroding region, and a salt film limited region near the base. The corrosion rate is assumed to be constant and high in the corroding region and effectively zero in the other two. The conductivity and geometry also vary between regions but are constant within each. This model allows predictions to be made about the location and depth of attack. Essentially this formulation is an IR* approach that uses an assumed chemistry change to stop corrosion rather than further potential drop.

AE)[76]

This is an earlier presentation of the model later used in (AC)[7]. It more complete than that later description. It elucidates the pH corrections for strong salts and describes changes in ionic mobilities in concentrated solutions. A

194 unique feature of the model is that temperature effects are also included. Corrosion rates and transport coefficients change with temperature. The model is solved by a FD method.

AF)[29]

This report is the most complete representation of the Gartland model used in (AD)[7] and (AE)[76]. It presents in detail the approximations made and the experimental data to which the simplifications were compared. The model is a one-dimensional FD code that allows mass transport by migration and diffusion. It accounts for the effects of temperature, concentrated solutions and viscosity on transport coefficients and the piecewise linear approximations made of the polarization curves provide good fidelity to experimental data. Chemical hydrolysis and other reactions are accounted for. A minor limitation is that chemical precipitates are not allowed to block the crevice. A more important limitation is that the chemical effects of cathodic reactions do not seem to appear in the governing equations.

AG)[77] A BEM approach is used to find the galvanic corrosion between a carbon and stainless steel couple in flowing salt water. The model only calculates the potential distribution between the two plates. The electrochemical boundary conditions are assumed to be Tafel-like for the dissolution. The cathodic reactions are assumed to be mass transport limited. The flow conditions are used to modify the cathodic reaction rate. The model

195 predicts that the greatest attack will occur on the carbon steel immediately adjacent to the stainless steel and that increasing the solution resistivity will exacerbate the attack there. The model predictions compare favorably with the experimental results.

AH)[10] The authors present an updated version of an earlier model. The model is a onedimensional finite difference representation of a crevice that includes mass transport by migration and diffusion. Various hydrolysis and chemical reactions are allowed and the heterogeneous electrochemical reactions can apparently be based on any combination of potential, temperature and chemistry. Strengths of the model include the handling of concentrated solutions. This treatment is apparently only intended for use in chemical equilibria. The transport coefficients seem to be determined by the Nernst-Einstein relationship given in subsection 2.3.2.2 of this dissertation and scaled for the assumed viscosity of the solution as was shown in subsection 2.3.2.2.2. Comparisons are shown between predictions of potential and experimental data. The model also generates information about the chemical concentration fields inside the occluded region.

AI)[78]

This paper presents an earlier version of the model shown in (AH)[10]. It differs from the later work in that while the governing equations are presented in a temporal form but no data are shown in a time-varying format. The author may be using a time-marching approach to find a steady-state solution. The paper includes a section on dimensional analysis. The general conclusion is that the

196 condition in the crevice are the result of a competition between generation and transport. Deeper crevices will thus form stronger cells.

AJ)[38]

This work presents a one-dimensional FEM model of chemical reaction and transport. The generation rate is a constant value and chemical reaction is allowed. The transport coefficients are a complicated function of the ionic strength. The model uses a explicit approach to solving the temporal variation. The authors present a justification for the use of Ohms law. The model is compared to experimental results for the silver in potassium nitrate moving boundary experiment. A very interesting result are the graphs of concentration as a function of position. The authors present a sharp delineation between the Ag+ and K+ species in solution.

AK)[37]

A prelude to the later work of (AJ)[38] was this effort at calculating potential distributions. The author uses WECAN, a commercially available FEM program to calculate potential distributions for a two-dimensional axisymmetric geometry. Since the geometry is axisymmetric the problem is actually only onedimensional in cylindrical coordinates. The author presents an alternate formulation for the E-I relationship that uses a variable polarization resistance instead of a polarization curve. The apparent advantage of this formulation is that it is well suited for use in commercial FEM programs.

197 AL)[44] The author presents a simple analytic expression to relate the concentrations of non-reacting species to the potential in solution. The proof is that at steadystate the concentrations of the non-reacting species must be the result of migration and diffusive fluxes that exactly cancel. This assumption gives rise to a relation that expresses the concentrations of the species in terms of the potential in solution. This method has been refuted by Psaila-Dombrowski in (BA)[48]. The issue is also discussed in subsection 2.3.4.2.1 of this dissertation.

AM)[23]

This work is an earlier presentation of the model in (AL)[44]. The author uses the theory to explain the observed crack tip chemistries in 7075 in various halide solutions.

AN)[79]

The authors studied the dissolution of SS 304 and the Ni-based Alloy 600 wires to investigate pit repassivation. Wires of the two materials were held at anodic potentials to form salt films and then the potential was stepped down and the current decay was recorded. The data was modeled by an analytic solution that only considered diffusion. The model assumed that the dissolved species could be represented by a single average species and that the conditions at the mouth were exactly those of the bulk. This was coupled with a potential drop model to find the effective potential at the bottom of the pit. A final assumption was that the concentration gradient was linear throughout the

198 pit initially. These two tools and the assumption are used to calculate the corrosion rate at the surface as a function of saturation for several potentiostatic holds. The correction appears to work well for pits of different depths. Predicted stable states where the generation rate for a particular saturation was equal to the transport rate were confirmed experimentally. The model yields insights into the stabilization of pitting under different conditions.

AO)[30]

The authors present a model for the mass transport of chemical species out of a pit. Diffusion is the only transport mechanism considered. Migration is assumed to be negligible because of the salt film that forms with large anodic polarization. The model used accounts for viscosity changes as a function of concentration. The model shows that pits which are very strongly polarized (~1V) will become saturated and diffusion limited.

AP)[45]

The author models the steady state distributions of chemical species inside 1-D pits of Fe and Zn in borate buffer solution. They plot the resulting concentrations of chemical species as a function of the product of current density and depth. In other terms, a more rapidly corroding pit can be shallower than a more slowly corroding one and still have equivalent conditions at the base. This work differs from (AQ)[42] and (AR)[36] in that it includes buffering reactions and considers the effects of migration on mass transport.

199 These extra complicating factors also caused the model to be solved numerically rather than analytically.

AQ)[42]

The author extends his previous model[36] of crevice corrosion to include the full hydrolysis of metal cations instead of only the first product. performing the full hydrolysis calculation allows the regions where the soluble species dominate to be identified as the ones where pitting is stable. Precipitated species are assumed to be protective.

AR)[36]

The author presents his model for the stability of different phases based on the product of current and depth. The model is an analytic one and only considers diffusion. Only the first hydrolysis product is considered and only anodic dissolution is assumed to occur inside the pit - no cathodic reactions are allowed to occur. The model is applicable to a number of divalent metals such as zinc and iron. The goal of the paper is to help clarify the combinations of pit size and corrosion rate that are self-stabilizing.

AS)[19]

This paper presents a transient, one-dimensional finite difference model that uses an implicit method to find the varying chemical concentration and potential fields. There are two very interesting aspects to the model. The first is the inclusion of the effects of temperature into the transport coefficients, O2

200 solubility, and even dielectric constant. The second is that the authors justify their use of a brute force approach to correct the charge imbalances by direct comparison with the use of the Poison term approach of Watson and Postlethwaite[9, 28, 60-62]. The authors prefer to simply adjust the chloride concentration to correct any charge imbalance after a chemical transport step. This procedure results in a pH which is ~0.25 units higher and a chloride content which is ~ 2/3 that of the Poisson corrected model. This model points out the difficulties and advantages of modeling performed on long-term structures like nuclear waste containers. The advantage is that modeling can make predictions over a longer time span than is practical to experiment. The disadvantage is that for this model the time multiplier in the best case was only 1200. The model was simplified by reducing the number of species considered by eliminating all but chromium hydrolysis and switching to the brute force approach for charge neutrality. A larger factor in keeping the multiplier high which was not mentioned by the authors was the small number of nodes used. This paper was performed with an eleven node system. The computation time for solving a tridiagonal matrix, like that the authors used, goes as the number of nodes . A thousand node simulation would require one hundred times the calculation. For an unbanded matrix the penalty goes as the number of nodes squared.

201 AT)[80] In an investigation of the crevice corrosion of 625 in chlorinated seawater the authors compare the results of two independent models to predict crevice corrosion. A purely ohmic model is to predict possible potential distributions. The approach is similar to Fu[37] who also used a variable polarization resistance instead of a direct E-I relationship to represent material behavior. The model was implemented using PSpice. The model formulation was really direct-element FEM as implemented by PSpice. These potential results were compared to data from Oldfield and Sutton[4] about the minimum crevice gaps and depths needed to sustain electrolytes of different pHs. It is not clear from the paper what passive current density was used to generate the plots of minimum crevice geometries. The major conclusion of the paper was that chlorination was required to raise the open circuit potential on the boldly exposed surface to produce enough potential drop to polarize the material into its active nose at a deep enough point in the crevice to sustain the required chemistry.

AU)[81, 82]

The authors present a FEM model for the calculation of galvanic corrosion. It is a two-dimensional axisymmetric model. In cylindrical coordinates the radius and height are variable. The governing equations are solved by FEM. The boundary conditions for the different materials are polynomial expressions. No chemical changes are allowed or predicted. The author presents a detailed

202 explanation of the governing equations. One reason the model is limited to galvanostatic type problems is that the canned FEM package used, MARC, does not allow the boundary conditions to vary as a function of multiple field values. Several example cases as shown and the results are compared to an analytic solution.

AV)[83]

The author examines the mass and electrical transport in cracks in Au-Cu alloys in FeCl3 solutions as an analog for the cracking of brasses. Mass transport is by diffusion and migration. Generation is by chemically sensitive Tafel-like expressions and hydrolysis and chemical reactions are allowed. The crack studied varies between 100 and 200 m long and varies in height. The author determines that hydrogen discharge is impossible because there is a lack of potential drop under these conditions. One problematic aspect of the work is the statement of the electroneutrality equation. In this paper it is stated as the sum of the product of zi and the chemical concentration gradient. This does statement does not on its face assure charge neutrality. For example, a gradient of 2M Na+ to 1M in parallel with a gradient of 1M Cl- to 0M would meet the authors condition but not be charge neutral.

AW)[43]

The authors present a very interesting model that predicts the current transients and shape change of metastable pits. The model is a 2-D FEM representation

203 of a pit in cylindrical coordinates. Diffusion is the only transport mechanism considered. Electrochemical generation is considered to scale linearly with the excess concentration above some threshold. No chemical equilibria or hydrolysis reactions are considered. The starting geometry is 0.1 m radius pits filled with saturated solution. The model predicts concentric rings of undercutting and repeated transient increases in the pit current. One strength of the model is that the boundaries are allowed to move as corrosion occurs. It is not clear from the authors descriptions how the concentration field is adjusted after each step increase in pit size.

AX)[84] The authors present a simple analytic expression for IR-drop in a crevice to support their experimental work on 625 in seawater. The approach is IR*-based. This theory was described in subsection 2.2.2. The model assumes parallel sides, constant conductivity and constant dissolution flux. Results from the model of Gartland[29] are also mentioned, but that model is not presented in detail.

AY)[85]

This paper is the numerical companion to an analytic analysis[86]. The authors use a numerical model to evaluate mass transport and reaction in three crackshaped regions. Convection, diffusion and migration are all considered. Dissolution reactions are assumed to be of a Tafel form and only the first hydrolysis reaction is considered. The model is written for any divalent metal.

204 The authors examine the correlation between one- and two-dimensional models and the relative importance of the various transport processes. For a 0.2 cm long crack of width 0.02 cm filled with 0.6 M NaCl a diffusion-only, onedimensional crack was found to be an acceptable simplification. These assumptions were used in the companion paper in an effort to develop analytic expressions that would more clearly show the interrelationships of the geometrical and electrochemical variables.

AZ)[86]

The authors present an analytic, one-dimensional model of the changing conditions inside a crevice that occur when diffusion is the only transport mechanism. The choice of this dimensionality and transport mechanism was justified in (AY)[85]. The authors investigate the interplay between the various factors and revisit the effects of migration on crack tip composition.

BA)[48]

This dissertation presents in detail a one-dimensional finite difference model with implicit time-stepping that is used to analyze nuclear reactor safe-ends. These structures are analogs of crevice in that they have large length-todiameter ratios. All three transport mechanisms are considered as are hydrolysis, chemical reaction and radiolysis. The boundary conditions are Tafellike. In addition to reviewing much of the relevant literature on crevice modeling, the author presents the governing equations in detail. One notable

205 aspect of the dissertation is the refutation in Appendix B of the commonly used exponential form for the concentration of non-reacting species[51]. This issue is redeveloped in subsection 2.3.4.1. The author carefully compares the results of the numerical model to analytic solutions.

BB)[84]

The authors present an iterative method to find the chemical concentration and potential fields inside occluded regions. The model considers only migration and diffusion. The electrochemical generation rate is a constant and hydrolysis is effectively considered. The dissolution mechanism is changed where appropriate to consume hydroxyls as well as generate metal ions.

BC)[87]

The authors discuss the possible role of chemical transport in the IR*model for crevice corrosion. Chemical changes are considered in the context of how they will affect the Flade potential and the size of the active nose. Hydrolysis equations are shown as governing equations but their use in the model is not explained.

BD)[90]

The authors present their model for calculating crevice initiation by the IR* mechanism. The FEM model used is two dimensional and accounts for both the interior of the occluded site and the boldly exposed surface. The electrochemical boundary condition is obtained experimentally. No mention is

206 made of the exact format used to represent the polarization curve in the model. Several analytic simplifications are included in an appendix to the document to show the interrelationships between the various physical parameters. The model results are compared to some experimental work on pure iron in 0.5 M aceticacid 0.5 M sodium acetate and 1 M NH4OH - 1 M NH4NO3. This work is the most complete representation of the IR* model used by Pickering.

BE)[47]

The authors present some analytic solutions for the concentration and potential inside cracks and crevices. The authors show plots of concentration and potential as a function of position for various current densities. The major assumptions used are the crack has parallel sides, transport occurs only by migration and diffusion and the electrochemical reaction is HER. The authors show that dissolution can occur inside a crack that is being cathodically polarized on the boldly exposed surface.

Summary This chapter has provided the basic information needed to model and understand the modeling of crevice corrosion. A basic grounding in electrochemistry led immediately into a discussion of the two major competing theories on the initiation of crevice corrosion - the CCS and IR* models. Computer simulations of these theories depend on calculating the chemical concentration and electrical fields within an occluded region. This can be done by building from

207 the flux equations through the mass conservation equation for chemical species and by an application of Ohms law for the electrical field. Each term in these governing equations carries along its own set of assumptions and simplifications. After expanding on the issues associated with the terms of the governing equations the chapter concluded by reviewing the previous work which has been done in modeling crevice corrosion. The next chapter will address the model which was developed for this dissertation.

208

Chapter 3: Definition of the CREVICER Model

One of the goals of this thesis was to develop a general, adaptable model that could represent the two processes which are common to all forms of crevice corrosion - generation and transport. By performing the modeling in this fashion, which stresses the commonalities among different systems of crevice corrosion, it is possible to greatly shorten the development time of models that are specific to a particular system. This chapter will discuss the rationale for attempting to model the corrosion process for a general crevice, the precepts of objectoriented design (OOD) which force the code to be written in a modular fashion and enable it to operate on the general case, and give an overview of the finite element method (FEM) which is used to solve the required mathematical equations. The last section of the chapter will discuss the specifics of the code developed in this thesis.

3.1 General Aspects of Crevice Corrosion

In order to make a code which is suitable to model crevice corrosion for a wide variety of material/environment systems it is necessary to examine the factors which all instances of crevice corrosion have in common. At the broadest level, each instance of crevice corrosion is governed by generation and transport. The reaction rate at any interface is determined by the local conditions. The local chemistry, the sum of all the quantities of all the species present

209 (Ci,...,Cj), the local electrochemical potential, E, and the temperature and absolute pressure (T and P) are sufficient to determine the reaction rate on any given interface. Understanding crevice corrosion is a matter of predicting how the local conditions, principally chemistry and potential, evolve in space and time and thus change the corrosion rate. At steady-state, the generation of chemical species and electrical charge at an interface is exactly balanced by their transport away from the interface. There are two methods of transporting chemical species, flux due to a gradient in electrochemical potential and flux due to physical flow of solution. The former is often broken into diffusion, flux due to an activity gradient, and migration, flux due to the interaction of charged ions with an electrical field. Flux due to the physical flow of solution is called convection. Electrical flux is always carried by ions in aqueous solution. It can be visualized by treating the charge flow as current through a medium of varying electrical resistivity. In an occluded region, the crevice former retards transport and allows the reaction products from the interface to accumulate. The former acts by creating a long, thin path over which species and charge must move. For the transport of a fixed quantity of ions, a reduction in the cross-sectional area available for transport increases the required flux proportionately. Additionally, since the fluxes of both chemical species and electrical charge are determined by the gradients of the appropriate field variables, activity and electrostatic potential, an increase in path length causes a proportionately larger total change between one end of the path and the other. Another retarding effect of a crevice on transport is that drag from the crevice walls dramatically reduces convective flow as the crevice narrows.

210 These change in local conditions caused by the retarding effect of the crevice former on transport affect the reaction rate, and if the entire process spirals out of control, crevice corrosion occurs. The general description of the preceding two paragraphs holds for all types of crevice corrosion. It is only the specific parameters such as the transport coefficients diffusivity and mobility (Di and ui), reaction rate as a function of chemistry and potential and any homogeneous chemical reactions such as hydrolysis or precipitation that make any material/environment combination unique. A general model for crevice corrosion needs to solve the following two equations at every point inside the crevice: MC i Mt MDel Mt

' & L @ Ji(C i...C j,T,P) % Ri(E,C i...C j,T,P)

(155)

' & L @ Jel(C i...C j,T,P) % Rel(E,C i...C j,T,P)

(156)

Solution of these equations gives the concentration and electrostatic potential fields from which the electrochemical reaction rates can be generated. The generality for such a model comes from its ability to use different functional dependencies for the fluxes, ( Ji , Jel ), and generation rates, (Ri, Rel), for different materials. For example, the passive films on stainless steels are relatively unaffected by high levels of caustic whereas aluminum alloys begin to dissolve rapidly in extremely alkaline environments. All types of crevice corrosion share the need to solve equations 155 and 156 and only differ in the exact effects of chemistry, potential, temperature and pressure on corrosion rate,

211 homogeneous chemical reactions, and transport. The problem is one of how to represent the underlying equations and data in a fashion which allows the specifics to be readily changed without affecting the rest of the code. One approach for programming such a model is Object Oriented Design (OOD).

3.2 Object Oriented Design

One goal of this thesis was to create a model which was flexible enough to handle the variety conditions which must be expressed in simulating crevice corrosion and was extendable to include future modeling efforts. To accomplish this, it was decided to use Object Oriented Design (OOD). OOD is a programming methodology which is characterized by two main attributes: encapsulation and inheritance.[91] An object is piece of code meant to represent a physical entity or idea. It includes all of the data and all of the methods that operate on that data. An example, shown in Figure 3.2(a) would be an object representing a childs ball. Mass and velocity might be data properties of the object. Accelerate would be a method property, included in the ball object, which uses the mass property and the force and time inputs to change the velocity property. Encapsulation is accomplished by hiding the internal functionality of the object away from other objects or code. Objects interact with each other only in defined ways, and the necessary information is passed overtly through formal calls rather than accessed directly from one object to another. This approach allows individual objects to be modified without causing

212 unforeseen errors in other parts of the program. Continuing the ball example, the initial form of the ball object might use Newtons First Law to calculate velocity changes in the accelerate method. If the object is properly encapsulated, rewriting the accelerate method to account for relativistic effects will correctly and uniformly affect the entire program. Figure 3.2(b) shows this more clearly. The encapsulated code can be changed and verified quickly and with little chance of introducing errors, while the non-encapsulated code is more difficult to modify and runs significant risks of introducing new errors elsewhere in the code when it is changed. Inheritance allows an object to inherit the properties of a parent class. Additional properties can be added or inherited ones overridden. This characteristic is useful because it allows the reuse of code. An example drawn from this dissertation is the TASpecies class and its children classes, such as TClm as shown in Figure 3.2(c). For any chemical species, we are interested in the same types of properties. Physical properties such as charge number, z, and transport properties such as mobility, u, and diffusivity, D must be defined for all chemical species. Inheritance allows a derived property, such as D, to be easily and accurately applied to all child classes derived from TASpecies. Figure 3.2(c) shows the default behavior of TASpecies as using the Nernst-Einstein equation to calculate D from u and temperature, T. A child class, such as TClm, must give new values for identifying physical traits such as z and u, but automatically inherits the method of calculating D from u. This property saves code, but more importantly inheritance makes it easier to debug the overall code, since the method of calculating D must only be verified at one point rather than many. It should be pointed out that

213 this inheritance in no way limits the ability of a child class to redefine any inherited property. If it were desirable to redefine D for a particular child class it could be done. Encapsulation and inheritance allow the type of model suggested in section 3.1 to be created. Figure 3.2(d) is a high level representation of the code developed in this project for the modeling of crevice systems. Conceptually, there are four areas that have to be addressed. By encapsulating them, each can be modified or improved without affecting the others. The central elements are the forms of the equations governing the accumulation of electrical charge and chemical species given in section 3.1. Two separate types of information, specific to each crevice system, are required to produce the coefficients for those equations. The first is the physical geometry and construction of the crevice. This information defines how deep and narrow the modeled crevice is as well as the metal it is constructed of and the electrolyte which fills it. The second type of information concerns how materials and chemical species act under different conditions. Corrosion rates at different potentials and the effects of ionic strength on diffusion coefficients are examples. Finally, the last important conceptual area is the mathematical method which solves the specific equations for the chemical and electrical fields inside the crevice. In the program CREVICER which was developed for this dissertation the finite element method (FEM) was used for these calculations and a short discussion of the method is included in the next section.

216

3.3 Finite Element Method

Many possible methods can be used to solve differential equations. The most accurate techniques are analytical ones. They produce a solution in the form of an equation which can be solved at every point inside the parameter space to give the exact solution. Unfortunately, analytic solutions are only available for a very limited number of geometries and boundary conditions. Typically the cases for which they are available are very simple and not representative of real-world crevices, though experimental cases have been constructed to fit the available analytic solutions.[7, 30, 79] Numerical approaches are more general and can be applied to any well-defined geometry. Numerical solutions use computer algorithms to produce results that are approximately correct at a finite number of points. However, for many types of problems, numerical solutions are the only possible ones and they dominate in the fields of fluid flow, heat transfer, and stress analysis. There are numerous methodologies for arriving at numerical solutions to differential equations as was discussed in subsection 2.3.4. Three principal ones are Finite Difference (FD), the Boundary Element Method (BEM) and the Finite Element Method (FEM)[50]. Each has advantages and disadvantages. FD is easy to code, but is computationally inefficient. BEM and FEM are both more complicated to code initially, but use computational resources more efficiently once implemented. BEM is more suited to solving differential equations over areas that have a low surface to volume ratio, while FEM better applied to volumes with large surface to volume ratios[50]. For this thesis, FEM was the mathematical technique used to solve the

217 differential equations governing the transfer of chemical and electrical flux. The method allows the grid to be adapted to maximize the resolution in areas of high gradients. The basic reference text used was Allaire[51]. Another important issue in solving the relevant differential equations is the dimensionality of the mathematical solution. The physical situation being modeled has three spatial dimensions and also varies in time. Limitations on the amount of computational power available constrain the number of dimensions that can be practically modeled, since all numerical methods depend on solving matrices of equations. The size of these matrices is varies linearly with number of points or nodes where the equation is solved. The number of computations, and thus the time, required to solves the matrix varies as the square of the number of nodes - in O notation solving matrices is O(n2). The number of nodes depends on r, the resolution desired along an axis, and the dimensionality. In one-dimensional problems the resolution directly determines the number of nodes. If the equation is to be solved with a resolution of ten points along an axis, then only ten nodes are required. For two- and three- dimensional problems, however, the number of nodes required scales as the square and cube respectively of the resolution. The amount of time required to solve a matrix for a fixed resolution varies as r2 for one-dimension, r4 for two dimensions, and r6 for three dimensions. For this thesis, the solution is performed for two independent spatial dimensions and the temporal dimension and allowances are made to account for the effect of charges in a dependent third spatial dimension. This compromise choice of dimensionality provides a good match to the physical shapes of crevices, which are by definition much larger in two dimensions than they are in the third and also allows a higher r

218 to be solved in the available time than if three independent spatial dimensions were used. The method used for reflecting dependent changes in the third dimension allows CREVICER to reflect gross changes in that dimension, such as an opening crack, but does not permit the effects of surface roughness to be included. The following subsections address the implementation of FEM for the spatial and temporal dimensions and the limitations of the method for both.

3.3.1 Spatial FEM The general steady-state second order partial differential equation which FEM has to solve is represented in Equation 157 below. M MM M 1 MM % Kxy(x,y) K x(x,y) Mx Mx Mx 2 My % M 1 MM M MM K y(x,y) Kyx(x,y) % My 2 Mx My My MM MM % My(x,y) Mx My

(157)

% Mx(x,y)

% P(x,y)M % Q(x,y) ' 0

Where: is the general field variable x and y are the independent spatial dimensions Kx, Ky, Kxy, and Kyx are the spatially-varying coefficients for the second-order terms

219 Mx and My are the spatially-varying first-order terms P is the spatially-varying scaling factor for the field variable Q is a spatially-varying generation term

In CREVICER the field variable is either potential or the chemical concentration of some species. The values of the coefficients vary throughout the crevice and depend on which field variable is being solved. The derivation of the coefficients from physical parameters was shown in subsections 2.3.1.1 and 2.3.1.4. Finally, this steady-state representation is usually replaced by the time-dependent formulation shown later in this section. Defining the differential equation is not sufficient to solve it as the appropriate boundary conditions must also be supplied. The general form for a boundary condition is given below. MM MM % K y(x,y) % "(x,y)M % $(x,y) ' 0 Mx My

K x(x,y)

(158)

Where: Kx and Ky are the spatially-varying coefficients for the first-order terms is the scaling factor for the field variable is the constant term

Two aspects of the boundary can be defined: the value of the field variable and its derivative. Depending on the values of the coefficients, a boundary condition can be classified into one of three categories shown in Table 7. In the first (or Dirichlet) type of boundary

220 condition, the value is fixed and the derivative is free. In the second (or Neumann) type, the derivative of the field variable is defined at the boundary, but the actual value is free. In the third (or Robin) type, neither the value nor the derivative is set, rather their relationship is defined. Any boundary can have only one type of boundary condition applied to it; the value and the derivative of the field variable cannot be set simultaneously on any boundary.

Equation "(x,y)M % $(x,y) ' 0

Type First (Dirichlet)

K x(x,y)

MM MM % K y(x,y) % $(x,y) ' 0 Mx My

Second(Neumann)

K x(x,y)

MN MN % K y(x,y) % "(x,y)N % $(x,y) ' 0 Mx My

Third(Robin)

Table 7. Boundary conditions for second order differential equations can be classed in three ways

In FEM the volume over which the differential equation is to be solved is broken into nodes and elements. A node is a point in the volume, an element is the shape which connects sets of nodes. The value of the differential equation is found at each node by solving a set simultaneous equations. That matrix of equations is created by applying the differential equation

221 over all of the elements. A sample element is illustrated in Figure 3.3.1(a) where a single linear simplex element is shown connecting three nodes. This code uses Galerkins method on these simplex elements arrive at values for the nodes. This method forces the sum of the differences between the FEM approximate solution and the true solution to be equal to zero. This method is discussed extensively in Allaires text on FEM[51]. Although reiterating Allaires derivation of FEM would be repetitive, some discussion of the limitations of spatial FEM is appropriate. One point to note is that while Allaires derivation of FEM allows for the coeffecients, Kx(x,y), Ky(x,y), etc. to vary spatially, they are held constant within each element. There is some dispute about the validity of this discretization and concern that it fails to fully account for the effects of the changes in the coefficients.

3.3.1.1 Limitations of Spatial FEM The FEM produces results which approximate the true solution to the differential equation at a finite number of points. As with any discretization process, the fineness of the intervals affects the accuracy of the result. For a given shape, the more nodes that are used, the more accurate the final result. Unfortunately, the time required to solve a mesh is proportional to the square of the number of nodes. In order to halve the separation between nodes in a twodimensional shape, four times as many nodes will be required and the time to perform the calculation will go up by a factor of sixteen! Another deviation between FEM and the true solution is the shape of the solution between the nodes. A FEM solution applies the shape function define the field variables

222 between the nodes. For a solver such as CREVICER which uses linear simplex elements, if the results were plotted in three dimensions using the field variable as the third, the surface would be composed of triangular facets. Only the value is continuous across the surface, the first and all higher order derivatives are discontinuous. Obviously such a surface differs from the true solution. Other shape functions could give more accurate representations of the spaces between nodes. This increased accuracy would require a more complicated formulation and slightly longer running time. A final error that can occur in spatial FEM is numerical oscillations caused by Peclet instability[51]. This problem occurs when the first order terms are large compared to the second order terms. In fluid mechanics, Peclet instability occurs when the convective terms are large compared to the diffusive terms. This relationship is shown in the equation below where the numerical approximations to the first and second order terms are made and divided to yield Pe, the Peclet number. The same calculation has to be made in the y direction. As long as both Peclet numbers are less than two, no numerical oscillations will occur spatially[51]. MM Mx M MM Kx Mx Mx Mx )M M ()x) )x ' x ' Pe )M Kx

Mx Kx

(159)

()x)2

Where: x is the discretization difference between adjacent points in the x direction [m]

223 Pe is the Peclet number

If numerical oscillations do occur, the resulting FEM solution will differ markedly and unpredictably from the true solution. Two recourses are available in such situations. One is to refine the mesh, thus decreasing x and y and reducing the Peclet number. This is the only method currently available in CREVICER. The second method is a numerical technique called upwinding[29]. While spatial FEM provides a good basis for the discussion of the technique and some of the problems that can be encountered with it, CREVICER rarely uses steady-state FEM. Instead, the temporal forms of the equations are employed, to model how variations occur with time inside an occluded site.

3.3.2 Temporal FEM While steady-state modeling of a crevice can provide some information about the endpoints of crevice corrosion, many central questions require a time-based approach. For instance, the time required for the pH to drop low enough to initiate corrosion for a particular geometry may be an important parameter in the design of a structure. The canonical equation for a general two-dimensional second order partial differential equation that varies in time is shown

224 M MM M 1 MM % Kxy(x,y) K x(x,y) Mx Mx Mx 2 My % M 1 MM M MM Kyx(x,y) % K y(x,y) My 2 Mx My My (160)

MM MM % My(x,y) % Mx(x,y) Mx My % P(x,y)M % Q(x,y) ' K t MM Mt

Where: Kt is the scaling factor for the rate of change of the field variable Equation 160 is little changed from Equation 157. Essentially, the steady-state form represented by Equation 157 is reached when the rate of change of the field variable is zero. Equation 160 is solved in a fashion similar to purely spatial FEM, except that instead of solving for the distribution of the field variable that makes the spatial terms sum to zero, the existing distribution is used to calculate the rate of change with time. That rate of change is then applied for a small period of time (t) and the calculations are repeated from the resulting distribution. If the spatial terms are calculated for the next time period based on the present time interval, then the method is fully explicit. If instead the distribution for each point during the next time period is expressed in terms of its neighbors values at the next time period the method is said to be fully implicit. This was discussed in subsection 2.3.4.2.1. CREVICER uses a weighted implicit-explicit technique from Allaire[51]. This approach is illustrated in the following series of equations. This case solves a time-dependent, parabolic differential equation instead

225 of the full canonical equation for simplicity, but the principles are the same. The equation to be solved for this illustration is time-dependent diffusion: M MM Kx Mx Mx MM ' 0 Mt

& Kt

(161)

In the weighted explicit-implicit approach a weighting factor, which varies from 0 to 1, is used to vary the contributions of the explicit and implicit terms as shown below. M MMm %1 Kx Mx Mx M MMm Kx Mx Mx MM Mt

% (1&2)

' Kt

(162)

Where: m m+1 is the general field variable at time t = m (explicit terms) is the general field variable at time t = m +1 (implicit terms) The following table shows how different combinations of and Kt can be combined to run CREVICER in different modes.

226 =1 =0 = 0.5 =1

Kt Kt <> 0 Kt <> 0 Kt <> 0 Kt = 0

FEM mode Fully implicit Fully explicit Crank-Nicholson Steady state

Table 8. and Kt can be combined to run CREVICER in a time dependent way that varies from fully explicit to fully implicit, or to force it to make steady state calculations. Typically, CREVICER is run in Crank-Nicolson mode which is a combination of the explicit and implicit techniques.. This reduces some of the problems with stability that are discussed in the next section.

228 3.3.2.1 Problems with Temporal FEM Numerical instability can occur in explicit temporal FEM and is related to the Courant number, r(e). The Courant number is defined by the following equation (16.15 taken from Allaire[51]). K x)t ()x)2 K t

r (e) '

(163)

Where: r(e) is the Courant number

Depending on the value of r(e) the solution may oscillate and/or fail to converge to the correct final answer.

Value of r(e) 0 < r(e) < 1/4 1/4 < r(e) < 1/ 2 1 /2 < r(e)

Result Non-oscillatory, stable Oscillatory, stable Unstable

Table 9. r(e) can have various effects on an explicit solution

The result of this limitation is that fine spatial grids require small time steps in the temporal solution to maintain stability. This solution has negative consequences on the solution time, because as was discussed in subsection 3.3.1.1. on the limitations of spatial FEM, fine grids already require more computational time. Halving the spacing between the nodes, which

229 already caused a factor sixteen increase in time per matrix solution, now requires four time steps to be performed where one would have sufficed before. The total penalty for halving the separation is now a factor of sixty-four. Fully implicit solutions are always stable, but may oscillate. Crank-Nicolson, which weights the explicit and implicit contributions equally is a good compromise that converges well and avoids some of the stability problems encountered in a fully explicit technique. Neither technique allows large time steps to be used with impunity, since large Courant numbers can still cause oscillations even though the final answer may converge. This brief summary of FEM has only addressed the relevant equations in canonical form. For use in crevice modeling the various coefficients (Kx, Mx, etc. ) must be represented in terms of physical constants. This connection is made in the next section.

3.4 Applications of FEM to Crevice Corrosion

CREVICER uses FEM to model both electrical potential and chemical concentration fields. Each case can be represented in the canonical form of Equation 160 by using the relation that the time rate of change is the negative of the divergence of the appropriate flux plus the rate of generation. This is done first for electrical charge. The electrical flux is equal to the conductivity times the gradient of electrostatic potential, as shown in Equation 164.

Jel ' 6LN

(164)

230 Where: Jel LNs is the electrical flux [C/m2-s] is the conductivity [(-m)-1] is the gradient of electrostatic potential in solution [V/m]

The rate of accumulation of charge at each point is found by taking the divergence of this flux and adding the rate of generation of electrical charge. Since charge is only generated at electrochemical interfaces, the rate of generation is the product of the reacting area and the rate divided by the volume of interest. MDel Mt Jel A(x,y) h(x,y)A(x,y)

' &6(x,y) L N %

(165)

Where: Del is the charge density [C/m3]

h(x,y) is height at point (x,y) [m] A is area [m2]

By canceling terms and multiplying through by h, Equation 165 is placed in the proper form for solution by FEM. Table 10 shows the correspondence between the terms for FEM and the physical parameters of the crevice.

231 h(x,y) MQ 2 ' &6 h(x,y) L N % Jel(x,y) Mt

(166)

FEM Coefficient Kt Kx = Ky Mx = My P Q

Physical Parameters h(x,y) - (x,y) h(x,y) 0 0 Jel(x,y)

Table 10. The coefficients for use in FEM can be related to physical parameters for use in calculating electrostatic potential fields.

A similar analysis can be performed for the case of chemical concentration fields. The starting point is the flux equation using the gradient of concentration for diffusivity and ignoring convection for the reasons discussed in section 2.3.1. Ji ' & Di LC i & zi F u i C i LN (167)

The rate of accumulation of chemical species at each point is found by taking the divergence of this flux and adding the rate of generation of chemical species. Because charge is only generated at electrochemical interfaces, the rate of generation is the product of the reacting area and the rate divided by the volume of interest.

232 MC i Mt Ji(x,y)A(x,y) A(x,y)h(x,y)

2 ' Di(x,y) L C i % zi F u i(x,y) LN LC i %

(168)

By canceling terms and multiplying through by h, Equation 168 is placed in the proper form for solution by FEM. MC i Mt

h(x,y)

2 ' h(x,y)Di(x,y) L C i % h(x,y)zi F ui(x,y) LN LC i % Ji(x,y)

(169)

Table 11 shows the correspondence between the terms for FEM and the physical parameters of the crevice.

FEM Coefficient Kt Kx = Ky Mx = My P Q

Physical Parameters h h(x,y)Di(x,y) h(x,y)ziFui(x,y) grad tilde phi 0 Ji(x,y)

Table 11. The coefficients for use in FEM can be related to physical parameters for use in calculating chemical concentration fields.

3.5 Program Structure and Simplifications used in CREVICER

CREVICER is a two-dimensional FEM code for the solution of time-varying partial

233 differential equations used in modeling the chemical concentration and potential fields of occluded regions. This section will address the basic structure of the program and the simplifications used within it. Any text marked (Bold) refers to a data structure or procedure in CREVICER and is included to more directly tie this subsection to the actual code. Any item with a T prefix is an object.

3.5.1 Program structure Figure 3.5.1(a) shows the major information flows within CREVICER. The diagram is complemented by Figure 3.5.1(b) which illustrates the objects and their inter-relationships. The Setup procedure uses the input node and element files to create the two data structures needed to define a crevice: the nodes and elements arrays. The nodes array contains all of the nodes in the crevice. Each node (NodeInfo) consists of an x,y,z position for the node, the conditions at the current time step (chem) and the conditions at the previous time step (oldchem). The z coordinate is not used by CREVICER, but is included for future functionality. The elements array stores all of the elements that form the crevice. Each element (TSolutionVolume) lists the i,j and k nodes that define the element, the height (h) of the element, and the material of which it is constructed (mat), and the materials along each of the edges if needed (ijmat, ikmat, jkmat). The program then consists of two loops: one for activities that happen within a time period, and another for the series of time periods being modeled. The inner loop includes an additional iterative step of variable length that is used to find the potential field.

234 The inner loop finds the chemical concentration or electrical field at the next time period for each field variable (concentration or potential) in turn. In order to find m field variables at n nodes the loops solves an n by n matrix m times. This approach is faster than solving an mn by mn matrix once by a factor of 1/m. The conditions of charge neutrality and chemical equilibrium are enforced after the transport of all the species for each time period. The matrix of equations is developed using the FEM equations presented in subsection 2.3.4.2.3. The mode of the solver, steady-state vs explicit, implicit or mixed is controlled by Kt, (theta) and t (time) as was described in section 3.3.2. The matrix is constructed elementby-element. Three equations are generated by each element, one for each node. The entries into the matrix depend on the x,y positions of the nodes, the values of the field variable (in oldchem), and h. Equations for chemical species also depend on zi, Di, and ui. These parameters are encapsulated in TAllSpecies, a container class for all possible species. This object in turn accesses the values for a particular species through the particular TASpecies which defines it. The heterogeneous reaction rates are queried from the elements mat (which is a TMaterial). A material sums the reaction rates from the various TReactions that are included in it. At a minimum a TMaterial should have one anodic and one cathodic TReaction. This separation of the reactions on a surface into different groups not only provides better fidelity to the physical situation, it also allows chemical fluxes even when the electrical flux is small or zero. This ability is vital if the crevice will be depolarized to Ecorr. Information on E, Ci,...,Cj, T and P is passed to each of the objects when a request is made for any parameter. The end of this subsection lists

235 which of the parameters are used, the unused parameters are passed for future use. The procedure for electrical transport is similar. The transport parameters are replaced by (kappa) which is calculated based on the local chem. Generation rates are found from the appropriate TMaterial which in turn uses the TReaction. One difference is that because electrical processes equilibrate much more rapidly than chemical ones an additional loop is performed only on the electrical parameter to find the proper potential distribution for each time step. Chemical and charge equilibria are enforced once all the transport steps have occurred. These routines are hard-coded as procedures into TAllspecies. Once equilibrium is restored output occurs and the new chem for each node becomes its new oldchem and the process restarts. Figure 3.5.1(b) is a view of the code that emphasizes objects. The Main() routine initializes the Elements and the Nodes with the geometry (Elements and Nodes) as well as the boundary and initial conditions. Elements is an array of TSolutionVolume. Nodes is an array of NodeInfos. Each Nodeinfo contain two TChemistrys one for the current and one for the next time period. The Main() procedure also controls the use of Solve(). Solve() operates on each species in turn. It builds an array of simultaneous equations and solves it to find the value of the field variables at the next time step. Solve() requests from each TSolutionVolume in Elements the values of the coefficients in the canonical equation (Kx, Ky, Mx, My, P and Q). These parameters are generated from the appropriate transport coefficients and generation rates.

236 TAllSpecies is a container class for TASpecies. It passes through information on conditions such as E, Ci ... Cj, T and P to the correct TASpecies and receives and returns the appropriate parameter, such as D, u or z. Each TMaterial performs a similar function for the TReactions it contains. The local conditions are passed to each TReaction and the resulting fluxes of chemical species and electrical current (Ji and Jel) are summed and returned. More information about the structure of the code can be obtained by reading the comments in the program itself. The individual files are listed in Appendices A - S. As a further aid the next subsection will address all the simplifications used in the code.

239 3.5.2 Simplifications in CREVICER Several types of simplifications have been made in CREVICER. The physical geometry of a crevice is approximated, the governing equations are simplified and several of the terms ignore the full functional dependency on the local conditions. The format used in this subsection is name of the concept or term being simplified, the relevant sections of this dissertation where the problem is discussed and the approach taken towards to problem in CREVICER.

3.5.2.1 Governing Equations

Convection: Relevant Sections: 2.3.1.1.1 Approach Used: CREVICER ignores convection. Small crevice gaps are unlikely to experience much flow unless a driving mechanism like crack pumping in corrosion fatigue is present.

Diffusion: Relevant Sections: 2.3.1.1.2, 2.3.2.1 Approach Used: CREVICER calculates diffusion based on the gradient of concentration rather than the gradient of activity. This is a valid assumption if the gradient of the activity coefficient with respect to chemistry is zero. D is determined separately for each element according to the method described in

240 3.5.2.2.

Migration: Relevant Sections: 2.3.1.1.3 Approach Used: Migration is calculated based on s, the potential in solution. It ignores the diffusion potential. u is determined separately for each element according to the method described in 3.5.2.2.

Potential: Relevant Sections: 2.3.1.4, 2.3.1.5, 2.3.1.6, 2.3.2.4 Approach Used: The potential field is found from Ohms law. It ignores the diffusion potential. is determined separately for each element according to the method described in 3.5.2.2.

3.5.2.2 Terms

z: Relevant Sections: None Approach Used: z is a constant for each chemical species and is stored in the appropriate TASpecies. This is not an approximation.

241 u: Relevant Sections: 2.3.2.2, 2.3.3.2.1 Approach Used: The mobility for each species used in CREVICER is a constant stored in the appropriate TASpecies. E, Ci,...,Cj, T and P are passed when u is called but no accounting is made for the effects of those variables or the derived effects of viscosity and tortuousity.

D: Relevant Sections: 2.3.2.2, 2.3.3.2.1 Approach Used: The diffusivity for each species used in CREVICER is calculated from the Nernst-Einstein equation. Ie, D is proportionate to the absolute temperature. No accounting is made for the effects of P the chemistry or the derived effects of viscosity and tortuousity.

a: Relevant Sections: 2.1.2.1, 2.3.1.1.2, 2.3.2.1 Approach Used: The single ion activity is not used in CREVICER. In the future it could be used for diffusive flux or to modify the transport coefficients. It is here that concentrated solution effects should eventually be accounted for. The function call passes E, Ci,...,Cj, T and P.

242 T: Relevant Sections: 2.3.3.1.1 Approach Used: Temperature is only used in CREVICER in calculating D from u according to the Nernst-Einstein relationship. It is consistently exchanged between objects to allow for future functionality. P: Relevant Sections: 2.3.3.1.2 Approach Used: Pressure is not used in CREVICER. It is consistently exchanged between objects to allow for future functionality.

3.5.2.3 Heterogeneous and Homogeneous Reactions

Jel: Relevant Sections: 2.1.2, 2.1.3, 2.1.4. 2.3.3.2.3, 2.3.3.3.4 Approach Used: Electrical flux is determined in CREVICER by summing the electrical fluxes from each of the component reactions on a TMaterial. This summation is done with the convention that anodic currents are positive and cathodic ones negative. The function call passes E, Ci,...,Cj, T and P. Some reactions in CREVICER use Ci to adjust the polarization curve. The polarization curve itself can be programed in any functional format. CREVICER has employed constant, Tafel and polynomial representations for the polarization curve.

243 Ji: Relevant Sections: 2.1.2, 2.1.3, 2.1.4, 2.3.2.3.1, 2.3.3.3.4 Approach Used: Chemical flux is determined in CREVICER by summing the fluxes from each of the component reactions on a TMaterial. This summation is done with the convention that dissolution reactions are positive and plating ones negative. The function call passes E, Ci,...,Cj, T and P. Some reactions in CREVICER use Ci to adjust the polarization curve. The polarization curve itself can be programmed in any functional format. CREVICER has employed constant, Tafel and polynomial representations for the polarization curve.

Homogeneous Chemical Reactions: Relevant Sections: 2.3.2.3.2, 2.3.3.2.4 Approach Used: Homogeneous chemical reactions including hydrolysis can be programmed into CREVICER. Chromium hydrolysis is already implemented. It uses only the mononuclear species and assumes that hydrolysis is fast compared to transport.

3.5.2.4 Derived Parameters

pH: Relevant Sections: None

244 Approach Used: CREVICER reports the pH of a chemistry for use in chemically sensitive polarization curves or for output purposes. The code assumes the dilute solution approximation and returns the negative of the log of the H+ concentration.

I: Relevant Sections: 2.3.2.3.2.1 Approach Used: CREVICER reports the ionic strength of a chemistry for use in chemically sensitive polarization curves or for output purposes. The code uses Equation 83 given in 2.3.2.3.2.1.

: Relevant Sections: 2.3.2.2.2 Approach Used: Viscosity is not used in CREVICER, nor is it even a defined parameter. If a general method of calculating the viscosity were developed it would have to be implemented as a new object.

Tortuousity: Relevant Sections: 2.3.2.2.3 Approach Used: Tortuousity caused by precipitation is not used in CREVICER, nor is

245 it even a defined parameter. If a general method of calculating the porosity were developed it would have to be implemented as a new object.

This section has covered the general structure needed by code that models crevice corrosion, the suitability of OOD for use in such a code, the basis and limitations of FEM for solving such a model and presented how the physical parameters are translated into the form needed for solution by FEM. It concludes by presenting the structure and approximations of the CREVICER code. The next chapter will apply the CREVICER code to several test cases in order to verify the code and present some of its capabilities.

246

Chapter 4: Model Verification and Use

OVERVIEW An integral step in the development of any model is the testing and verification procedure. In this chapter the CREVICER code is tested against known analytic and numerical solutions. The FEM code that acts as the numerical engine for CREVICER is a solution solver for second-order partial differential equations. Such equations can be represented in the form of Equation 160 from subsection 3.3.2 below. M MN M 1 MN K x(x,y) % Kxy(x,y) Mx Mx Mx 2 My % M 1 MN M MN Kyx(x,y) % K y(x,y) My 2 Mx My My (160)

MN MN % Mx(x,y) % My(x,y) Mx My % P(x,y)N % Q(x,y) & K t MN ' 0 Mt

Section 4.1 of this chapter verifies the ability of CREVICER to solve the different forms of this differential equation that are relevant to crevice corrosion. The three subsections test and verify the codes ability to find the correct solutions for steady-state potential distributions, steady-state chemical transport, and time-transient chemical transport. Each subsection progresses from one-dimensional cases with simple boundary conditions to greater dimensionality and more complicated boundary conditions.

247 Section 4.2 discusses the known limitations of the code. The mathematical methods it uses are only stable over a limited range of conditions, restrictions have to be made to the incremental steps in time and space used in each model to prevent oscillations.

4.1 Comparisons of CREVICER to Analytic Solutions

Equation 160 in the introduction to this chapter is the general form for a second-order partial differential equation. In modeling crevice corrosion, this type of equation is used in two basic ways. To calculate the potential distributions in a crevice only the second and zeroeth order terms are present, i.e., no first-order terms are needed. This was shown in section 2.3.1.4. Potential distributions reach equilibrium on a timescale much shorter than that required to transport chemical species. Because of this, the potential distributions remain at quasi-steady-state. Test cases of this type are solved in subsection 4.1.1. The potential distributions used in this subsection all ignore the effects of diffusion potential. As was shown in section 2.3.1, chemical transport requires not only the second order terms caused by diffusion, but also demands first order terms for migration and convection. Test cases of this type are solved in section 4.1.2. Convective terms are not used in this thesis for the reasons discussed in section 2.3.1.1.1. It is interesting to model chemical transport for both steady-state and transient solutions. Comparison of the code to one time transient solution is shown in subsection 4.1.3. CREVICER models two independent spatial dimensions in a cartesian coordinate

248 system with provisions to account for dependent changes in a third dimension. The code is compared to analytic solutions representing one, two and two-plus -dimensional cases. In all cases the code is actually solving the differential equation in two dimensions. For the comparison to one-dimensional solutions, the boundary conditions are arranged such that the only variations occur along one axis. The two-plus cases show the codes ability to model the effects of dependent changes in a third dimension. The field variable is assumed to vary only in the xy plane, but that distribution reflects the effect of changes in the height of the third dimension across the xy plane. This partial accounting of the third dimension is discussed in greater depth later in this section.

249

4.1.1 Test Cases Evaluating Potential


Potential distributions are critical to the rates of generation and mass transport within crevices. For clarity, all of the cases in this section concern themselves with s, the solution potential. As was discussed in section 2.3.2.4.2 this potential is related to the electrochemical potential. The contribution of diffusion is not considered. Consideration of the diffusion potential would make the analytic solutions intractable.

4.1.1.1 Case 1 - One-D Crevice With Active Tip and Passive Flanks

The simplest geometry against which to test the CREVICER code is a one-dimensional crevice filled with an electrolyte of uniform conductivity. An equally simple set of boundary conditions would represent a potentiostatically controlled crevice corroding only at the tip. These conditions roughly simulate a simple environmentally-assisted crack. To define such boundary conditions the mouth is held potentiostatically at constant potential, the active base has constant electrical flux, and the crack flanks are perfectly passive (zero flux). These conditions are illustrated in Figure 4.1.1.1(a). They represent a 1-cm long crevice with a uniform 10-m gap, filled with 0.6 M NaCl and corroding along the crevice base at a rate of 10 mA/cm2. The mouth potential is held at 0 V. These conditions have been converted to standard units and are summarized in Table 12.

250

Parameter Jtip 6 N0 l

Value -102 [A/m2]* 7.58335 [S-m]-1 0 [V] 10-2 [m]

h 10-5 [m] * An anodic current at the base is oriented in the -x direction, hence the negative sign. Table 12. Summary of conditions for Case 1.

Analytic Solution for Case 1 The governing equation for this problem is the LaPlace Equation. At equilibrium the divergence of the potential in solution is equal to zero. 2 L Ns ' 0 (170)

Where: s is the solution potential [V]

This equation can be represented in one-dimensional cartesian coordinates as shown below. M2 N Mx


2

' 0

(171)

251 The first boundary condition for this problem occurs at the mouth (x=0). It is a Dirichlet condition since the value of the field variable, s, is fixed at a constant value 0. Ns(x'0)'N0 (172)

The other boundary condition occurs at the crevice tip (x = x0). It is a Neumann condition since the fixed flux and constant solution conductivity determine the derivative of the potential. MNs J /0 ' & tip Mx 000 6 x'x 0

(173)

Where: Jtip 6 is current density at the crack tip[A/m2] is conductivity [S-m]-1

The solution for this differential equation has the form: Ns(x) ' K1 x % K0 (174)

Where: K1, K2 are the coefficients of the solutions

By substituting in for the boundary conditions given in equations 172 and 173 the final

252 solution can be found and is shown below. Jtip 6

Ns(x) ' &

x % N0

(175)

For this geometry and these boundary conditions the solution has the form of a straight line. It is interesting to note that for this geometry, which has constant height throughout the crevice, there is no dependence on h. It is the ratio of the electrical current density to the solution conductivity which determines the gradient of potential. In a crevice with constant height and non-reacting flanks the current density in solution is uniformly equal to the flux at the tip, Jtip. The physical parameters in this situation that are needed to determine the potential distribution are the current density at the crack tip, Jtip, the solution conductivity, , and the mouth potential, 0. The values for these were given in Table 12. Substituting these values into Equation 175 gives the numerical form for the potential distribution inside the crevice shown below. Ns(x) ' 13.2 x (176)

Numerical Solution with CREVICER for Case 1 CREVICER was configured to run a crevice with the conditions shown in Table 12. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact

253 numerical solutions obtained by Equation 176 is shown in Figure 4.1.1.1(b). As can be seen in Table 13 the quality of the fit is extremely good. Each of the 100 variable nodes is a separate degree of freedom (D.O.F). Summation of the relative errors between the numerical and analytic solutions at each node yields the Chi-square (P2 ) of the fit. P

D.O.F. 100

P2 1.96 x 10-11

Table 13. Goodness of fit for Case 1.

For this simple geometry the correspondence between the numerical data calculated by CREVICER and the exact solution is extremely good. The calculated P2 is essentially measuring truncation error. The next test case considers a more complicated set of boundary conditions applied to the same geometry.

256 4.1.1.2 Case 2 - One-D Crevice With Active Flanks and Passive Tip

A slightly more complicated case than the previous one can be generated by starting with the same geometry but applying different boundary conditions. A simple first approximation of the boundary conditions for a crevice would be to hold the mouth potentiostatically and allow the crevice flanks to corrode at a uniform rate, without any contribution to the current from the crevice tip. This test case was referred to in subsection 2.3.1.6 and was used in the calculation of the charge density in solution which is related to the value of the second derivative of potential. To define the situation for this test cases the mouth is held potentiostatically at constant potential and the crack flanks are equally active at all potentials with constant flux regardless of potential. These conditions are illustrated in Figure 4.1.1.2(a). They represent a 1-cm long crevice with a uniform 10-m gap, filled with 0.6 M NaCl and corroding along the crevice walls at a rate of 0.1 mA/cm2. The mouth potential is held at 0 V. These conditions have been converted to standard units and are summarized in Table 14.

257

Parameter Jwalls 6 N0 l h

Value 1 [A/m2] 7.58335 [S-m]-1 0 [V] 10-2 [m] 10-5 [m]

Table 14. Summary of conditions for Case 2.

Analytic Solution for Case 2 The governing equation for this problem is the LaPlace Equation. At equilibrium the divergence of the flux is equal and opposite to the rate of generation of charge. Another way of stating this is to say that the current flow out through solution is equal to the charge injected from the crack flanks into the electrolyte. This situation occurs because at equilibrium the amount of free charge in solution does not change. 2 L Ns % Q ' 0 (177)

Where: s Q is the solution potential [V] is related to the generation rate of charge [V/m2]

258 When this equation is represented in cartesian coordinates and Q is expressed in physical terms Equation 178 is generated. M2 Ns Mx 2 Jwalls 6h

' 0

(178)

Where: Ns Jwalls 6 h is the potential [V] is the current perpendicular on crevice walls [A/m2] is the solution conductivity [S-m]-1 is the crevice height [m]

The boundary condition at the mouth (x=0) is once again the Dirichlet condition presented in Equation 172 since the potential is fixed at s, = 0. Ns(x'0)'N0 (172)

The other boundary condition is a Neumann condition since the derivative of the solution potential, , is fixed. In this case however the value of the derivative is fixed at zero, since no current crosses the boundary at the crevice base where x = x0. MNs /0 ' 0 Mx 000 x 'x0

(179)

259 The solution to this differential equation has the following form. Ns(x) ' K2 x 2 % K1 x % K0 (180)

The final solution is found by substituting in for the boundary conditions and solving for the coefficients. Jwalls 26h Jwallsx 0 6h

Ns(x) ' &

x2 %

x % N0

(181)

For this geometry and these boundary conditions the solution has the form of a parabolic curve. Unlike the situation in Case 1, where only the tip was active, the height of the crevice is an integral part of the final solution. Because charge is injected along the crevice wall, whose area is independent of the crevice height, the resulting current density does scale inversely with crevice height. Likewise, the length of the crack enters into the equation since changing the crack length increases the amount of total current leaving the crevice as well as the length over which it must be transported. Finally, it is worth pointing out that the current density (and thus the derivative of potential with distance) changes throughout the crevice. For a onedimensional crevice, with sides corroding at a constant rate, the current density decreases linearly from a maximum at the mouth to zero at the base. The physical parameters in this situation that are needed to determine the potential distribution are the current density on the crevice walls, Jwalls, the solution conductivity, , the crevice height, h, and depth, x0, and the mouth potential, 0. The values for these were given in Table 14. Substituting these values into Equation 181 gives the numerical form for the potential

260 distribution inside the crevice shown below. Ns(x) ' &6.59@103 x 2 % 1.32@102 x (182)

Numerical Solution with CREVICER for Case 2 CREVICER was configured to run a crevice with the conditions shown in Table 14. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solutions obtained by Equation 182 is shown in Figure 4.1.1.2(b). As can be seen in Table 15 the quality of the fit is extremely good.

D.O.F. 100

P2 5.2 x 10-10

Table 15. Goodness of fit for Case 2.

For this simple geometry the correspondence between the numerical data calculated by CREVICER and the exact solution is extremely good and the measured P2 is essentially representing truncation error. The next test case combines the boundary conditions for these two cases and applies them simultaneously to the same geometry.

263 4.1.1.3 Case 3 - One-D Crevice With Active Flanks and Active Tip

Continuing with the same geometry used in Cases 1 and 2 the boundary conditions used in the preceding cases can be combined. A more complete representation of the environmentally assisted cracking in Case 1 would include corrosion reactions on the crack flanks as well as at the crack tip. To define this situation the mouth is held potentiostatically at constant potential, the crack flanks are equally active at all potentials with constant flux regardless of potential, and the crack tip corrodes at a constant rate. These conditions are illustrated in Figure 4.1.1.3(a). They represent a 1-cm long crevice with a uniform 10-m gap, filled with a 0.6 M NaCl solution, corroding along the crevice walls at a rate of 0.1 mA/cm2 and at the crack tip at a rate of 10 mA/cm2. The mouth potential is held at 0 V. These conditions have been converted to standard units and are summarized in Table 16.

Parameter Jwalls Jtip 6 N0 l

Value 1 [A/m2] -102 [A/m2]* 7.58335 [S-m]-1 0 [V] 10-2 [m]

h 10-5 [m] * An anodic current at the base is oriented in the -x direction, hence the negative sign. Table 16. Summary of conditions for Case 3.

264 Analytic Solution for Case 3 The governing equation for this problem is the same LaPlace Equation that ruled Case 2. Once again, at equilibrium the divergence of the flux is equal and opposite to the rate of generation of charge yields Equation 177. 2 L Ns % Q ' 0 (177)

Converting the equation to cartesian coordinates and again substituting in for the boundary conditions yields Equation 178 once more. M2 Ns Mx 2 Jwalls 6h

' 0

(178)

Where: Ns Jwalls 6 h is the potential [V] is the current perpendicular on crevice walls [A/m2] is the solution conductivity [S-m]-1 is the crevice height [m]

The first boundary condition, applied at the potentiostatically controlled mouth, is the same Dirichlet condition as in all of these first three test cases. Ns(x'0)'N0

(172)

265 The boundary condition at the crack tip, where x = x0, is also the same Neumann condition as was used in subsection 4.1.1.1. MNs J /0 ' & tip Mx 000 6 x 'x0

(173)

Where: Jtip 6 is the current at the crevice tip (A/m2) is the solution conductivity (S-m)-1

This problem has the same form for the solution as Case 2. Ns(x) ' K2 x 2 % K1 x % K0 (180)

Finally, by substituting in for the boundary conditions and deriving the coefficients the final form for the solution is found. Jwalls 26h Jwallsx 0 6h Jtip 6

Ns(x) ' &

x2 %

&

x % N0

(183)

For this one dimensional case and these boundary conditions of an active tip combined with active crack flanks, the resulting solution is the superposition of the linear and parabolic solutions found in Cases 1 and 2. The physical interpretation of the results can also be viewed as the linear combination of two processes, one considering only the crack tip, the other only

266 the crack flanks. The resulting equation requires both the current density at the crack tip, Jtip, as well as along the crack walls, Jwalls, the solution conductivity, , both aspects of the crevice geometry, h and x0, and the crack mouth potential, N0, to determine the potential distribution. Using the values from Table 16 gives the numerical form for the equation shown below. Ns(x) ' &6.59@103 x 2 % 1.45@102 x (184)

A comparison of Equation 184 to Equations 176 and 182 shows that the result is indeed the sum of the solutions to Cases 1 and 2.

Numerical Solution with CREVICER for Case 3 CREVICER was configured to run a crevice with the conditions shown in Table 16. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solutions obtained by Equation 184 is shown in Figure 4.1.1.3(b). As can be seen in Table 17 the quality of the fit is extremely good.

D.O.F. 100

P2 4.3 x 10-10

Table 17. Goodness of fit for Case 3.

267

For this simple geometry the correspondence between the numerical data calculated by CREVICER and the exact solution is extremely good and the calculated P2 is essentially a measure of truncation error. These three initial test cases investigated CREVICERs ability to solve the potential distributions inside one-dimensional crevices filled with uniform electrolytes. The next case investigates the CREVICERs fidelity to a situation where the electrolyte varies throughout the crevice.

270 4.1.1.4 Case 4 - One-D Crevice With Active Tip and Varying Solution Conductivity

Although a crevice or crack may initially be filled with a uniform electrolyte, electrochemical reactions within the occluded site cause variations in the aqueous solution that fills the defect. Case 4 investigates a one-dimensional crack in which the solution conductivity varies linearly from the crack mouth to the crack tip. To define this situation the mouth is held potentiostatically at constant potential, the crack flanks are perfectly passive and the crack tip corrodes at a constant rate. These conditions are illustrated in Figure 4.1.1.4(a). They represent a 1-cm long crevice with a uniform 10-m gap, corroding at the crack tip at a rate of 10 mA/cm2 , and filled with an electrolyte concentration that varies linearly from 10 mM NaCl at the base (where the conductivity is 0) to 1.01 M NaCl at the mouth (where the conductivity is 1 x0 + 0) . These conditions may be considered roughly approximate to the situations found in cracks and crevices, where the most concentrated electrolytes are found in the most occluded portions of the sites. The mouth potential is held at 0 V. These conditions have been converted to standard units and are summarized in Table 18.

271

Parameter Jtip 61 60 N0 l

Value -102 [A/m2]* 1263.9 [S-m]-1 0.12639 [S-m]-1 0 [V] 10-2 [m]

h 10-5 [m] * An anodic current at the base is oriented in the -x direction, hence the negative sign.

Table 18. Summary of conditions for Case 4.

Analytic Solution for Case 4 The potential distribution for this case is found by using the relationship between the gradient of solution potential, the electric flux in solution, conductivity. Jel 6(x) Jel , and the varying

LNs '

(185)

Where: Jel (x) is the electric flux density in solution [A/m2] is the conductivity at position x [-m]-1

272 Expressed in one-dimensional cartesian coordinates this equation takes the form below. MNs Mx Jel 6 1 x % 60

'

(186)

Where: 6 1x + 6 0 is the solution conductivity [S-m]-1

The boundary condition at the crack mouth is the Dirichlet condition because of the potentiostatic hold. Ns(x'0)'N0

(172)

At the active crack tip the boundary is a Neumann condition because it is the derivative which is defined. The conductivity at the crack tip depends on the length of the crack, x0, and the conductivity coefficients, 1 and 0 . MNs Jtip /0 ' & Mx 000 61x 0 % 60 x 'x0

(187)

Where: Jtip 6 1x + 6 0 is the current at the crevice tip (A/m2) is the solution conductivity (S-m)-1

273 Equation 186 can be directly integrated and the boundary conditions applied to yield the general form for the solution. Jtip ln(61 x%6 0 ) 61 Jtip ln(6 0 ) 61

Ns(x) ' &

% N0

(188)

The natural logarithm of the conductivity shapes the potential at any point within the crack. Substituting the values from Table 18 yields the following numerical values for the potential in this case. Ns(x) ' 7.91 @ 10&2 ln(1.26 @ 103 x%1.26 @ 10&1 ) & 1.64 @ 10&1 (189)

Numerical Solution with CREVICER for Case 4 CREVICER was configured to run a crevice with the conditions shown in Table 18. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solution obtained by Equation 189 is shown in Figure 4.1.1.4(b). As can be seen in Table 19 the quality of the fit is extremely good.

274 P2 2.6 x 10-3

D.O.F. 200

Table 19. Goodness of fit for Case 4.

For this simple geometry the correspondence between the numerical data calculated by CREVICER and the exact solution is extremely good. This test case examined CREVICERs ability to solve the potential distribution inside a one-dimensional crevice with an electrolyte of varying composition when the current density in solution was a constant. The next case examines CREVICER when it models a crevice with both varying electrolyte composition and varying current density in solution which is caused by actively corroding walls.

277 4.1.1.5 Case 5 - One-D Crevice With Active Walls, Passive Tip and Varying Solution Conductivity

The previous case considered a simple system with varying solution composition. This case uses the same geometry and variations in solution composition as Case 4, but uses active crevice walls rather than an active crack tip to supply the electrical current. Thus, the current density in solution decreases linearly from the mouth to zero at the tip. To define this situation the mouth is held potentiostatically, (constant potential) and the crack flanks are uniformly active, generating the same current at all potentials and environments. These conditions are illustrated in Figure 4.1.1.5(a). They represent a 1-cm long crevice with a uniform 10-m gap, corroding along the crevice walls at a rate of 10 A/cm2 , and filled with an electrolyte that varies linearly from 10 mM NaCl at the tip (where the conductivity is 0) to 1.01 M NaCl at the base (where the conductivity is 1 x0 + 0) . These conditions are rough analogs to the situations found in cracks and crevices, where the most concentrated electrolytes are found in the most occluded portions of the sites. The mouth potential is held at 0 V. These conditions have been converted to standard units and are summarized in Table 20.

278

Parameter Jwalls 61 60 N0 l h

Value 0.1 [A/m2] 0.12639 [S-m]-1 1263.9 [S-m]-1 0 [V] 10-2 [m] 10-5 [m]

Table 20. Summary of conditions for Case 5.

Analytic Solution for Case 5 The potential distribution for this case is found by using the relationship between the gradient of solution potential, the changing electric flux in solution, Jel(x) , and the varying conductivity.

LNs '

Jel(x) 6(x)

(190)

Where: Jel (x) is the electric flux density in solution at position x [A/m2]

279 (x) is the conductivity at position x [-m

The flux density in solution changes with position based on the amount of current generated between x and the base at x0. Equation 190 be expanded and placed into cartesian coordinates.
x0

MNs Mx Where: Jwalls

m '
x

Jwalls dx

(191)

6 1 x % 60

is the current perpendicular on crevice walls [A/m2]

6 1x + 6 0

is the solution conductivity (S-m)-1

In this case, as in every one investigated thus far, the initial boundary condition is a Dirichlet one where the mouth is held at a constant potential, N0.

Ns(x'0)'N0

(172)

At the crevice tip, the boundary condition still defines the derivative of potential. Since no current crosses the crevice tip in this case, the derivative is equal to zero.

280 MNs /0 ' 0 Mx 000 x 'x0

(179)

Equation 191 be solved by a double integration and the use of the boundary conditions to find the general form of the solution potential as a function of x. Jwalls h x 6 0 ln(61 x%6 0 ) x 0 ln(6 1 x%60 ) x 0 ln(60 ) 60 ln(6 0 ) % % N0 & & % 2 2 61 61 61 6 6
1 1

Ns(x) '

&

(192)

The potential distribution is determined by the magnitude of the electrical fluxes, Jwalls, the coefficients for the solution conductivity, 1 and 0 , and the crevice geometry x0 and h. The crevice height is required here where it was not in Case 4 because it directly affects the current density in solution. Given equal current densities on the crack flanks, a narrower crevicer, i.e. a smaller h, will have to support higher fluxes of electrical current through solution. The values from Table 20 can be substituted into Equation 192 to produce the numerical form for the exact conditions used in this case. N(x) ' 104 7.91 @ 10&4 x & 7.99 @ 10&6 ln(6 1 x%60 ) & 1.65 @ 10&5 (193)

Numerical Solution with CREVICER for Case 5 CREVICER was configured to run a crevice with the conditions shown in Table 20. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis).

281 A comparison of the numerical results obtained with CREVICER and the exact numerical solution obtained by Equation 193 is shown in Figure 4.1.1.5(b). As can be seen in Table 21 the quality of the fit is extremely good.

D.O.F. 100

P2 3.0 x 10-3

Table 21. Goodness of fit for Case 5.

For this simple geometry the correspondence between the numerical data calculated by CREVICER and the exact solution is extremely good. This initial group of five test cases has established CREVICERs ability to model one-dimensional cracks and crevices with a spread of boundary conditions and internal distributions of conductivity. The next two cases will examine CREVICERs operation on two-dimensional occluded regions.

284 4.1.1.6 Case 6 - Two-D Crevice With Passive Walls and Active Tip

The CREVICER code is at its heart a two-dimensional, cartesian, finite element code. The previous five cases were modeled using a two-dimensional grid that had the majority of the gridding in the x-direction. Cases 6 and 7 apply CREVICER to two-dimensional test cases. The geometry used in Case 6 is a washer-shaped crevice with active corrosion occurring along the tip, or interior edge, while the mouth (exterior edge) is held potentiostatically. The crevice is of uniform height and is filled with a uniform electrolyte. This system is radially symmetric and is solved analytically in one-dimension cylindrical coordinates. CREVICER treats the geometry as an approximately circular shape laid out on a rectangular grid, so the test truly does show CREVICERs ability to model in two dimensions. To define this situation the mouth (outside edge) is held potentiostatically, (constant potential) and the crevice base (along the interior edge) is active, generating the same current at all potentials. These conditions are illustrated in Figure 4.1.1.6(a). They correspond to a washer-shaped crevice with 2-cm inner diameter, a 4cm outer diameter and a 10-m gap filled with 0.6M NaCl solution. The inner edge is corroding at a rate of 10 mA/cm2 and the outer edge is held potentiostatically at 0 V. These conditions have been converted to standard units and are summarized in Table 22.

285

Parameter Jtip rinner router 6 N0 h

Value 102 [A/m2] 10-2 [m] 2x10-2 7.58335 [S-m]-1 0 [V] 10-5 [m]

Table 22. Summary of conditions for Case 6.

Analytic Solution for Case 6 The governing equation for this problem is the LaPlace Equation without generation that determined Cases 1 and 4. It simply states that the divergence of the flux is zero. 2 L Ns ' 0 (170)

By taking advantage of the radial symmetry of the washer, this can be expressed in one-dimensional cylindrical coordinates. M2 Ns Mr 2 1 MNs ' 0 r Mr

(194)

The outer edge of the washer-shaped crevice being held potentiostatically. This causes

286 a Dirichlet boundary condition. Ns(r'router)'N0

(195)

At the inner edge of the washer the current flow (along with the solution conductivity) defines the derivative of the potential. MNs J /0 ' & tip Mr 000 6 r'rinner

(196)

Where: Jtip 6 is current density at tip axis [A/m2] is conductivity [S-m]-1

The solution to this differential equation has the following form. Ns(r) ' K1 lnr % K0 (197)

The boundary conditions can be used to produce an expression defining the potential in terms the physical parameters of the crevice. Jtip rinnerln(r) 6 Jtip rinnerln(router) 6

Ns(r) ' &

% N0

(198)

The potential field established by this geometry and these boundary conditions is also radially symmetric. The current, established by Jtip, interacts with the solution resistance, which

287 depends on the conductivity, , and the geometry rinner and router to create the potential distribution. Just as in Cases 1 and 4 the height of the crevice does not appear in the equation. Another way of viewing this is that the total current scales linearly with height, while the solution resistance scales inversely and the two factors cancel. The values of the physical parameters given in Table 22 can be substituted into Equation 198 to produce the exact equation for this situation. Ns(r) ' &0.132 ln(r) & 0.516 (199)

Numerical Solution with CREVICER for Case 6 CREVICER was configured to run a crevice with the conditions shown in Table 22. The grid used had 1270 nodes arranged to form 2348 elements. The average element was approximately 600 m across. A plot of the numerical results is shown in Figure 4.1.1.6(b). Figure 4.1.1.6(c) shows a comparison of the numerical data created with CREVICER and the exact values predicted by Equation 199. The plot was obtained by plotting the potential value at the radius for each of the 1270 nodes that CREVICER solved for. As can be seen in Table 23 the quality of the fit is extremely good.

D.O.F. 1269

P2 1.9 x 10-5

Table 23. Goodness of fit for Case 6.

288

The next test case is an extension of this one to slightly more complicated boundary conditions. In this case the total current crossing any isoradial line was a constant, although the current density decreased due to the increase in circumference. For Case 7, where the crevice walls are corroding, the total current drops off as the center of the crevice is approached.

292 4.1.1.7 Case 7 - Two-D Crevice With Active Walls

The case extends the exploration of CREVICERs two-dimensional capabilities started in Case 6. Case 7 is a disc-shaped crevice with active corrosion occurring along the crevice walls, while the mouth (exterior edge) is held potentiostatically. The crevice is of uniform height and is filled with a uniform electrolyte. This system is radially symmetric and is solved analytically in one-dimension. Just as in Case 6 CREVICER treats the geometry as an approximately circular shape laid out on a rectangular grid, so the test truly does show CREVICERs ability to model in two dimensions. To define this situation the mouth (outside edge) is held potentiostatically at constant potential and the crevice base (interior edge) is active, generating the same current at all potentials. These conditions are illustrated in Figure 4.1.1.7(a). They correspond to a disc-shaped crevice with 2-cm diameter, a 10-m gap filled with 0.6M NaCl solution. The inner surface is corroding at a rate of 100 A/cm2 and the outer edge is held potentiostatically at 0 V. These conditions have been converted to standard units and are summarized in Table 24.

293

Parameter Jwalls router 6 N0 h

Value 1 [A/m2] 10-1 [m] 7.58335 [S-m]-1 0 [V] 10-5 [m]

Table 24. Summary of conditions for Case 7.

Analytic Solution for Case 7 The governing equation for this problem is the LaPlace Equation with generation that determined Cases 2 and 3. It simply states that the divergence of the flux is equal and opposite to the generation rate of current from the crevice walls into the solution. 2 L Ns % Q ' 0 (177)

Using the radial symmetry of the disc and substituting in for the generation term the governing equation can be expressed in one-dimensional cylindrical coordinates. M2 Ns Mr 2 J 1 MNs % walls ' 0 r Mr 6h

(200)

Where:

294 Jwalls 6 h is the current density at the tip axis [A/m2] is the conductivity [S-m]-1 is the height [m]

The potentiostatically-held outer edge causes the same Dirichlet condition as was in Case 6. Ns(r'router)'N0

(195)

Despite the fact that there is no physical inner edge to a disc, as there is in a washer, there is still an internal boundary condition for the derivative of potential. At the center of the disc, where r=0, there is no current flow since there is no area at r < 0 to generate any current. MNs /0 ' 0 Mr 000 r'0

(201)

The solution to this differential equation has the form below: Ns(r) ' K2 r 2 % K1 r % K0 (202)

The boundary conditions can be applied and the differential equation solved to generate the expression for the potential distribution inside the disc.

295 Jwallsr 2 46h Jwallsrouter 46h


2

Ns(x) ' &

% N0

(203)

The potential distribution inside the disc depends on the current density, Jwalls, the disc geometry, router and h, and the solution conductivity, . The values for the physical constants from Table 24 can be placed into the above equation to generate the exact polynomial representing the potential distribution inside the disc. Ns(x) ' &3.30 @ 103 r 2 % 3.30 @ 101 (204)

Numerical Solution with CREVICER for Case 7 CREVICER was configured to run a crevice with the conditions shown in Table 24. The grid used had 574 nodes arranged to form 1082 elements. The average element was approximately 500 m across. A plot of the numerical results is shown in Figure 4.1.1.7(b). Figure 4.1.1.7(c) shows a comparison of the numerical data created with crevicer and the exact values predicted by Equation 204. The plot was obtained by plotting the potential value at the radius for each of the 574 nodes that CREVICER solved for. As can be seen in Table 25 the quality of the fit is extremely good.

296 P2 P2 = 1.9 x 10-4

D.O.F. 573

Table 25. Goodness of fit for Case 7.

These two test cases 6 and 7 have tested the functionality of CREVICER on twodimensional situations. In addition to solving two free spatial dimensions, CREVICER can incorporate the effects of changes in third dimension. Cases 8 and 9 evaluate CREVICERs abilities in this area.

300 4.1.1.8 Case 8 - One-D Wedge with Varying Height and Active Tip

Cases 8 and 9 test CREVICERs ability to simulate dependent changes in a third dimension. The test geometry is a trapezoidal wedge shape as might be found in a growing crack under stress. The crack plane is the xy-plane which CREVICER models with its two spatial dimensions, though in this case only one of the two free dimensions is used to correspond with this analytic solution. The dependent third dimension is the crack height which decreases linearly from the crack mouth (where h = h0) to the crack tip (where h = h1). For Case 8 all of the current is generated at the crack tip and the crack is filled with a uniform electrolyte. To define this situation the mouth (x = 0) is held potentiostatically at constant potential and the crevice base (along the interior edge) is active, generating the same current at all potentials. These conditions are illustrated in Figure 4.1.1.8(a). They correspond to a wedge-shaped crack 1 cm long with a mouth height of 300 m that decreases linearly to a tip height of 5 m, filled with 0.6M NaCl solution and corroding at the tip at a rate of 10 mA/cm2. These conditions have been converted to standard units and are summarized in Table 26. This problem is analogous to Case 4 presented in subsection 4.1.1.4. There, the potential gradients were steepest near the mouth because of conductivity increases. Here, the steepest gradients occur at the crack tip where the cross-sectional area is smallest.

301

Parameter Jtip x0 h0 h1 2 6 N0

Value -102 [A/m2] 10-2 [m] 3 x 10-4 [m] 5 x 10-6 [m] 2.95 x 10-2 [radians] 7.58335 [S-m]-1 0 [V]

Table 26. Summary of conditions for Case 8.

Analytic Solution for Case 8 The potential distribution for this case is found by using the relationship between the gradient of solution potential, the varying electric flux in solution, Jel(x) , and the solution conductivity. Jel(x) 6

LNs '

(205)

Jel(x) changes because the total current from the crack tip remains constant while the crack itself increases linearly in height to the crack mouth. The above equation can be expressed in one-dimensional cartesian coordinates and the flux density can be expressed in

302 terms of the crevice parameters. is a derived parameter, the crack opening angle. MNs Mx Jtip h1 6 h0 &2sin 2 2 (206)

' &

Where: is the crack opening angle [rad]

The boundary condition at the crack mouth is the familiar Dirichlet condition caused by the potentiostatic hold. Ns(x'0)'N0

(172)

At the tip boundary, where x=x0, the imposed constraint determines the derivative of the potential with position. MNs Mx /0(x'x0) Jtip 6

' &

(173)

The solution to this differential equation has the form: Ns(x) ' K1 ln(ax%b) % K0 (208)

The boundary conditions can be substituted in and the coefficients solved for to produce an expression for the potential.

303 Jtip h1 ln h0 &2sin 26sin


2 2 2 2

Ns(x) '

x &

Jtip h1 lnh0 26sin


2 2

% N0

(209)

The potential distribution inside the wedge depends on the current density at the crack tip, Jtip , the solution conductivity, , and the wedge geometry which is determined by h0 and . The values for the physical constants from Table 26 can be placed into the above equation to generate the exact expression representing the potential distribution inside the wedge Ns(x) ' 2.24 @ 10&3 ln 3 @ 10&4 &2.95 @ 10&2 x & 1.81 @ 10&2 (210)

Numerical Solution with CREVICER for Case 8 CREVICER was configured to run a crevice with the conditions shown in Table 26. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solutions obtained by Equation 210 is shown in Figure 4.1.1.8(b). As can be seen in Table 27 the quality of the fit is extremely good.

D.O.F. 100

P2 P2 = 2.5 x 10-6

Table 27. Goodness of fit for Case 8.

304

The next test case continues to address the wedge geometry but deals with the added complication of changing total electrical current along the length of the crevice. Instead of generating electrical current at the crack tip it arises along the crack flanks.

307 4.1.1.9 Case 9 - One-D Wedge With Varying Height and Active Sides

Case 9 concludes the test of CREVICERs ability to simulate dependent changes in a third dimension. As in Case 8, the test geometry is a trapezoidal wedge shape as might be found in a growing crack under stress. The crack plane is the xy-plane which CREVICER models with its two spatial dimensions, though in this case only one of the two free dimensions is used to correspond with this analytic solution. The dependent third dimension is the crack height which decreases linearly from the crack mouth (where h = h0) to the crack tip (where h = h1). In Case 9 all of the current is generated on the crack flanks and the crack is filled with a uniform electrolyte. To define this situation the mouth (x = 0) is held potentiostatically at constant potential and the crack flanks are active, generating the same current at all potentials. These conditions are illustrated in Figure 4.1.1.9(a). They correspond to a wedge-shaped crack 1 cm long with a mouth height of 300 m that decreases linearly to a tip height of 5 m, filled with 0.6M NaCl solution and corroding along the flanks at a rate of 100 A/cm2. This can be interchangeably viewed as each of the two flanks corroding at 50 A/cm2 since the important parameter is the total corrosion rate per unit length. These conditions have been converted to standard units and are summarized in Table 28.

308

Parameter Jwalls h0 h1 2 6 N0

Value 0.1 [A/m2] 3 x 10-4 [m] 5 x 10-6 [m] 2.95 x 10-2 [radians] 7.58335 [S-m]-1 0 [V]

Table 28. Summary of conditions for Case 9.

Analytic Solution for Case 9 The potential distribution for this case is found by using the relationship between the gradient of solution potential, the varying electric flux in solution, Jel(x) , and the solution conductivity. This is the same governing equation, 205, that was used in Case 8 of subsection 4.1.1.8. Jel(x) 6

LNs '

(205)

Jel(x) changes in this case because of the changes in the crack height with position and the varying total current that must cross each point. If the terms in the above equation are expanded and placed into cartesian coordinates the following governing equation is found. is a derived parameter, the crack opening angle.

309 m ' &


x x0

MNs Mx

Jwallsdx (211) 2 2

6 h0 &2sin

At the mouth the boundary condition is the regular Dirichlet condition that reflects the potentiostatic hold. Ns(x'0)'N0

(172)

The other boundary condition applies at the crack tip and defines the derivative of the flux. MNs ' 0 Mx /0(x'x0)

(179)

Equation 211 can be solved by a double integration and the use of the boundary conditions.
2 x 2 2 x 2

Ns(x) '

J walls 6

x 2sin 2 2

h 0 ln h 0 &2sin % 4sin 2 2 2

x 0 ln h 0 &2sin & 2sin 2 2

x0 ln(h 0 ) 2sin 2 2

&

h 0 ln(h 0 ) 4sin 2 2 2

% N0

(212)

The values for the physical constants from Table 28 can be placed into the above

310 equation to generate the exact expression representing the potential distribution inside the wedge. Ns(x) ' 1.32@10&2 33.9x % 5.76@10&3 ln h0 &2sin 2 x 2 % 4.67@10&2

(213)

Numerical Solution with CREVICER for Case 9 CREVICER was configured to run a crevice with the conditions shown in Table 28. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solutions obtained by Equation 213 is shown in Figure 4.1.1.9(b). As can be seen in Table 29 the quality of the fit is extremely good.

D.O.F. 100

P2 P2 = 4.0 x 10-9

Table 29. Goodness of fit for Case 9.

This test case concludes the exploration of CREVICERs abilities to model potential distributions. The next set of test cases examines CREVICERs usefulness in solving differential equations with first as well as second order terms. These types of differential equations are involved in the mass transport by diffusion and migration of chemical species in solution.

313

4.1.2 Test Cases Evaluating Mass Transport

The calculation engine which powers CREVICER solves two-dimensional partial differential equations. The previous nine cases only tested the programs ability to analyze the types of differential equations required to solve potential distributions. There were only three different types of governing equations used, 172, 177 and 190. They involved the second order terms with or without the addition of a generation term. Modeling the mass transport of chemical species is slightly more complicated as the first order terms are also required as was shown in Section 2.3.1.3.

4.1.2.1 Case 10 - One-D Mass Transport of Chemical Species

The first case used to test CREVICERs abilities in this area is somewhat artificial, but it was chosen to be in the same form as Psaila-Dombrowski[48]. The physical situation is a onedimensional slot-shaped crevice, filled with a conducting electrolyte to keep the conductivity constant, and the mass transport is done on minor, non-reacting species. Although these species are affected by the potential gradient in the crevice, which is defined to be constant in this case, there is no generation. This problem was discussed in subsection 2.3.4.1.2 and the limitations of this solution to real problems were explored. To define this situation the mouth (x = 0) is held constant in both potential and in the concentration of the minor species. These conditions are illustrated in Figure 4.1.2.1(a). They

314 correspond to a slot-shaped crack 1cm long with a mouth height of 10 m, filled with 0.5 M Na2SO4 + 1 mM NiCl2. The sodium sulfate is the supporting electrolyte. It dominates the conductivity over the minor species of nickel chloride, whose transport is being modeled in this case. The tip is corroding at a rate of 10 mA/cm2. These conditions have been converted to standard units and are summarized in Table 30.

Parameter Jtip DNi++ zNi++ Ni++ Kx(Ni++) Mx(Ni++) C0(Ni++) h

Value -100 [A/m2] 6.6523x10-10 [m2/s] 2 [eq/mol] 2.6850x10-13 [m2-mol/J-s] 6.6523x10-10 [m2/s] 3.9753x10-7 [m/s] 1 [mol/m3] 10-5 [m]

Parameter 6 DClzClClKx(Cl-) Mx(Cl-) C0(Cl-) x0

Value 13.0338 [S-m]-1 2.0309x10-9 [m2/s] -1 [eq/mol] 8.197x10-13 [m2-mol/J-s] 2.0309x10-9 [m2/s] -6.0681x10-7 [m/s] 2 [mol/m3] 10-2 [m]

Table 30. Summary of conditions for Case 10.

Analytic Solution for Case 10 The governing equation for this problem is the LaPlace Equation without generation but including the first order terms. This equation was generated from the mass transport equation and was developed in section 2.3.1. For simplicity the coefficients of the equation, Kx, Mx, ,

315 and have been left in the equations, their representations in terms of physical constants are in Table 31. K x L C i %MxLC i ' 0
2

(214)

The above equation can be represented in one-dimensional cartesian coordinates as shown below. M2 C i Mx 2 MC i Mx

Kx

% Mx

' 0

(215)

At the crevice mouth the concentration of each species, Ci, is held at a constant value, Ci0. C i(x'0) 'C i

(216)

At the other boundary, the crevice tip (x=x0 ), the fluxes from the diffusion and migration are equal and opposite for each species. 0 K xC i(x'x 0 ) % MxC i(x'x 0 ) ' 0 (217)

This differential equation has the following exponential form. C i(x) ' K1 e (ax) % K0 (218)

Substituting in for the boundary conditions and solving yields:

316
& Mx Kx x

C i(x) ' C i e
0

(219)

The values for the coefficients in terms of physical parameters of the crevice are given in Table 31.

Parameter Kx Mx

Value Di [m2/s] zFi LN [m/s]

Table 31. Coefficient Values for Case 10. The concentration of each non-reacting species, i, depends exponentially on the ratio of the first to second order terms. A higher LNs causes larger exponential terms. Substituting in all of the values yields the following numerical expression for the concentration of each species C Ni(x) ' e &5.98@10
2

(221)

C Cl(x) ' 2e 2.99@10

(222)

Numerical Solution with CREVICER for Case 10

317 CREVICER was configured to run a crevice with the conditions shown in Table 30. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solutions obtained by Equations 221 and 222 is shown in Figure 4.1.2.1(b). As can be seen in Table 32 the quality of the fit is extremely good.

D.O.F. 100

P2 P2 = 1.37x10-6 (Na+) P2 = 6.64x10-5 (Cl-)

Table 32. Goodness of fit for Case 10.

As was discussed in subsection 2.3.4.1.2 the solution of this test cases is only applicable for a limited set of conditions. There must be no diffusion potential, the electrical flux cannot be a function of chemistry or potential and the conductivity must be a constant. CREVICER can simulate all of these limitations, for a physical system the equations only apply to the concentrations of minor species in a supporting electrolyte. The next test case examines chemical transport with generation.

320 4.1.2.2 Case 11 - One-D Mass Transport of Chemical Species With Generation

Case 11 continues with Case 10's exploration of CREVICERs abilities. It differs in that the governing equation now includes generation. To test this, the modeled situation is a one-dimensional slot-shaped crevice filled with a conducting electrolyte to keep the conductivity constant, and the mass transport is done on minor, non-reacting species. Although these species are affected by the potential gradient in the crevice, which is defined to be constant in this case, they contribute little to it by their generation along the crevice flanks. This case was chosen to represent the assumptions of a commonly-solved analytic case and is not physically realizable. To define this situation the mouth (x = 0) is held constant in both potential and in concentration of the minor species. These conditions are illustrated in Figure 4.1.2.2(a). They correspond to a slot-shaped crack 1 cm long with a mouth height of 10 m, filled with 0.5 M Na2SO4 + 1 mM NiCl2. The sodium sulfate is the supporting electrolyte, it dominates the conductivity over the minor species of nickel chloride, whose transport is being modeled in this case. The tip is corroding at a rate of 10 mA/cm2 , but not contributing to chemical generation. The sides are corroding at a rate of 10-9 mol/m2-s. This chemical flux of nickel is equivalent to an electrical current of 20 nA/cm2. These conditions have been converted to standard units and are summarized in Table 33.

321

Parameter Jtip Jwalls 6 h x0 C0(Ni++)

Value -100 [A/m2] 10-9 [mol/m2] 13.0338 [S-m]-1 10-5 [m] 10-2 [m] 1 [mol/m3]

Parameter DNi++ zNi++ Ni++ Kx Mx

Value 6.6523x10-10 [m2/s] 2 [eq/mol] 2.6850x10-13 [m2-mol/J-s] 6.6523x10-10 [m2/s] 3.9753x10-7 [m/s]

Table 33. Summary of conditions for Case 11.

Analytic Solution for Case 11 The governing equation for this problem is the LaPlace Equation with generation and including the first order terms. This equation was generated from the mass transport equation and was developed in Section 2.3.1.3. For simplicity the coefficients of the equation, Kx and Mx have been left in the equations. Their representations in terms of physical constants are in Table 34. K x L C i %MxLC i % Q ' 0
2

(223)

This can be expressed in one-dimensional cartesian coordinates. M2 C i Mx 2 MC i Mx

Kx

% Mx

% Q ' 0

(224)

322 The Dirichlet boundary condition at the crevice mouth fixes the concentrations of the species. C i(x'0) 'C i

(216)

At the other boundary the fluxes caused by migration and diffusion must be equal and opposite 0 K xC i(x'x 0 ) % MxC i(x'x 0 )' 0 (217)

This differential equation has the same form of solution as Case 10 C i(x) ' K1 e (ax) % K0 (225)

The final solution for this equation can be found by substituting in for the boundary conditions and solving.
Mx

C i(x) ' &

Jwalls hMx

K xJwalls x 0 Jwalls & Kx x K xJwalls x J C0 & & e % 0 walls % 2 2 hMx hMx hMx hMx

(226)

The values for the coefficients in terms of physical parameters of the crevice are given in Table 34.

323

Parameter Kx Mx Q $

Value Di [m2/s] -zFi LN [m/s] Jwalls / h [A/m] Ji [mol/m2-s]

Table 34. Coefficient Values for Case 11.

Substituting in all of the values yields the following numerical expression for the concentration of each species. C i(x) ' & 2.52@102 x & 1.94e &598x % 2.94 (227)

Numerical Solution with CREVICER for Case 11 CREVICER was configured to run a crevice with the conditions shown in Table 33. The grid used had divisions every 100 m in the x direction (101 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solution obtained by Equation 227 is shown in Figure 4.1.2.2(b). As can be seen in Table 35 the quality of the fit is extremely good.

324 P2 P2 = 4.59 x 10-7

D.O.F. 100

Table 35. Goodness of fit for Case 11.

The form of the resulting concentration distribution is interesting. It exhibits a maximum at x = 0.002 m. At deeper portions of the crevice the diffusive flux acts to counteract the migration flux. Nearer the mouth the diffusive flux acts in concert with the migration flux to remove Ni+2 from the crevice. At each point the net flux of current from the crevice at point x is equal to the integral current from x to x0. This is shown in Figure 4.1.2.2(c). The next case examines CREVICERs ability to model time-transient problems.

328

4.1.3 Test Case Evaluating Time


The final area of verification for CREVICER is a time-transient solution.

4.1.3.1 Case 12 - Transient Diffusion of Chemical Species

The calculation engine which powers CREVICER solves two-dimensional, timetransient partial differential equations. This final test case is loosely based on Allaires[51] example problem 16.1. That problem modeled the transient diffusion of heat from a heated bar whose ends were held at a fixed temperature. This case solves the directly analogous problem of a two-ended crevice filled with a concentrated electrolyte whose ends are suddenly held at lower concentrations. To define this situation a 1cm long crevice is initially filled with a homogeneous solution and then the mouths are dropped to a lower concentration. These conditions are illustrated in Figure 4.1.3.1(a). They correspond to a two-ended crevice 1cm long with a height of 10 m, filled with 1 M NaCl. At time t=0 the concentration of NaCl at both ends is lowered to 0 M and held there. There is no generation inside the crevice, nor is there an electric field to cause migration. These conditions have been converted to standard units and are summarized in Table 36.

329

Parameter Ci0 DNa+ x0 h

Value 1000 [mol/m3] 1.31037 x 10-9 [m2/s] 10-2 [m] 10-5 [m]

Table 36. Summary of conditions for Case 12.

Analytic Solution for Case 12 The governing equation for this problem is the LaPlace Equation without generation but including the first order terms. This equation was generated from the mass transport equation and was developed in Section 2.3.1.3. MC i Mt

Kt

' K xL C i

(228)

This can be expressed in one-dimensional cartesian coordinates. MC i Mt M2 C i Mx 2

' Dih

(229)

Where: Ci Di is the concentration of species i [mol/m3] is the diffusivity of species i [m2/s]

330 h is the crevice height [m]

The initial condition is that the entire crevice is initially at the same concentration. C i(x,t'0) ' C i

(230)

The two boundary conditions for the problem are the Dirichlet constraints imposed at the two ends. C i(x'0,t>0) ' 0 (231)

and C i(x'x 0 ,t>0) ' 0 (232)

Equation 229 can be solved by directly integrating. 4C i 1 (2n%1)2 B2 t (2n%1)Bx exp &D sin j 2 B n'0 2n%1 x0 x
0

C i(x,t) '

(233)

This solution is the summation of a series of exponential terms. For this test case the summation was carried over the first ten terms. Substituting in for the boundary conditions from Table 36 yields the following numerical representation.

331 C i(x,t) ' 1.27@103 j


n'0 4

1 exp &1.29@10&4 (2n%1)2 t sin 3.14@102 (2n%1)x 2n%1

(234)

Numerical Solution with CREVICER for Case 12 CREVICER was configured to run a crevice with the conditions shown in Table 36. The grid used had divisions every 625 m in the x direction (17 nodes along the x-axis). A comparison of the numerical results obtained with CREVICER and the exact numerical solutions obtained by Equation 234 is shown in Figure 4.1.3.1(b). The numerical data agrees well with the analytic solution despite the relatively coarse gridding of only sixteen elements along the x-axis.

334

4.2 Limitations of Model


In addition to the various limitations imposed by the simplifications used in producing the CREVICER model, there are four separate problems that affect usage of the code. The most minor and easily corrected problem is caused by the discretization of the crevice. An additional difficulty, Peclet stability, can arise for spatial solutions if the first-order terms are large compared to the second-order. Courant stability restricts the size of time steps that can be used in temporal solutions. Finally, potential solutions can be difficult to find for certain geometries and polarization curves.

4.2.1 Discretization Limitations

CREVICER approximates a crevice as a collection of elements and nodes. The field variables are only solved at the nodes and a flat inclined plane is used to represent the value of the field variable over each element. CREVICER finds an approximation of the true distribution. Coarse grids can be solved rapidly but may miss important details of the solution. This is especially true in regions where steep gradients are present. Such areas occur near the mouth of a crevice, especially if the conditions at that point are assumed to be those of the bulk environment. While this may not be a good assumption - Evitts et al [60] and Walton[78] both present data which suggests that in fact crevices influence a region of the bulk solution outside the mouth - it is commonly used in modeling crevice corrosion.

335 Increasing the spatial resolution imparts a cost that can only be paid in terms of additional computing time. The time required to solve one iteration of a crevice goes as the number of nodes squared. As will be seen in subsection 4.2.3 decreasing average size of an element also decreases the length of time that can be solved for an time step. A coarse grid is only imprecise. The following two types of problems can produce solutions which oscillate and are inaccurate.

4.2.2 Peclet Limitations

A commonly encountered problem in computational fluid dynamics is Peclet stability, discussed in subsection 3.3.1.1. In that situation the problem arises when the convective flux is large compared to the diffusive flux. Mathematically, the problem is caused when the first-order terms of a partial differential equation are large compared to the second-order ones. Despite the fact that convection is usually ignored in crevice corrosion an analogous situation arises in modeling that phenomenon. Migration fluxes are also first-order and can cause a Peclet problem. Walton[10] describes a dimensionless grouping of the migration flux to the diffusional flux that is the electrochemical analog to the Peclet number. ziFDiLNs RT Di )x ziF)x LNs RT

Pe '

'

(235)

336 When this term is greater than 2 the numerical method is unstable. An unstable problem can only be made stable by refining the mesh (decreasing x) or reducing the gradient of solution potential that drives migration. Another approach to solving problems with large Peclet numbers is to change the mathematical method. Upwinding is an approach that has been used by other researchers[10, 48]. Peclet instabilities are a spatial problem. They affect the code both in both steady-state and time-transient modes. Problems with the Courant number, discussed in the next subsection, affect only the temporal portion of the code.

4.2.3 Courant Limitations

Explicit temporal solutions can have a problem with stability. The Courant number, r, can be used to differentiate stable, oscillatory, and unstable solutions and was discussed in subsection 3.3.2.1. The parameter is found by the formula below. K x)t )x 2 K t (236)

r (e) '

Different values of r identify different regions of stability[51]. 0 < r(e) < 1/4 1/4 < r(e) < 1/2 1/2 < r(e) Non-oscillatory and stable Spatially oscillartory and stable Unstable

337 Halving the size of each element forces the length of the timestep to be quartered. Because of the Courant component the computational penalty for increasing the resolution of the mesh is quite high. The time for solving each iteration goes as n2. An additional factor of n2 arises if the number of time steps must be increased to reduce the length of each to retain Courant stability. This limitation does not affect implicit time approaches. The mode most commonly used by CREVICER, Crank-Nicolson, has fewer problems than a fully explicit approach, but may still be affected. The last type of numerical problem that CREVICER can experience is related to the discretization problem, but is caused by specific types of polarization curves.

4.2.4 dI/dE Stability Limitations

Although each element in the crevice model can corrode at a different rate, within each element the behavior must be constant. CREVICER uses the average chemistry and potential of each of the nodes to determine the corrosion rate for each element. This approach can cause problems in modeling the potential distribution for materials whose polarization curves have very high rates of change for current with respect to potential. Potential-type problems are more sensitive to this issue than chemical ones because of the feedback from the current and solution resistance into determining the potential distribution. Finding the potential distribution inside a crevice is a search procedure to locate the potential distribution(s) that produce

338 currents which interact with the crevice geometry and conductivity that in turn generate the original potential distribution. The only remedies found in this dissertation was to decrease the average size of the elements and to avoid modeling polarization curves with steep, narrow active noses.

4.2.5 Variable Coefficient-Induced Stability Limitations The fact that the coefficients of the canonical equation (Equation 160, below) are themselves functions of position may introduce instabilities into the numerical solution. M MM M 1 MM % Kxy(x,y) K x(x,y) Mx Mx Mx 2 My % M 1 MM M MM K y(x,y) Kyx(x,y) % My 2 Mx My My (160)

MM MM % Mx(x,y) % My(x,y) Mx My % P(x,y)M % Q(x,y) ' K t MM Mt

Section 8.3 of Allaires[51] development of Galerkins method for FEM, used in CREVICER, assumes that the coefficients are variable, but are constant within each individual element. An examination of a one-dimensional second-order differential equation without any apparent first order terms highlights one potential problem with this approach. M MM MM K x(x) ' Kt Mx Mx Mt

(237)

When the derivative is applied over the bracketed term a first-order term proportional

339 to the derivative of Kx appears. M2 M Mx 2 MK x(x) MM MM @ ' Kt Mx Mx Mt

K x(x)

(238)

Analogously to the Peclet problem discussed in Section 4.2.2 instabilities can occur if the first-order term is large compared to the second-order. The ratio of the terms is: K x )(x))x K x(x)

Pe '

(239)

If this ratio exceeds 2 then the solution may oscillate. This type of instability may be important for potential type problems since the variation in either or h (depending on the exact formulation) may introduce an unexpected first-order term. A similar problem exists for chemical transport since variations in D will produce an additional first-order term.

Summary

This chapter has presented three series of test cases that verify CREVICERs abilities in modeling crevice corrosion. Example problems for potential distribution, chemical transport and time-transient solutions were solved and compared to analytic solutions. In all cases CREVICER was able to replicate the analytic result. The example cases showed CREVICERs ability to operate under diverse conditions of: varying conductivity; two free spatial dimensions; changes in a third dependent dimension; with various boundary conditions and with time. These cases have verified CREVICERs ability to fulfill the first goal of this

340 dissertation, to produce a versatile model that would be suitable to model the crevice behavior of a variety of crevice and crack systems. The next chapter uses CREVICER to examine one of the commonly observed features of crevice corrosion, intermediate attack and meet the second goal of the dissertation.

341

Chapter 5: Intermediate Attack

OVERVIEW

This chapter uses the model that was developed and verified in the previous two chapters to present a new theory, the Cathodic Focusing (CF) model to explain Intermediate Attack (IA) in crevice corrosion. The CF model differs from the standard crevice models in the literature in that in that it accounts for the effects of cathodic reactions occurring deep within crevices. Although much more extensive experimental work would be required to gather a data set which could be used to definitively prove if the model operates, this thesis establishes the basis for the theory. IA is the commonly observed phenomenon that corrosion damage in crevices is usually concentrated near, but not exactly at, the mouth of the site. Section 5.1 discusses the phenomenology of IA and defines the terms and questions to be answered. Conceptually, there are several possible explanations for IA. Although the standard CCS and IR* models do not explicitly address the problem of IA, minor modifications keeping in the spirit of the models allow them to attempt to explain the problem. Section 5.2 addresses the strengths and weaknesses of each model as applied to the problem of not only where does a crevice start to corrode, but where does the corrosion end. This question is important because a more complete understanding of the entire crevice corrosion process might lead to

342 better strategies for combating it.

Some background material on metal cation hydrolysis and the differences between hydrolyzing metal ions that are generated electrochemically rather than chemically is presented in Section 5.3. This material is needed to explain the counter intuitive effects predicted by the CF model in Section 5.4. Finally, the chapter ends by presenting the results of modeling IA with CREVICER according to the IR*, modified CCS, and CF models for some hypothetical test cases. Although the test cases do not represent any specific situation, they are all physically plausible and illustrate the capabilities of CREVICER. CF is shown to be a plausible explanation for IA.

5.1 Phenomenology of Intermediate Attack

Intermediate attack describes the commonly observed condition in crevice corrosion where the area nearest the crevice mouth is uncorroded, the next deepest area is heavily attacked, and the deepest regions are paradoxically unaffected by the corrosion. This is illustrated schematically in Figure 5.1.1.1(a) from Jones[49] This figure can be compared to the SEM micrograph in Figure 5.1.1.1(b) which was taken of a 304 SS sample which had been pressed face down onto a Teflon crevice former, held potentiostatically at 0.05 V vs SCE in a solution of 17 mM NaCl and tightened to a mean crevice gap of 4 m. The corroded region (lighter colored area) occurs neither at the mouth (outside edge of sample) nor at the base

343 (center of sample). Rather, it occurs only at intermediate depths. Using the terminology of Figure 5.1.1.1(c) there is an unattacked region of width xinit from the mouth of the crevice to the first point of attack. The size of the corroded region can be expressed by its width, xattack and depth, dattack. Most previous models for the initiation crevice corrosion have concerned themselves with determining, for a given material, environment, and geometry the depth within a crevice where attack will occur and the incubation time for that attack to start. Those are two important parameters for making engineering predictions about the suitability of a particular design for use in an environment. However, these approaches uniformly failed to address a peculiar quirk of crevice corrosion, the fact that it often fails to occur at the deepest points in the crevice. Understanding not only what processes promote corrosion in a crevice but also which ones might retard it may yield insights into better design to prevent localized attack. The next section addresses how the standard theories of CCS and IR* can be modified to predict IA.

347

5.2 Standard Theories Applied to IA

The standard theories for crevice corrosion may not explicitly address IA, but some minor modifications to the theories can give some insight into the IA process. If the IA is the result of a steady-state process, there must be some corrosion-retarding force to counteract the corrosion-promoting one that is the focus of each theory. In the case of CCS, acidification and chloride enrichment is the promoting process. In IR* it is destabilization of the protective oxide by decreased anodic overpotential. In both cases a reasonable offsetting force is decreasing anodic overpotential which decreases the driving force for dissolution. This protective mechanism is also present for crevices corroding according to the IR* model once the potential is on the open circuit side of the active nose. Another possibility is that the observed IA is only a temporal effect. The differing depths of corrosion might be the product of a moving corrosion front and that the structure at long times will be entirely different. Each of these theories has limitations when applied to modeling IA. Later in the chapter, CF will be presented as a possible explanation of IA. It proposes that the chemical effects of small amounts of cathodic current on pH retard corrosion.

5.2.1 CCS Theory Applied to IA

Essentially the CCS theory for the initiation of crevice corrosion proposes that a crevice

348 acts as a barrier to the mass transport of metal cations out of the occluded site. The resulting accumulation of positively charged metal cations causes the ingress of rapidly moving, negatively charged anions, such as chloride. The metal cations also hydrolyze in solution, producing hydronium and lowering the local pH. As will be stressed later in this chapter, an important but implicit assumption in this theory is that the cathodic reactions needed to balance the dissolution reactions occur outside of the crevice. CCS holds that it is the increasing acidity of the crevice environment that causes the increased corrosion rate with the crevice. In its original formulation, the theory assumes that potential has an insignificant role in promoting crevice corrosion. A theory which uses acidification as the only force affecting corrosion rate cannot predict IA. Such a theory must predict monotonically decreasing pH with greater depth from the mouth to the base of a crevice and accordingly, monotonically increasing corrosion rate. To account for IA, some offsetting force must be added. Potential drop within the crevice is a reasonable candidate. The flow of a net anodic current from the interior of the crevice to the exterior where the supporting cathodic reactions are occurring must produce a potential drop. The magnitude of the drop depends on the electrical resistance of the crevice and the size of the current. The resistance of the crevice depends on geometry and solution conductivity. Crevices by definition are tight and combined with the limited conductivity of even highly concentrated solutions, even small currents can produce appreciable potential drops on the order of hundreds of millivolts[25]. This potential drop inside a crevice will decrease the driving force for dissolution.

349 Indeed for all metals except active/passive ones, potential drop inside a crevice is a protective factor. These competing processes, increased solution aggressiveness and decreased driving force are shown in Figure 5.2.1(a). This figure is illustrative only and is meant to depict the processes rather than any particular situation. Part (a) is a diagram showing the orientation of the crevice and the location of three points within it. Part (b) shows the pH, a measure of solution aggressiveness, and potential within the crevice. With increasing depth in the crevice the pH first drops, then remains at a constant low level. The potential drops continuously throughout the crevice, even after the solution saturates and no longer drops in pH. Part (c) shows two polarization curves, one for the high pH, non-aggressive conditions near the mouth, and the other for the acidic, highly aggressive conditions at the middle and base of the crevice. Using the pH and potential information from part (b) the conditions at the three marked points within the crevice are marked on the appropriate polarization curve at the correct potential. Part (d) represents the resulting current density along the crevice walls. Starting at the mouth (x=0) and going into the crevice, initially the increasing solution aggressiveness more than offsets the decreased driving force. Once the rate of increase of solution aggressiveness drops off however the reduced driving force begins to decrease the corrosion rate. One factor to note is that IR drop cannot lower the potential below the open circuit potential in the relevant environment. IR is thus a restoring force that allows the metal potential to approach its steadystate value in the absence of polarization. The strength of this theory is that it is only a minor modification of a widely accepted model for the initiation of crevice corrosion. Using IR to turn off corrosion keeps with the

350 spirit of CCS that potential is unimportant in assisting crevice corrosion. Rather IR drop is a counterbalancing force which is overwhelmed in the shallow parts of the crevice by the increase in solution aggressiveness, but whose effects can appear once the solution composition stabilizes. There are several weaknesses to the theory however. The most important is that IR drop cannot lower the potential below the open circuit potential. The corrosion rate at open circuit in highly aggressive environments can be significant. At open circuit it is only the net current which is zero; the dissolution reactions can be significant. The tendency of the metal potential to approach open circuit with increased depth is also problematic in that it begins to violate one of the premises of the CCS model - the assumption that the cathodic reactions occur outside the crevice. As the potential approaches open circuit a greater and greater proportion of the required cathodic current is met locally. The effect of these local cathodic reactions will be discussed extensively in sections 5.3 and 5.4.

352 5.2.2 IR* Theory applied to IA

Essentially the IR* theory claims that a crevice acts as a barrier to electrical transport. A net anodic current flowing from the crevice across the resistive crevice solution causes the potential in the crevice to drop towards its open circuit value. For active-passive metals held in their passive region this decrease in potential can destabilize the protective oxide film and cause in increase in corrosion rate. The IR* theory claims that potential is the dominant factor in determining crevice corrosion. Although it has not typically been used to predict IA, IR* can predict it. Once the potential drops beyond the peak of the active nose, further drops in potential decrease the corrosion rate, for the same reasons as explained in the previous section. The fact that for active-passive metals over some potential ranges decreases in potential increase the corrosion rate is a quirk of kinetics caused by the loss of the metal oxide. The two forces involved in creating IA according to the IR* model are the promoting force of oxide destabilization and the retarding force of decreased overpotential. Figure 5.2.2(a) shows how the IR* model can predict IA. The figure is illustrative only and is meant to depict the processes rather than any particular situation. Part (a) is a diagram showing the orientation of the crevice and the location of three points within it. Anodic current is shown arising on the crevice walls and flowing across the solution resistance within the crevice. The circuit is completed on the boldly exposed surface where cathodic reactions consume the electrons generated inside the crevice. Part (b) shows the potential within the crevice. The

353 potential drops continuously throughout the crevice. Part (c) shows the operative polarization curve. The potentials at different points within the crevice are marked on it. At the mouth the potential is held in the passive region. IR drop causes the potential at the middle of the crevice to drop to the active nose. Further drop causes the potential at the base to approach the open circuit value. Part (d) represents the resulting current density along the crevice walls. Starting at the mouth (x=0) and going into the crevice, the corrosion rate remains at the passive current density as long as the potential remains above the primary passivation potential. Once sufficient potential drop has occurred to lower the potential into the active nose, the corrosion rate increases. Further drop lowers the potential across the active nose and begins to decrease the corrosion rate. Once the potential reaches the open circuit value the net current is zero and no further drop occurs. The strength of this theory is that it falls naturally from the published IR* theory. Xu and Pickering[88] illustrate the process in depictions of IR but do not present information about the trailing off process. There are two main limitations however. The first is that this theory only applies to active-passive metals, and cannot be universally applied to all corrosion systems. The second is identical to the main limitation of the CCS theory, the corrosion rate at open circuit can be considerable.

355 5.2.3 IA as a Transient Phenomenon

It is possible that observed IA is not the result of a steady-state process. Instead it could just be the trace of the early stages of attack. If crevice corrosion is nucleated at some heterogeneous site, it may only propagate across the crevice at some finite rate.

5.3 Hydrolysis Reactions


Subsection 2.3.2 discussed the hydrolysis of metal cations and the methods used to determine the change in pH for a given addition of metal cations. When metal cations are introduced into aqueous solution they have a tendency to form metal hydroxides. This was shown in Equation 95 from subsection 2.3.2.3.2.1 repeated below. xM z% % yOH & Mx(OH)y
(xz&y)%

(95)

By consuming hydroxyl ions the metal cations lower the pH of the solution. As was discussed in Chapter 2, it is a relatively straightforward procedure to find the resulting pH for a given addition of metal cations. Processes like the dissolution of a metal salt or the anodic dissolution of a metal can create these metal cations. There is one critical difference between adding metal cations through the chemical dissolution of a metal salt and the electrochemical dissolution of a metal. The cations in the salt are already ionized, whereas the reduced atoms of a metal must be oxidized to become soluble. The electrons that are stripped from the atoms must be consumed in a reduction reaction at

356 some location. In aqueous solutions the common cathodic reactions are the Hydrogen Evolution and Oxygen Reduction Reactions. These were first presented as Equations 3 and 4. 2 H % % 2 e & X H2 (3)

2 H2 O % O2 % 4 e & X 4 OH &

(4)

Each of these reactions generates hydroxyl ions that have a tendency to raise the pH. When metal salts are dissolved the only force on the pH of the solution acts to lower it. When a metal is electrochemically dissolved there are counterbalancing forces for acidification and alkalinization. Each generated metal cation consumes some pH-dependent number of hydroxyl ions. If the cathodic reactions required to support the dissolution of that cation are HER or ORR, then one hydroxyl is generated per electron released, independent of pH. Counterintuitively, it is the alkalinization process that dominates in almost all cases. An examination of the distribution of hydrolysis products for chromium, as shown in Figure 5.3(a), yields insight into the situation. At low pHs, less than 3, there are few hydoxyl ions available to form metal hydroxides. The dominant Cr species is Cr+3 - more than 90% of the chromium ions have no attached hydroxyl ions. The hydrolysis of a single trivalent chromium consumes less than one hydroxyl on average. However, the cathodic reactions required to produce that ion from a chromium atom generate three hydroxyl ions. The net result is that electrochemical dissolution of chromium at low pHs alkalinizes the solution.

357 As the pH rises each bare chromium ion hydrolyzes to a greater and greater extent. Fig 5.3(a) shows the number of hydroxyl ions consumed per chromium cation. Three hydroxyl ions are generated by cathodic reactions to support the dissolution of each cation. The only point at which the electrochemical dissolution of chromium will not have a tendency to affect the pH is when the number of hydroxyl ions consumed is equal to the number generated. For chromium, this occurs at a pH of 9.6. At pHs below this fewer hydroxyl ions are consumed that generated and the solution will become more alkaline. At pHs above this value more are consumed than produced and the solution acidifies. The trace of the number of hydroxyl ions consumed per cation in Figure 5.3(a) was generated by summing the products of the fraction of each species times the number of hydroxyl ions consumed per cation. An alternate method of finding the equilibrium pH for the dissolution of an element which only forms mononuclear hydrolysis products and whose cation has valence n is to find the intersection of the curves for the n-1 and n+1 th order hydrolysis products. No such graphical technique is possible when polynuclear species must also be considered. Table 37 shows the equilibrium pHs for several common cations.

358

Cation Al+3 Cr+3 Fe+2 Cu+2

Valence 3 3 2 2

Equilibrium pH 6.7 9.6 10.7 10.0

Table 37. The equilibrium pHs obtained when various metals are electrochemically dissolved in neutral water. The pHs are obtained by assuming that only ions of the given valence are produced by dissolution and that only mononuclear products form.

It is interesting to note that Cr, which is considered a stronger hydrolyzer than Al, has a higher equilibrium pH. This is because the equilibrium pH depends on the 2nd, 3rd, and 4th order products. To achieve the equilibrium pH an ion must be hydrolyzed, on average, to the same degree as the valence of the ion. At the equilibrium pH for a trivalent ion, such as Cr+3 or Al+3, essentially none of the ions remain at only the first hydrolysis product. The minimum pH that can be reached by the addition of a metal salt depends on the first hydrolysis coefficient. The same kind of analysis can be applied to alloys as well as pure elements. Figure 5.3(b) shows the number of hydroxyl ions consumed per average cation of the stainless steel 304 with the composition shown in Table 38. An average ion resulting from the dissolution of 304 has a valence of 2.2. The mix of ions produced by that dissolution consumes on average 2.2 hydroxyl ion per metal cation at a pH of 10.6.

359

Element Fe Cr Ni Mn

Weight % 69.75% 19.00% 9.25% 2.00%

Atomic % 69.06% 20.21% 8.72% 2.01%

Table 38. Composition of stainless steel 304. The composition was taken from Davis[#181]. Silicon, Phosphorus and Sulfur are not included. This alkalinization when the material corrodes locally has been observed by Buchheit et al[34] in experiments on isolated microcrevices and shaving experiments with high surface-tovolume ratios. Crevices are usually thought of as being held anodically and as a result having the majority of the anodic reactions occur inside the crevice and the bulk of necessary cathodic on the boldly exposed surface. Were this absolutely true, that no cathodic reactions occurred inside the crevice then there would be no alkalinizing force and crevices pHs would drop unfettered. It is possible to use the analysis of the previous section to calculate the equilibrium pH when various fractions of the required cathodic current are met locally. This calculation is shown in Figure 5.3(c). For 304, if only 10% of the cathodic current is met locally the equilibrium pH is 5. For pure Fe, if 10% of the required electrons are consumed locally the pH is 9.2. Both alloys have an equilibrium pH of near 10.7 if all of the cathodic current is filled through local reactions. At a materials open circuit potential, all of the required current is being met locally.

360 Crevice corrosion generates large amounts of current. If the resulting potential drop depolarizes parts of the crevice to the open circuit potential, then those depolarized regions can be expected to become very alkaline. Providing even small amounts (10%) of the required cathodic current locally can dramatically limit the pH drop caused by metal cation hydrolysis. Meeting all of the current locally, as occurs at open circuit, can cause a pH rise to quite alkaline values. In comparison, Figure 5.3(c) shows that if the solution resulting from the dissolution of 304 is in equilibrium at pH=2, then only 0.09% of the required cathodic current is being met locally. The vast majority of the cathodic current is being supplied from reactions occurring far away in solution where the alkalinizing effect does not affect the chemistry at the dissolution site.

364

5.4 Cathodic Focusing Theory of IA

Undoubtedly both potential and chemistry effects are involved in crevice corrosion. Some systems may be dominated by one effect or the other, but both CCS and IR* ignore the chemical effects of cathodic reactions occurring within the crevice. Section 5.3 illustrated that even small amounts of cathodic current can have large effects on the equilibrium pH. The CF theory proposes that potential drop in the crevice lowers the potential to near the open circuit value. Near the open circuit value the dissolution current is almost balanced by locally occurring cathodic reactions and this causes the pH to rise. It is this rise in pH that protects the metal deep in the crevice and causes IA. Figure 5.4.1(a) shows this process. This figure is illustrative only and is meant to depict the processes rather than any particular situation. Part (a) is a diagram showing the orientation of the crevice and the location of three points within it. Part (b) shows the pH, a measure of solution aggressiveness, and potential within the crevice. With increasing depth in the crevice the pH first drops, then rises in the regions of the crevice which rest near their open circuit values. The potential drops throughout the crevice, unless changes in chemistry cause the deepest parts of the crevice to be polarized cathodically. This extreme is not shown in the diagram, as it is unnecessary to illustrate the overall process. Part (c) shows two polarization curves, one for the high pH, non-aggressive conditions near the mouth and base, and the other for the acidic, highly aggressive conditions at the middle of the crevice. Using the pH and potential information from part (b) the conditions at the three marked points within the crevice

365 are marked on the appropriate polarization curve at the correct potential. Part (d) represents the resulting current density along the crevice walls. Starting at the mouth (x=0) and going into the crevice, initially the increasing solution aggressiveness more than offsets the decreased driving force. Once the potential is low enough to cause appreciable amounts of the required cathodic current to be met locally, the pH rises again and the corrosion rate rapidly drops off because both chemistry and potential are acting as retarding forces. One factor to note is that while IR drop alone cannot lower the potential below the open circuit potential in the relevant environment, changes in chemistry can polarize the sample either anodically or cathodically. This theory allows for corrosion to be totally stopped within the crevice. For many metals, while the corrosion rates in highly acidic solutions can be appreciable even at open circuit, in neutral to alkaline environments they are negligible. This theory also fits with the observations of Alavi and Cottis[93] and Guo[94] who saw pH rises in deep crevices and the recommendations of Turnbull[95] who suggests using the alkalinization as a preventative measure by stimulating the cathodic reaction in the crevice.

367

5.5 Modelling of IA by IR*, CCS and CF by CREVICER

CREVICER was used as a platform to model crevice corrosion under different sets of assumptions. It is capable of accounting for or disregarding any variables as needed. This section presents results of crevice corrosion modeling by each the two prevalent theories with an eye towards explaining intermediate attack. It will end by modeling IA by the Cathodic Focusing model of crevice corrosion.

5.5.1 IA by the IR* Model As was discussed in section 5.2 the IR* theory for the initiation of crevice corrosion in active/passive metals can explain intermediate attack. Depolarization of the crevice by resistive potential drop can lower the potential of portions of a crevice thus destabilizing the protective oxide film and initiating rapid attack. Further decreases in potential reduce the driving force for initiation and lower the dissolution rate to icorr, the corrosion rate at the open circuit value of the relevant environment. CREVICER can be used to model such a situation. Figure 5.5.1(a) represents a onedimensional crevice held potentiostatically at the mouth with one active/passive flank. The length of the crevice is x0 and the separation of the two parallel sides is h. The crevice is filled with a uniformly conducting electrolyte of composition 0.5 M sodium sulfate + 0.5 M sulfuric acid. This case was drawn from the work of Walton[78] modeled in CREVICER using the physical parameters of Table 39. The final physical parameter used was E-I relationship for the material

368 in this environment.

Parameter x h w 0

Value 1 [cm] 0.5 [mm] 1 [cm] 2.67085 [-m]-1 0.71 [V SHE]

Table 39. The parameters used for modelling the IA by the IR* model. These values are the exact ones used to define the size and character of the crevice illustrated in Figure 5.5.1(a). The only remaining piece needed is the polarization curve shown in Figure 5.5.1(b) and defined in Table 40. CREVICER uses the geometrical, chemical and electrochemical properties of the crevice to find the potential and current distributions within the crevice. These are shown in Figure 5.5.1(c) The exact relationship used was the tenth-order polynomial given in Equation 240 that was fit to the experimental data of Valdes-Moldon used by by Walton[78]. The raw data and the fit are shown in Figure 5.5.1(b). The parameters of the polynomial are given in Table 40. i ' 10
a 0 % a 1E % a 2E 2 % a 3E 3 % a 4E 4 % a 5E 5 % a 6E 6 % a 7E 7 % a 8E 8 % a 9E 9 % a 10E 10

(240)

369

Parameter a0 a1 a2 a3 a4 a5

Value 2.34608 0.753641

Parameter a6 a7

Value 275.231 96.0202 -428.904 284.36 -59.7865

-1.20439 a8 37.838 a9

-69.4211 a10 -137.304

Table 40. The values for the coefficients of the tenth-order polynomial used to fit the polarization curve of Valdes-Moldon.

The use of a tenth-order polynomial to fit the logarithm of the experimental data allows a good representation of the data. It captures the polarization curve in a compact, continuous format. The physical data on the crevice geometry, the solution conductivity, and the material behavior can be used to find the steady-state potential distribution. The resulting distributions of potential and current density along the crevice flank are shown in Figure 5.5.1(c). The point of greatest attack is predicted to occur 0.6 mm from the mouth. Neither the model nor the physical system it is based upon experience chemistry changes, or by extension polarization curve shifts. The only driving force for corrosion is the varying potential within the crevice.

370 The other major competing theory for the initiation of crevice corrosion is the CCS. As will be seen in the next subsection, 5.5.2, the model cannot account for IA. Modifying the process to account for the effects of potential variations can allow it to model IA and will be shown in subsection 5.2.3.

374 5.5.2 CCS Model

The CCS model in its purest form is not capable of modeling intermediate attack. If no potential variations are allowed to occur then the only force which can affect the corrosion rate in the crevice is the increasing aggressiveness of the electrolyte. Without a counterbalancing force of some kind to slow corrosion, the rate of attack can only increase with increasing depth into the crevice. This phenomenon was illustrated by using CREVICER. Figure 5.5.2(a) shows the simple, one-dimensional, slot-shaped geometry used in subsection 5.5.1. It has length x0 and gap h. It is filled with a 0.6 M NaCl solution with conductivity 7.58335 [-m]-1. These values are summarized in Table 41. The polarization curves used to represent the material behavior are shown in Figure 5.5.2(b). The set of polarization curves is continuous. The behaviors at pH = 1 and pH = 7 are defined and the log of the current at other pHs is interpolated linearly between those two values. Traces of the interpolated polarization curves at various pHs are shown. Note that since for this case no potential drop is allowed to occur within the crevice the potential is uniformly that of the mouth, 0.05 V. Essentially, only a single point on each polarization curve is used.

375

Parameter xo h w 0

Value 1 [cm] 4 [m] 1 [cm] 7.58335 [-m]-1 0.05 [V]

Table 41. The parameters used for modelling according to the CCS model. These values are the exact ones used to define the size and character of the crevice illustrated in Figure 5.5.2(a). The only remaining piece needed is the polarization curve shown in Figure 5.5.2(b). CREVICER uses the geometrical, chemical and electrochemical properties of the crevice to find the potential and current distributions within the crevice. These are shown in Figure 5.5.2(c) Figures 5.5.2(c) shows the pH distribution within the crevice at various times. Since there are no potential variations, the pH drops uniformly and evenly except near the mouth where transport of chemical species out of the crevice keeps the pH more neutral than what can be achieved at greater depths. This pH distribution and the fixed potential can be used to find the corrosion rate along the crevice flanks at various times. This is shown in 5.5.2(d). The corrosion rate inside the crevice is constantly increasing with greater depth. It is only mitigated near the mouth because the close proximity of the bulk solution allows transport which limits the pH drop. The CCS model was originally only designed to predict the initiation of crevice corrosion. It is not meant as a criticism to point out that is unable to model IA which it was

376 never intended to do. Extending the theory by accounting for the effects of potential drop decreasing the overpotential for anodic dissolution can modify the theory to account for IA. This is done in the next subsection.

381 5.5.3 IA by the CCS model

Accounting for the effects of potential drop provides the CCS model with the counterbalancing force that reduces the corrosion rate and can be played against the corrosion promoting force of acidification to produce IA. For a Tafel-like metal reducing the driving force slows the corrosion rate. IA can be generated if attack is retarded at the mouth due to insufficiently aggressive chemistry, promoted in the interior due to adequate driving force and chemistry, and retarded near the base by a lack of driving force. This case is modeled by CREVICER with the following conditions. Figure 5.5.3(a) shows the same geometry that was used in the preceding subsections. Once again the length of the crevice is x0 and the gap is h. It is initially filled again with 0.3 M NaCl, but this time the conductivity of 3.791675 [-m]-1 plays an important role by affecting the corrosion rate. These physical parameters are shown in Table 42. The same set of polarization curves are used as in 5.5.2. Accounting for potential drop brings the entire curves to bear rather than just the 0.05 V points. These curves are repeated in Figure 5.5.3(b).

382

Parameter xo h w 0

Value 1 cm 4 m 1 cm 3.791675 [-m]-1 0.05 V

Table 42. The parameters used for modeling according to the CCS model. These values are the exact ones used to define the size and character of the crevice illustrated in Figure 5.5.3(a). The only remaining piece needed are the polarization curves shown in Figure 5.5.3(b). CREVICER uses the geometrical, chemical and electrochemical properties of the crevice to find the potential and current distributions within the crevice. These are shown in Figure 5.5.3(c). CREVICER produces information about the changing potential and pH distributions within the crevice. These are shown in Figures 5.5.3(c) and (d). Figure 5.5.3(c) shows the potential distribution within the crevice at various times. Initially the crevice is filled with 0.3 M NaCl at a pH of 7. The combination of high conductivity and extremely low current generation because of the neutral pH causes a nearly flat potential profile within the crevice. The subsequent corrosion rate and release of the metal cations is nearly equal within the crevice. Consequently, the entire crevice drops in pH nearly uniformly. This is seen in the t = 1 s line on Figure 5.5.3(d). This change in chemistry affects the potential distributions at later times. The minor effect of these additional ions on increasing conductivity is more than overcome by the

383 exponential increase in current with decreasing pH and a significant potential distribution appears with in the crevice by time t = 8 s. Once a significant potential distribution appears the generation rate within the crevice is no longer equal. More corrosion occurs (and more metal cations are released) at the most anodic potentials near the mouth, a process that is only limited by the rapid transport of ions out of the crevice at the same location. This variable rate of corrosion results in an uneven distribution of pH as seen in Figure 5.5.3(d) at times t >= 8 s. The information in Figures 5.5.3(c) and (d) can be combined to find the corrosion rate of the crevice at each point within the crevice. These data is presented in Figure 5.5.3(e). It shows the transition from nearly uniform corrosion initially within the crevice to intermediate attack where the corrosion rate peaks near, but not at, the mouth of the crevice. An alternate method of presenting the information about the potential, pH and corrosion rate within the crevice is Figure 5.5.3(f). It combines all of the information from Figures 5.5.3(c)-(e), but the position information is now implicit by the location of each data point along the curve. The lowest potential points are deepest in the crevice. The information forms a quasipolarization curve. It records the current information from a potential sweep of a single material in an electrolyte of varying composition. Neither of the models for IA by CCS nor CCSIA have included the chemical effects of the cathodic reactions. The next model differs from the previous two only in that it produces hydroxyl along with any cathodic current.

390 5.5.4 IA by the CF Model

The CF model fully accounts for the electrical and chemical behavior of a crevice. When modeling a Tafel-like material, the driving force for increased dissolution is greater solution aggressiveness. The two counterbalancing forces that turn off corrosion are decreasing driving force and alkalinization of the crevice depths. This alkalinization occurs by the mechanism discussed in section 5.3 and the overall theory was discussed in section 5.4. This case is modeled by CREVICER with the following conditions. Figure 5.5.4(a) shows the same geometry that was used in the preceding subsections. Once again the length of the crevice is x0 and the gap is h. It is initially filled again with 0.3 M NaCl, but this time the conductivity of 3.791675 [-m]-1 plays an important role by affecting the corrosion rate. These physical parameters are shown in Table 43. The same set of polarization curves are used as in 5.5.2. Accounting for potential drop brings the entire curves to bear rather than just the 0.05 V points. These curves are repeated in Figure 5.5.4(b)

391

Parameter xo h w 0

Value 1 cm 4 m 1 cm 3.791675 [-m]-1 0.05 V

Table 43. The parameters used for modeling according to the CCS model. These values are the exact ones used to define the size and character of the crevice illustrated in Figure 5.5.3(a). The only remaining piece needed are the polarization curves shown in Figure 5.5.3(b). CREVICER uses the geometrical, chemical and electrochemical properties of the crevice to find the potential and current distributions within the crevice. These are shown in Figure 5.5.3(c). CREVICER produces information about the changing potential and pH distributions within the crevice. These are shown in Figures 5.5.4(c) and (d). Figure 5.5.4(c) shows the potential distribution within the crevice at various times. Initially the crevice is filled with 0.3 M NaCl at a pH of 7. The combination of high conductivity and extremely low current generation because of the neutral pH causes a nearly flat potential profile within the crevice. The subsequent corrosion rate and release of the metal cations is nearly equal within the crevice. Consequently, the entire crevice drops in pH nearly uniformly. This is seen in the t = 1 s line on Figure 5.5.4(d). This change in chemistry affects the potential distributions at later times. The minor effect of these additional ions on increasing conductivity is more than overcome by the

392 exponential increase in current with decreasing pH and a significant potential distribution appears with in the crevice by time t = 8 s. Once a significant potential distribution appears the generation rate within the crevice is no longer equal. More corrosion occurs (and more metal cations are released) at the most anodic potentials near the mouth, a process that is only limited by the rapid transport of ions out of the crevice at the same location. This variable rate of corrosion results in an uneven distribution of pH as seen in Figure 5.5.4(d) at times t >= 8 s. A third phase in the crevicing process occurs once the solution becomes aggressive enough to cause adequate current to depolarize the base of the crevice to values near the open circuit potential. As can be seen in Figure 5.5.4(c) this starts to occur at time t = 40 s. Near the open circuit potential in the relevant environment OH-s are produced locally. This first mitigates, then reverses, the acidification of the crevice. This can be seen in Figure 5.5.4(d) at times t >= 40 s. The information in Figures 5.5.4(c) and (d) can be combined to find the corrosion rate of the crevice at each point within the crevice. This data is presented in Figure 5.5.4(e). It shows the transition from nearly uniform corrosion initially within the crevice to intermediate attack where the corrosion rate peaks near, but not at, the mouth of the crevice. When compared to Figures 5.5.2(e) and 5.5.3(e) the degree of protection afforded the base of the crevice becomes apparent. An alternate method of presenting the information about the potential, pH and corrosion rate within the crevice is Figure 5.5.4(f). It combines all of the information from Figures 5.5.4(c)-(e), but the position information is now implicit by the location of each data point along

393 the curve. The lowest potential points are deepest in the crevice. The information forms a quasipolarization curve. It records the current information from a potential sweep of a single material in an electrolyte of varying composition. The dramatic slowing of corrosion rates caused by the alkalinization of the crevice base is immediately obvious on this plot. Another useful plot is a representation of the ration of anodic to cathodic current at each point in the crevice. This is shown in Figure 5.5.4(g). Areas with ratios equal to 1 are at the open circuit potential. Those with ratios > 1 are cathodically polarized. This can occur because the local open circuit potential rises with pH. The CF model can produce dramatically different rates of corrosion by alkalinizing the base of a crevice. The model fully accounts for the generation of chemical species. Any crevice that depolarizes to the open circuit potential will have a tendency to rise in pH in those regions. This tendency can only be overcome by transport of acidity from the intermediate regions to the depths of the crevice. In Figure 5.5.4(d) the movement of the acidity/alkalinity interface to deeper depths with increasing time showed this process. Because current densities at the open circuit are lower than those with higher driving force the areal production of acidity near the mouth must be higher than the areal production of alkalinity near the base. This suggests that changing the area ratio of the acidity producing areas to the alkalinity producing ones will shift the motion of the acidity/alkalinity interface. Figure 5.5.4(h) shows the pH versus position data at several times for a crevice that differs from the one defined in Table 43 only in that it is 5-cm long instead of 1 cm. The increased length of the crevice provides more crevice area that corrodes at the open circuit

394 potential and thus generates alkalinity. This increase in area more than compensates for the low specific generation of hydroxyl ions and allows the alkaline region to expand at the expense of the acidic region. Compare these results to Figure 5.5.4(d), which was generated for a 1-cm long crevice, which shows the alkaline region shrinking.

Summary This chapter has presented several models of crevice corrosion that were run under CREVICER to test their suitability for modeling IA. The CCS model was unable to predict IA. Both the IR* and CCS/IA models were able to produce some degree of differential corrosion rates that peaked at intermediate depths by using potential drop to turn off the corrosion rate. Neither model was able to produce as great a differential as the CF model. The CF model alone fully accounts for the electrical and chemical processes occurring inside crevices. Intermediate attack in crevice corrosion can only result from the interplay of at least one corrosion-promoting and one corrosion-retarding force. An explanation of intermediate attack must properly account for both forces. This understanding opens the possibility of adjusting the balance between the forces to favor the corrosion retarding one and prevent crevice corrosion entirely. The concepts of the CF model can also be applied to environmental cracks and suggest a relationship between crack length and crack-tip pH.

403

Chapter 6: Conclusions
The two goals of this dissertation were to develop a broad-based code for the modeling of crevice corrosion that would be adaptable enough to serve as a platform for a variety of future modeling efforts and to use that code to investigate the phenomenon of IA. CREVICER is a two-dimensional(+) FEM code for modeling the electrochemical conditions that arise inside occluded sites. It models mass transport by migration and diffusion and maintains charge neutrality and chemical equilibrium. The boundary conditions can be programmed as free-form curves and can be sensitive to potential, chemical composition, temperature and pressure. This range of applicability allows the code to be used to model the chemical behavior of any two-dimensional crack or crevice. This versatility was achieved through the use of OOD. Constructing the code as a collection of objects allows easy revision of modification of individual portions. CREVICER can act as a basis for future models that refine individual areas of the code. Many of these possible improvements are discussed in Chapter 7. Despite CREVICERs overall versatility, the code has some limitations. It is restricted in the kinds of polarization curves it can utilize, cannot account for shape changes, and may not be properly accounting for the diffusion potential. Subsection 4.2.4 presented the difficulties CREVICER encounters in finding potential distributions for materials with sharp, narrow active noses. CREVICER depends on an outside mesher to create the elements and nodes that define the crevice. This cannot be done as the code runs so a model cannot automatically adjust its

404 shape as corrosion or plating occurs. Finally, the diffusion potential is not be perfectly integrated into the code. Its effects are included in transport but not in generation or the stability checks. CREVICER was used to model crevice corrosion by the IR*, CCS, CCS/IA and CF models in order to test their suitability for modeling IA in crevice corrosion. IA can only occur if there are at least two opposing forces operating on the crevice. The CCS model only supplies a single corrosion enhancing force, acidification, and cannot model IA. The CCS/IA model adds the effects of potential drop and uses the resulting reduction in driving force to arrest corrosion in the crevice depths. The IR* model includes the ability to model IA in its original form. The potential drop which depolarizes an active/passive metal into its active region can also bring parts of the crevice to the open circuit potential. Both of these two approaches ignore the chemical effects of cathodic reactions in the crevice. Common cathodic reactions produce one hydroxyl per electron consumed. The CF model accounts for these cathodic reactions and predicts alkalinization at the most occluded portions of an occluded region. This alkalinization can be a second force for retarding corrosion. The CF model, by its explanation of the retarding force against crevice corrosion, presents the possibility of strengthening that retarding force and stopping crevice corrosion entirely. Section 5.5.4 showed that crevice length can have a marked effect on the size and stability of any potential alkaline region. Other mechanisms to increase the rate of hydroxyl ion production include adding cathodic catalysts, increasing the supply of a reducible, hydroxylgenerating ion like ozone or diatomic oxygen, or driving the cathodic reactions with a separate embedded and powered cathode.

405

406

Chapter 7: Future Work


The CREVICER code is meant to act as a platform on which later models can be built. Three types of future work can be performed to extend this dissertation: improvements to the CREVICER code; improvements to the model implemented in CREVICER and experimental work to verify the predictions of the code.

7.1 Code Improvements


The areas in which CREVICER can be improved are increased speed, increased stability and increased ease of use. CREVICER is strongly limited by computational time. Increasing the rate at which the code runs would allow proportionately more intensive problems to be examined. The problems that are examined may or may not be stable. CREVICER alerts the user if the problem may be numerically unstable, but the code takes no corrective action. Another limitation of the code is that the functionality can only be accessed by programming. An easy-to-use Graphical User Interface (GUI) that provided a shell between novice users and the code would be a welcome addition. A successful GUI would make CREVICER more accessible for a wider distribution of corrosion scientists and engineers. The first area that should be examined to locate a speed increase is the solver routine. The current solver uses Gaussian elimination to solve the n by n matrix that is created for each variable in each time period. Although this algorithm is easy to code, it is extremely inefficient. Possible improvements would be to use a vectorized approach that takes advantage of the

407 bandedness of the equations or to use a sparse matrix implementation that only manipulates the non-zero elements of the matrix. A second area for speed increases which should be examined is the routine for finding the potential distribution in the crevice at each time period. Currently, CREVICER attempts to find the steady-state solution by time marching through pseudo-time. This method can have the same types of stability problems that were mentioned in subsections 4.2.2 and 4.2.3. Each calculation of a pseudo-timestep takes as much time as a chemical timestep. Multiple steps in pseudo-time can be required to find the quasi-steady-state potential distribution at each timestep. A method to speed the calculation of the potential distribution could result in significant time savings. The second area the CREVICER could be upgraded in is enhancing the stability of the code. CREVICER detects Peclet problems as it runs and informs the operator that the code may not be stable. The code does not however adjust its own parameters, such as the timestep or mesh size, to ensure stability. An alternate route would be to use upwinding or the method of lines to ensure stability over a wider range of conditions[48]. The third area for improvement in the CREVICER code is in the area of interfacing with the user. CREVICERs object-oriented nature makes it easy to reprogram. This ease of programmability is of little use to non-programmers. A GUI would make it easier for nonprogrammers to use CREVICER. The basic functions for such a GUI would be mesh generation and definition, setup of initial conditions, control of the model execution and model output.

408 Mesh generation is currently done in ANSYSTM. Integrating that separate step into CREVICER would simplify model operation. The initial conditions for the model have an effect on the course of the crevicing event. Graphical selection of the solution composition and the materials for individual elements and edges would ease input and increase accuracy by ensuring the boundary conditions actually used by the model correspond to the physical system. The parameters of the model execution such as length of timesteps used, degree of implicitness/explicitness and convergence criteria would ideally be located at a single point. Finally, CREVICER can generate extremely large amounts of data. CREVICER can output not only the field variables but derived parameters such as pH, conductivity, or flux across an edge. The parameters that need to be output vary from model to model and the ability to selectively output only the relevant data without programming would simplify the data analysis process. This subsection has discussed changes that change the way CREVICER operates, but not the fidelity of the model implemented in CREVICER to any particular physical situation. The next section addresses such changes.

7.2 Model Improvements


CREVICER currently makes several simplifications about the behavior of individual components of the crevicing process. Most of these can easily be addressed in the code by modifying one or two objects. Better representations of concentrated solution effects, precipitation, viscosity and tortuosity would be easily implemented. Accounting for shape changes would be more complicated but would still involve only a minority of the code. One

409 omission, however, would require small modifications over most of the code. Absolute time is not passed between any of the parameters and its inclusion into the code would cause changes in almost every object of CREVICER. A final improvement would be reformulating the mathematical method used to allow for moving boundaries. As was seen in subsection 2.3.2.2 on the transport coefficients a number of factors can come to bear on the kinetics of mass transfer when the solute ions begin to interact with one another. Not only may the diffusivity and mobility be changed directly, but indirect effects like viscosity changes or tortuousity caused by precipitation of a solid phase may play a role. None of these factors are currently implemented in any object in CREVICER. Concentrated solutions may also affect the thermodynamics of the crevice solution by changing the activity coefficients of individual species. This can even destroy the underlying basis for using gradients of concentration rather than activity in diffusion as was discussed in subsection 2.3.2.1. Time was omitted as a variable when the interfacing between the various objects was defined. CREVICER assumes that behaviors instantly change to reflect new electrochemical conditions. This approach does not fully reflect the physical behavior of real systems. For example, a previously passivated metal surface takes a finite period of time to remove the protective oxide when it is placed in an activating solution. Another example might be the dissolution of metastable pits. It would be useful to allow pits inside a crevice to corrode for fixed periods of time and the turn off. Passing time as a parameter would not only allow materials to show time transient behavior that is independent of chemistry or potential changes but also allow for the model to make specific changes in the model at absolute time intervals.

410 A final improvement in the model would be to recast the mathematical solution technique to allow for the boundaries of the crevice to move based on the corrosion rate. This would allow for a single model to investigate the shape evolution of a crevice. Model verification by experiment would strengthen the CF theory of intermediate attack in crevice corrosion. In situ or ex situ measurements of pH within a creviced region similar to the work of Alavi and Cottis[93] would be useful if compared directly to CREVICER predictions.

Summary CREVICER could benefit from modifications to the code to improve speed and usability and from refinements of the models that are implemented in it.

411

Chapter 8: References
1. Jones, D., Principles and Prevention of Corrosion. 1992: MacMillian Publishing Company. 586.

2.

Hoar, T.P., Disc. Faraday Soc., 1947. 1: p. 299.

3.

Fontana, M.G.G., Corrosion Engineering. 1986, New York: McGraw-Hill Book Company. 556.

4.

Oldfield, J.W. and Sutton, W.H., "Crevice Corrosion of Stainless Steels I. A Mathematical Model". Br. Corros. J., 1978. 13(1): p. 13-22.

5.

Cho, K. and Pickering, H.W., "Demonstration of Crevice Corrosion in Alkaline Solution Without Acidification". J. Electrochem. Soc., 1990. 137(10): p. 3313-3314.

6.

Sharland, S.M., "A Mathematical Model of the Initiation of Crevice Corrosion in Metals". Corrosion Science, 1992. 33(2): p. 183-201.

7.

Gartland, P.O. "A Simple Model of Crevice Corrosion Propagation for Stainless Steels in Sea Water". in Corrosion 97. 1997: National Association of Corrosion Engineers.

412 8. Turnbull, A., "Modelling of Crack Chemistry In Sensitized Stainless Steel in Boiling Water Reactor Environments". Corrosion Science, 1997. 39(4): p. 789-805.

9.

Watson, M.K. and Postlethwaite, J., "Numerical Simulation of Crevice Corrosion: The Effect of the Crevice Gap Profile". Corrosion Science, 1991. 32(11): p. 1253-1262.

10.

Walton, J.C., Cragnolino, G., and Kalandros, S.K., "A Numerical Model of Crevice Corrosion for Passive and Active Metals". Corrosion Science, 1996. 38(1): p. 1-18.

11.

Sridhar, N. and Dunn, D.S., "Effect of Applied Potential on Changes in Solution Chemistry Inside Crevices on Type 304L Stainless Steel and Alloy 825". Corrosion, 1994. 50(11): p. 857-872.

12.

DeJong, L.A. and Kelly, R.G., "The Demonstration of the Microfabrication of Rigorously Defined Crevices for the Investigation of Crevice Corrosion Scaling Laws", in Critical Factors in Localized Corrosion III, R.G. Kelly, et al., Editors. 1999, The Electrochemical Society: Pennington, NJ. p. 678-688.

13.

Brossia, C.S. and Kelly, R.G. "On the Role of Alloy Sulfur in the Initiation of Crevice Corrosion in Stainless Steel". in Critical Factors in Localized Corrosion II. 1996: Electrochemical Society Proceedings.

413 14. Hebert, K. and Alkire, R., "Dissolved Metal Species Concentration for Initiation of Crevice Corrosion of Aluminum I. Experimental Investigations in Chloride Solutions". J. Electrochem. Soc., 1983. 130(5): p. 1001-1007.

15.

Lott, S.E. and Alkire, R.C., "The Role of Inclusions on Initiation of Crevice Corrosion of Stainless Steel". J. Electrochem. Soc., 1989. 136(4): p. 973-978.

16.

King, F., Tang, Y., Quinn, M.J., and Litke, C.D. "The Effects of Dissolved Oxygen Concentration and Mass-Transport Conditions on the Dissolution Behaviour of Copper Nuclear Waste Containers". in Corrosion 95. 1995: National Association of Corrosion Engineers.

17.

King, F. and Kolar, M. "Prediction of Lifetimes of Copper Nuclear Waste Containers Under Restrictive Mass-Transport and Evolving Redox Conditions". in Corrosion 95. 1995.

18.

Shoesmith, D.W., Ikeda, B.M., and LeNevu, D.M. "Modelling the Failure of Nuclear Waste Containers". in Corrosion 96. 1996.

19.

Sridhar, N., Cragnolino, G., Pennick, H., and Torng, T.Y. "Application of a Transient Crevice Corrosion Model to the Prediction of Performance of High-Level Nuclear

414 Waste Container Materials". in Life Prediction of Corrodible Structures. 1991: NACE International.

20.

Weast, R.C., ed. CRC Handbook of Chemistry and Physics. 59 ed. . 1978, CRC Press, Inc.

21.

Newman, J., Electrochemical Systems. 1973, Englewood Cliffs, NJ: Prentice-Hall, Inc. 432.

22.

Lupis, C.H.P., Chemical Thermodynamics of Materials. 1983, New York: NorthHolland. 581.

23.

Bockris, J.O.M. and Reddy, A.K.N., Modern Electrochemistry. Vol. 2. 1970, New York: Plenum Press. 1432.

24.

Bard, A.J. and Faulkner, L.J., Electrochemical Methods: Fundamanetals and Applications. 1980, New York: John Wiley & Sons. 718.

25.

Pickering, H.W. and Frankenthal, R.P. "Mechanism of Pit and Crevice Propagation on Iron and Stainless Steels". in U.R. Evans Conference on Localized Corrosion. 1971. Williamsburg, VA: National Association of Corrosion Engineers.

415 26. Johnson, W.A., Class Notes: MSE 792 Diffusional Processes in Materials.

27.

Turnbull, A. "Progress in the Understanding of the Electrochemistry in Cracks". in Embrittlement by the Localized Crack Environment. 1983. Philadelphia, PA: The Metallurgical Society/AIME.

28.

Watson, M. and Postlethwaite, J., "Numerical Simulation of Crevice Corrosion of Stainless Steels and Nickel Alloys in Chloride Solutions". Corrosion, 1990. 46(7): p. 522-530.

29.

Gartland, P.O., A Mathematical Model of Crevice Corrosion for Fe-Ni-Cr-Mo Alloys in Chloride Solutions, . 1988, SINTEF: Trondheim, Norway.

30.

Tester, J.W. and Isaacs, H.S., "Diffusional Effects in Simulated Localized Corrosion". J. Electrochem. Soc., 1975. 122(11): p. 1438-1445.

31.

Song, W., "Activity Coefficient Model of Concentrated Electrolyte Solutions". AIChE Journal, 1990. 36(12): p. 1896-1900.

32.

Hamilton, R.L. and Crosser, O.K., "Thermal Conductivity of Heterogeneous TwoPhase Systems". Industrial Engineering Chemistry, 1963. 1(3): p. 187-191.

416 33. Baes, C.F. and Mesmer, R.E., The Hydrolysis of Cations. 1986, Malabar, Florida: Krieger Publishing Company. 499.

34.

Buchheit, R.G., Moran, J.P., and Stoner, G.E. "The Role of Hydrolysis in the Crevice Corrosion of Aluminum-Lithium-Copper Alloys". in NACE90. 1990. Las Vegas: National Association of Corrosion Engineers.

35.

Bikerman, J.J., Surface Chemistry. 1958, New York: Academic Press. 551.

36.

Galvele, J.R., "Transport Processes and the Mechanism of Pitting of Metals". J. Electrochem. Soc., 1976. 123(4): p. 464-474.

37.

Fu, J.W., "A Finite Element Analysis of Corrosion Cells". Corrosion, 1982. 38(5): p. 295-296.

38.

Fu, J.W. and Chan, S.-K., "A Finite Element Method for Modeling Localized Corrosion Cells". Corrosion, 1984. 40(10): p. 540-544.

39.

Alkire, R., Tomasson, T., and Hebert, K., "The Critical Geometry for Initiation of Crevice Corrosion". J. Electrochem. Soc., 1985. 132(5): p. 1027-1031.

417 40. Sharland, S.M. and Tasker, P.W., "A Mathematical Model of Crevice and Pitting Corrosion - I. The Physical Model". Corrosion Science, 1988. 28(6): p. 603-620.

41.

Sharland, S.M., "A Mathematical Model of Crevice and Pitting Corrosion - II. The Mathematical Solution". Corrosion Science, 1988. 28(6): p. 621-630.

42.

Galvele, J.R., "Transport Processes in Passivity Breakdown - II. Full Hydrolysis of the Metal Ions". Corrosion Science, 1981. 21(8): p. 551-579.

43.

Laycock, N.J., White, S.P., Noh, J.S., Wilson, P.T., and Newman, R.C., "Perforated Covers for Propagating Pits". Journal of the Electrochemical Society, 1998. 145(4): p. 1101-1108.

44.

Edwards, R.A.H., "A Simple Mass Transport Analysis of Localized Corrosion", in Advances in Localized Corrosion, H. Isaacs, et al., Editors. 1990, NACE: Houston. p. 381-392.

45.

Gravano, S.M. and Galvele, J.R., "Transport Processes in Passivity Breakdown - III. Full Hydrolysis Plus Ion Migration Plus Buffers". Corrosion Science, 1984. 24(6): p. 517-34.

418 46. Turnbull, A. and Thomas, J.G.N., "A Model of Crack Electrochemistry for Steels in the Active State Based on Mass Transport by Diffusion and Ion Migration". J. Electrochem. Soc., 1982. 129(7): p. 1412-1422.

47.

Ateya, B.G. and Pickering, H.W., "On the Nature of Electrochemical Reactions at a Crack Tip during Hydrogen Charging of a Metal". J. Electrochem. Soc., 1975. 122(8): p. 1018-1026.

48.

Psaila-Dombrowski, M.J., "Modeling of Crack and Crevice Chemistry in Light Water Reactor Environments", Massachusetts Institute of Technology, Boston MA, 1990

49.

Chapra, S.C. and Canale, R.P., Numerical Methods for Engineers. 1988, New York: McGraw-Hill Book Company. 812.

50.

Fletcher, C.A.J., Computational Techniques for Fluid Dynamics. Vol. 1. 1991, New York: Springer-Verlag. 401.

51.

Allaire, P.E., Basics of the Finite Element Method. 1985, Dubuque, Iowa: Wm. C. Brown Publishers. 691.

52.

Sharland, S.M., "A Review of the Theoretical Modeling of Crevice and Pitting Corrosion". Corrosion Science, 1987. 27(3): p. 289-323.

419 53. Munn, R.S., "A Review of the Development of Computational Corrosion Analysis for Spatial Corrosion Modeling Through its Maturity in the Mid-1980's", in Computer Modeling in Corrosion, ASTM STP 1154, R.S. Munn, Editor. 1992, American Society for Testing and Materials: Philadelphia. p. 215-228.

54.

Turnbull, A., "Modelling of Environment Assisted Cracking". Corrosion Science, 1993. 34(6): p. 921-960.

55. 56.

Turnbull, A., Review of Modelling of Environment-Assisted Cracking, . 1992. Turnbull, A. and Psaila-Dombrowski, M., "A Review of Electrochemistry of Relevance to Environment-Assisted Cracking in Light Water Reactors". Corrosion Science, 1992. 33(12): p. 1925-1966.

57.

Turnbull, A., "Review of Modelling of Pit Propagation Kinetics". 1992.

58.

Turnbull, A., "Chemistry Within Localized Corrosion Cavities", in Advances in Localized Corrosion, H.S. Isaacs, et al., Editors. 1990, National Association of Corrosion Engineers: Houston, Texas. p. 359-373.

59.

Turnbull, A., "The Solution Composition and Electrode Potential in Pits, Crevices and Cracks". Corrosion Science, 1983. 23(8): p. 833-870.

420 60. Evitts, R.W., Watson, M.K., and Postlethwaite, J., "Numerical Simulation of Crevice Corrosion of Titanium:Effect of the Bold Surface". Corrosion96, 1996: p. 121/1121/10.

61.

Watson, M.K., Evitts, R.W., and Wilmott, M.J., "Simulation of Changes in Stress Corrosion Cracking Environments in Anaerobic CO2 Rich near Neutral Bulk Solutions". Corrosion96, 1996: p. 251/1-251/13.

62.

Evitts, R.W., Postlewaithe, J., and Watson, M.K., "Modelling Crevice Corrosion". 1992.

63.

Harb, J.N. and Alkire, R.C., "Transport and Reaction during Pitting Corrosion of Ni in 0.5 M NaCl". J. Electrochem. Soc., 1991. 138(9): p. 2594-2600.

64.

Alkire, R.C. and Lott, S.E., "The Role of Inclusions on Initiation of Crevice Corrosion of Stainless Steel II. Theoretical Studies". J. Electrochem. Soc., 1989. 136(11): p. 3256-3262.

65.

Hebert, K. and Alkire, R., "Dissolved Metal Species Mechanism for Initiation of Crevice Corrosion of Aluminum II. Mathematical Model". J. Electrochem. Soc., 1983. 130(5): p. 1007-1014.

421 66. Alkire, R.C. and Siitari, D., "Initiation of Crevice Corrosion II. Mathematical Model for Aluminum in Sodium Chloride Solutions". J. Electrochem. Soc., 1982. 129(3): p. 488-496.

67.

Siitari, D.W. and Alkire, R.C., "Initiation of Crevice Corrosion I. Experimental Investigations on Aluminum and Iron". J. Electrochem. Soc., 1982. 129(3): p. 481487.

68.

Alkire, R., Ernsberger, D., and Damon, D., "The Role of Conductivity Variations Within Artificial Pits During Anodic Dissolution". J. Electrochem. Soc., 1976. 123(4): p. 458-464.

69.

Turnbull, A. and Ferriss, D.H., "Mathematical Modeling of the Electrochemistry in Corrosion Fatigue Cracks in Steel Corroding in Marine Environments". Corrosion Science, 1987. 27(12): p. 1323-1350.

70.

Turnbull, A. and Ferriss, D., "Mathematical Modelling of the Electrochemistry in Corrosion Fatigue Cracks in Structural Steel Cathodically Protected in Sea Water". Corrosion Science, 1986. 26(8): p. 601-628.

71.

Gangloff, R.P. and Turnbull, A. "Crack Electrochemistry Modeling and Fracture

422 Mechanics Measurement of the Hydrogen Embrittlement Threshold in Steel". in Modeling Environmental Effects on Crack Growth Processes. 1985. Toronto, Canada: The Metallurgical Society, Inc.

72.

Turnbull, A., "Theoretical Analysis of Influence of Crack Dimensions and Geometry on Mass Transport in Corrosion-Fatigue Cracks". Materials Science and Technology, 1985. 1(9): p. 700-710.

73.

Sharland, S.M., Jackson, C.P., and Diver, A.J., "A Finite Element Model of the Propagation of Corrosion Crevices and Pits". Corrosion Science, 1989. 29(9): p. 1149-1166.

74.

Oldfield, J.W., Masters, G.L., and Stokes, K.B. "Prediction of Initiation and Propagation of Crevice Corrosion on Aluminum Alloys in Sea Water by Mathematical Modelling". in Corrosion 96. 1996: National Association of Corrosion Engineers.

75.

Oldfield, J.W. and Sutton, W.H., "New Technique for Predicting the Performance of Stainless Steels in Sea Water and Other Chloride Containing Environments". Br. Corros. J., 1980. 15(1): p. 31-34.

76.

Gartland, P.O. "Modeling Crevice Corrosion of Fe-Cr-Ni-Mo Alloys in Chloride

423 Solution". in 12th International Corrosion Congress. 1993: NACE International.

77.

Bardal, E., Johnsen, R., and Gartland, P.O., "Prediction of Galvanic Corrosion Rates and Distribution by Means of Calculation and Experimental Models". Corrosion, 1984. 40(12): p. 628-633.

78.

Walton, J.C., "Mathematical Modeling of Mass Transport and Chemical Reaction in Crevice and Pitting Corrosion". Corrosion Science, 1990. 30(8/9): p. 915-928.

79.

Gaudet, G.T., Mo, W.T., Hatton, T.A., et al., "Mass Transfer and Electrochemical Kinetic Interactions in Localized Pitting Corrosion". AIChE Journal, 1986. 32(6): p. 949-958.

80.

Lillard, R.S. and Scully, J.R., "Modeling of the Factors Contributing to the Initiation and Propagation of the Crevice Corrosion of Alloy 625". J. Electrochem. Soc., 1994. 141(11): p. 3006-3015.

81.

Munn, R.S. and Devereaux, O.F., "Numerical Modeling and Solution of Galvanic Corrosion Systems: Part I. Governing Differential Equation and Electrode Boundary Conditions". Corrosion, 1991. 47(8): p. 612-618.

424 82. Munn, R.S. and Devereaux, O.F., "Numerical Modeling and Solution of Galvanic Corrosion Systems: Part II. Finite-Element Formulation and Descriptive Examples". Corrosion, 1991. 47(8): p. 618-634.

83.

Bertocci, U., "Modeling of Crack Chemistry in Cu-Au Alloys". J. Electrochem. Soc., 1989. 136(7): p. 1887-1892.

84.

Engelhardt, G. and Stehblow, H.-H., "A Quantitative Method of Describing Ionic Transfer Processes in Electrolytes Under Metal Corrosion". Journal of Electroanalytical Chemistry, 1994. 365: p. 7-18.

85.

Shuck, R.R. and Swedlow, J.L., "Analysis of Crack-Like Regions - Part I", in Localized Corrosion, B.F. Brown, J. Kruger, and R.W. Staehle, Editors. 1974, NACE: Houston, TX. p. 190-207.

86.

Shuck, R.R. and Swedlow, J.L., "Analysis of Crack-Like Regions - Part I", in Localized Corrosion, B.F. Brown, J. Kruger, and R.W. Staehle, Editors. 1974, NACE: Houston, TX. p. 208-220.

87.

Ateya, B.G. and Pickering, H.W. "The Dynamics of Interaction Bewteen the IR Potential Drop and Composition Changes During the Activation and Propagation of

425 Crevice Corrosion". in Crevice Corrosion: The Science and its Control in Engineering Practice. 1996.

88.

Xu, Y. and Pickering, H.W., "The Initial Potential and Current Distributions of the Crevice Corrosion Process". J. Electrochem. Soc., 1993. 140(3): p. 658-668.

89.

Beavers, J.A. and Thompson, N.G., "Effect of Pit Wall Reactivity on Pit Propagation in Carbon Steel". Corrosion, 1987. 43(3): p. 185-188.

90.

De Force, B. and Pickering, H., "A Clearer View of How Crevice Corrosion Occurs". Journal of Materials, 1995(September): p. 22-27.

91.

Lippman, S.B., C++ Primer. 1991, Reading, Massachusetts: Addison-Wesley Publishing Company. 614.

92.

Brossia, C.S., "Personal Communication". 1996.

93.

Alavi, A. and Cottis, R.A., "The Determination of pH, Potential and Chloride Concentration in Corroding Crevices on 304 Stainless Steel and 7475 Aluminum Alloy". Corrosion Science, 1987. 27(5): p. 443-451.

426 94. Guo, S. "The Distribution of pH Within Corrosion Crevice Without External Surface". in Aluminum Alloys '90. Second International Conference on Aluminum Alloys -Their Physical and Mechanical Properties. 1990. Beijing: International Academic Publishers.

95.

Turnbull, A., "Prevention of Crevice Corrosion by Coupling to More Noble Materials?". Corrosion Science, 1998. 40(4-5): p. 843-845.

96.

Evitts, R.W., Postlethwaite, J., and Watson, M.K. "Modelling Crevice Corrosion". in Corrosion 92. 1992: National Association of Corrosion Engineers.

427

Appendix A: CREVICER Code Printout


CREVICER consists of the following header and c files. constant.h tchem.h taspecie.h tallspec.h treactio.h tmateria.h fem.h solver.h

tchem.c taspecie.c tallspec.c treactio.c tmateria.c fem.c solver.c chemtest.c

The CREVICER code also requires two different input files, one to define the elements and one to define the nodes. Example files have been included. nosq8 elsq8

By convention in CREVICER no prefixed files denote node files while el prefixes are used to label element files. The font used on the following pages produces 80 characters per line. Several comment lines in CREVICER exceed this length, in context it is clear where this has occurred. Each file is reproduced in the following appendices for archival purposes. Electronic versions of the code may be obtained from the author.

428

Appendix B: constant.h
/********************************************************* This header file contains universal constants for CREVICER It also defines conventions.

Conventions - units used length time temperature moles potential current mass charge # _m_ _s_ _K_ _moles_ _V_ _A_ _g_ _eq_ used _mol/m^3_ _A/m^2_ _mol/m^2_ _V/m_ _g/m^3_

Not intuitive units concentration Current density Chemical flux Electric field density

NOT MOLAR

All electrochemical potentials are give as volts vs NHE *********************************************************/ #ifndef __CONSTANT_H #define __CONSTANT_H

#ifndef __STRING_H #include <string.h> #endif

#define R 8.3143 // [J]/[mol-K] //** Note: defining F as 96847 is an integer => F*F exceeds the upper limit //for integers, causes problems in kappa of tallspec #define F 96487.0 // [C]/[eq] #define F2 9309741169.0 // error codes #define FALSE 0 #define ERROR 0 #define TRUE 1 #define OK 1 #define ITEMNOTINLIST 2 #define BOOL int #define MAXNUMSPECIES 15

429
int StringsEqual(char * str1, char * str2) {if (strcmp(str1, str2) == 0) {return(1); } else {return(0); } } /* Values from CRC D-167 (Brossia's) Equivalent Ionic Conductivities UNITS FOR THE VALUES IN THIS TABLE u = [cm^2-mol]/[J-s] D = cm^2/s *Per m^2 values are 10^-4 that species lambda z u Al+++ 61 3 H+ 349.65 1 Ca++ 59.47 Cr+++ 67 3 Cu++ 53.6 Fe++ 54 2 Fe+++ 68 3 H+ 349.65 1 K+ 73.48 1 Li+ 38.66 1 Mg++ 53 2 Mn++ 53.5 NH4+ 73.5 N2H5+ 59 1 Na+ 50.08 1 Ni++ 50 2 Zn++ 52.8

D@ 298K

2.184E-09 5.411E-06 3.756E-08 9.305E-05 2 3.194E-09 7.914E-06 2.399E-09 5.944E-06 2 2.879E-09 7.132E-06 2.900E-09 7.186E-06 2.435E-09 6.032E-06 3.756E-08 9.305E-05 7.893E-09 1.956E-05 4.153E-09 1.029E-05 2.846E-09 7.053E-06 2 2.873E-09 7.119E-06 1 7.895E-09 1.956E-05 6.337E-09 1.570E-05 5.379E-09 1.333E-05 2.685E-09 6.653E-06 2 2.836E-09 7.026E-06

Anions Br- 78.1 -1 8.389E-09 2.079E-05 CH3CO2- 40.9 -1 4.393E-09 1.088E-05 CO3-69.3 -2 3.722E-09 9.222E-06 Cl- 76.31 -1 8.197E-09 2.031E-05 ClO252 -1 5.586E-09 1.384E-05 ClO364.6 -1 6.939E-09 1.719E-05 ClO467.3 -1 7.229E-09 1.791E-05 CrO4-- 85 -2 4.565E-09 1.131E-05 HCO254.6 -1 5.865E-09 1.453E-05 HCO344.5 -1 4.780E-09 1.184E-05 HS- 65 -1 6.982E-09 1.730E-05 HSO350 -1 5.371E-09 1.331E-05 HSO450 -1 5.371E-09 1.331E-05 I- 76.8 -1 8.249E-09 2.044E-05

430
MnO4MoO4NO2NO3NH2SO3OH- 198 SO3-SO4-S2O3-S2O4-S2O6-S2O8-*/ #endif 61.3 -1 6.585E-09 1.631E-05 74.5 -1 8.002E-09 1.983E-05 71.8 -1 7.712E-09 1.911E-05 71.42 -1 7.672E-09 1.901E-05 48.6 -1 5.220E-09 1.293E-05 -1 2.127E-08 5.270E-05 79.9 -2 4.291E-09 1.063E-05 80 -2 4.297E-09 1.065E-05 85 -2 4.565E-09 1.131E-05 66.5 -2 3.572E-09 8.849E-06 93 -2 4.995E-09 1.238E-05 86 -2 4.619E-09 1.144E-05

431

Appendix C: tchem.h
/********************************************************************* TCHEM.H

Kevin C. Stewart

2/25/94

This module includes all classes that deal with aqueous species. TAllSpecies | TASpecies - [subclasses] AqAluminum - Ferrous - etc. See pages 691-700 of BorlandC++ on how many subclasses can be used simultaneously in place of TASpecies TAllSpecies TASpecies Super Class to hold all species A generic class for aqueous species

TChemistry holds the species name/concentration information for a solution volume

**********************************************************************/ #ifndef __TCHEM_H #define __TCHEM_H #ifndef __STDIO_H #include <stdio.h> #endif #ifndef __CONSTANT_H #include "constant.H" #endif // only needed for debugging #ifndef __STRING_H #include <string.h> #endif #define MAXSPECIESLENGTH 20 typedef char * TSpeciesName; class TChemistry /* class TChemistry

432
last modified 2/25/94 */ { public: AddSpecies(TSpeciesName name, double concentration, int isfixed = 0); int size; SetConcentration(TSpeciesName name, double concentration); double GetConcentration(TSpeciesName name); SetFixed(TSpeciesName name, int isfixed); int GetFixed(TSpeciesName name); CopyChemistry(TChemistry * source); TChemistry(); TChemistry(TChemistry * old); double concentrations[MAXNUMSPECIES]; TSpeciesName names[MAXNUMSPECIES]; int fixed[MAXNUMSPECIES]; private: int count; }; #endif

433

Appendix D: tchem.c
/********************************************************************** TCHEM.CPP 4/8/94 TChemistry is a list of species names, concentrations, and booleans that record if the parameter is changeable. It also contains function to set and read both the value of a parameter and its status.One data structure of this type is associated with each node. Another one is associated with each solution volume. All chemical concentrations are in moles/m^3. 1 m^3 = 1000 liter The type "electrical" is in V vs NHE. This entry was last edited on 3/6/97. ***********************************************************************/ #include "tchem.H" TChemistry::TChemistry() /*********************************************************************** TChemistry(): Constructor for class ***********************************************************************/ {size = 0; // initially no species present } TChemistry::TChemistry(TChemistry * old) /*********************************************************************** TChemistry(): Constructor for class copies another TChemistry ^^^^^^ ***********************************************************************/ {int count; size = old->size; for(count=0;count<size;count++) {concentrations[count] = old->concentrations[count]; names[count] = old->names[count]; fixed[count] = old->fixed[count]; } } TChemistry::AddSpecies(TSpeciesName name, double concentration, int isfixed = 0) /*********************************************************************** AddSpecies(...):

434
Adds a new parameter to the set. Places a new entry in each of the names, concentrations, and fixed arrays. Also increments the size parameter. ***********************************************************************/ { names[size]=name; concentrations[size] = concentration; fixed[size] = isfixed; size++; } TChemistry::SetConcentration(TSpeciesName name, double concentration) /*********************************************************************** Returns OK if item present Returns ITEMNOTINLIST if failed (This function does not add parameters that aren't present because no info about the parameters adjustable status is included.) ***********************************************************************/ {// find right name for(count=0;!(StringsEqual(names[count],name)&&(count<size));count++); if (count < size) {concentrations[count] = concentration; return(OK); } else // name not in this TChemistry {return(ITEMNOTINLIST); } } double TChemistry::GetConcentration(TSpeciesName name) /*********************************************************************** 4/16/94 GetConcentration: Returns: Concentration of a species in solution in mol/m^3 ***********************************************************************/ {// find right name for(count=0;!(StringsEqual(names[count],name)&&(count<size));count++); if (count < size) { return(concentrations[count]); } else // name not in this TChemistry => species not present {return(0); } }

435
TChemistry::SetFixed(TSpeciesName name, int isfixed) /*********************************************************************** Returns OK if item present Returns ITEMNOTINLIST if failed ***********************************************************************/ {// find right name for(count=0;!(StringsEqual(names[count],name)&&(count<size));count++); if (count < size) {fixed[count] = isfixed; return(OK); } else // name not in this TChemistry {return(ITEMNOTINLIST); } } int TChemistry::GetFixed(TSpeciesName name) /*********************************************************************** 4/16/94 GetFixed: Returns: If the parameter is adjustable. ***********************************************************************/ {// find right name for(count=0;!(StringsEqual(names[count],name)&&(count<size));count++); if (count < size) { return(fixed[count]); } else // name not in this TChemistry => species not present {return(0); } } TChemistry::CopyChemistry(TChemistry * source) /*********************************************************************** TChemistry(): Copies another TChemistry NOTE: Don't really have to copy the names and fixed info since this is to be used for copying chem into oldchem ***********************************************************************/ {int count; size = source->size; for(count=0;count<size;count++)

436
{concentrations[count] = source->concentrations[count]; names[count] = source->names[count]; fixed[count] = source->fixed[count]; } }

437

Appendix E: taspecie.h
// TASPECIE.H

#ifndef __TASPECIE_H #define __TASPECIE_H

#ifndef __TCHEM_H #include "tchem.H" #endif #ifndef __STRING_H #include <string.h> #endif #ifndef __CONSTANT_H #include "constant.H" #endif

class TASpecies /*********************************************************************** class TASpecies Last Modified 3/12/97 See Comments in taspecie.C **********************************************************************/ { public: int z; // the charge number of species double dbu; // the mobility of species double u0; // the standard chemical potential of the species virtual double u(double T, double P, TChemistry * chem); // mobility virtual double D(double T, double P, TChemistry * chem); // returns the diffusivity of species, Einstein Eq? virtual double a(double T, double P, TChemistry * chem); // returns the single ion activity coefficient TASpecies(); TASpecies(int speciesz, double speciesu,double speciesu0, TSpeciesName speciesname); // Constructor TSpeciesName name; private: }; class TAlppp: public TASpecies

438
{public: TAlppp(); private: }; // constructor for Al+3

class THp: public TASpecies {public: THp(); // constructor for H+ private: }; class TOHm: public TASpecies {public: TOHm(); // constructor for OHprivate: }; class TKp: public TASpecies {public: TKp(); // constructor for K+ private: }; class TNap: public TASpecies {public: TNap(); // constructor for Na+ private: }; class TClm: public TASpecies {public: TClm(); // constructor for Clprivate: }; class TNipp: public TASpecies {public: TNipp(); // constructor for Ni+2 private: }; class TFepp: public TASpecies {public: TFepp(); // constructor for Ni+2 private: }; class TCrppp: public TASpecies {public: TCrppp(); // constructor for Cr+3 private:

439
};

class TCrO4mm: public TASpecies {public: TCrO4mm(); // constructor for CrO4-2 private: }; class TNO3m: public TASpecies {public: TNO3m(); // constructor for NO3private: }; class TAgp: public TASpecies {public: TAgp(); // constructor for Ag+ private: }; class TCrOHpp: public TASpecies {public: TCrOHpp(); // constructor for CrOH+2 private: }; class TCrOHOHp: public TASpecies {public: TCrOHOHp(); // constructor for Cr(OH)2+ private: }; class TCrOHOHOH: public TASpecies {public: TCrOHOHOH(); // constructor for Cr(OH)2+ private: }; class TCrOHOHOHOHm: public TASpecies {public: TCrOHOHOHOHm(); // constructor for Cr(OH)2+ private: }; class TLip: public TASpecies {public: TLip(); // constructor for Li+ private: }; class TSO4mm: public TASpecies {public:

440
TSO4mm(); private: }; // constructor for SO4--

class TElectrical: public TASpecies {public: TElectrical(); // constructor for electrical private: }; class TTemperature: public TASpecies {public: TTemperature(); // constructor for electrical private: }; class TPressure: public TASpecies {public: TPressure(); // constructor for electrical private: };

#endif

441

Appendix F: taspecie.c
/******************************************************* TASPECIE.C Tested by test.cpp This the parent class for (all?) aqueous species. All Species have the following attributes z u = charge number of species (invariant) = ionic mobility (does this vary w/ T?) (redo as function?) u0 = standard chemical potential (invariant) D = diffusivity (varies with T) a = single species ionic activity UNITS equivalents [mol-m^2]/[J-s] J/mol m^2/s ----

Sources for data on species: "Hydrolysis of Cations" Baes and Mesmer QD501.B162 (not available as of 3/5/94) CRC Handbook Vol 66 esp sections D50 D151 D167 F44

-D100 -D158 -D170 -F45

Code was last edited on on 3/7/97. *********************************************************/ #ifndef __TASPECIE_H #include "taspecie.H" #endif TASpecies::TASpecies() /*********************************************************************** TASpecies(): Constructor for class This function is more for form's sake than anything else. The full constructor needs to be called to do anything useful (and avoid crashes) ***********************************************************************/ {z = 0; dbu = 0; } TASpecies::TASpecies(int speciesz, double speciesu, double speciesu0, TSpeciesName speciesname)

442
/*********************************************************************** TASpecies(): Constructor for class This function is the proper constructor to call to create a species. NOTE: Most species have their own type that derives from this one. ***********************************************************************/ {z = speciesz; // [equivalents] dbu = speciesu; // [mol-m^2]/[J-s] u0 = speciesu0; // [J/mol] name = speciesname; } double TASpecies::u(double T, double P, TChemistry * chem) /*********************************************************************** u: This function calculates mobility based on the thermodynamic state. It is a virtual function and can be redefined. INPUTS: The thermodynamic state Temperature (T) Pressure (P) Composition (chem) RETURNS: mobility in mol m^2 / J-s ***********************************************************************/ {return(dbu); } double TASpecies::D(double T, double P, TChemistry * chem) /*********************************************************************** D: This function returns the Diffusivity of the species. The default method of calculating the diffusivity is to use the NernstEinstein Equation. It is a virtual function and can be redefined. INPUTS: The thermodynamic state Temperature (T) Pressure (P) Composition (chem) RETURNS: diffusivity in m^2 / s NOTE: The Nernst-Einstein Relation is "strictly applicable at infinite dilution." (J. Newman, Electrochemical Systems p 229) ***********************************************************************/ {double diffusivity; diffusivity= R*T*dbu; //Nernst-Einstein Eq return(diffusivity);

443
} double TASpecies::a(double T, double P, TChemistry * chem) /*********************************************************************** a: This function returns the activity of the species. The default method is to use the dilute solution approximation and return the concentration of the species as the activity. It is a virtual function and can be redefined. INPUTS: The thermodynamic state Temperature (T) Pressure (P) Composition (chem) RETURNS: activity in unitless ***********************************************************************/ {double conc; conc = chem->GetConcentration(name); return(conc); } TAlppp::TAlppp() /*********************************************************************** TAlppp(): This is the constructor for the Aluminum +3 ion. ***********************************************************************/ {z = 3; dbu = 2.184e-13; // CRC compare w/%%11%% Siitari u0 = -485343; // CRC name="Al+++"; } THp::THp() /*********************************************************************** THp(): This is the constructor for the Hydrogen +1 ion. ***********************************************************************/ {z = 1; dbu = 3.756e-12; u0 = 0; name="H+"; } TOHm::TOHm() /*********************************************************************** TOHm(): This is the constructor for the Hydroxyl -1 ion. ***********************************************************************/ {z = -1; dbu = 2.127e-12; u0 = 0; name="OH-"; }

444
TKp::TKp() /*********************************************************************** TKp(): This is the constructor for the Potassium +1 ion. ***********************************************************************/ {z = 1; dbu = 7.893e-13; u0 = 0; name="K+"; } TNap::TNap() /*********************************************************************** TNap(): This is the constructor for the Sodium +1 ion. ***********************************************************************/ {z = 1; dbu = 5.379e-13; u0 = 0; name="Na+"; } TClm::TClm() /*********************************************************************** TClm(): This is the constructor for the Chloride -1 ion. ***********************************************************************/ {z = -1; dbu = 8.197e-13; u0 = 0; name="Cl-"; } TNipp::TNipp() /*********************************************************************** TNipp(): This is the constructor for the Nickel +2 ion. ***********************************************************************/ {z = 2; dbu = 2.685e-13; u0 = 0; name="Ni++"; } TFepp::TFepp() /*********************************************************************** TFepp(): This is the constructor for the Nickel +2 ion. ***********************************************************************/ {z = 2; dbu = 2.900e-13; u0 = 0; name="Fe++"; } TCrO4mm::TCrO4mm()

445
/*********************************************************************** TCrO4mm(): This is the constructor for the Chromate -2 ion. ***********************************************************************/ {z = -2; dbu = 4.565e-13; u0 = 0; name="CrO4--"; } TCrppp::TCrppp() /*********************************************************************** TCrppp(): This is the constructor for the Chromium +3 ion. ***********************************************************************/ {z = 3; dbu = 2.399e-13; u0 = 0; name="Cr+++"; } TNO3m::TNO3m() /*********************************************************************** TNO3m(): This is the constructor for the Nitrate -1 ion. ***********************************************************************/ {z = -1; dbu = 7.672e-13; u0 = 0; name="NO3-"; } TAgp::TAgp() /*********************************************************************** TAgp(): This is the constructor for the Silver +1 ion. ***********************************************************************/ {z = 1; dbu = 4.78e-13; u0 = 0; name="Ag+"; } TCrOHpp::TCrOHpp() /*********************************************************************** TCrOHpp(): This is the constructor for the Cr(OH) +2 ion. ***********************************************************************/ { z = 2; dbu = 4.78e-13; u0 = 0; name="CrOH++"; } TCrOHOHp::TCrOHOHp() /***********************************************************************

446
TCrOHOHp(): This is the constructor for the Cr(OH)2 +1 ion. ***********************************************************************/ {z = 1; dbu = 4.78e-13; u0 = 0; name="CrOHOH+"; } TCrOHOHOH::TCrOHOHOH() /*********************************************************************** TCrOHOHOH(): This is the constructor for the Cr(OH)3 solid in saturated solution. Changue u to zero to make immobile; ***********************************************************************/ {z = 0; dbu = 4.78e-13; u0 = 0; name="CrOHOHOH"; } TCrOHOHOHOHm::TCrOHOHOHOHm() /*********************************************************************** TCrOHOHOHOHm(): This is the constructor for the Cr(OH)4 -1 ion. ***********************************************************************/ {z = -1; dbu = 4.78e-13; u0 = 0; name="CrOHOHOHOH-"; } TLip::TLip() /*********************************************************************** TLip(): This is the constructor for the Li +1 ion. ***********************************************************************/ {z = 1; dbu = 4.153e-13; u0 = 0; name="Li+"; } TSO4mm::TSO4mm() /*********************************************************************** TSO4mm(): This is the constructor for the SO4 -2 ion. ***********************************************************************/ {z = -2; dbu = 4.297e-13; u0 = 0; name="SO4--"; } TElectrical::TElectrical() /*********************************************************************** TElectrical(): This is the constructor for the Electrical value addin.

447
***********************************************************************/ {z = 0; dbu = 0; u0 = 0; name = "electrical"; } TTemperature::TTemperature() /*********************************************************************** TElectrical(): This is the constructor for the Temperature value addin. ***********************************************************************/ {z = 0; dbu = 0; u0 = 0; name = "temperature"; } TPressure::TPressure() /*********************************************************************** TElectrical(): This is the constructor for the Pressure value addin. ***********************************************************************/ {z = 0; dbu = 0; u0 = 0; name = "pressure"; }

448

Appendix G: tallspec.h
// TALLSPEC.H #ifndef __TALLSPEC_H #define __TALLSPEC_H #ifndef __TASPECIE_H #include "taspecie.H" #endif #ifndef __MATH_H #include <math.h> #endif #ifndef __STRING_H #include <string.h> #endif

#define

MAXNUMBEROFSPECIES 100

class TAllSpecies /************************************************************************ class TAllSpecies last modified 3/13/97 To Do: Work on EnforceEquilibria ************************************************************************/ { public: TASpecies * allspecies[MAXNUMBEROFSPECIES]; // Properties to look up for individual species int z(TSpeciesName name); //returns charge equivalence double u(TSpeciesName name, double T, double P, TChemistry ionic mobility double D(TSpeciesName name, double T, double P, TChemistry double a(TSpeciesName name, double T, double P, TChemistry

# * chem); //returns * chem); // * chem);

double u0(TSpeciesName name); //returns std. chemical potnential // Properties of collections of species double kappa(double T, double P, TChemistry * chem); double ChargeDensity(TChemistry * chem); double IonicStrength(TChemistry * chem); double pH(TChemistry * chem); EnforceEquilibria(TChemistry * chem); // NOT VALIDATED CrEquilibria(TChemistry * chem);

449
// Properties to create and maintain data structure void AddSpecies(TASpecies * newspecies); void AddSpecies(int speciesz, double speciesu, double speciesu0, TSpeciesName speciesname); void DeleteSpecies(TSpeciesName name); int size; TAllSpecies(); private: TASpecies * FindTASpecies(TSpeciesName name); }; #endif

450

Appendix H: tallspec.c
/*********************************************************************** TALLSPEC.CPP 3/6/94 This object is just a container to hold all of the TASpecies that are in use. It can be queried for a,u,D,z,u0 just like TASpecies. Currently it does not check for the presence of a specie in the set. => Will blow if misused. ***********************************************************************/ #ifndef __TALLSPEC_H #include "tallspec.H" #endif TAllSpecies::TAllSpecies() /*********************************************************************** TASpecies(): Constructor for class ***********************************************************************/ {size = 0; } int TAllSpecies::z(TSpeciesName name) /*********************************************************************** z(): This function finds the z for species name. RETURNS: the charge equivalents of species name DANGER: Do not call a species that does not exist in this data structure. ***********************************************************************/ {if(!((StringsEqual(name,"electrical")) ||(StringsEqual(name,"temperature")) ||(StringsEqual(name,"pressure"))) ) {return(FindTASpecies(name)->z); } else {return(0); } } double TAllSpecies::u(TSpeciesName name, double T, double P, TChemistry * chem) /************************************************************************ u(): This function returns the mobility for species name. RETURNS: the ionic mobility of species name[mol-m^2/J-s] DANGER: Do not call a species that does not exist in this data structure. ************************************************************************/ {if(!((StringsEqual(name,"electrical"))

451
||(StringsEqual(name,"temperature")) ||(StringsEqual(name,"pressure"))) ) {return(FindTASpecies(name)->u(T,P,chem)); } else {return(0); } } double TAllSpecies::D(TSpeciesName name, double T, double P, TChemistry * chem) /************************************************************************ D(): This function returns the diffusivity for species name RETURNS: the ionic Diffusivity of species name [m^2/s] DANGER: Do not call a species that does not exist in this data structure. ************************************************************************/ {if(!((StringsEqual(name,"electrical")) ||(StringsEqual(name,"temperature")) ||(StringsEqual(name,"pressure"))) ) {return(FindTASpecies(name)->D(T,P,chem)); } else {return(0); } } double TAllSpecies::a(TSpeciesName name, double T, double P, TChemistry * chem) /************************************************************************ a(): This function returns the single ion activity of species name RETURNS: the single ion activity [no units] DANGER: Do not call a species that does not exist in this data structure. ************************************************************************/ {if(!((StringsEqual(name,"electrical")) ||(StringsEqual(name,"temperature")) ||(StringsEqual(name,"pressure"))) ) {return(FindTASpecies(name)->a(T,P,chem)); } else {return(0); } } double TAllSpecies::u0(TSpeciesName name) /************************************************************************ u0(): This function returns the standard Gibb's Free energy of formation of species name.

452
RETURNS: the standard Gibbs Free Energy of formation [mol-m^2/J-s] DANGER: Do not call a species that does not exist in this data structure. ************************************************************************/ {if(!((StringsEqual(name,"electrical")) ||(StringsEqual(name,"temperature")) ||(StringsEqual(name,"pressure"))) ) {return(FindTASpecies(name)->u0); } else {return(0); } }

double TAllSpecies::kappa(double T, double P, TChemistry * chem) /************************************************************************ kappa(): This function returns the ionic conductivity of a solution with composition chem. RETURNS: the conductivity of the solution in (Ohm-m)^-1 From Scully A. Echem Notes Vol 1 pg 2 lambda = zi F^2 ui kappa = Sum ( zi^2 F^2 ui Ci) ************************************************************************/ {int count; int z1; double kappa = 0; for(count=0;count<chem->size;count++) {if (!((StringsEqual(chem->names[count],"electrical")) ||(StringsEqual(chem->names[count],"temperature")) ||(StringsEqual(chem->names[count],"pressure"))) ) {z1 = z(chem->names[count]); kappa = kappa + z1*z1*F2*u(chem->names[count],T,P,chem)*chem->concentrations[count]; } } return(kappa); }

void TAllSpecies::AddSpecies(TASpecies * newspecies) /************************************************************************ AddSpecies(): This function is the better of the two for adding species to this container class. (It is better because by adding one of

453
the child classes of TASpecies you don't have to remember the properties each time you create of these types.) ************************************************************************/ {allspecies[size] = newspecies; size++; }

void TAllSpecies::AddSpecies(int speciesz, double speciesu, double speciesu0, TSpeciesName speciesname) /************************************************************************ AddSpecies(): This function is the worse of the two for adding species to this container class. (It is worse because by not adding one of the child classes of TASpecies you have to remember the properties each time you create of these types.) ************************************************************************/ {allspecies[size] = new TASpecies(speciesz,speciesu,speciesu0,speciesname); size++; } void TAllSpecies::DeleteSpecies(TSpeciesName speciesname) /************************************************************************ DeleteSpecies(): This function deletes a species from the type. Immediately, I can't see any reason why you would want to do that. It would speed things up a little, but why you add a species you didn't want to begin with? ************************************************************************/ {int count; // Find the right name for(count=0;!(StringsEqual(speciesname,allspecies[count]->name)&&(count<size));co unt++); // get rid of pointer delete allspecies[count]; size--; //there is one fewer TASpecies for(;count!=size;) // move the rest of the TASp[count]->name[ecies' up {allspecies[count]=allspecies[count+1]; count++; } }

TASpecies *TAllSpecies::FindTASpecies(TSpeciesName name) /************************************************************************ FindTASpecies: This function sorts through the collection of TASpecies objects and returns the one whose name matches "name".

454
DANGER: Will return a pointer to an undefined TASpecies if the name is not present in the list, ie. it will point to whatever garbage is present in memory at the address just after the end of the array. This will give incorrect results to all the steps following. ************************************************************************/ {int count; // Loop thru list, testing equality of target and destination names for(count=0;!(StringsEqual(name,allspecies[count]->name)&&(count<size));count++); return(allspecies[count]); } double TAllSpecies::ChargeDensity(TChemistry * chem) /************************************************************************ ChargeDensity(): This function retuns the charge density of a given solution composition, chem. RETURNS: Charge Density in C/m^3 DANGER: All the species in the chem have to be present in this data structure. ************************************************************************/ {int count; int size,z1; double conc; double cd = 0; TSpeciesName name;

for(count=0;count<chem->size;count++) {name = chem->names[count]; if(!((StringsEqual(chem->names[count],"electrical")) ||(StringsEqual(chem->names[count],"temperature")) ||(StringsEqual(chem->names[count],"pressure"))) ) {z1 = z(name); conc = chem->GetConcentration(name);//chem->names[count]); cd = cd + z1*conc*F; } } return(cd); } double TAllSpecies::IonicStrength(TChemistry * chem) /************************************************************************ IonicStrength(): This function returns the ionic strength of the solution, chem.

455
From Baes&Mesmer p. xx I = Sum(zi^2 [Ci]) / 2 3/13/97 This isn't crashing, and was verified for 1M NaCl, pH=1 ************************************************************************/ {int count; int size,z1; double conc; double I = 0; TSpeciesName name; size = chem->size; // loop thru species for(count=0;count<size;count++) {name = chem->names[count]; if(!((StringsEqual(chem->names[count],"electrical")) ||(StringsEqual(chem->names[count],"temperature")) ||(StringsEqual(chem->names[count],"pressure"))) ) {z1 = z(name); conc = chem->GetConcentration(name); I = I + z1*z1*conc; } } I = I/2000; // have to correct concentrations to molar return(I); } double TAllSpecies::pH(TChemistry * chem) /************************************************************************ pH(): This function calculates the pH of the solution, chem. RETURNS: The negative of the logithm of [H+]. Could be modified to account for [Cl-] etc. Checked 3/13/97 ************************************************************************/ {double dbpH; dbpH = -log10(chem->GetConcentration("H+")/1000); // have to convert to molar return(dbpH); } TAllSpecies::EnforceEquilibria(TChemistry * chem) /************************************************************************ EnforceEquilibria: This function equilibrates the various species of Chromium, Cr+3, CrOH+2, and Cr(OH)2+.

456
ASSUMES that I does NOT change during calculatations Not verified as of 3/13/97 THIS FUNCTION HAS BEEN SUPERSEDED BY CrEqulibria - LEFT AS EXAMPLE OF EARLY EFFORTS ************************************************************************/ {double Hp, Crp3, CrOHp2, CrOHOHp; double dHp, dCrp3, dCrOHp2, dCrOHOHp; double Q11, Q12, r11,r12, I, sqrtI, exp; int sign1, sign2, done; double l1,l2,conc; sign1 = 0; sign2 = 0; done = 0; I = IonicStrength(chem); I = 1; sqrtI = pow(I,0.5); exp = -4.0 - (2.044 * sqrtI) / (1+sqrtI); Q11 = pow(10,exp); exp = -9.7; Q12 = pow(10,exp); Hp = chem->GetConcentration("H+"); dHp=0; Crp3 = chem->GetConcentration("Cr+++"); dCrp3 = 0; CrOHp2 = chem->GetConcentration("CrOH++"); dCrOHp2 = 0; CrOHOHp = chem->GetConcentration("CrOHOH+"); dCrOHOHp = 0; l1 = Crp3 /1000; l2 = l1; while(!done) {r11 = (CrOHp2 + dCrOHp2)*(Hp + dHp)/(Crp3 + dCrp3); if(r11 > Q11) {dCrp3 = dCrp3 + l1; dHp = dHp - l1; dCrOHp2 = dCrOHp2 - l1; if(sign1 > 0) {//l1 = l1 * 1.01; } else {l1 = l1 * .49; } sign1 = 1; } else {dCrp3 = dCrp3 - l1; dHp = dHp + l1; dCrOHp2 = dCrOHp2 + l1; if(sign1 < 0) {//l1 = l1 * 1.95; }

457
else {l1 = l1 * .49; } sign1 = - 1; } r12 = (CrOHOHp + dCrOHOHp)*(Hp + dHp)*(Hp + dHp)/(Crp3 + dCrp3); if(r12 > Q12) {dCrp3 = dCrp3 + l2; dHp = dHp - 2 * l2; dCrOHOHp = dCrOHOHp - l2; if(sign2 > 0) {//l2 = l2 * 1.95; } else {//l2 = l2 * .49; } sign2 = 1; } else {dCrp3 = dCrp3 - l2; dHp = dHp + 2 * l2; dCrOHOHp = dCrOHOHp + l2; if(sign2 < 0) {l2 = l2 * 1.95; } else {l2 = l2 * .49; } sign2 = - 1; } if(((1e6*l1) < (Crp3 + dCrp3)) &&((1e6*l2) < (Crp3 + dCrp3))) {done = 1; } } conc = Hp + dHp; chem->SetConcentration("H+",conc); conc = Crp3 + dCrp3; chem->SetConcentration("Cr+++",conc); conc = CrOHp2 + dCrOHp2; chem->SetConcentration("CrOH++",conc); conc = CrOHOHp + dCrOHOHp; chem->SetConcentration("CrOHOH+",conc); } TAllSpecies::CrEquilibria(TChemistry * chem) /************************************************************************

458
Requirements: Hp,OHm, Crppp,CrOHpp,CrOHOHp,CrOHOHOH, CrOHOHOHOHm must be in chem!

Validated 8/21/97 Conc Cr+3 [mol/m^3] Conc H [mol/m^3] pH =================== ================ == 1000 12.5116 1.90268711e-2 100 3.90393 2.408398 10 1.18348 2.9268391 crc->CrEquilibria(nodes[count]->chem); } ************************************************************************/ {double Q11, Q12, Q13, Q14; double H,OH, Cr0,Cr1,Cr2,Cr3,Cr4; double logH, logOH, logCr0, logCr1, logCr2, logCr3, logCr4; double a,b,c,x; // values for determinign the concentation of H and OH double TotCr, TestH, DerCr, DerH; double lambdaCr, lambdaH; int done = 0; TSpeciesName Crppp; double fit, exp, lambda; Crppp = "Cr+++"; // Grab the concentrations of the relevant species if ((!chem->GetFixed(Crppp)) && (chem->GetConcentration("Cr+++") > 0)) {H = chem->GetConcentration("H+"); OH = chem->GetConcentration("OH-"); Cr0 Cr1 Cr2 Cr3 Cr4 = = = = = chem->GetConcentration("Cr+++"); chem->GetConcentration("CrOH++"); chem->GetConcentration("CrOHOH+"); chem->GetConcentration("CrOHOHOH"); chem->GetConcentration("CrOHOHOHOH-");

// Calculate how much OH would be generated if all Cr-species dehydrolyzed OH = OH + Cr1 + 2*Cr2 + 3*Cr3 + 4*Cr4; // Equilibrate H and OH // want to find x such that (H-x) * (OH-x) = 1e-8 (mol/m^3) a = 1; b = -H - OH; c = H * OH - 1e-8;

459
x = (-b - sqrt(b*b - 4*a*c))/2*a; H = H - x; OH = OH - x;

//Set the total Cr that has to be apportioned among the products TotCr = Cr0 + Cr1 + Cr2 + Cr3 + Cr4; // Set the Formation Q11 = pow(10,-0.8); Q12 = pow(10,-3.7); Q13 = pow(10,-9.0); Q14 = pow(10,-15.4); quotients //Baes + Mesmer //Baes + Mesmer //Baes + Mesmer //Baes + Mesmer

-3.8 -9.7 -18.0 -27.4

(+3 for /m^3) (+6 for /m^3 (+9 for /m^3 (+12 for /m^3

Cr0 = TotCr; //initialize the first guess for Cr=-log( TestH = H; //initialize the first guess for H lambdaCr = 2.3; lambdaH = 2.3;

exp = -4; lambda = 4; while (!done) {TestH = pow(10,exp); Cr1 Cr2 Cr3 Cr4 = = = = Q11 Q12 Q13 Q14 * * * * Cr0 Cr0 Cr0 Cr0 / / / / (TestH); (TestH*TestH); (TestH*TestH*TestH); (TestH*TestH*TestH*TestH);

// Find out how much TOTAL Cr is produced by these conditions DerCr = Cr0 + Cr1 + Cr2 + Cr3 + Cr4; // Correct Cr0 to get the exact amount of Cr+3 required to match TotCr Cr0 = Cr0 * TotCr/DerCr; // Recalculate the Conc's of all hydrolysis products // Could just multiply by TotCr/DerCr - this is clearer to read Cr1 = Q11 * Cr0 / (TestH); Cr2 = Q12 * Cr0 / (TestH*TestH); Cr3 = Q13 * Cr0 / (TestH*TestH*TestH); Cr4 = Q14 * Cr0 / (TestH*TestH*TestH*TestH);

// This finds the total [H] b4 it redistributes with OH DerH = H + Cr1 + 2*Cr2 + 3*Cr3 + 4*Cr4; // Settle the [H] and [OH] conc's for with the formation of H2O

460
a = 1; b = - DerH - OH; c = DerH * OH - 1e-8; x = (-b - sqrt(b*b - 4*a*c))/2*a; DerH = DerH - x;

// If the resulting [H](DerH) > initial [H](TestH) the next TestH should be higher // If less, next TestH should be lower // If the relaticve postion cross over need to reverse the sign and shrink lambda if(DerH > TestH) // started too basic need lambda > 0 {if(lambda < 0) // just crossed over {lambda = -0.49 * lambda; } } else // started too acidic, need lambda < 0 {if(lambda > 0) {lambda = -0.49 * lambda; } } fit = fabs((DerCr-TotCr)/TotCr) + fabs((TestH-DerH)/TestH); printf("%lg %lg %lg %lg %lg %lg %lg \n",Cr0, TotCr, DerCr, TestH, DerH, fit, lambda); if(fabs(lambda) < 1e-6) {done = 1; } else {exp = exp + lambda; } } H = DerH; OH = OH -x; // THis step screws with the pH!!!! //Fix the OH relative to the new H conc //a = 1; // b = -H - OH; //c = H * OH - 1e-8; //x = (-b - sqrt(b*b - 4*a*c))/2*a; //H = H - x; //OH = OH - x; // OH = pow(10,-8) / H;

461
// put the Values back into chem chem->SetConcentration("H+",H); chem->SetConcentration("OH-",OH); chem->SetConcentration("Cr+++",Cr0); chem->SetConcentration("CrOH++",Cr1); chem->SetConcentration("CrOHOH+",Cr2); chem->SetConcentration("CrOHOHOH",Cr3); chem->SetConcentration("CrOHOHOHOH-",Cr4); } }

462

Appendix I: treactio.h
#ifndef __TREACTIO_H #define __TREACTIO_H #ifndef __MATH_H #include <math.h> #endif #ifndef __CONSTANT_H #include "constant.H" #endif #ifndef __TCHEM_H #include "tchem.H" #endif #ifndef __TALLSPEC_H #include "tallspec.H" #endif #define MAXREACTIONLENGTH 40 class TReaction {public: TAllSpecies * environment; char description[MAXREACTIONLENGTH]; double GetCurrentDensity(TChemistry * chemistry, double E, double T, double P); virtual double GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P); virtual double Erev(TChemistry * chemistry, double T, double P); TReaction();//needed for subclasses TReaction(TAllSpecies * allspecies,double a, double c, double k, int numelectrons); double double double int n; double aa; //anodic transfer coefficient ac; //cathodic transfer coefficient i0; //exchange current density // # electrons transferred per reaction k0; //standard rate constant

private: virtual double AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); virtual double CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P);

463
}; class TAlDiss: public TReaction {public: TAlDiss(TAllSpecies * allspecies); // constructor double GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P); private: TSpeciesName Alppp; int vAlppp; double Erev(TChemistry * chemistry, double T, double P); double AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); double CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); }; class THER: public TReaction {public: THER(TAllSpecies * allspecies); // constructor THER(TAllSpecies * allspecies,double a, double c, double i); double GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P); double Erev(TChemistry * chemistry, double T, double P); private: double AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); double CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); TSpeciesName Hp; int vHp; }; class T304A: public TReaction {public: T304A(TAllSpecies * allspecies); // constructor private: TSpeciesName Fepp; TSpeciesName Crppp; int vFepp, vCrppp; double AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); double CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); };

464
class TSAF2205Diss: public TReaction {public: TSAF2205Diss(TAllSpecies * allspecies); private: double AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); double CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); }; class T304_1An: public TReaction {public: T304_1An(TAllSpecies * allspecies); double GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P); private: double dbEtaA; double dbEtaC; double dbIcorr; double dbEcorr; double dbAvgz; TSpeciesName Hp; double dbfFe; TSpeciesName double dbfCr; TSpeciesName double dbfNi; TSpeciesName double dbfMn; TSpeciesName

Fepp; Crppp; Nipp; Mnpppp;

double AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); double CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); }; class T304_1Ca: public TReaction {public: T304_1Ca(TAllSpecies * allspecies); double GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P); private: double dbEtaA; double dbEtaC; double dbIcorr; double dbEcorr; double dbAvgz; TSpeciesName OHm;

465
double AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); double CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P); };

#endif

466

Appendix J: treactio.c
/*********************************************************************** 4/13/94 This module defines the base class TReaction. A reaction is just the production (or consumption) of species. Multiple reactions can be combined to create a polarization curve. This is necessary because the net current cannot be related to the flux of species across an interface at low overpotentials. The theory in this section is based on J. Newman, Electrochemical Systems J.R. Scully , MSE 771 Advanced E-Chem Class Notes G.E. Stoner, MSE 662? E-Chem Class Notes Conventions: All current densities given in [A/m^2-s] (+) current is anodic (hole current flowing from electrode to solution) (-) current is cathodic(hole current flowing from solution to electrode) (+) chemical flux is species generation (-) chemical flux is species consumption Definitions: eta = overpotential E = electrode potential Erev = reversible potential E0 = Equilibrium potential R = Universal Gas Constant, definied in "constants.h" T = temperature a(X) = activity of X u0(X) = standard chemical potential of X n = number of electrons transferred in reaction deltaG = change in Gibbs Free Energy when all reactants and products have unit activity. i0 = exchange current density aa ac N(X) v(X) = = = = anodic transfer coefficient cathodic transfer coefficient chemical flux of species X stoichiometric coefficient of species X

Relations: Thermodynamics:

467
For the reaction defined below: aA + bB <=> cC + dD + nea(C)a(D) Erev = E0 + RT ln -------a(A)a(B) where E is defined by the relation: nFE0 = deltaG (Scully defines deltaG reversed )

(Nernst Equation)

=> E0 = u0(C)+u0(D)-u0(A)-u0(B) ----------------------nF Kinetics: Overpotential is defined by: eta = E - Erev The net current is governed by the Butler-Volmer Relation: | aa F ac F | inet = i0|exp [---- eta] - exp [- ---- eta] | | RT RT | Anodic (+) current is given by: | aa F | i0|exp [---- eta] | | RT | (Newman's Surface overpotential section 8

ian =

Cathodic (-) current is given by: | ac F | ica = -i0|exp [- ---- eta] | | RT |

Chemical Fluxes: inet ---- v(X) nF [A/m^2] --------------[eq/mol]-[C/eq]

N(X) =

For anodic species: (current > 0) => N > 0 (current < 0) => N < 0

468
For cathodic species: (current > 0) => N < 0 (current < 0) => N > 0

Comments:

Right now u0's of species are used to calculate E0 => if speed issue, can multiply by hand,enter into code, save calculations Issue of cathodic/anodic produce/consume can set v(X) (-) for reduced species => hides what is really happening (bad) => only have to get it straight in one place rest of code identical for both cathodic and anodic species (good) can flip in code => oppposites of above (good), (bad)

Stupid Sign convention used by corrosion people: Corrosion people use wrong sign convention for current electron flow - not hole flow Also take current as surface to p-stat Anodic current (+) metal ions flow from surface to solution, e-'s from from surface to pstat. In corrosion this is (+) current Cathodic current (+) metal ions go solution to surface, e-'s go p-stat to surface this is (-) current

This program will use KCS sign convention: Hole flow Anodic current (+) but taken as flow from p-stat to surface Cathodic current (-) but taken as hole flow from pstat to surface

Other Conventions

469
Fluxes in m^-2 Concentrations in m^-3

8/23/96 Bard and Faulkner p. 96 i = nFAk0 [Co(0,t) exp(-alpha*nf*exp(E-E0)) - Cr(0,t) exp((1-alpha)nf(E-E0)) where f = F/RT ac should be negative, aa positive NOTE: REALLY SHOULD HAVE TO DEFINE ANODIC AND CATHODIC CURRENT DENSITY FUNCTIONS ***********************************************************************/ #ifndef __TREACTIO_H #include "treactio.H" #endif TReaction::TReaction() /*********************************************************************** TReaction() : Minimal constructor. This function is useless as is, but a default constructor must be supplied to allow the creation of child types like TAlppp, etc. It has been reduced to a stub to possibly speed things up. ***********************************************************************/ { } TReaction::TReaction(TAllSpecies * allspecies, double a, double c, double k, int numelectrons) /*********************************************************************** TReaction(): Constructor for current only. This function will create a reaction that generates current but no chemical species. ***********************************************************************/ {environment = allspecies; aa = a; ac = c; k0 = k; n = numelectrons; } double TReaction::GetCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** GetCurrentDensity(): This function calls the private member functions AnodicCurrentDensity and CathodicCurrentDensity

470
those functions can be redefined for inheritance. Returns the current density in A/m^2 | aa F ac F | inet = i0|exp [---- eta] - exp [- ---- eta] | | RT RT | ***********************************************************************/ {double inet; // net current inet = AnodicCurrentDensity(chemistry,E,T,P); inet = inet + CathodicCurrentDensity(chemistry,E,T,P); return(inet); } double TReaction::GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P) /********************************************************************* GetFluxOfSpecies() : This function returns the flux of species name. It is a virtual function and can be redefined. RETURNS: The chemical flux in mol/(m^2-s) inet [A/m^2] ---- v(X) --------------nF [eq/mol]-[C/eq] ***********************************************************************/ {return(0); } N(X) = double TReaction::Erev(TChemistry * chemistry, double T, double P) /*********************************************************************** Erev(): This function calculates the reversible potential for the reaction. It depends on the reactions and the concentrations of the reactants and products. It is a virtual function so that it can be redefined by child functions. For the reaction defined below: aA + bB <=> cC + dD + neRT a(C)a(D) Erev = E0 + -- ln -------nF a(A)a(B) where:

(Nernst Equation)

E0 = u0(C)+u0(D)-u0(A)-u0(B) ----------------------nF ***********************************************************************/

471
{return(0); }

double TReaction::AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** AnodicCurrentDensity: This function calculates the anodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {return(0); } double TReaction::CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** CathodicCurrentDensity: This function calculates the cathodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {return(0); } TAlDiss::TAlDiss(TAllSpecies * allspecies) /*********************************************************************** TAlDiss(): This is the constructor for Aluminum dissolution. It is an example of the redefining process, and does not represent any particular physical case. ***********************************************************************/ { environment = allspecies; n = 3; aa = .5; //anodic transfer coefficient ac = .5; //cathodic transfer coefficient // This used to be used to calculate current, it still could be // instead of k0,C // i0 = 1e-5; //exchange current density A/m^2 strcpy(description,"Al <=> Al+++ + 3e-"); Alppp ="Al+++"; vAlppp = 1; } double TAlDiss::GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P) /*********************************************************************** GetFluxOfSpecies() : This function returns the flux of species name. It is a virtual function and can be redefined.

472
RETURNS: The chemical flux in mol/(m^2-s) inet [A/m^2] ---- v(X) --------------nF [eq/mol]-[C/eq] ***********************************************************************/ {double flux; N(X) = if(StringsEqual(name,Alppp)) {flux = GetCurrentDensity(chemistry,E,T,P)*vAlppp /(n*F); } else {flux = 0; } return(flux); } double TAlDiss::Erev(TChemistry * chemistry, double T, double P) /*********************************************************************** Erev(): This function calculates the reversible potential for the reaction. It depends on the reactions and the concentrations of the reactants and products. It is a virtual function so that it can be redefined by child functions. For the reaction defined below: aA + bB <=> cC + dD + neRT a(C)a(D) Erev = E0 + -- ln -------nF a(A)a(B) where:

(Nernst Equation)

E0 = u0(C)+u0(D)-u0(A)-u0(B) ----------------------nF

The reaction here is: Al <=> Al+++ + 3e***********************************************************************/ {double E0; double Erev; E0 = (environment->u0(Alppp))/(n*F); Erev = E0 + R*T*log(environment->a(Alppp,T,P,chemistry))/(n*F); // log==ln, log10==log in C++ return(Erev); }

473
double TAlDiss::AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** AnodicCurrentDensity: This function calculates the anodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {double inet; inet = 0; return(inet); } double TAlDiss::CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** CathodicCurrentDensity: This function calculates the cathodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {double inet; // net current inet = 0; return(inet); }

THER::THER(TAllSpecies * allspecies) /*********************************************************************** THER: This function is the constructor for the THER class. ***********************************************************************/ {environment = allspecies; n = 2; aa = .5; //anodic transfer coefficient ac = .5; //cathodic transfer coefficient // i0 = 1e-5; //exchange current density A/m^2 k0 = 1e-10; strcpy(description,"H2 <=> 2 H+ + 2e-"); Hp ="H+"; vHp = 2; }

double THER::GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P) /*********************************************************************** GetFluxOfSpecies() : This function returns the flux of species name. It is a virtual function and can be redefined. RETURNS: The chemical flux in mol/(m^2-s) inet [A/m^2]

474
---- v(X) --------------nF [eq/mol]-[C/eq] ***********************************************************************/ {double flux; if(StringsEqual(name,Hp)) {flux = GetCurrentDensity(chemistry,E,T,P)*vHp /(n*F); } else {flux = 0; } return(flux); } double THER::Erev(TChemistry * chemistry, double T, double P) /*********************************************************************** Erev(): This function calculates the reversible potential for the reaction. It depends on the reactions and the concentrations of the reactants and products. It is a virtual function so that it can be redefined by child functions. For the reaction defined below: aA + bB <=> cC + dD + neRT a(C)a(D) Erev = E0 + -- ln -------nF a(A)a(B) where: N(X) =

(Nernst Equation)

E0 = u0(C)+u0(D)-u0(A)-u0(B) ----------------------nF

The reaction here is: Al <=> Al+++ + 3e***********************************************************************/ {double E0; double Erev; E0 = (environment->u0(Hp))/(n*F); Erev = E0 + R*T*log(environment->a(Hp,T,P,chemistry))/(n*F); // log==ln, log10==log in C++ return(Erev); } double THER::AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** AnodicCurrentDensity: This function calculates the anodic current

475
density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {double eta; // surface overpotential double inet; // net current double C0; C0 = 1; // This is concentration of the reacting species eta = E - Erev(chemistry,T,P); inet = -n*F*k0*C0 * exp(-(ac*F*eta)/(R*T)); return(inet); } double THER::CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** CathodicCurrentDensity: This function calculates the cathodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {double eta; // surface overpotential double inet; // net current double C0; C0 = 1; // This is concentration of the reacting species eta = E - Erev(chemistry,T,P); inet = -n*F*k0*C0 * exp(-(ac*F*eta)/(R*T)); return(inet); }

T304A::T304A(TAllSpecies * allspecies) /*********************************************************************** ***********************************************************************/ {environment = allspecies; //grabs the characteristics of chemical species for use by this reaction strcpy(description,"304 <=> Fe++ + Cr+++ + 5e-"); Fepp = "Fe++"; Crppp = "Cr+++"; vFepp = 2; vCrppp = 3; }

double T304A::AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P)

476
/*********************************************************************** Below -.4 V SCE - Tafel Behavior -.4 V - .4 V polynomial Above .4 V constant AnodicCurrentDensity: This function calculates the anodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. **********************************************************************/ {double iAn; double dbCl; double m, b; double a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,exp; dbCl = chemistry->GetConcentration("Cl-"); if(dbCl > 500) {a0 = -0.371175; a1 = 4.87385; a2 = 24.6553; a3 = 8.50292; a4 = -469.768; a5 = -188.606; a6 = 4270.06; a7 = -773.606; a8 = -20599.1; a9 = 11104.2; a10 = 49894.1; m = 2.600712; b = -0.38825; if (E < -0.4) {exp = m * E + b; } else {if (E < 0.4) {exp = a0 + a1*E + a2*pow(E,2) + a3*pow(E,3) + a4*pow(E,4) + a5*pow(E,5) + a6*pow(E,6) + a7*pow(E,7) + a8*pow(E,8) + a9*pow(E,9) + a10*pow(E,10); } else {exp = 3; } } iAn = pow(10,exp); } else {m = 0.674602; b = -1.6462;

477
exp = m * E + b; iAn = pow(10,exp); } return(iAn); } double T304A::CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** CathodicCurrentDensity: This function calculates the cathodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {double iCa; double a0,a1,a2,a3,a4,exp; a0 a1 a2 a3 a4 = = = = = -23.1206;//-4.40961;//-8.40961; -84.8619;//-5.97816; -119.219;//9.89802; -73.8527;//22.809; -16.4973;//10.872;

if(E < -0.3) {exp = a0 + a1*E + a2*pow(E,2) + a3*pow(E,3) + a4*pow(E,4); iCa = -pow(10,exp); } else {iCa = 0; } return(iCa); }

TSAF2205Diss::TSAF2205Diss(TAllSpecies * allspecies) /********************************************************************** TSAF2205Diss: This function is the constructor for this class **********************************************************************/ {environment = allspecies; } double TSAF2205Diss::AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /********************************************************************** AnodicCurrentDensity: This function calculates the anodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. **********************************************************************/ {double net,J1,h,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,exp; // Walton Numbers /* a0 = .34608;

478
a1 = 0.753641; a2 = -1.20439; a3 = 37.838; a4 = -69.4211; a5 = -137.304; a6 = 275.231; a7 = 96.0202; a8 = -428.904; a9 = 284.36; a10 = -59.7865; /* a0 = -2.09854; //Converting to A/m^2 a1 = -.548883; a2 = 11.2756; a3 = -73.2338; a4 = 277.566; a5 = 51.7637; a6 = -4039.31; a7 = 12573.9; a8 = -16900.4; a9 = 10690.5; a10 = -2586.61;

*/ a0 = -2.10089; a1 = -0.161199; a2 = 3.44601; a3 = -37.4825; a4 = 368.071; a5 = -856.978; a6 = -2520.55; a7 = 13958.4; a8 = -23346; a9 = 17202.7; a10 = -4766.35; if(E > -.6) //-.55 for walton {exp = a0 + a1*E + a2*pow(E,2) + a3*pow(E,3) + a4*pow(E,4) + a5*pow(E,5) + a6*pow(E,6) + a7*pow(E,7) + a8*pow(E,8) + a9*pow(E,9) + a10*pow(E,10); exp = exp -3.875 ; J1 = -pow(10,exp); exp = -6 + (-.3 - E)/.06; J1 = J1 + pow(10,exp); } else { J1 = 0; } net = J1; return(net);

479
} double TSAF2205Diss::CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** CathodicCurrentDensity: This function calculates the cathodic current density of the reaction. It uses the Bard and Faulkner type approach described in the header to this file. ***********************************************************************/ {double net; net = 0; return(net); } T304_1An::T304_1An(TAllSpecies * allspecies) /********************************************************************** T304_1An: This function is the constructor for this class This class represents reaction 1, from CSB thesis FIg 4.40(a). It is for 304 in 1M Cl, 0, mM S The "reversible potential" here is wrong, it is the corrosion potential from the polarization curve

**********************************************************************/ {environment = allspecies; dbEtaA = 0.362304; dbEtaC = 0.148233; dbIcorr = 9.52e-3; dbEcorr = -0.21; dbAvgz = 2.216; Hp = "H+"; dbfFe dbfCr dbfNi dbfMn dbfFe dbfCr } = = = = = = 0.704; 0.196; 0.087; 0.013; 0.782; 0.218; Fepp Crppp Nipp Mnpppp = = = = "Fe++"; "Cr+++"; "Nipp"; "Mn++++"; // // // // Anodic Tafel slope Cathodic Tafel slope Corrosion current Corrosion potential

double T304_1An::GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P) /*********************************************************************** ***********************************************************************/ {double dbElFlux, dbChemFlux; if(StringsEqual(name,Fepp))

480
{dbElFlux = AnodicCurrentDensity(chemistry,E,T,P); dbChemFlux = dbfFe * dbElFlux / (dbAvgz * F); } else {if(StringsEqual(name,Crppp)) {dbElFlux = AnodicCurrentDensity(chemistry,E,T,P); dbChemFlux = dbfCr * dbElFlux / (dbAvgz * F); } else {if(StringsEqual(name,Nipp)) {dbElFlux = AnodicCurrentDensity(chemistry,E,T,P); dbChemFlux = dbfNi * dbElFlux / (dbAvgz * F); } else {if(StringsEqual(name,Mnpppp)) {dbElFlux = AnodicCurrentDensity(chemistry,E,T,P); dbChemFlux = dbfMn * dbElFlux / (dbAvgz * F); } else {dbChemFlux = 0; } } } } return(dbChemFlux); } double T304_1An::AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** AnodicCurrentDensity: This function calculates the anodic current density of the reaction. ***********************************************************************/ {double eta; // surface overpotential double ia; // current

eta = E - dbEcorr; ia = dbIcorr * pow(10, eta/dbEtaA); return(ia); } double T304_1An::CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** CathodicCurrentDensity: This function calculates the anodic current density of the reaction. ***********************************************************************/

481
{double eta; // surface overpotential double ic; // current eta = dbEcorr-E; ic = -dbIcorr * pow(10, eta/dbEtaC); ic = 0; return(ic); }

T304_1Ca::T304_1Ca(TAllSpecies * allspecies) /********************************************************************** T304_1Ca: This function is the constructor for this class This class represents reaction 1, from CSB thesis FIg 4.40(a). It is for 304 in 1M Cl, 0, mM S The "reversible potential" here is wrong, it is the corrosion potential from the polarization curve

**********************************************************************/ {environment = allspecies; dbEtaA = 0.362304; dbEtaC = 0.148233; dbIcorr = 9.52e-3; dbEcorr = -0.21; dbAvgz = 2.216; OHm = "OH-"; } double T304_1Ca::GetFluxOfSpecies(TSpeciesName name, TChemistry * chemistry, double E, double T, double P) /*********************************************************************** ***********************************************************************/ {double dbElFlux, dbChemFlux; if(StringsEqual(name,OHm)) {dbElFlux = CathodicCurrentDensity(chemistry,E,T,P); dbChemFlux = -dbElFlux / F; printf("flux of OH = %lg at E = %lg \n",dbChemFlux, E); } return(dbChemFlux); } double T304_1Ca::AnodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** AnodicCurrentDensity: This function calculates the anodic current density of the reaction. // // // // Anodic Tafel slope Cathodic Tafel slope Corrosion current Corrosion potential

482
***********************************************************************/ {double eta; // surface overpotential double ia; // current

eta = E - dbEcorr; ia = dbIcorr * pow(10, eta/dbEtaA); ia = 0; return(ia); } double T304_1Ca::CathodicCurrentDensity(TChemistry * chemistry, double E, double T, double P) /*********************************************************************** CathodicCurrentDensity: This function calculates the anodic current density of the reaction. ***********************************************************************/ {double eta; // surface overpotential double ic; // current eta = dbEcorr-E; ic = -dbIcorr * pow(10, eta/dbEtaC); return(ic); }

483

Appendix K: tmateria.h
/********************************************************************** TMATERIA.H 2/26/94

{ This should contain and isolate all Material dependent info } Properties {Polarization Curves: fn (ph, [Me++], temperture) they will have to be some sort of compressed representation Line segements, Fitted polynomial Functions GetProductionRate(species, potential (NHE), [concentrations], temp) Rate/area This function will contain the logic about how to interpolate into unmeasured conditions --> data can be refined here **********************************************************************/ #ifndef __TMATERIA_H #define __TMATERIA_H #ifndef __TCHEM_H #include "tchem.H" #endif

#ifndef __TALLSPEC_H #include "tallspec.H" #endif #ifndef __TREACTIO_H #include "treactio.H" #endif #ifndef __MATH_H #include <math.h> #endif class TMaterial /* class TMaterial last modified 2/26/94

484
*/ { public: TAllSpecies * crc; char name[20]; // Returns flux in (moles of name) / m^2 virtual double GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P); virtual double GetChemicalFlux(TSpeciesName name, TChemistry *chemistry, double E, double T, double P); double GetOpenCircuit(TChemistry *chemistry,double T, double P); TMaterial(); //needed for subclasses TMaterial(TAllSpecies* allspecies); private: };

class TFooMaterial:public TMaterial {public: TFooMaterial(TAllSpecies* allspecies); double GetChemicalFlux(TSpeciesName name, TChemistry *chemistry, double E, double T, double P); double GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P); private: TSpeciesName fooname; TReaction * HER; TReaction * AlDiss; }; class TAg:public TMaterial {public: TAg(TAllSpecies* allspecies); double GetChemicalFlux(TSpeciesName name, TChemistry *chemistry, double E, double T, double P); double GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P); private: TSpeciesName Agp; };

class TSAF2205:public TMaterial

485
{public: TSAF2205(TAllSpecies* allspecies); double GetChemicalFlux(TSpeciesName name, TChemistry *chemistry, double E, double T, double P); double GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P); private: TSpeciesName Nipp; TSpeciesName Crppp; TReaction * HER; TReaction * SAF2205; }; class T304Mat:public TMaterial {public: T304Mat(TAllSpecies* allspecies); double GetChemicalFlux(TSpeciesName name, TChemistry *chemistry, double E, double T, double P); double GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P); private: TSpeciesName Fepp; TSpeciesName Crppp; TReaction * cathodic; TReaction * anodic; }; #endif

486

Appendix L: tmateria.c
/********************************************************************** TMATERIA.CPP 3/1/94 CONVENTIONS Return rates as (moles of name) /(s- m^2) All potentials should be vs NHE

GENERAL This should be the parent class for many classes, one per material. => KCS needs to learn about virtual functions, abstract classes This and TASpecies are the most object-oriented classes in crevice. (See TASpecies for more comments A material will generate species fluxes based on: => solution chemistry (esp. ph and [Cl-]) => potential => temperature THESE INDIVIDUAL REPRESENTATIONS ARE STORED IN TREACTIONS There is probably a nearly infinite number of ways to represent material data => (variable) number of line segments => polynomial => series of splines ^^^ all of the above mixed and matched for different chemistries ^^^ many ways to interpolate amongst chemistries ^^^ temperatures => read, write are sort of nonsensical => hardwire information into each Object Measured polarization curves are the sum of an anodic one and a cathodic one. 0 NET current does not translate to 0 generation of species => break experimental data into 2 curves ===> IDEA <=== Do polarization curves scale vs NHE based on metal ion concentration i.e. same shape just displaced because of changing reversible potentials? {%% 45,46%% Hebert and Alkire %%25%% Alkire, Tomasson, Hebert

487
==> [Al+++] responsible for CCS}

if so GetReversiblePotential would make sense ==> There may be a need for a TReaction object class TReaction char symbolicform[40] TSpeciesName reactant1, (reactant2), product1, (product2) (or anodicspecies and cathodic species) double i0 double Erev

4/25/94 Eventually include density of material => weight loss => penetration rate

4/27/94 Want to find opencircuit potential Want to find (overpotential) potential given current (polarization) Include Diffusional effects? **********************************************************************/ #ifndef __TMATERIA_H #include "tmateria.H" #endif TMaterial::TMaterial() /********************************************************************** TMaterial(): Default constructor for class, Needed to allow subclasses. **********************************************************************/ {crc = NULL; } TMaterial::TMaterial(TAllSpecies * allspecies) /********************************************************************** TMaterial(): This is the useful constructor for objects of this type. The information in TAllspecies(z,D,u, etc) is needed to make all other calculations. **********************************************************************/ {crc = allspecies; // somehow have to know z for species } double TMaterial::GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P) /**********************************************************************

488
3/1/94 GetNetCurrentDensity : Returns the total electrical flux [A/m^2] for the material in solution "chemistry" at "potential". CONVENTIONS: Currents > 0 are ANODIC Currents < 0 are CATHODIC This is a virtual function, therefore it can be redefined by **********************************************************************/ {double net = 0; net = 0; // 1e-6 * (pow(10,E-.157) - pow(10,.157-E)); return(net); }

double TMaterial::GetChemicalFlux(TSpeciesName name,TChemistry *chemistry, double E, double T, double P) /********************************************************************** 3/1/94 GetChemicalFlux : Returns the chemical flux [mol/(m^2-s)] of species "name"for the material in solution "chemistry" at "potential". CONVENTIONS: Fluxes > 0 produce species Fluxes < 0 consume species

QUESTIONS/THOUGHTS Is there a better way to do this? Anodic, Cathodic Current TReaction Object needed? **********************************************************************/ {double flux; if (StringsEqual(name,"Ni++")) {flux = 1e-9; } else {flux = 0; } return(flux); } double TMaterial::GetOpenCircuit(TChemistry *chemistry, double T, double P) /********************************************************************** 3/20/97

489
GetOpenCircuit : This function returns the Open Circuit potential in V(SHE) for the material in a solution with composition "chemistry". It does this by iteratively searching for a potential with no net current. Multiple opencircuit potentials will not be found. ??? Do I want to be able to pass a starting potential for the search ???? POTENTIAL PROBLEMS: This routine assumes that the curves for anodic and cathodic currents are continuous (that they intersect) **********************************************************************/ { double oc; // trial open circuit potential double inet; // net current at oc (try to make 0) double newinet; // new net current double delta; // step size for creating new guesses double threshold; // effective size of zero oc = 0; delta = .5; // starting point, could optimize or pass // initial stepsize, could optimize

inet = GetNetCurrentDensity(chemistry,oc,T,P); // iff oc is the actual open circuit, net current = 0 // threshold defines how close to "0" is close enough threshold = 1e-12; while(fabs(inet) > threshold) //this is the exit condition {if(inet > 0) // if net anodic current => try lower potential {oc = oc - delta; } else // if net cathodic current => try higher potential {oc = oc + delta; } newinet = GetNetCurrentDensity(chemistry,oc,T,P); // if oc is between the old and new potentials => decrease the step size if ((inet*newinet) <0) // was there a sign change (cross true oc) {delta = delta/2; } // could increase step size inet = newinet; } return(oc); };

TFooMaterial::TFooMaterial(TAllSpecies * allspecies)

490
/********************************************************************** TFooMaterial(): Constructor for class FooMaterial is my test material Currently it is MJ Psaila-Dombrowski's material in Section 3.4.1 **********************************************************************/ {crc = allspecies; fooname = "Foo"; HER = new THER(crc); AlDiss = new TAlDiss(crc); } double TFooMaterial::GetChemicalFlux(TSpeciesName name, TChemistry *chemistry, double E, double T, double P) /********************************************************************** See TMaterial function of same name. **********************************************************************/ {double flux; if (StringsEqual(name,"Al+++")) {flux = 2.073e-3; } else {flux = 0; } return(flux); }; double TFooMaterial::GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P) /********************************************************************** See TMaterial function of same name. **********************************************************************/ {double net; net = 0; return(net); } TAg::TAg(TAllSpecies * allspecies) /********************************************************************** TAg(): Constructor for class Silver, as used by Fu and Chan[38] and Evitts [96] **********************************************************************/ {crc = allspecies; Agp = "Ag+"; }

491
double TAg::GetChemicalFlux(TSpeciesName name, TChemistry *chemistry, double E, double T, double P) /********************************************************************** See TMaterial function of same name. **********************************************************************/ {double flux; if (StringsEqual(name,Agp)) {flux = 3.299e-3; //318 A/m^2 / zF } else {flux = 0; } return(flux); }; double TAg::GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P) /********************************************************************** See TMaterial function of same name. **********************************************************************/ {double net; net = 318.31; return(net); } TSAF2205::TSAF2205(TAllSpecies * allspecies) /********************************************************************** TSAF2205(): Constructor for class SAF2205 is my test material Loosely based on SAF2205 in ph = -.5 p90 of Par Olav Gartland's report %%63%% **********************************************************************/ {crc = allspecies; Nipp = "Ni++"; Crppp = "Cr+++"; SAF2205 = new TSAF2205Diss(crc); } double TSAF2205::GetChemicalFlux(TSpeciesName name,TChemistry *chemistry, double E, double T, double P) /********************************************************************** 3/1/94 GetChemicalFlux : Returns the chemical flux [mol/(m^2-s)] of species "name"for the SAF2205 in solution "chemistry" at "potential". CONVENTIONS:

492
Fluxes >0 produce species Fluxes <0 consume species **********************************************************************/ {double flux; flux = SAF2205->GetFluxOfSpecies(name,chemistry,E,T,P); return(flux); } double TSAF2205::GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P) /********************************************************************** 3/1/94 GetNetCurrentDensity : Returns the total electrical flux [A/m^2] for the material in solution "chemistry" at "potential". CONVENTIONS: Currents > 0 are ANODIC Currents < 0 are CATHODIC **********************************************************************/ {double net; net = SAF2205->GetCurrentDensity(chemistry,E,T,P); return(net); } T304Mat::T304Mat(TAllSpecies * allspecies) /********************************************************************** T304Mat(): Constructor for class SAF2205 is my test material Loosely based on SAF2205 in ph = -.5 p90 of Par Olav Gartland's report %%63%% **********************************************************************/ {crc = allspecies; Fepp = "Fe++"; Crppp = "Cr+++"; anodic = new T304_1An(crc); cathodic = new T304_1Ca(crc); } double T304Mat::GetChemicalFlux(TSpeciesName name,TChemistry *chemistry, double E, double T, double P) /********************************************************************** 3/1/94 GetChemicalFlux : Returns the chemical flux [mol/(m^2-s)]

493
of species "name"for the SAF2205 in solution "chemistry" at "potential". CONVENTIONS: Fluxes >0 produce species Fluxes <0 consume species **********************************************************************/ {double flux; flux = anodic->GetFluxOfSpecies(name,chemistry,E,T,P) + cathodic->GetFluxOfSpecies(name,chemistry,E,T,P); return(flux); } double T304Mat::GetNetCurrentDensity(TChemistry *chemistry, double E, double T, double P) /********************************************************************** 3/1/94 GetNetCurrentDensity : Returns the total electrical flux [A/m^2] for the material in solution "chemistry" at "potential". CONVENTIONS: Currents > 0 are ANODIC Currents < 0 are CATHODIC **********************************************************************/ {double net; net = anodic->GetCurrentDensity(chemistry,E,T,P) + cathodic->GetCurrentDensity(chemistry,E,T,P);

return(net); }

494

Appendix M: fem.h
/*************************************************************************** FEM.H Programmed by: Kevin Stewart Date Last Modified: 9/20/95 Summary: This is the header file for FEM.C. Please see that program for more documentation. ***************************************************************************/

#ifndef __FEM_H #define __FEM_H #ifndef __STDIO_H #include <stdio.h> #endif #ifndef __STRING_H #include <string.h> #endif #ifndef __MATH_H #include <math.h> #endif #ifndef __TCHEM_H #include "tchem.H" #endif #ifndef __TASPECIE_H #include "taspecie.H" #endif #ifndef __TALLSPEC_H #include "tallspec.H" #endif #ifndef __TMATERIA_H #include "tmateria.H" #endif //For Future consider moving temp and pressure to nodes from elements struct NodeInfo {int iNodeId; long double dbX, dbY, dbZ; // x, y and z coords of point int iUsed; int iFixed; TChemistry * chem;

495
TChemistry * oldchem; }; class TSolutionVolume /* */ {public: // variables NodeInfo *i,*j,*k; TSpeciesName currentspecies; TChemistry * avgchem; TMaterial TMaterial TMaterial TMaterial * * * * mat; ijmat; ikmat; jkmat;

double Kt,Kx,Ky,Kxy,Lij,Lik,Ljk,Mx,My,P; // variables for the differential eq double theta; double alphaij,alphaik,alphajk,betaij,betaik,betajk; double double double double bi,bj,bk,ci,cj,ck; A,h; T, Pr; dX, dY; // intermediate calculations // Area, height // temp and pressure

TAllSpecies * crc; //functions TSolutionVolume(); //constructor

TSolutionVolume(NodeInfo *nodei, NodeInfo *nodej, NodeInfo *nodek, double height, TMaterial * material, TMaterial * ij, TMaterial * ik, TMaterial * jk, TAllSpecies * allspecies); int SetConstants(TSpeciesName name, double kt, double th);

void SetChemistry(); double double double double double Q(); dEdX(); dEdY(); dCdX(); dCdY();

double dDdX();

496
double dDdY(); double Jx(); double Jy(); double double double double double double Jijx(); Jijy(); Jikx(); Jiky(); Jjkx(); Jjky();

double I(); double J(); double K(); double double double double double double double double double bii(); bij(); bik(); bji(); bjj(); bjk(); bki(); bkj(); bkk();

double double double double double double double double double

Bii(double Bij(double Bik(double Bji(double Bjj(double Bjk(double Bki(double Bkj(double Bkk(double

delt); delt); delt); delt); delt); delt); delt); delt); delt);

double Ci(double delt); double Cj(double delt); double Ck(double delt); }; #endif

497

Appendix N: fem.c
/*************************************************************************** FEM.C Programmed by: Kevin Stewart Date Last Modified: 9/20/95 Summary: This program is an object-oriented implementation of two-dimensional finite elements with weighted explicit/implicit time-stepping. The code handles creating elements and generating matrix values for the general differential equation: dE d^2E d^2E d^2E dE dE Kt -- = Kx ---- + Kxy ---- + Ky ---- + Mx -- + My-- + PE + Q dt dx^2 dxdy dy^2 dx dy The completed matrix is assembled and solved in a different piece of code, solver.C. Inputs: Each element is initialized by a call to TSolutionVolume(...) i,j, and k must be valid pointers to NodeInfos. Those pointers must remian valid, since the code keeps the pointer instead of internally storing the information. i,j, and k must be arranged counterclockwise in space when viewed from _above_ the xy plane. The coefficients for each element can be manipulated externally, since they are public variables. theta and Kt should not vary from element to element Outputs: Calls to the proper functions will return the values for the matrices B and C | Bii Bij Bik | |Tim| |Ci| | Bji Bjj Bjk | * |Tjm| = |Cj| | Bki Bkj Bkk | |Tkm| |Ck|

Notes on Use: Kt = 0, theta Kt != 0, theta Kt != 0, theta Kt != 0, theat

= = = =

1 1 0 .5

=> => => =>

steady state solution fully implicit fully explicit Crank-Nicholson

All references to "Allaire" refer to the book "Basics of the Finite Element Method: Solid Mechanics, Heat Transfer, and

498
Fluid Mechanics" by Paul E. Allaire Wm. C. Brown Publishers Dubuque, Iowa 1985 Time stepping: [B] matrix found according to eq 16.37, p 591, Allaire [B] = theta * [Bx] + [Bt] [C] matrix, eq. 16.38, Allaire [C] = Cx - (1-theta)[Bx]*[Tm] + [Bt]*[Tm] [Bx] found in equation 15.20, p 547 Allaire [Cx] found in Figure 9.11 p 331 Allaire [Bt] _derived_ according to equation top of page 584 Allaire using Mathematica

Ideas: time stepping in pseudotime can be used to find potential distributions express terms of equation in physical terms now? (Q= J/h, Kx=kappa?) E,concentrations are properties of nodes, not elements -but Q evaluated at center of element grad phi can be calculated for simplex elements from position and value of vertexes Can entire equation be multiplied by 1000 etc. w/o messing things up? Does time scale Rule for delta t ( A *Kt / 10 * kx) Need routine(in different piece of code) to determine if stuff has stopped changing purely relative changes might not work unless really small delta( maybe print out metric for a series of steps) possible metrics sum of delta/old (purposefully allow +,- to cancel) Need oldE probably for stability, don't need to keep old Concentrations need some if statement at beginning of procedures for E vs C and species

499
Random thought about IR* model In tight crevices, the active site moves right near the mouth - almost all of the crevice will just be at the open circuit 12/15 Implementing MigDiff Use 1) Find Grad Phi - multiple tiny timesteps when only Ji changes - kappa, h stay same 2) Find delta Ci's - single tiemsteps, one for each species - Grad PHI term stable after step one is done ( within each element, for all species) 3) Reconciliation step for charge neutrality - Maybe if steps small enough, wouldn'y have to do? - maybe include some grad phi stuff In each element, bi,bj,bk,ci,cj,ck, A all fixed as long as locations of i,j,k vertices are stable

Mass XPort Terms Kx = Ky = -Di Kxy = 0 Mx = My = -zi F ui GradPHI P = 0 Q = Ri Kt = 1 Potential Kx = Ky = kappa h Kxy = 0 Mx = My = 0 P = 0 Q = Ji Kt = 1 In Mass Xport Di, ui, have to be recalculated once species changes all species change Gead PHI recaluclated To Do: work out how to call electrical vs chemcial (and species) Solve in solver.C calls on fem.C to build arrays

500
Find, look at really old stuff to incorporate the D u etc ****************************************************************************/ //line 70 #include "fem.H" TSolutionVolume::TSolutionVolume() { } /**************************************************************************** TSolutionVolume: This is the constructor for this class. This procedure should only be called once. => memory leak via avgchem Also => Big problems if nodes have different numbers of species

****************************************************************************/ TSolutionVolume::TSolutionVolume(NodeInfo *nodei, NodeInfo *nodej, NodeInfo *nodek, double height, TMaterial * material, TMaterial * ij, TMaterial * ik, TMaterial * jk, TAllSpecies * allspecies) { i = nodei; // Grab pointers to vertices for later use j = nodej; k = nodek; // initialize the pointer to avgchem to ensure proper number of species avgchem = new TChemistry(i->chem); // load avgchem with the right species // Set the value of avgchem to the proper average of the nodal values SetChemistry(); crc = mat = ijmat ikmat jkmat allspecies; material; = ij; = ik; = jk; // Set the degree of explicitness(0) or implicitness(1) // This really should always be 1 if the diff eq is in std form // Diffusion terms // Hard to envision aqueous system where Kx!=Ky (liquid crystal) // Migration terms

theta = 1; Kt Kx Ky Kxy Mx My P = = = = = = = 0; 1; Kx; 0; 0; 0; 0;

// Find bi,bj,bk ci,cj,ck and A based on coordinates of vertices // ?? Move to separate procedure if element splitting is required

501
// Formulas pulled from Allaire, p.41 ?? bi = j->dbY - k->dbY; bj = k->dbY - i->dbY; bk = i->dbY - j->dbY; ci = k->dbX - j->dbX; cj = i->dbX - k->dbX; ck = j->dbX - i->dbX; A = (bi*cj - bj*ci)/2; // these 6 terms used in Bx, also to find A

Lij = sqrt(bk*bk + ck*ck); Lik = sqrt(bj*bj + cj*cj); Ljk = sqrt(bi*bi + ci*ci); h = height; //height of crevice in meters

// find the width and height of element // there are probably better ways of finding the derivates wrt x,y dX = fabs(ci); if (dX < fabs(cj)) {dX = fabs(cj); } if (dX < fabs(ck)) {dX = fabs(ck); } dY = fabs(bi); if (dY < fabs(bj)) {dY = fabs(bj); } if (dY < fabs(bk)) {dY = fabs(bk); } } /************************************************************************ SetConstants: 1/15/96 This function adjusts the values of the constants based on if the fem is to be done on current (name=="electrical") or chemical species. Mass XPort Terms Kx = Ky = Di Kxy = 0 Mx = My = zi F ui GradPHI P = 0 Q = Ri

502
Kt = 1 Scaling Scale on Kx From Nernst-Einstein Kx = -D=-uRT => Kx = -2500u But Mx = (1) (1e5) (GradPhi) u min Grad Phi 1mV/1cm = .1 V/m Potential Kx = Ky = kappa h Kxy = 0 Mx = My = 0 P = 0 Q = Ji Kt = 1 Scaling Scale on Kx (nonzero) ************************************************************************/ int TSolutionVolume::SetConstants(TSpeciesName name, double kt, double th) {double Pex, Pey; double E; double a,b,c; theta = th; //these two variables determine the method time-stepping kt=0, th=1 is steady state Kt = kt; currentspecies = name; // Set the value of avgchem to the proper average of the nodal values SetChemistry(); T = avgchem->GetConcentration("temperature"); Pr = avgchem->GetConcentration("pressure"); Kt = Kt*h;//have to account for multiplying through by h

i->iFixed = i->chem->GetFixed(currentspecies); j->iFixed = j->chem->GetFixed(currentspecies); k->iFixed = k->chem->GetFixed(currentspecies);

if (StringsEqual(name,"electrical")) {a = dEdX(); if (fabs(a) > 0.0) {Kx = h * crc->kappa(T,Pr,avgchem);// * (1 + dDdX()/a ); }

503
else {Kx } = h * crc->kappa(T,Pr,avgchem);

//Ky = Kx; // Hard to envision aqueous system where Kx!=Ky (liquid crystal) b = dEdY(); if (fabs(b) > 0.0) {Ky = h * crc->kappa(T,Pr,avgchem);// * (1 + dDdY()/b ); } else {Ky = h * crc->kappa(T,Pr,avgchem); } Kxy Mx My P } else {Kx Ky crystal) Kxy = 0; = 0; = 0; = 0; //There are no first-order terms for electrical

= h * crc->D(name,T,P,avgchem); // Diffusion terms = Kx; // Hard to envision aqueous system where Kx!=Ky (liquid = 0; //

Mx = h*crc->z(name)*F*crc->u(name,T,Pr,avgchem)*(dEdX()-dDdX()); Migration terms My = h*crc->z(name)*F*crc->u(name,T,Pr,avgchem)*(dEdY()-dDdY()); P } alphaij = 0; alphaik = 0; alphajk = 0; betaij = 0; betaik = 0; betajk = 0; = 0;

//This sets the alpha and beta boundary condition for the model at each point if(ijmat != NULL) {E = (i->chem->GetConcentration("electrical") + j->chem->GetConcentration("electrical"))/2; if (StringsEqual(currentspecies,"electrical")) {alphaij = 0; //Mx, My = 0 for electrical - otherwise alphaij = (fabs(bk) * Mx + fabs(ck) * My)/Lij; betaij = h * ijmat->GetNetCurrentDensity(avgchem,E,T,Pr); }

504
else {alphaij = -((bk) * Mx + (ck) * My)/Lij; // The M terms already incorporate h betaij = -h*ijmat->GetChemicalFlux(currentspecies,avgchem,E,T,Pr); } } if(ikmat != NULL) {E = (i->chem->GetConcentration("electrical") + k->chem->GetConcentration("electrical"))/2; if (StringsEqual(currentspecies,"electrical")) {alphaik = 0; //Mx, My = 0 for electrical - otherwise alphaij = (fabs(bj) * Mx + fabs(cj) * My)/Lik; betaik = h * ikmat->GetNetCurrentDensity(avgchem,E,T,Pr); } else {alphaik = -((bj) * Mx + (cj) * My)/Lik; betaik = -h * ikmat->GetChemicalFlux(currentspecies,avgchem,E,T,Pr); } } if(jkmat != NULL) {E = (j->chem->GetConcentration("electrical") + k->chem->GetConcentration("electrical"))/2; if (StringsEqual(currentspecies,"electrical")) {alphajk = 0; //Mx, My = 0 for electrical - otherwise alphajk = (fabs(bi) * Mx + fabs(ci) * My)/Ljk; betajk = h * jkmat->GetNetCurrentDensity(avgchem,E,T,Pr); } else {alphajk = -((bi) * Mx + (ci) * My)/Ljk; betajk = -h*jkmat->GetChemicalFlux(currentspecies,avgchem,E,T,Pr); } } // check for stability Peclet number in x and y directions Pex = Mx*dX/Kx; Pey = My*dY/Ky; // This section prints out information about the conditions that caused the peclet instability if((fabs(Pex) > 2) || (fabs(Pey) > 2)) {printf("Pex = %lg, Pey = %lg, %d % d %d dX = %lg, dY = %lg, Ky = %lg, My = %lg (ci,cj,ck) %lg %lg %lg dEdY()%lg\n", Pex, Pey,i->iNodeId,j->iNodeId,k->iNodeId, dX, dY,Ky,My,ci,cj,ck, dEdY()); printf("ix %lg iy %lg jx %lg jy %lg kx %lg ky %lg\n",i->dbX,i->dbY,j->dbX, j->dbY, k->dbX, k->dbY); printf("\nMy = %lg, dy = %lg Ky = %lg, Pey = %lg \n",My,dY,Ky,Pey); }

505
if ((fabs(Pex)>2) || (fabs(Pey)>2)) {return(0); //unstable } else {return(1); //stable } } /************************************************************************ SetChemistry This procedure set the average chemistry of the entire element. It averages the concentrations from each node of each species ************************************************************************/ void TSolutionVolume::SetChemistry() {int icount; double conc; TSpeciesName name; for(icount=0;icount<avgchem->size;icount++) {name = avgchem->names[icount]; conc = (i->chem->GetConcentration(name) + j->chem->GetConcentration(name) + k->chem->GetConcentration(name))/3; avgchem->SetConcentration(name,conc); } }

/************************************************************************ dEdX eq 3.24-25 p45 Allaire dT/dx dT/dy 1 = -2A [bi [ [ci bj cj bk] ] ck] [ Ti ] [ Tj ] [ Tk ]

Need to multiply by (-1) to translate E to phi ************************************************************************/ double TSolutionVolume::dEdX() {double dedx; dedx = -(bi * i->chem->GetConcentration("electrical") + bj * j->chem->GetConcentration("electrical") + bk * k->chem->GetConcentration("electrical"))/(2*A); return(dedx); } double TSolutionVolume::dEdY() {double dedy; dedy = -(ci * i->chem->GetConcentration("electrical") + cj * j->chem->GetConcentration("electrical") + ck * k->chem->GetConcentration("electrical"))/(2*A);

506
return(dedy); } /************************************************************************ dCdX eq 3.24-25 p45 Allaire dT/dx dT/dy 1 = -2A [bi [ [ci bj cj bk] ] ck] [ Ti ] [ Tj ] [ Tk ]

NOTE: depends on currentspecies to figure out which species to return ************************************************************************/ double TSolutionVolume::dCdX() {double dcdx; dcdx = (bi * i->chem->GetConcentration(currentspecies) + bj * j->chem->GetConcentration(currentspecies) + bk * k->chem->GetConcentration(currentspecies))/(2*A); return(dcdx); } double TSolutionVolume::dCdY() {double dcdy; dcdy = (ci * i->chem->GetConcentration(currentspecies) + cj * j->chem->GetConcentration(currentspecies) + ck * k->chem->GetConcentration(currentspecies))/(2*A); return(dcdy); }

/************************************************************************ dDdX: Calculates the gradient of the diffusion potential in the X direction in V/m ************************************************************************/ double TSolutionVolume::dDdX() {double dddx = 0; int icount; TSpeciesName oldcurrentspecies; oldcurrentspecies = currentspecies; //save the condition before this procedure runs for(icount=0;icount < avgchem->size;icount++) {currentspecies = avgchem->names[icount]; dddx = dddx + crc->z(avgchem->names[icount])*crc->D(avgchem->names[icount],T,P,avgchem)*dCdX(); }

507
dddx = dddx * F / crc->kappa(T,Pr,avgchem); currentspecies = oldcurrentspecies; return(dddx); } /************************************************************************ dDdY: Calculates the gradient of the diffusion potential in the Y direction in V/m ************************************************************************/ double TSolutionVolume::dDdY() {double dddy = 0; int icount; TSpeciesName oldcurrentspecies; oldcurrentspecies = currentspecies; //save the condition before this procedure runs for(icount=0;icount < avgchem->size;icount++) {currentspecies = avgchem->names[icount]; dddy = dddy + crc->z(avgchem->names[icount])*crc->D(avgchem->names[icount],T,P,avgchem)*dCdY(); } dddy = dddy * F / crc->kappa(T,Pr,avgchem); currentspecies = oldcurrentspecies; return(dddy); } /************************************************************************ Jx: Uses: currentspecies name to choose species temperature (set in Set Constants) pressure (set in SetConstants) Chemical J = - D Grad C - z F u C Grad E Jx = - D dC/dX - z F u C dE/dX Jy = - D dC/dY - z F u C dE/dY Electrical V = IR I = dV / R R = rho L / A I = dV A / rho L I = A kappa dV / dX A = h w I/w = h kappa dV / dX Returns value in units of flux/length for use in Jijx etc ************************************************************************/ double TSolutionVolume::Jx() {double jx;

508
if(StringsEqual(currentspecies,"electrical")) {jx = dEdX() * crc->kappa(T,Pr,avgchem) * h; } else {jx = - crc->D(currentspecies,T,Pr,avgchem) * dCdX() - crc->z(currentspecies) * F * crc->u(currentspecies,T,Pr,avgchem) * avgchem->GetConcentration(currentspecies) * dEdX(); jx = jx * h; } return(jx); } /************************************************************************ Jy - See above ************************************************************************/ double TSolutionVolume::Jy() {double jy; if(StringsEqual(currentspecies,"electrical")) {jy = dEdY() * crc->kappa(T,Pr,avgchem) * h; } else {jy = - crc->D(currentspecies,T,Pr,avgchem) * dCdY() - crc->z(currentspecies) * F * crc->u(currentspecies,T,Pr,avgchem) * avgchem->GetConcentration(currentspecies) * dEdY(); jy = jy * h; } return(jy); } /************************************************************************ Jijx - return the x component of the total flux crossing the ij side of the element Jij = Jijx + jijy Units in flux, Jij is in the same direction as J (= Jx i^ + Jy j^) See document "Flux" expression for magnitude of flux J (c i^ + d j^) across line segment l (a i^ + b j^) is |(bc - ad)| and its direction is in the unit vector of J (c i^ + d j^) / ( sqrt(c^2 + d^2) ) the vector representing the line segment is from i (at ix,iy) TO j (at jx,jy) l = (jx - ix) i^ + (jy - iy) j^ ************************************************************************/ double TSolutionVolume::Jijx()

509
{double a,b,c,d, jijx; // find the vector for the line segment a = j->dbX - i->dbX; b = j->dbY - i->dbY; // find the vector for the flux c = Jx(); d = Jy(); jijx = fabs(b * c - a * d) * c / (sqrt(c*c + d*d)); return(jijx); } double TSolutionVolume::Jijy() {double a,b,c,d, jijy; // find the vector for the line segment a = j->dbX - i->dbX; b = j->dbY - i->dbY; // find the vecotr for the flux c = Jx(); d = Jy(); jijy = fabs(b * c - a * d) * d / (sqrt(c*c + d*d)); return(jijy); } double TSolutionVolume::Jikx() {double a,b,c,d, jikx; // find the vector for the line segment a = k->dbX - i->dbX; b = k->dbY - i->dbY; // find the vector for the flux c = Jx(); d = Jy(); jikx = fabs(b * c - a * d) * c / (sqrt(c*c + d*d)); return(jikx); } double TSolutionVolume::Jiky() {double a,b,c,d, jiky; // find the vector for the line segment a = k->dbX - i->dbX; b = k->dbY - i->dbY; // find the vector for the flux

510
c = Jx(); d = Jy(); jiky = fabs(b * c - a * d) * d / (sqrt(c*c + d*d)); return(jiky); } double TSolutionVolume::Jjkx() {double a,b,c,d, jjkx; // find the vector for the line segment a = k->dbX - j->dbX; b = k->dbY - j->dbY; // find the vecotr for the flux c = Jx(); d = Jy(); jjkx = fabs(b * c - a * d) * c / (sqrt(c*c + d*d)); return(jjkx); } double TSolutionVolume::Jjky() {double a,b,c,d, jjky; // find the vector for the line segment a = k->dbX - j->dbX; b = k->dbY - j->dbY; // find the vector for the flux c = Jx(); d = Jy(); jjky = fabs(b * c - a * d) * d / (sqrt(c*c + d*d)); return(jjky); } double TSolutionVolume::I() {double val; val = i->oldchem->GetConcentration(currentspecies); return(val); } double TSolutionVolume::J() {double val; val = j->oldchem->GetConcentration(currentspecies); return(val); } double TSolutionVolume::K()

511
{double val; val = k->oldchem->GetConcentration(currentspecies); return(val); } double TSolutionVolume::Q() {double E,J,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,exp; E = (i->chem->GetConcentration("electrical") + j->chem->GetConcentration("electrical") + k->chem->GetConcentration("electrical"))/3;

if (StringsEqual(currentspecies,"electrical")) {J = -mat->GetNetCurrentDensity(avgchem,E,T,Pr); } else {J = mat->GetChemicalFlux(currentspecies,avgchem,E,T,Pr); } return(J); } double TSolutionVolume::bii() {double bii; bii = (Kx*bi*bi + Kxy*bi*ci + Ky*ci*ci)/ (4*A) - (Mx*bi + My*ci)/6 - (P*A)/6 + (alphaij * Lij)/3 + (alphaik * Lik)/3; return(bii); } double TSolutionVolume::bij() {double bij; bij = (Kx*bi*bj + Kxy*(bi*cj + bj* ci)/2 + Ky*ci*cj)/ (4*A) - (Mx*bj + My*cj)/6 - (P*A)/12 + (alphaij * Lij)/6; return(bij); } double TSolutionVolume::bik() {double bik; bik = (Kx*bi*bk + Kxy*(bi*ck + bk* ci)/2 + Ky*ci*ck)/ (4*A) - (Mx*bk + My*ck)/6

512
- (P*A)/12 + (alphaik * Lik)/6; return(bik); } double TSolutionVolume::bji() {double bji; bji = (Kx*bj*bi + Kxy*(bj*ci + bi* cj)/2 + Ky*cj*ci)/ (4*A) - (Mx*bi + My*ci)/6 - (P*A)/12 + (alphaij * Lij)/6; return(bji); } double TSolutionVolume::bjj() {double bjj; bjj = (Kx*bj*bj + Kxy*bj*cj + Ky*cj*cj)/ (4*A) - (Mx*bj + My*cj)/6 - (P*A)/6 + (alphaij * Lij)/3 + (alphajk * Ljk)/3; return(bjj); } double TSolutionVolume::bjk() {double bjk; bjk = (Kx*bj*bk + Kxy*(bj*ck + bk* cj)/2 + Ky*cj*ck)/ (4*A) - (Mx*bk + My*ck)/6 - (P*A)/12 + (alphajk * Ljk)/6; return(bjk); } double TSolutionVolume::bki() {double bki; bki = (Kx*bk*bi + Kxy*(bk*ci + bi* ck)/2 + Ky*ck*ci)/ (4*A) - (Mx*bi + My*ci)/6 - (P*A)/12 + (alphaik * Lik)/6; return(bki); }

513
double TSolutionVolume::bkj() {double bkj; bkj = (Kx*bk*bj + Kxy*(bk*cj + bj* ck)/2 + Ky*cj*ck)/ (4*A) - (Mx*bj + My*cj)/6 - (P*A)/12 + (alphajk * Ljk)/6; return(bkj); } double TSolutionVolume::bkk() {double bkk; bkk = (Kx*bk*bk + Kxy*bk*ck + Ky*ck*ck)/ (4*A) - (Mx*bk + My*ck)/6 - (P*A)/6 + (alphaik * Lik)/3 + (alphajk * Ljk)/3; return(bkk); } double TSolutionVolume::Bii(double delt) {double Bii; Bii = theta * bii(); Bii = Bii + Kt * A / (delt * 6); return(Bii); } double TSolutionVolume::Bij(double delt) {double Bij; Bij = theta * bij(); Bij = Bij + Kt * A / (delt * 12); return(Bij); } double TSolutionVolume::Bik(double delt) {double Bik; Bik = theta * bik(); Bik = Bik + Kt * A / (delt * 12); return(Bik);

514
} double TSolutionVolume::Bji(double delt) {double Bji; Bji = theta * bji(); Bji = Bji + Kt * A / (delt * 12);

return(Bji); } double TSolutionVolume::Bjj(double delt) {double Bjj; Bjj = theta * bjj(); Bjj = Bjj + Kt * A / (delt * 6); return(Bjj); } double TSolutionVolume::Bjk(double delt) {double Bjk; Bjk = theta * bjk(); Bjk = Bjk + Kt * A / (delt * 12); return(Bjk); } double TSolutionVolume::Bki(double delt) {double Bki; Bki = theta * bki(); Bki = Bki + Kt * A / (delt * 12); return(Bki); } double TSolutionVolume::Bkj(double delt) {double Bkj; Bkj = theta * bkj(); Bkj = Bkj + Kt * A / (delt * 12); return(Bkj);

515
} double TSolutionVolume::Bkk(double delt) {double Bkk; Bkk = theta * bkk(); Bkk = Bkk + Kt * A / (delt * 6); return(Bkk); } double TSolutionVolume::Ci(double delt) {double Ci; double nI,nJ,nK; nI= I(); nJ=J(); nK=K(); Ci = Q()*A/3 - betaij* Lij/2 - betaik*Lik/2; // {Cx}

// [Bx] * [Tm] Ci = Ci - (1-theta) * (bii()*I()+bij()*J()+bik()*K()); Ci = Ci + (Kt * A * nI)/ (delt * 6) + (Kt * A * nJ)/ (delt * 12) + (Kt * A * nK)/ (delt * 12); // {Bt} * {Tm} return(Ci); } double TSolutionVolume::Cj(double delt) {double Cj; double nI,nJ,nK; nI= I(); nJ=J(); nK=K(); Cj = Q()*A/3 - betaij* Lij/2 - betajk*Ljk/2; // {Cx}

// [Bx] * [Tm] Cj = Cj - (1-theta) * (bji()*I()+bjj()*J()+bjk()*K()); Cj = Cj + (Kt * A * nI)/ (delt * 12) + (Kt * A * nJ)/ (delt * 6) + (Kt * A * nK)/ (delt * 12); // {Bt} * {Tm} return(Cj); } double TSolutionVolume::Ck(double delt)

516
{double Ck; double nI,nJ,nK; nI= I(); nJ=J(); nK=K(); Ck = Q()*A/3 - betajk* Ljk/2 - betaik*Lik/2; // {Cx}

// [Bx] * [Tm] Ck = Ck - (1-theta) * (bki()*I()+bkj()*J()+bkk()*K()); Ck = Ck + (Kt * A * nI)/ (delt * 12) + (Kt * A * nJ)/ (delt * 12) + (Kt * A * nK)/ (delt * 6); // {Bt} * {Tm} return(Ck); }

517

Appendix O: solver.h
#ifndef __SOLVER_H #define __SOLVER_H #ifndef __STRING_H #include <string.h> #endif #ifndef __MATH_H #include <math.h> #endif #ifndef __FEM_H #include "fem.H" #endif #ifndef __TCHEM_H #include "tchem.H" #endif #ifndef __TASPECIE_H #include "taspecie.H" #endif #ifndef __TALLSPEC_H #include "tallspec.H" #endif void Print(int iNumOfNodes, NodeInfo *nodes[6000], char name[80], TSpeciesName name); void PrintEdge(char name[80],TSolutionVolume * els[3000]); void NeutralizeCharge(NodeInfo * nodes[6000], int iNumOfNodes); void ChemicalEquilibriaCr(NodeInfo * nodes[6000], int iNumOfNodes, TAllSpecies * crc); void NeutralizeChargeCl(NodeInfo * nodes[6000], int iNumOfNodes, TAllSpecies * crc); void SetOldChem(NodeInfo * nodes[6000], int iNumOfNodes); void Solve(TSolutionVolume * els[3000], int iNumOfElements, NodeInfo * nodes[6000], int iNumOfNodes, double time, TSpeciesName name); //void Display(TScreen * tscr, TSolutionVolume * els[3000], int iNumOfElements, NodeInfo * nodes[6000], int iNumOfNodes); double AvgDifference(NodeInfo * nodes[6000], int iNumOfElements); #endif

518

Appendix P: solver.c
/*************************************************************************** SOLVER.C Programmed by: Kevin Stewart Date Last Modified: 9/20/95 Summary: This program performs some basic math and i/o functions for test.C. It assembles (by making the appropriate calls to Bxx and Cx) and solves the matrix of nodal values. Inputs: "NodeInfo * nodes[6000]" should be a sequentially numbered contiguous block of all the nodes used in the FE formulation. "TSolutionVolume * els[3000]" is the matrix of all the elements used in the FE formulation. It too should be continuous. At the start of the Solve procedure the variables nodes[x]->E should contain the value of the field variable at the end of the last timestep. Outputs: After "Solve" nodes[]->E will contain the values of the field variable. oldE probably isn't needed ***************************************************************************/ #include "solver.H" // This doesn't work for anything other than potential double AvgDifference(NodeInfo * nodes[6000], int iNumOfElements) {int count; double temp, sum; double dbold, dbnew; sum = 0; for(count=0;count<iNumOfElements;count++) {dbnew = nodes[count]->chem->GetConcentration("electrical"); dbold = nodes[count]->oldchem->GetConcentration("electrical"); if (fabs(dbnew) < 1e-9) {dbnew = 1e-9; } else {temp = (dbnew - dbold)/dbold; if(temp < 0) {sum = sum - temp;

519
} else {sum = sum + temp; } } } sum = sum / iNumOfElements; return(sum); } void Print(int iNumOfNodes, NodeInfo *nodes[6000], char name[80], TSpeciesName species) {FILE * out; int count; double dbold, dbnew; out = fopen(name,"w"); for(count=0;count<iNumOfNodes;count++) {dbnew = nodes[count]->chem->GetConcentration(species); dbold = nodes[count]->oldchem->GetConcentration(species); fprintf(out," %d %lg %lg %lg %lg \n",count,nodes[count]->dbX, nodes[count]->dbY, dbnew,dbold); } fclose(out); } /* This code prints out an edge for elsq8 */ void PrintEdge(char name[80],TSolutionVolume * els[3000]) {FILE * out; int icount; out = fopen(name,"w"); fprintf(out,"1 %lg %lg\n",els[1]->Jijx(),els[1]->Jijy()); fprintf(out,"34 %lg %lg\n",els[34]->Jijx(),els[34]->Jijy()); fprintf(out,"5 %lg %lg\n",els[5]->Jijx(),els[5]->Jijy()); fprintf(out,"6 %lg %lg\n",els[6]->Jijx(),els[6]->Jijy()); fprintf(out,"7 %lg %lg\n",els[7]->Jijx(),els[7]->Jijy()); fprintf(out,"8 %lg %lg\n",els[8]->Jijx(),els[8]->Jijy()); fprintf(out,"33 %lg %lg\n",els[33]->Jjkx(),els[33]->Jjky()); fprintf(out,"0 %lg %lg\n",els[0]->Jijx(),els[0]->Jijy()); fprintf(out,"3 %lg %lg\n",els[3]->Jijx(),els[3]->Jijy()); fprintf(out,"42 %lg %lg\n",els[42]->Jjkx(),els[42]->Jjky()); fprintf(out,"16 %lg %lg\n",els[16]->Jijx(),els[16]->Jijy());

520
fprintf(out,"15 %lg %lg\n",els[15]->Jijx(),els[15]->Jijy()); fprintf(out,"14 %lg %lg\n",els[14]->Jijx(),els[14]->Jijy()); fprintf(out,"13 %lg %lg\n",els[13]->Jijx(),els[13]->Jijy()); fprintf(out,"40 %lg %lg\n",els[40]->Jjkx(),els[40]->Jjky()); fprintf(out,"2 %lg %lg\n",els[2]->Jjkx(),els[2]->Jjky()); fclose(out); } void NeutralizeCharge(NodeInfo * nodes[6000], int iNumOfNodes) {int count; double amt; for(count=0;count<iNumOfNodes;count++) {amt = nodes[count]->chem->GetConcentration("K+") + nodes[count]->chem->GetConcentration("Ag+"); nodes[count]->chem->SetConcentration("NO3-",amt); nodes[count]->oldchem->SetConcentration("NO3-",amt); } } void NeutralizeChargeCl(NodeInfo * nodes[6000], int iNumOfNodes, TAllSpecies * crc) {int count; double amt, dbPrevCl; TSpeciesName Clm; Clm = "Cl-"; for(count=0;count<iNumOfNodes;count++) {if(!nodes[count]->chem->GetFixed(Clm)) {amt = crc->ChargeDensity(nodes[count]->chem); dbPrevCl = nodes[count]->chem->GetConcentration(Clm); amt = (amt+F*dbPrevCl)/F; nodes[count]->chem->SetConcentration("Cl-",amt); } } } void SetOldChem(NodeInfo * nodes[6000], int iNumOfNodes) {int count; for(count=0;count<iNumOfNodes;count++) {nodes[count]->oldchem->CopyChemistry(nodes[count]->chem); } } void ChemicalEquilibriaCr(NodeInfo * nodes[6000], int iNumOfNodes, TAllSpecies * crc) {int count;

521
for(count=0;count<iNumOfNodes;count++) {crc->CrEquilibria(nodes[count]->chem); } } void Solve(TSolutionVolume * els[3000], int iNumOfElements, NodeInfo * nodes[6000], int iNumOfNodes, double time,TSpeciesName name) { double B[2000][2000]; // num of nodes double C[2000]; // num of nodes double temp2, temp3; int count1,count2; // Debugging Variable // TSolutionVolume * temps; // Zero out matrices for(count1=0;count1<= iNumOfNodes;count1++) {for(count2=0;count2<= iNumOfNodes; count2++) {B[count1][count2]=0; } C[count1] = 0; } //notation on matrices is [down][over] for(count1=0;count1 <iNumOfElements;count1++) { B[els[count1]->i->iNodeId][els[count1]->i->iNodeId] = B[els[count1]->i->iNodeId][els[count1]->i->iNodeId] + els[count1]->Bii(time); B[els[count1]->i->iNodeId][els[count1]->j->iNodeId] = B[els[count1]->i->iNodeId][els[count1]->j->iNodeId] + els[count1]->Bij(time); B[els[count1]->i->iNodeId][els[count1]->k->iNodeId] = B[els[count1]->i->iNodeId][els[count1]->k->iNodeId] + els[count1]->Bik(time); B[els[count1]->j->iNodeId][els[count1]->i->iNodeId] = B[els[count1]->j->iNodeId][els[count1]->i->iNodeId] + els[count1]->Bji(time); B[els[count1]->j->iNodeId][els[count1]->j->iNodeId] = B[els[count1]->j->iNodeId][els[count1]->j->iNodeId] + els[count1]->Bjj(time); B[els[count1]->j->iNodeId][els[count1]->k->iNodeId] = B[els[count1]->j->iNodeId][els[count1]->k->iNodeId] + els[count1]->Bjk(time); B[els[count1]->k->iNodeId][els[count1]->i->iNodeId] = B[els[count1]->k->iNodeId][els[count1]->i->iNodeId] + els[count1]->Bki(time); B[els[count1]->k->iNodeId][els[count1]->j->iNodeId] = B[els[count1]->k->iNodeId][els[count1]->j->iNodeId] + els[count1]->Bkj(time); B[els[count1]->k->iNodeId][els[count1]->k->iNodeId] = B[els[count1]->k->iNodeId][els[count1]->k->iNodeId] + els[count1]->Bkk(time); C[els[count1]->i->iNodeId] = C[els[count1]->i->iNodeId] + els[count1]->Ci(time); C[els[count1]->j->iNodeId] = C[els[count1]->j->iNodeId] + els[count1]->Cj(time);

522
C[els[count1]->k->iNodeId] = C[els[count1]->k->iNodeId] + els[count1]->Ck(time); } //Scale up matrix for(count1=0;count1<iNumOfNodes;count1++) {for(count2=0;count2<iNumOfNodes;count2++) {B[count1][count2] = B[count1][count2]*1e7; } C[count1] = C[count1]*1e7; }

// Solve the matrix // First: Pass thru back to front, removing rows and columns, and fixing C int iThis, iLast; iLast = iNumOfNodes-1; //row number of last spot // Note: pass from back to front to avoid destroying numbering for(iThis= iNumOfNodes-1;iThis >= 0;iThis--) {if (nodes[iThis]->iFixed == 1) // Is this a constant element that needs to be removed {for(count1=0 ; count1<=iLast ; count1++) {C[count1] = C[count1] - B[count1][iThis] * nodes[iThis]->chem->GetConcentration(name); temp2=C[count1]; temp3 = B[count1][iThis]; } //Remove the C entry for(count1=iThis ; count1<iLast ; count1++) {C[count1] = C[count1+1]; temp2=C[count1]; } //Remove Rows for(count1=iThis ; count1<iLast ; count1++) {for(count2=0;count2<=iLast;count2++) //Move across this column {B[count1][count2] = B[count1+1][count2]; } } //Remove Columns for(count1=iThis ; count1<iLast ; count1++) {for(count2=0;count2<=iLast;count2++) {B[count2][count1] = B[count2][count1+1]; } } // Decrement iLast iLast--;

523
} } // Solve by Gaussian Elimination // kill down double temp; for(iThis = 0 ; iThis<iLast ; iThis++) {for(count1=iThis+1 ; count1<=iLast ; count1++) {if((B[iThis][iThis]*B[iThis][iThis] *B[count1][iThis]*B[count1][iThis]) > 1e-600) // Check to see if == 0 {temp = -B[count1][iThis]/B[iThis][iThis]; } else {temp = 0; } for(count2=iThis;count2<=iLast;count2++) {B[count1][count2] = B[count1][count2] + temp * B[iThis][count2]; } C[count1] = C[count1] + temp * C[iThis]; } }

// Back Substitute for(count1=iLast ; count1>=0 ; count1--) { temp =C[count1]; for(count2=count1+1 ; count2 <= iLast ; count2++) {temp2 = C[count2]; temp3 = B[count1][count2]; temp = temp - (temp2 * temp3); } C[count1] = temp/B[count1][count1]; }

// Grab the nodal values count1 = 0; //keeps track of unfixed nodes for(iThis = 0 ; iThis < iNumOfNodes ; iThis++) {if(nodes[iThis]->iFixed != 1) // fixed node {nodes[iThis]->chem->SetConcentration(name,C[count1]); count1++; } } }

524

Appendix Q: chemtest.c
#include #include #include #include #include #include #include <string.h> <math.h> "tchem.H" "taspecie.H" "tallspec.H" "tmateria.H" "solver.H"

// els labell CCW // This function reads the ANSYS-generated test fields to get the mesh information // (Node number, Node position, Node connectivity) void setup(TSolutionVolume * els[3250], int * iNumOfElements, NodeInfo * nodes[6500], int * iNumOfNodes, TAllSpecies * crc) { FILE * in; // Basic variables for I/O FILE * out; char buf[256]; char * ch; // kluged way of check EOF, will be Null if fgets is unsuccessful int count1, count2; long double x,y,z; int nodenumber; int iNumUsedNodes; int temp; int i,j,k; int elnumber; double r; TASpecies * foo; TChemistry * initchem; TMaterial * mat; TMaterial * matedge; // counting variable

// Fill crc with the species that will be in this crevice foo = new TKp(); crc->AddSpecies(foo); foo = new TClm(); crc->AddSpecies(foo); foo = new THp(); crc->AddSpecies(foo); foo = new TOHm();

525
crc->AddSpecies(foo); foo = new TNipp(); crc->AddSpecies(foo); foo = new TFepp(); crc->AddSpecies(foo); foo = new TCrppp(); crc->AddSpecies(foo); foo = new TCrO4mm(); crc->AddSpecies(foo); foo = new TNap(); crc->AddSpecies(foo); foo = new TAlppp(); crc->AddSpecies(foo); foo = new TNO3m(); crc->AddSpecies(foo); foo = new TAgp(); crc->AddSpecies(foo); foo = new TCrOHpp(); crc->AddSpecies(foo); foo = new TCrOHOHp(); crc->AddSpecies(foo); foo = new TCrOHOHOH(); crc->AddSpecies(foo); foo = new TCrOHOHOHOHm(); crc->AddSpecies(foo); foo = new TElectrical(); crc->AddSpecies(foo); foo = new TTemperature(); crc->AddSpecies(foo); foo = new TPressure(); crc->AddSpecies(foo); mat = new T304Mat(crc); matedge = NULL; //new TFooMaterial(crc); //set the initial chemistry initchem = new TChemistry(); initchem->AddSpecies("Na+",17,0); initchem->AddSpecies("Cl-",17,0); initchem->AddSpecies("H+",1e-4,0); initchem->AddSpecies("OH-",1,0); initchem->AddSpecies("Cr+++",0,0); initchem->AddSpecies("CrOH++",0,0); initchem->AddSpecies("CrOHOH+",0,0); initchem->AddSpecies("CrOHOHOH",0,0); initchem->AddSpecies("CrOHOHOHOH-",0,0);

526
initchem->AddSpecies("Fe++",0,0); initchem->AddSpecies("temperature",298); initchem->AddSpecies("pressure",1e5); initchem->AddSpecies("electrical",0.05);

crc->CrEquilibria(initchem); double a; // The source filenames char nofile[80], elfile[80]; sprintf(nofile,"nopirod2"); sprintf(elfile,"elpirod2");

printf ("started reading files\n"); in = fopen(nofile,"r"); count1 = 0; // "nodes" is the ANSYS file // initialize count

nodenumber = 0; ch = fgets(buf,256,in); // use ch to grab the result of the fgets operation while(ch != NULL) {// buf[7] is the ones place of the number if((buf[7] >= '0') && (buf[7] <= '9') && (strlen(buf)> 7))// if this line is not one of the "waste" lines {sscanf(buf," %d %lg %lg %lg ",&temp, &x, &y, &z); nodes[count1] = new NodeInfo; nodes[count1]->chem = new TChemistry(initchem); nodes[count1]->oldchem = new TChemistry(initchem); nodes[count1]->dbX = x; nodes[count1]->dbY = y; nodes[count1]->dbZ = z; nodes[count1]->iUsed = 0; //Initialize to "not used" nodes[count1]->iNodeId = temp; count1++; } ch = fgets(buf,256,in); // use ch to grab the result of the fgets operation } nodenumber = count1; // save the total number of nodes read fclose(in); // close "nodes"

// now open and pass through "elements" twice, once to see which nodes are used, // a second time to create the elements

527
in = fopen(elfile,"r"); ch = fgets(buf,256,in); while(ch != NULL) {// buf[7] is the ones place of the number if((buf[7] >= '0') && (buf[7] <= '9') && (strlen(buf) > 7)) {sscanf(buf,"%d %d %d %d %d %d %d %d", &elnumber,&i,&i,&i,&i,&i,&j,&k); nodes[i-1]->iUsed = 1; nodes[j-1]->iUsed = 1; nodes[k-1]->iUsed = 1; } ch = fgets(buf,256,in); } fclose(in); // Renumber the nodes sequentially iNumUsedNodes = 0; for(count1=0;count1 < nodenumber;count1++) {if(nodes[count1]->iUsed != 0) {nodes[count1]->iNodeId = iNumUsedNodes; iNumUsedNodes++; } }

// Go thru "elements again" creating TSolutionVolumes in = fopen(elfile,"r"); ch = fgets(buf,256,in); temp = 0;

out = fopen("elements.txt","w"); while(ch != NULL) {// buf[7] is the ones place of the number if((buf[7] >= '0') && (buf[7] <= '9') && (strlen(buf) > 7)) {sscanf(buf,"%d %d %d %d %d %d %d %d", &elnumber,&i,&i,&i,&i,&i,&j,&k); // remember that the location of the node is name in file - 1 els[elnumber-1] = new TSolutionVolume(nodes[i-1], nodes[j-1],nodes[k-1],1e-6, mat,matedge,matedge,matedge,crc); fprintf(out,"%i %i %i %i\n", elnumber-1,nodes[i-1]->iNodeId,nodes[j-1]->iNodeId,nodes[k-1]->iNodeId); temp++; } ch = fgets(buf,256,in); }

528
fclose(out); fclose(in); /////////////////////////////////////////////////////////////////////////// // This section condenses the array of nodes and keeps only those used // Can't do earlier have to keep old numbering system until elements are created /////////////////////////////////////////////////////////////////////////// for(count1=0;count1 < iNumUsedNodes;) {if(nodes[count1]->iUsed == 0) // The reason this works is because ANSYS generated sequentially numbered nodes (although an excess) {delete(nodes[count1]); for(count2=count1;count2<(nodenumber-1);count2++) {nodes[count2] = nodes[count2+1]; } } else {count1++; } }

/////////////////////////////////////////////////////////////////////////// // This section defines the boundary conditions for the relevant shape. // It sets the potential and/or gradients at some of the nodes. /////////////////////////////////////////////////////////////////////////// double db,ix,iy,jx,jy,kx,ky,ri,rj,rk,alpha,beta,top,bottom,left,right,inner,outer;

/////////////////////////////////////////////////////////////////////////// // ELCOOP1 /////////////////////////////////////////////////////////////////////////// printf("Using boundary conditions for elcoop1 %i\n",nodenumber); for(count1=0;count1<nodenumber;count1++) {if (nodes[count1]->dbY < .0000001) // right side {nodes[count1]->oldchem->SetFixed("electrical",1); // the potential for this node is fixed nodes[count1]->chem->SetFixed("electrical",1); // the potential for this node is fixed nodes[count1]->oldchem->SetFixed("Na+",1); // the potential for this node is fixed nodes[count1]->chem->SetFixed("Na+",1); // the potential for this node is fixed nodes[count1]->oldchem->SetFixed("Cl-",1); // the potential for this node is fixed nodes[count1]->chem->SetFixed("Cl-",1); // the potential for this node is fixed nodes[count1]->oldchem->SetFixed("Cr+++",1); // the potential for this node is fixed

529
nodes[count1]->chem->SetFixed("Cr+++",1); this node is fixed nodes[count1]->oldchem->SetFixed("Fe++",1); this node is fixed nodes[count1]->chem->SetFixed("Fe++",1); this node is fixed nodes[count1]->oldchem->SetFixed("H+",1); this node is fixed nodes[count1]->chem->SetFixed("H+",1); node is fixed nodes[count1]->oldchem->SetFixed("OH-",1); this node is fixed nodes[count1]->chem->SetFixed("OH-",1); this node is fixed nodes[count1]->oldchem->SetFixed("CrOH++",1); this node is fixed nodes[count1]->chem->SetFixed("CrOH++",1); this node is fixed } } // the potential for // the potential for // the potential for

// the potential for // the potential for this

// the potential for // the potential for

// the potential for // the potential for

/////////////////////////////////////////////////////////////////////////// // Tidy up variables. /////////////////////////////////////////////////////////////////////////// *iNumOfElements = temp; *iNumOfNodes = iNumUsedNodes; } void main(void) { // setup variables for use in this program int count, count1,count2; int i,j,k; int stable; double temp2; double temp3; int done = 0; double residual; TSolutionVolume * els[3250]; int iNumOfElements; int iNumOfNodes; NodeInfo * nodes[6500]; char nm[80]; char name[12];

530
double kt, th; long double time = 1e-2; TAllSpecies crc; setup(els, &iNumOfElements, nodes, &iNumOfNodes, &crc);

printf("to main\n");

count2=0; count1=0;

NeutralizeChargeCl(nodes,iNumOfNodes,&crc); for(count2=0;count2 < 100;count2++) { // Copy the new values to the old to prepare for the next timestep SetOldChem(nodes,iNumOfNodes);

sprintf(name,"NO3-"); printf("Time period %d %s found. \n",count2, name); // Screen hand holder sprintf(nm,"nO%d.txt",count2); //Filename

done = 0; // set flag for electrical finieshed to FALSE printf("STARTING ELECTRICAL \n"); sprintf(name,"electrical"); // first find potential gradient time = 1e-6; // set delta t for electrical kt = 1; th = .5; stable = 1; //check for Peclet stability for(count=0;count<iNumOfElements;count++) //iniitalize elements for electrical {stable = stable && els[count]->SetConstants(name,kt,th); } if(!stable) {printf("OOOOOPS NOT STABLE\n"); } els[0]->Kt,els[0]->Kx,els[0]->Ky,els[0]->Mx,els[0]->My,els[0]->currentspecies); while (done != 1) //loop till stable EI {SetOldChem(nodes,iNumOfNodes); Solve(els,iNumOfElements,nodes,iNumOfNodes,time,name); printf("just solve\n"); residual = AvgDifference(nodes,iNumOfNodes); if (residual < .01) // typically .1 {done = 1; // if have converged to stable E-I

531
printf("Time period %d electrical found. \n",count1); // Screen hand holder sprintf(nm,"el%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file printf("%s \n",nm); } else {printf("residual = %lg \n",residual); sprintf(nm,"b%d",count1); strcat(nm,".txt"); Print(iNumOfNodes,nodes,nm,name); printf("%s \n",nm); count1++; if(count1>60) {done = 1; } // reinitialize the variables for(count=0;count<iNumOfElements;count++) {els[count]->SetConstants(name,kt,th); } } }

time = 100; kt = 1; th = .5;

// set delta t for electrical

sprintf(name,"Na+"); printf("starting on %s \n",name) stable = 1; for(count=0;count<iNumOfElements;count++) //initialize elements for Ni++ {stable = stable && els[count]->SetConstants(name,kt,th); } if(!stable) {printf("OOOOOPS NOT STABLE in %s\n",name); } Solve(els,iNumOfElements,nodes,iNumOfNodes,time,name); intf("Time period %d %s found. \n",count2, name); // Screen hand holder sprintf(nm,"na%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file

sprintf(name,"Cr+++"); printf("starting on %s \n",name); stable = 1;

532
for(count=0;count<iNumOfElements;count++) //initialize elements for Ni++ {stable = stable && els[count]->SetConstants(name,kt,th); } if(!stable) {printf("OOOOOPS NOT STABLE in %s\n",name); } Solve(els,iNumOfElements,nodes,iNumOfNodes,time,name); sprintf(name,"Fe++"); printf("starting on %s \n",name); stable = 1; for(count=0;count<iNumOfElements;count++) //initialize elements for Ni++ {stable = stable && els[count]->SetConstants(name,kt,th); } if(!stable) {printf("OOOOOPS NOT STABLE in %s\n",name); } Solve(els,iNumOfElements,nodes,iNumOfNodes,time,name); printf("Time period %d %s found. \n",count2, name); // Screen hand holder sprintf(nm,"fe%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file NeutralizeChargeCl(nodes,iNumOfNodes,&crc); sprintf(name,"Cl-"); // Model Al interactions printf("starting on %s \n",name); printf("Time period %d %s found. \n",count2, name); // Screen hand holder sprintf(nm,"cl%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file sprintf(name,"H+"); // Model Al interactions printf("starting on %s \n",name); stable = 1; for(count=0;count<iNumOfElements;count++) //initialize elements for Ni++ {stable = stable && els[count]->SetConstants(name,kt,th); } if(!stable) {printf("OOOOOPS NOT STABLE in %s\n",name); } printf("Kx value = %lg Ky = %lg %s",els[0]->Kx,els[0]->Ky,els[0]->currentspecies); Solve(els,iNumOfElements,nodes,iNumOfNodes,time,name); printf("Time period %d %s found. \n",count2, name); // Screen hand holder sprintf(name,"OH-"); // Model Al interactions printf("starting on %s \n",name);

533
stable = 1; for(count=0;count<iNumOfElements;count++) //initialize elements for Ni++ {stable = stable && els[count]->SetConstants(name,kt,th); } if(!stable) {printf("OOOOOPS NOT STABLE in %s\n",name); } printf("Kx value = %lg Ky = %lg %s",els[0]->Kx,els[0]->Ky,els[0]->currentspecies); Solve(els,iNumOfElements,nodes,iNumOfNodes,time,name); printf("Time period %d %s found. \n",count2, name); // Screen hand holder sprintf(nm,"oh%d.txt",count2); //Filename ChemicalEquilibriaCr(nodes,iNumOfNodes,&crc); Print(iNumOfNodes,nodes,nm,name); //write the file sprintf(name,"H+"); // Model Al interactions sprintf(nm,"h%d.txt",count2); //Filename printf("Time period %d %s found. \n",count2, name); // Screen hand holder sprintf(nm,"h%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file sprintf(name,"Cr+++"); // Model Al interactions printf("Printing time period %d %s. \n",count2, name); // Screen hand holder sprintf(nm,"h%d.txt",count2); //Filename sprintf(nm,"cr%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file sprintf(name,"CrOH++"); // Model Al interactions printf("Printing time period %d %s. \n",count2, name); // Screen hand holder sprintf(nm,"h%d.txt",count2); //Filename sprintf(nm,"cr1h%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file sprintf(name,"CrOHOH+"); // Model Al interactions printf("Printing time period %d %s. \n",count2, name); // Screen hand holder sprintf(nm,"h%d.txt",count2); //Filename sprintf(nm,"cr2h%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file sprintf(name,"CrOHOHOH"); // Model Al interactions printf("Printing time period %d %s. \n",count2, name); // Screen hand holder sprintf(nm,"h%d.txt",count2); //Filename sprintf(nm,"cr3h%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file sprintf(name,"CrOHOHOHOH-"); // Model Al interactions printf("Printing time period %d %s. \n",count2, name); // Screen hand holder

534
sprintf(nm,"h%d.txt",count2); //Filename sprintf(nm,"cr4h%d.txt",count2); //Filename Print(iNumOfNodes,nodes,nm,name); //write the file } }

535

Appendix R: nosq8
LIST ALL SELECTED NODES. NODE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 NODE 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 NODE X .00000E+00 .10000E-01 .62500E-03 .12500E-02 .18750E-02 .25000E-02 .31250E-02 .37500E-02 .43750E-02 .50000E-02 .56250E-02 .62500E-02 .68750E-02 .75000E-02 .81250E-02 .87500E-02 .93750E-02 .10000E-01 .10000E-01 .10000E-01 X .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .00000E+00 .93750E-02 .87500E-02 .81250E-02 .75000E-02 .68750E-02 .62500E-02 X DSYS= 0 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX

Y .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .10000E-01 .62500E-03 .12500E-02 Y .18750E-02 .25000E-02 .31250E-02 .37500E-02 .43750E-02 .50000E-02 .56250E-02 .62500E-02 .68750E-02 .75000E-02 .81250E-02 .87500E-02 .93750E-02 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 Y

536
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 NODE 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 NODE 81 82 83 84 85 86 87 .56250E-02 .50000E-02 .43750E-02 .37500E-02 .31250E-02 .25000E-02 .18750E-02 .12500E-02 .62500E-03 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 X .00000E+00 .00000E+00 .00000E+00 .00000E+00 .30597E-02 .43576E-02 .56306E-02 .68592E-02 .88823E-02 .89021E-02 .89175E-02 .89108E-02 .69403E-02 .56424E-02 .43694E-02 .31408E-02 .11177E-02 .10979E-02 .10825E-02 .10892E-02 X .16766E-02 .79420E-02 .88531E-02 .89789E-02 .83234E-02 .20580E-02 .11469E-02 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .10000E-01 .93750E-02 .87500E-02 .81250E-02 .75000E-02 .68750E-02 .62500E-02 .56250E-02 .50000E-02 .43750E-02 .37500E-02 .31250E-02 Y .25000E-02 .18750E-02 .12500E-02 .62500E-03 .11177E-02 .10979E-02 .10825E-02 .10892E-02 .30597E-02 .43576E-02 .56306E-02 .68592E-02 .88823E-02 .89021E-02 .89175E-02 .89108E-02 .69403E-02 .56424E-02 .43694E-02 .31408E-02 Y .11469E-02 .10211E-02 .16766E-02 .79420E-02 .88531E-02 .89789E-02 .83234E-02 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00

537
88 89 90 91 92 93 94 95 96 97 98 99 100 NODE 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 NODE 121 122 123 124 125 126 127 128 129 130 131 132 133 134 .10211E-02 .76095E-02 .77130E-02 .23905E-02 .22870E-02 .49998E-02 .78674E-02 .50000E-02 .21326E-02 .62415E-02 .78145E-02 .37584E-02 .21855E-02 X .37472E-02 .78021E-02 .62527E-02 .21979E-02 .66724E-02 .66791E-02 .33300E-02 .33233E-02 .44652E-02 .55455E-02 .68655E-02 .68696E-02 .55403E-02 .44600E-02 .31401E-02 .31360E-02 .58753E-02 .58679E-02 .41307E-02 .41381E-02 X .60926E-02 .49961E-02 .39133E-02 .50085E-02 .50095E-02 .62500E-03 .14633E-02 .27798E-02 .20883E-02 .34048E-02 .40538E-02 .46788E-02 .53153E-02 .59403E-02 .20580E-02 .22870E-02 .76095E-02 .77130E-02 .23905E-02 .21322E-02 .50000E-02 .78674E-02 .50000E-02 .21852E-02 .62416E-02 .78145E-02 .37584E-02 Y .21977E-02 .37473E-02 .78021E-02 .62527E-02 .33231E-02 .66727E-02 .66792E-02 .33297E-02 .31399E-02 .31358E-02 .44654E-02 .55459E-02 .68658E-02 .68698E-02 .55405E-02 .44600E-02 .41381E-02 .58755E-02 .58680E-02 .41306E-02 Y .50098E-02 .60928E-02 .49959E-02 .50089E-02 .39124E-02 .62500E-03 .57347E-03 .55886E-03 .57347E-03 .55886E-03 .54893E-03 .54893E-03 .54126E-03 .54126E-03 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00

538
135 136 137 138 139 140 NODE 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 NODE 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 .65546E-02 .71796E-02 .77210E-02 .93750E-02 .83460E-02 .88015E-02 X .94265E-02 .94411E-02 .94265E-02 .94411E-02 .94511E-02 .94511E-02 .94587E-02 .94587E-02 .94554E-02 .94554E-02 .94894E-02 .93750E-02 .94894E-02 .91617E-02 .85367E-02 .72202E-02 .79117E-02 .65952E-02 .59462E-02 .53212E-02 X .46847E-02 .40597E-02 .34454E-02 .28204E-02 .22790E-02 .62500E-03 .16540E-02 .11985E-02 .57347E-03 .55886E-03 .57347E-03 .55886E-03 .54893E-03 .54893E-03 .54126E-03 .54126E-03 .54458E-03 .54458E-03 .51057E-03 .83830E-03 .54458E-03 .54458E-03 .51057E-03 .62500E-03 .51057E-03 .83830E-03 Y .14633E-02 .27798E-02 .20883E-02 .34048E-02 .40538E-02 .46788E-02 .53153E-02 .59403E-02 .65546E-02 .71796E-02 .77210E-02 .93750E-02 .83460E-02 .88015E-02 .94265E-02 .94411E-02 .94265E-02 .94411E-02 .94511E-02 .94511E-02 Y .94587E-02 .94587E-02 .94554E-02 .94554E-02 .94894E-02 .93750E-02 .94894E-02 .91617E-02 .85367E-02 .72202E-02 .79117E-02 .65952E-02 .59462E-02 .53212E-02 .46847E-02 .40597E-02 .34454E-02 .28204E-02 .22790E-02 .11985E-02 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00

539
NODE 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 NODE 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 NODE 221 222 223 224 225 226 X .51057E-03 .37086E-02 .23681E-02 .26733E-02 .34035E-02 .49941E-02 .46787E-02 .40524E-02 .62449E-02 .53152E-02 .59360E-02 .74006E-02 .72343E-02 .65503E-02 .88922E-02 .88677E-02 .82459E-02 .83422E-02 .89098E-02 .83848E-02 X .83521E-02 .89142E-02 .83924E-02 .83660E-02 .89449E-02 .83119E-02 .83627E-02 .62914E-02 .76319E-02 .73267E-02 .65965E-02 .50059E-02 .53212E-02 .59475E-02 .37551E-02 .46847E-02 .40639E-02 .25994E-02 .27657E-02 .34496E-02 X .11078E-02 .11323E-02 .17541E-02 .16578E-02 .10902E-02 .16152E-02 Y .16540E-02 .11078E-02 .11323E-02 .17541E-02 .16577E-02 .10902E-02 .16150E-02 .16478E-02 .10858E-02 .16073E-02 .16339E-02 .10551E-02 .16881E-02 .16372E-02 .37086E-02 .23681E-02 .26733E-02 .34035E-02 .49941E-02 .46788E-02 Y .40525E-02 .62449E-02 .53153E-02 .59361E-02 .74006E-02 .72343E-02 .65504E-02 .88922E-02 .88677E-02 .82459E-02 .83422E-02 .89098E-02 .83848E-02 .83521E-02 .89142E-02 .83924E-02 .83660E-02 .89449E-02 .83119E-02 .83627E-02 Y .62914E-02 .76319E-02 .73267E-02 .65965E-02 .50059E-02 .53212E-02 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00

540
227 228 229 230 231 232 233 234 235 236 237 238 239 240 NODE 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 NODE 261 262 263 264 265 266 267 268 269 270 271 272 273 .16479E-02 .10858E-02 .16076E-02 .16340E-02 .10551E-02 .16881E-02 .16373E-02 .13489E-02 .19818E-02 .83975E-02 .77757E-02 .82313E-02 .86511E-02 .83460E-02 X .80182E-02 .16025E-02 .22243E-02 .17687E-02 .16540E-02 .69255E-02 .77058E-02 .71409E-02 .77638E-02 .69828E-02 .71961E-02 .30745E-02 .22942E-02 .28603E-02 .22362E-02 .30171E-02 .28051E-02 .56206E-02 .43735E-02 .47325E-02 X .52726E-02 .78410E-02 .78347E-02 .73664E-02 .73685E-02 .43792E-02 .56264E-02 .52702E-02 .47300E-02 .21590E-02 .21653E-02 .26364E-02 .26343E-02 .59475E-02 .37551E-02 .46847E-02 .40639E-02 .25994E-02 .27657E-02 .34496E-02 .16025E-02 .17687E-02 .13489E-02 .16540E-02 .19818E-02 .83975E-02 .77757E-02 Y .82313E-02 .86511E-02 .83460E-02 .80182E-02 .22243E-02 .22361E-02 .30172E-02 .28050E-02 .69255E-02 .77058E-02 .71411E-02 .77638E-02 .69828E-02 .71961E-02 .30745E-02 .22941E-02 .28601E-02 .21587E-02 .21649E-02 .26360E-02 Y .26340E-02 .56208E-02 .43736E-02 .47327E-02 .52729E-02 .78410E-02 .78347E-02 .73666E-02 .73686E-02 .43792E-02 .56264E-02 .52703E-02 .47300E-02 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00

541
274 275 276 277 278 279 280 NODE 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 NODE 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 .64569E-02 .58935E-02 .72468E-02 .73421E-02 .35442E-02 .41092E-02 .27544E-02 X .26607E-02 .35353E-02 .41062E-02 .72372E-02 .73338E-02 .64659E-02 .58965E-02 .27640E-02 .26690E-02 .61089E-02 .67689E-02 .62738E-02 .67744E-02 .61097E-02 .62735E-02 .38950E-02 .32351E-02 .37304E-02 .38942E-02 .32296E-02 X .37307E-02 .50054E-02 .43017E-02 .47374E-02 .57104E-02 .52775E-02 .68676E-02 .63704E-02 .64790E-02 .63688E-02 .64811E-02 .50002E-02 .57041E-02 .52682E-02 .42954E-02 .47281E-02 .31381E-02 .36354E-02 .35267E-02 .36371E-02 .27542E-02 .26605E-02 .64571E-02 .58937E-02 .72469E-02 .73422E-02 .35440E-02 Y .41092E-02 .27637E-02 .26688E-02 .35352E-02 .41063E-02 .72374E-02 .73339E-02 .64659E-02 .58966E-02 .32295E-02 .38942E-02 .37306E-02 .61093E-02 .67692E-02 .62741E-02 .67745E-02 .61099E-02 .62736E-02 .32348E-02 .38948E-02 Y .37301E-02 .31379E-02 .36352E-02 .35261E-02 .36370E-02 .35241E-02 .50056E-02 .43017E-02 .47376E-02 .57107E-02 .52779E-02 .68678E-02 .63706E-02 .64793E-02 .63689E-02 .64813E-02 .50003E-02 .57043E-02 .52682E-02 .42953E-02 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00

542
NODE 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 X .35246E-02 .59839E-02 .54419E-02 .54424E-02 .59802E-02 .54320E-02 .54382E-02 .45634E-02 .40220E-02 .45696E-02 .40257E-02 .45733E-02 .45738E-02 .55505E-02 .50023E-02 .44609E-02 .50090E-02 Y .47280E-02 .45740E-02 .45735E-02 .40252E-02 .54426E-02 .59841E-02 .54422E-02 .59804E-02 .54320E-02 .54384E-02 .45633E-02 .45697E-02 .40215E-02 .50093E-02 .55508E-02 .50024E-02 .44606E-02 Z .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 .00000E+00 THXY .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THYZ .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 THZX .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00 .00

543

Appendix S: elsq8
LIST ALL SELECTED ELEMENTS. ELEM MAT TYP REL ESY 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 1 32 48 65 6 8 10 12 22 24 26 28 38 40 42 44 53 55 57 (LIST NODES) NODES 2 4 18 34 8 8 10 12 14 24 26 28 30 40 42 44 46 55 57 59 NODES 59 66 67 69 70 71 73 74 75 77 78 79 4 82 4 68 83 16 84 72 61 10 12 24 26 28 40 42 44 55 57 59 81 14 6 14 20 20 30 30 80 67 68 70 71 72 74 75 76 78 79 80 63 16 81 82 22 83 32 84 60 132 134 144 146 148 158 160 162 172 174 176 127 137 5 136 141 138 151 150 178 133 135 145 147 149 159 161 163 173 175 177 180 15 129 137 21 141 31 151 177 186 189 195 199 202 208 212 215 221 225 228 126 139 127 192 143 140 153 205 20 63 36 51 66 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 17 3 33 49 130 7 9 11 13 23 25 27 29 39 41 43 45 54 56 58 19 126 35 50 131 130 132 134 136 144 146 148 150 158 160 162 164 172 174 176 138 64 152 166 182 128 131 133 135 142 145 147 149 156 159 161 163 170 173 175

ELEM MAT TYP REL ESY 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

544
ELEM MAT TYP REL ESY 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 32 86 76 87 48 88 80 82 6 83 84 85 86 87 88 89 68 90 72 NODES 36 36 46 46 51 51 61 61 16 65 22 32 38 48 53 63 82 82 84 84 NODES 91 76 92 80 89 66 70 74 78 90 91 101 65 67 71 75 79 65 102 69 86 86 88 88 83 67 71 75 79 85 87 66 92 68 72 76 80 66 70 70 NODES 103 73 104 74 74 78 95 103 96 214 208 227 213 214 226 267 211 271 87 91 81 92 69 93 94 95 96 73 77 93 81 97 98 99 100 101 94 102 243 218 245 231 238 186 199 212 225 241 244 188 184 189 202 215 228 182 201 195 242 243 234 245 196 190 203 216 229 209 222 187 235 194 207 220 233 188 200 201 244 219 235 232 197 187 200 213 226 210 223 259 183 191 204 217 230 185 263 198 38 85 48 86 53 87 63 88 83 81 69 85 73 87 77 81 83 89 85 90 155 152 165 164 169 166 179 178 139 128 143 153 157 167 171 181 237 192 240 205 37 155 47 165 52 169 62 179 140 183 142 154 156 168 170 180 236 237 239 240 157 154 167 218 171 168 181 231 236 129 196 239 209 242 222 234 238 193 241 206

ELEM MAT TYP REL ESY 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ELEM MAT TYP REL ESY 81 82 83 1 1 1 1 1 1 1 1 1 0 0 0

545
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 77 93 65 97 89 94 98 90 95 99 91 96 100 105 97 106 98 78 67 101 68 69 71 72 73 75 76 77 79 80 89 89 90 90 NODES 107 99 101 100 101 110 101 93 111 105 112 94 113 106 114 95 115 107 116 96 91 91 109 92 108 97 93 97 102 102 98 98 103 103 99 99 104 104 100 100 NODES 111 93 113 115 117 110 118 112 94 110 95 96 105 105 106 106 112 109 114 116 111 117 113 118 264 261 268 272 292 290 295 293 265 302 269 273 291 292 294 295 307 260 312 317 308 305 313 310 104 107 108 108 92 105 109 110 94 111 106 112 95 113 107 114 96 115 108 116 254 252 283 255 282 275 259 258 285 284 277 262 287 286 279 266 289 288 281 270 253 254 299 257 257 274 260 275 263 285 276 277 267 287 278 279 271 289 280 281 288 278 282 280 256 290 283 261 264 291 293 265 268 294 296 269 272 297 300 273 104 97 92 89 102 98 90 103 99 91 104 100 92 102 105 103 106 221 190 185 194 197 203 207 210 216 220 223 229 233 248 246 251 249 227 191 256 193 198 204 206 211 217 219 224 230 232 247 248 250 251 224 258 184 246 247 262 249 250 266 252 253 270 255 284 274 286 276

ELEM MAT TYP REL ESY 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ELEM MAT TYP REL ESY 121 122 123 124 125 126 127 128 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

546
129 130 131 132 133 134 135 136 137 138 139 140 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 119 114 120 116 117 111 113 115 121 118 122 119 107 107 108 108 111 112 114 116 112 113 114 115 NODES 123 124 121 124 117 124 124 110 120 110 124 117 116 118 118 122 121 119 123 125 109 117 120 124 120 122 124 119 124 123 120 109 125 125 125 125 321 327 325 335 322 330 336 306 303 305 332 323 320 326 327 328 334 329 331 304 304 324 333 337 331 335 334 330 323 336 332 302 333 306 337 324 115 119 109 120 121 121 122 123 118 122 119 123 298 296 301 300 308 307 312 317 311 313 316 318 297 298 299 301 309 311 316 321 310 314 315 319 318 315 303 320 322 309 314 319 325 326 328 329

ELEM MAT TYP REL ESY 141 142 143 144 145 146 147 148 149 150 151 152 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0

/OUTPUT FILE= nosq8a