Object-Oriented Software for Fitness-For-Service Assessment of Cracked Cylinder Based on API RP 579

Fitness-for-service assessment of a cracked component intends to evaluate its remaining strength and remaining life to support the implementation of a maintenance plan. This research aims to develop a fitness-for-service assessment software to facilitate the task. The software development process included identifying the software specifications, designing the software structure, manipulating the information in the standard for programming, the graphical user interface design, and finally verification. The assessment procedure employed in this study was the third edition of the standard API RP 579. The software structure was designed using an objectoriented concept. The software can perform integrity assessment levels 1, 2, and 3 option B, leak-before-break assessment, and remaining life assessment for a cracked cylinder that has a through-thickness crack or semi-elliptical surface crack oriented in an axial or circumferential direction. The applied loads could be a nominal axial force, bending moment, and internal pressure, as well as stress profiles perpendicular to the crack plane due to mechanical, thermal, and residual stresses. Accuracy of the software was demonstrated by applying it to example problems. Some aspects of the software extensibility were conceptually discussed.


INTRODUCTION
crack-like flaw is one of the major service degradation mechanisms for pressure vessels and piping. Fitness-forservice (FFS) assessments are conducted on these cracked components to quantitatively evaluate their suitability for operation and to determine the remaining service life. Numerous professional FFS assessment procedures have been developed worldwide, as reviewed by Hasegawa [1]. To enhance FFS assessment activities, Filiou et al. [2] suggested the development of FFS software. Researchers from universities, organizations, and companies have attempted to develop these software packages [3][4][5][6][7][8][9][10][11][12][13][14]. The computational basis within these packages may refer to a single specific FFS standard [3,6,9,11,14], an integration of several FFS standards [12,13], or a direct implementation of a fracture mechanics methodology without referring to any standard [4,5,7,8,10].

A
The API 579 standard [15] is a well-known assessment standard, especially in the petrochemical industry since it covers the major damage mechanisms found in this area of application. Since the first edition was first released in 2000, the code has been continually revised, with the most recent third edition of the code published in 2016. For the crack-like flaw assessment module, the code provides necessary assessment information similar to other well-accepted codes, such as BS 7910, R6, and FITNET procedures. The stress intensity factor (SIF) solutions in the API 579 standard support the broadest range of cylindrical components and allow the calculation of SIF due to an arbitrary stress distribution profile [16]. The latest edition of standard revised a number of elements, for example, the reference temperature for a level 1 assessment, the recommended residual stress profiles, and the method to determine the plasticity correction factor. The FFS software developed based on the API 579 standard is rarely found in the literature [9,11,12]. Furthermore, the available software can assess up to level 2 and do not support the latest edition of this standard. In the development of the FFS software, the extensibility of the software is a necessary concern. Object-oriented (OO) programming is one of the proper approaches that can support the software structure design to satisfy such requirements [17]. A few applications of the OO concept in FFS software for a cracked component were found in the literature [3,4,8]. Furthermore, to the authors' knowledge, the OO concept has not yet been applied in the development of a FFS software based on the API 579 standard. The present paper aims to apply the OO concept to develop the FFS software for a cracked cylinder, based on the latest edition of the API 579 standard. The major concern is to develop a class hierarchy diagram to support the extensibility of the software. The paper is composed of a review of the API 579 standard, the software design process, and an application of the software with example problems.

API 579 STANDARD
he API 579 standard provides three levels of integrity assessment. The higher level of assessment requires more detailed information and analysis, although more precise assessment results can be obtained. Fig. 1 provides an overview of the integrity assessment recommended by the standard. The assessment always starts from level 1 if this level's applicability criteria are satisfied. The higher level of the assessment should be performed if the lower level assessment predicts a component failure. However, if it is decided not to conduct the higher assessment level, the component must be repaired or replaced as suggested by the standard. An assessment of component acceptability must also consider the potential for future component degradation under continued service conditions, based on the potential for crack growth due to fatigue or corrosion. If there is a potential of crack growth, it is necessary to evaluate its remaining life. The background of the integrity assessment for each level and the remaining life evaluation can be summarized as follows. A level 1 assessment adopts a screening curve approach to determine a permissible crack length in a component. The standard prepares several screening curves according to component geometries (i.e., plate, cylinder, sphere), a crack depth relative to the thickness of the component, and the crack location (i.e., base metal, heat-affected zone, weld). Fig. 2 schematically represents this curve for a particular case. The horizontal axis is T -T ref + 56 (in o C), where T is the component service temperature, and T ref is a reference temperature of the material. The T ref can be set as a nil-ductilitytransition temperature, RT NDT , or estimated from the specified minimum yield strength (SMYS) and the exemption curve of a material. From knowing the T, T ref , crack depth, crack location, and component wall thickness, the allowable crack length can be determined from this curve. If the allowable crack length is shorter than that from the inspection, the component is predicted to be unsafe. Level 2 and 3 assessments adopt a failure assessment diagram (FAD) approach. Fig. 3 schematically represents the diagram. The horizontal axis of the FAD is a load ratio based on primary stress, L r,p , while the vertical axis is a toughness ratio, K r . The current status of a cracked component is represented by an assessment point (L r,p , K r ). The component is predicted to be safe (or acceptable) only if the assessment point lies on or below the failure assessment curve (FAC). Parameter L r,p is defined as: Perform a level 1 assessment Parameter K r is defined as: where K I,p and K I,sr are mode-I stress intensity factors due to primary and secondary stresses, respectively, K mat is fracture toughness of the component's material, and  is the plasticity correction factor. The SIF of specific cracked component geometry and applied loads can be determined from formulas in the standard. The SIF solutions may be expressed in terms of nominal loads, linearized stress components, or influence coefficients. The last form of the SIF solution is appropriate to evaluate the SIF due to a stress profile acting normal to the crack plane, e.g. thermal and residual stress profiles. The standard employs an approximation of the actual stress profile with the following 4 th order polynomial function: where  0 ,  1 ,  2 ,  3 and  4 are best-fit coefficients, t is the nominal thickness corrected with uniform corrosion, and x is the local coordinate pointed along the thickness direction. A level 2 FAC is a general curve, which means it is independent of the materials and component geometries. This general curve is expressed by:  (5) where E and  ref are Young's modulus and reference strain, respectively. It should be noted that the FAC depends on the material properties, so it can be called a material-specific FAC.
The extent of the FAC on the L r,p axis is dependent on a material's deformation behavior. For materials with a yield point plateau (where the strain hardening exponent is greater than 15) or materials with unknown strain-hardening characteristics, the L r,p(max) is set to 1. For specific material types or classes such as ASTM A508 steel, C-Mn steels, and austenitic stainless steels, the recommended values of L r,p(max) are 1.15, 1.25, and 1.80, respectively. For materials with a typical strain hardening characteristic, the L r,p(max) is determined from the following equation: where  f is the flow stress which is typically an average of the yield and ultimate strength of a material.
If the component is predicted to be safe per level 3 assessment, then the assessment can proceed to evaluate the remaining life of the cracked component. To determine the remaining life, processes of updating the crack size and assessing the integrity of the structure are alternately conducted until the assessment point lies above the FAC, where the component is predicted to be unsafe. The summation of a number of cycles (or time) during each step of crack increment is the remaining life. For the case of a component with a surface crack, both crack length and crack depth are continually evaluated. The surface crack will be recategorized as a through-wall crack when its depth reaches 80% of the wall thickness, as illustrated in Fig. 4. The length of a through-wall crack after recategorized is given by 2c = 2c s + 2(t − a s ), where 2c s and a s are the length and depth of a surface crack when the crack size meets the recategorization criteria. The component with this through-wall crack is then reassessed. If it is predicted to be safe, the processes of crack growth analysis and integrity assessment will proceed as previously described. Thus, the remaining life of a component with a surface crack might be a combination of the surface crack growth period and the through-wall crack growth period.

SOFTWARE DESIGN
his section describes the software design processes, beginning with a description of the software specifications, followed by highlighting some calculation issues. In this study, the information from the standard which is presented in graphical and tabular forms are transformed into other forms to make them more convenient to handle during the programming process. Other issues including calculating the SIF and fatigue crack growth analysis are also addressed. Next, the class hierarchy diagram of the program is presented. Finally, the user interface is demonstrated.

Specifications
The software specifications are related to the types and levels of assessments, cracked component geometries, and types of applied loads. The software was specified to perform integrity, leak-before-break (LBB), and remaining life assessments of a cracked cylinder. Four types of cracked cylinder (namely CTCL, CTCC, CSCLE, and CSCCE) were considered, as illustrated in Fig. 5. For CSCLE and CSCCE, both the inner-wall and outer-wall cracks were included in the study. The treatments of crack interaction and weld strength mismatch were not included. The SI unit system was adopted. The integrity assessment covered levels 1, 2, and 3 option B. The LBB assessment was permitted for the level 2 and 3 assessments, whereas the remaining life assessment permitted only a level 3 assessment. For the LBB assessment, the user must provide the length of a through-wall crack at a detectable leak rate. The remaining life assessment covered only the crack growth mechanism by fatigue. Furthermore, only cyclically nominal loads with a constant amplitude were considered. The analysis was performed at two representative locations on the crack front. The applied loads on the cylinder could be nominal loads, i.e. internal pressure, axial force, and bending moment, as well as through-thickness mechanical, thermal, and residual stress distribution perpendicular to the crack plane. These stress profiles are expressed in the form of Eqn. (3), where the coefficients in the equation are specified for given types and directions of stresses. The coefficients of thermal stress profiles were provided by the user. Meanwhile, for residual stress, the user has a choice of whether to use the recommended profiles in the standard.

Calculation issues
The standard provides definite steps to manipulate the input information for each type and level of assessment. Yet some issues require preparation and consideration before coding. The first issue was information preparation in the standard which appears as a graph (e.g., screening curve) or table and converting that into a suitable format for programming. The next issue was the SIF calculation when the origin of the local coordinate on the thickness direction of a cracked cylinder differs from the recommended residual stress profile, or from after crack recategorization. The final issue was related to fatigue crack growth analysis. Each screening curve was digitized and the coordinates obtained were stored in a text file. An array-type variable was prepared to store the data read from the opened text file while the program was running. A one-dimensional linear interpolation algorithm was used to determine a permissible crack length at an intermediate value of the independent variable, i.e. T -T ref + 56. The information from each table was stored in a text file. A one or three-dimensional linear interpolation algorithm was employed depending on the number of independent variables. The next issue was SIF calculation. Considering the CSCLE and CSCCE cracked cylinders with an external surface crack, shown respectively in Figs. 5(d) and 5(f), the origin of the local coordinate x was defined at the outer wall, whereas the recommended residual stress profiles were typically defined at the inner wall. Therefore, before computing the SIF of these two cracked cylinder geometries, the recommended residual stress profiles must be rewritten in the form of: where  0 ,  1 ,  2 ,  3 and  4 are recommended coefficients given in the standard. A similar situation occurs when the CSCLE and CSCCE cracked cylinders with an external surface crack (Figs. 5(d) and 5(f)), are respectively recategorized as the CTCL (Fig. 5(a)) and CTCC ( Fig. 5(b)) cracked cylinders. The user-defined stress profiles of any type (i.e. mechanical, thermal and residual) for the cases of CSCLE and CSCCE must be rewritten in the form of Eqn. (7) where c allow is the allowable increment of half crack length (i.e. 0.01c), and (dc/dN) in and (dc/dN) out are the FCGRs at the inner and outer points, respectively. Note that Eqn. (9) yields a conservative value of N allow since the maximum between FCGRs at two locations and the floor function were used. The increments of a half crack length at the inner point c in and the outer point c out under a cyclic load of N allow cycles are c in = N allow ·(dc/dN) in and c out = N allow ·(dc/dN) out , respectively. Since c in is typically unequal to c out (Fig. 6), the maximum between both values was chosen to be the half crack length increment c, i.e. c = max(c in , c out ). For a semi-elliptical surface crack, FCGRs at the surface and deepest points were calculated. The conservative allowable number of loading cycles N allow was determined from:

Class hierarchy diagram
This section explains the class hierarchy diagram development process. This process involved identifying appropriate classes and assigning class relationships. This research identified the classes from nouns and noun phrases in the problem description. The following paragraph presents the problem description and the candidate classes are underlined.
In-servicing cylindrical vessel has been degraded by uniform corrosion and crack. To perform an assessment, engineers gather information which is a fabrication (e.g., weldment and residual stress), material (e.g., general information, tensile properties, fracture toughness, fatigue crack growth rate), environment, nominal loads, and stresses on the crack plane. For convenience, these identified classes are renamed and listed (in the same order as those appearing in the problem description) as Cylinder, UniformCorrosion, Crack, Assessment, Weldment, ResidualStress, Material, GeneralInfo, Tensile, Toughness, FCG, Environment, NominalLoad, and Stress classes. The class hierarchy was developed by applying the concepts of association, inheritance (the "is a" relationship), and composition (the "has a" relationship). The concept of inheritance might introduce generalized classes. The class diagram obtained from these considerations is shown in Fig. 7. Brief explanations of the diagram are given as follows: • The GeneralInfo, Environment, and NominalLoad classes were changed to be the property (also called attribute) of the Material, Structure, and Cylinder classes, respectively. They are therefore not included in the diagram. • The UniformCorrosion and Crack classes are derived from the same base class (the Defect class) since both uniform corrosion and crack are specific types of defects.
• The Cylinder class is derived from a more generalized class (the Structure class) since a cylinder is a specific type of structure. This class had a specific method to calculate the stresses due to nominal loads. • The Structure class is an aggregation of the Weldment and Defect classes because weldment and defect might exist in a structure. This class was also composed of the Material and Stress classes since a structure is made of a specific type of material and is always under stress. • The ResidualStress class is derived from the Stress class because residual stress is a specific type of stress. The Stress class had a method to determine linearized stress components. • The Weldment class is composed of the Material and ResidualStress classes because weldment is made of a specific type of material and always introduces residual stress in a structure. • The FCG class is derived from the CrackGrowth class since fatigue crack growth is a specific type of crack growth mechanism. • The Material class is composed of the Tensile, Toughness, and CrackGrowth classes. ResStrCylinder, had a specific method to determine these coefficients of a cylinder from the weld information. • In Fig. 8(d), the Toughness class had K mat as a property. Each of the derived classes ASME, Charpy, and MasterCurve had a method to estimate a K mat according to ASME section XI lower bound curve, Charpy impact transition curve or Charpy impact energy, and master curve methodologies, respectively. • In Fig. 8(e), the abstract class FCG has two subclasses named Paris and Walker. Each subclass had parameters in FCGR model as a property and was able to calculate the fatigue crack growth rate.
• In Fig. 8(f), the AssessCrack class is derived from the abstract class Assessment. This class had a method to perform an assessment of a cracked cylinder according to the specified type and level of assessment. The object created by the abstract class Level behaves according to the object of the subclass being created, i.e. the Level1 or Level2 class. The Level1 class had a method to determine a permissible crack length from a screening curve. The Level2 class had a method to determine an assessment point and the FAC. The level3 class inherits the method to determine an assessment point from the Level2 class and overrides the method to determine the FAC.  All classes shown in Figs. 7 and 8 are classified as the application classes. To complete the software design, it is necessary to create the graphical user interface (GUI) classes. The GUI classes have the purpose of receiving input information and creating and managing the application objects. The designed GUI class hierarchy and its communications with the application classes (partially presented) are illustrated in Fig. 9. All the GUI classes in this figure have a name starting with the letters "frm". The frmMain class creates the application objects of the Structure and Material classes. After that, it creates the GUI object (or windows) of the frmCrackCylinder class to acquire information about cylinder geometry, welding, crack, and applied loads, and it also creates the GUI object of the frmMaterial class to acquire information about materials. The acquired information is then assigned to the corresponding application objects. Finally, the frmMain class creates the object of the Assessment class to assess the object(s) of the Structure class. At this stage, the present class diagram can fulfill the software specifications. However, it may be useful to reexamine the present class diagram for its extensibility. The following paragraph conceptually discusses an extension of the software if it is required to include the other types of a cracked component. Fig. 10 shows an extension of the class diagram to incorporate the other cracked component types, e.g. a cracked plate. The Plate and ResStrPlate classes are derived from the Structure and ResidualModel classes, respectively. The Plate class has the plate dimensions (e.g., width and thickness) as properties and has a method to calculate for calculating nominal stress. The CrackPlate class which is derived from the Plate class has the SIF and reference stress as properties. Additional classes for a specific type of cracked plate can be derived from the CrackPlate class. Each of the inherited classes has a specific method to calculate SIF and reference stress. The derived class ResStrPlate has a specific method to determine the residual stress profile of a plate from the weld information. In summary, the present class diagram has sufficient flexibility for further additional functions and improvements.

User interface
The implementation of GUI design and programming was accomplished by using the integrated development environment (IDE) of Delphi 10.2.3 community edition from Embarcadero Technologies. The information for the assessment was organized into three windows: Main window (Fig. 11); Cracked Cylinder window (Figs. 12 and 13); and Material window (Fig. 14). Note that the displayed information in all of these figures is for the level 3 option B assessment. For the lower assessment level, unnecessary information will be hidden or disabled. Instructions for using the software are described as follows. First, the defect type and assessment level in Option tab of Main window (Fig. 11(a)) are specified. If a level 2 or 3 option B assessment is selected, the additional options for assessment will be enabled. For the LBB assessment, the user must input the crack length at the detectable leak rate. The remaining life assessment is enabled for the level 3 option B assessment and the user must specify the crack growth mechanism.

ResidualStress ResidualModel
ResStrCylinder ResStrPlate Figure 10: Extension of the application classes to incorporate a cracked plate assessment.
Next, it proceeds to the Information tab of the Main window ( Fig. 11(b)) where the user is asked for specifying equipment details and material data source. The user then opens the Cracked Cylinder window (Figs. 12 and 13) and Material window (Fig. 14) to specify detailed information of the cracked cylinder and material properties, respectively.
The Cracked Cylinder window organizes information into Dimension, Weldment, Defect, and Operation tabs, as shown in Figs. 12(a) to 12(d), respectively. The Operation tab covers information about design, service, and maintenance of the cylinder. Additional details of the service conditions are illustrated in Fig. 13. For the Mechanical load tab shown in Fig. 13(a), the user can specify the applied nominal loads or coefficients of a stress profile. The Thermal stress tab is similar to the Mechanical load tab so it is not presented. For the Residual stress tab shown in Fig. 13(b), the user can enter the coefficients of a residual stress profile or allow the software to select the recommended profile in the standard.
The Material window has two main tabs to specify properties of base material and weld material (if weldment exists). Both tabs contain almost similar information, so only Base material tab is presented (Fig. 14). The mechanical properties are organized into tabs of Tensile, Fracture toughness, and Crack growth, with details of each tab shown in Fig. 14(a) -(c), respectively. The user can perform an assessment after completing the information and analysis options. The result of each assessment type or level is separately saved in a text file that can be displayed in the Result tab of the Main window (Fig. 11(c)). Example 2 Weldment (Fig. 12(b)) Heat input data source Custom API 579 Residual stress ( Fig. 13(b)) Data source API 579 (2016) Custom Tensile (Fig. 14(a)

Example 1
The cylindrical vessel constructed according to the ASME B&PV code, Section VIII Division 1 had a longitudinal semielliptical surface crack in the longitudinal seam on the inner wall (i.e. case in Fig. 5(c)). Uniform corrosion was not detected on either the inner or outer walls. The vessel was made of SA-516 Grade 70 steel with a specified minimum yield strength and ultimate strength of 260 MPa and 485 MPa, respectively. The material's exemption curve was assigned as a B-curve. The weld seam was a double V-groove 10 mm wide, produced by a shield metal arc weld (SMAW) process with a linear heat input of 1,500 J/mm and was not subjected to a post-weld heat treatment. The nominal inside diameter and thickness of the vessel were 3,050 mm and 25 mm, respectively. The vessel operated at an internal pressure of 0.7 MPa at 5 o C. An 80 mm long and 5 mm deep crack was detected by ultrasonic and magnetic particle techniques, respectively. The nearest major discontinuity was 800 mm from the crack. The vessel was also subjected to cyclic pressure with a maximum value of 0.7 MPa and a minimum value of 0 MPa. Thus, crack propagation by fatigue was possible. The FCGR is given by da/dN = 2.910 -8 K 3 , where da/dN is the fatigue crack growth rate (in mm/cycle) and K is the stress intensity factor range (in MPa·m 1/2 ). In the level 1 integrity assessment, the software used information about the crack size, crack orientation, weld orientation, material's exemption curve, SMYS, and the service temperature. The permissible crack length in the cylinder was determined to be 8.3 mm, smaller than the 80 mm long crack found during the inspection, so the cylinder was predicted to be unsafe. For the level 2 and 3 option B integrity assessments, the software reported important parameters which are shown in column 2 of Tab. 3, and predicted that the cylinder was safe.
For the remaining life evaluation, the fatigue crack growth rate was the additional input data.

Example 2
The cylindrical vessel constructed according to the ASME B&PV code, Section VIII Division 1 had a circumferential semi-elliptical surface crack in the circumferential seam on the outer wall (see the case in Fig. 5(f)). Uniform corrosion was not detected on either the inner or outer walls. The vessel was made of SA-106 Grade B steel with a specified minimum T yield strength of 240 MPa and an ultimate strength of 415 MPa, while the fracture toughness was 100 MPa·m 1/2 . The weld seam was a single V-groove 10 mm wide produced by a shield metal arc weld (SMAW) process and was not subjected to a post-weld heat treatment. The through-thickness residual stress profile is expressed by Eqn. (3)

CONCLUSIONS
he object-oriented software for fitness-for-service assessment of a cracked cylinder based on the current edition of the API 579 standard has been developed. The software development process was described and a unique class diagram was developed. Extension of the class diagram to include another type of cracked component (e.g. a cracked plate) was conceptually demonstrated. Programming issues were discussed, for example the preparation of information in the standard for coding, handling of a changing of a local coordinate in SIF calculation, crack size updating in fatigue crack growth analysis, and incorporating the effect of residual stress on the fatigue crack growth rate. The software's source code was written in the Delphi programming language. The software is able to perform brittle fracture assessment at levels 1, 2 and 3 option B, leak-before-break assessment, and remaining life assessment of a cracked cylinder subjected to axial force, bending moment, and internal pressure, in addition to stress profiles perpendicular to the crack plane due to mechanical, thermal and residual stresses. The cracked cylinders included in the software had either a through-thickness crack or a semi-elliptical surface crack oriented in axial or circumferential directions. The software incorporated a material database and methods to estimate the fracture toughness and material parameters in the R-O model when the user does not have this data. The software was found to accurately and rapidly perform the assessments.