## Abstract

The design and verification of pressure vessels is governed by the design codes specified by the ASME Boiler and Pressure Vessel Code (BPVC). Convention design satisfying the ASME BPVC code requirements would lead to a conservative design. This situation will to be solvable by modern structural optimization methods. The size optimization of pressure vessel complying with design-by-analysis requirements within the ASME Sec. VIII Division 2 specification is discussed in this paper. This is accomplished by an integrated approach in which the stress analysis is carried out by ANSYS. These results are used by an optimization code in matlab to perform design optimization. The integrated approach is fully automated and applied to the optimal design of a real pressure vessel. The results show that the material used by the pressure vessel can be minimized while satisfying the maximum stress specified in the BPVC.

## 1 Introduction

The work presented in this paper has been inspired by the recommendations made by Marins et al. [1]. The authors urged the design engineers stating that

“The goal to continue producing safe pressure vessels while reducing costs requires the most effective use of the design process. The automation of design engineering activities is needed to achieve this goal. Vessel designers should consider developing specialzed FE interfaces similar to that de-scribed in this paper to effectively use automation for routine and repetitive investigations.”

Optimization is the process of finding the best feasible solution among the conventional designs which accepts almost all designs which merely satisfies the problem requirements. Solving complex design problems by integrating robust optimization tools like matlab with powerful finite element analysis (FEA) softwares such as ansys has opened a new door in the field of design optimization. The optimization methods, combined with more detailed and accurate simulation methods can improve the experimental process of conceptual and detailed design of engineering systems. The main purpose of performing design optimization in pressure vessels is to reduce material cost, by minimizing the weight with sufficient design factors to avoid failures such as excessive plastic deformation, rupture, ratchetting (incremental plastic deformation under cyclic loading), shakedown, fracture, corrosion fatigue, and buckling.

Use of computer-aided engineering has made the design and analysis of pressure vessels under the standard American Society of Mechanical Engineers (ASME) code more accurate, implying that the vessels are becoming safer and more efficient. The construction of pressure vessels and containers nowadays require advanced FEA tools due to the complex geometry of the structure and the multiple external conditions. Hence, an APDL (ANSYS Parametric Design Language) script file was written in order to formulate a parametric finite element model of the equipment as well as to automate the preprocessing, solution, and postprocessing phase in ansys 17.0. A static analysis is performed and the stresses generated in the model are evaluated according to the pressure vessel codes ASME VIII div 2 Part 5 design by analysis requirements *Protection against plastic collapse Elastic stress analysis method*, or its European counterpart EN 13445-3 Annex C Design by analysis *Method based on stress categories*.

Finite element analysis of the model is executed through matlab by running ANSYS script file in Batch mode. The postprocessing results such as total volume of the equipment, deformations, von-Mises stress, and membrane and bending stresses linearized across different component paths are stored in a result file. Objective function and constraints are defined in matlab by extracting appropriate data from this result file generated by ansys. For example, volume data represent the value of objective function, whereas linearized stress results which need to be verified against their respective allowable limits, forms the constraint. When the optimization problem has been setup and user runs the matlab file, the fmincon solver runs ansys in Batch mode and evaluates the design functions iteratively by searching the design space till a minimum weight design is found. The proposed methodology is completely automated and does not require any kind of user intervention until the optimal solution is found.

This paper presents size optimization of an axisymmetric pressure vessel structure in agreement with the standard ASME “design by analysis” requirement of elastic stress analysis criteria for protection against plastic collapse. In addition, this work also demonstrates how to develop an automated robust optimization procedure in order to generate a more reliable, safe, and cost-effective design solution.

## 2 Literature Survey

In the industrial sector, the pressure vessels are used as storage tanks, diving cylinder, recompression chamber, distillation towers, autoclaves, and many other vessels in mining or oil refineries and petrochemical plants, nuclear reactor vessel, habitat of a space ship, habitat of a submarine, pneumatic reservoir, hydraulic reservoir under pressure, rail vehicle airbrake reservoir, road vehicle airbrake reservoir, and storage vessels for liquefied gases. Even though optimization techniques have been extensively applied to design structures in general, very few pieces of work can be found which are directly related to design optimization of pressure vessels in compliance with the ASME Boiler and pressure vessel code (BPVC) by interfacing robust optimization solvers with FEA software. Various other researches on pressure vessel are related to study on how to perform the stress linearization and categorization to verify results from finite element analysis of 3D solid models, against the ASME code stress limits. Also, many analytical as well as experimental investigations are focused on the design and stress analysis of nozzle and head connections in a pressure vessel subjected to different loading conditions.

Gauchia et al. [2] had utilized a similar approach for optimizing a complex bus structure in weight and stiffness by means of coupling matlab and ansys. Their paper explains how to setup the overall flow in order to establish an automatic loop for the optimization procedure. Thickness of the beam cross section in the vehicle geometry were used as the design variables. For the optimization loop analyzed in this study, the matlab genetic algorithm toolbox was used to search the design space by varying the beam thickness and evaluating the fitness function in each iteration. Prior to the optimization, a sensitivity analysis was carried out in order to apply the optimization loop on certain beams more sensitive to variations in weight and torsion stiffness. A reduction of 4% in weight and an increase of 0.23% in torsion stiffness proves the effectiveness of the proposed advanced analysis method. The authors also suggested that a further improvement in results can be achieved by changing the beam placement in the bus structure.

There are several discussions on how to conduct the stress linearization and classification for ASME code verifications in order to prove the design as safe. The complex geometry and nature of the loading involved in the problem sometimes causes difficulty to analyst in performing these tasks. To emphasize some of these issues, Carlos [3] has made a few recommendations on how to perform these verifications considering a common geometry found in many nuclear and petrochemical plants. The generic geometry used for the analysis is a four-way Wye junction, connecting, in the inlet side, three piping and one piping from the outlet side. The 3D model of the equipment developed in solidworks program was imported in ansys to carry out the finite element analysis. The article discusses the nuclear piping analysis with a nonstandard item when the item should be modeled as a 3D solid with its verification done per the Sec. III Subsection NB 3300 of the ASME Code. Only primary stresses generated from internal pressure were considered in this work, since the scope is to highlight some of the problems caused by the stress classification and linearization in discontinuities, which are common in the nuclear area.

In an effort to analyze the design of a typical pressurized water reactor nozzle to pressure vessel connection under different loading combinations including internal pressure and nozzle concentrated loads, Neto and Albuquerque [4] adopted stress categorization methods and compared the results obtained from linear elastic FEA with the limit load FEA and with the results from simple shell geometry formulae. The analysis was performed in ansys using a quarter model with 3D solid finite elements comprising of 20 nodes per element and 3 degrees-of-freedom per node. It was found that in case of internal pressure and nozzle concentrated loads, the failure mode identified was plastic collapse in the vessel shell and the nozzle, respectively, whereas in the case of internal pressure plus nozzle concentrated loads, the failure mode was plastic collapse in the nozzle. It was concluded that the influence of local plus bending primary stresses and of the primary plus secondary stresses in the geometry transitions does not necessarily indicates the occurrence of excessive plastic deformation or incremental plastic deformation. Albuquerque also recommended to follow the procedures described in this work for the design of nozzle to vessel connections where there are many sets of nozzle concentrated loads in the design, service, and test conditions.

Another pioneering work on pressure vessel design using computational modeling was presented by Carbonari and Munoz-Rojas [5], who applied shape optimization techniques to axisymmetric pressure vessels considering an integrated approach in which the entire pressure vessel model is used in conjunction with a multi-objective function that aims to minimize the von-Mises mechanical stress from nozzle to head. In this work, a multi-objective function is defined as the sum of the logarithmic of the proof of summation of p-exponent terms of head and nozzle von-Mises stresses, allowing the control of the head and nozzle stresses through a weighting coefficient. Thus, the minimization of this function consists of minimizing the von-Mises stresses in the head and nozzle areas simultaneously. In the adopted shape optimization approach, the shapes of head and nozzle are given by cubic spline interpolation whose shape is changed during the optimization process by varying the coordinates of spline knots. The pressure vessel is modeled in ansys by using the 2D-axisymmetric shell element whereas for the optimization purpose a gradient-based sequential linear programing optimization algorithm is implemented using the matlab built-in linear programing function linprog. Based on the results, Carbonari concluded that the stress values are smaller for the optimized result than for the elliptical head when no thermal load is considered. In addition, the author proposed to consider the entire vessel for shape optimization, since the cylinder stresses are more sensitive to the coupling cylindrical region value than head and nozzle stresses, thereby allowing the optimization method to minimize the different stress levels between the head and nozzle.

Regarding with the appropriate structural design of the pressure vessel, the optimization approach has been paid much attention by many researchers both in practice and research. An extensive study was conducted by Widiharso et al. [6] to design a minimum weight pressure vessel for optimum thickness using ansys direct optimization tool. Bhagatsinh Verma [7] performed optimization for shell and head dimensions, to minimize the mass and von-Mises stress in a pressure vessel by employing screening optimization method in ansys 15.0. Another example of optimizing design of pressure vessel by interfacing different software packages, was presented by Saidpatil and Thakare [8]. The main aim of this work was to carry out detailed design and analysis of pressure vessel used in boiler for optimum thickness, temperature distribution, and dynamic behavior. Geometrical model was created on catiav5r19, finite element modeling was done using hypermesh, and ansys was used as a solver.

In various literatures, pressure vessels have been taken for various applications, and different optimization methods have been applied at various parts for reducing the stress or weight of the pressure vessel.

## 3 Finite Element Modeling of the Pressure Vessel

### 3.1 Creating Solid Model.

An ansys command file was written based on the design data of a real-world pressure vessel equipment used in a chemical industry. The complete finite element analysis of this equipment including solution, pre-and postprocessor have been automated using an APDL script file. This script file is executed in ansysapdl v17.0 to generate the geometry, meshes, boundary conditions, and postprocess. The main advantage of creating a model by means of APDL is that: the geometrical dimensions can be defined in terms of variables, thus creating a parametric model. Since the values for shell and flange thickness of the vessel are varied during each optimization loop, the finite element model of the equipment is defined in terms of parametric variables. The geometrical model as shown in Fig. 1 represents an axisymmetric thin-walled cylindrical pressure vessel, which is 5.85-m long and 8-m wide, with elliptical heads and four rectangular nozzle openings supported by flanges. Due to symmetry of the vessel along the *z*-plane, we consider only half model for our analysis.

The finite element model incorporate global geometry, boundary conditions, and loadings. The main pressure bearing components are shown in Fig. 2.

The mechanical properties of the material are as follows: modulus of elasticity is 200 GPa, Poisson's ratio is 0.3, and density is 7.9 × 10^{−6} kg/mm^{3}. FE analysis of the model was performed using solid95.

### 3.2 Loading and Boundary Conditions.

As shown in Fig. 3, three different boundary conditions were imposed on the design model:

symmetry boundary condition is applied to the structural;

fixed support in all three axis on the position of top bearing;

fixed support in X-axis on the position of bottom bearing.

Figure 4 displays the seven different loading conditions applied on the pressure vessel model:

acceleration due to gravity along

*X*-axis. Gravity in negative*X*-axis, −9.8 m/s^{2};internal pressure of 0.2 MPa;

average bolt pressure on the flanges;

the pull on the cross section of the two end nozzles (pressure = −2.5 MPa).

### 3.3 Meshing.

For the model under study, a superior quality mesh was generated by employing mapped hexa-meshing criteria. Hexahedral meshed model of the pressure vessel used during optimization is shown in Fig. 5.

## 4 Stress Analysis and Verification by Code

The ASME BPVC, particularly in its Section VIII Div-2 “design by analysis” code [9], has specific requirements on how to assess the stress results obtained from FEA to make the necessary code verification. For elastic analysis stress components are calculated, combined, and compared to limits for each category of stress based on multiples of the design stress intensity, *S _{m}*, for the material in use and for the category of stress. The guidelines and suggestions from this code were followed in order to ensure a safe design of the equipment analyzed in this paper.

In this work, elastic stress analysis method was utilized in the analysis for plastic collapse, since it is the only failure mode being considered. It is worth mentioning that although this method is used since it is relatively easy and straightforward, it should be kept in mind that the results of the categorization process may end up being ambiguous for more complex geometries and load cases. In such cases, a good engineering judgment and extensive code knowledge is required to correctly classify the stresses. Some of the issues regarding separation of primary and secondary stresses in finite element analyses have been explored by Slagi [10].

### 4.1 Stress Linearization.

After the static analysis is performed on the finite element model, the stress results obtained are linearized along 20 different stress classification lines (SCL/paths), to extract the membrane and membrane plus bending stress components generated in the critical parts of the vessel like cylindrical shell, nozzles, flanges, shell-head junctions, shell-nozzle junctions, nozzle-flange junctions, etc. The linearized stress components are generated using APDL commands along a predefined path. The results are separated into: (1) membrane stresses (*P _{m}*)—constant across thickness and (2) bending stresses (

*P*)—varying linearly across the thickness. These SCL's also known as paths in ansys were chosen according to the recommendations made by Hechmer and Hollinger [11] as such to cover all critical parts—mainly the junctions and intersection regions in the analyzed geometry of the pressure vessel, aiming to verify them against the Code limits.

_{b}### 4.2 Stress Classification.

The stresses are classified into primary (*P*), secondary (*Q*), or peak (*F*). Primary stresses are further divided into three types: general primary membrane (*P _{m}*), local primary membrane (

*P*), and primary bending (

_{L}*P*).

_{b}### 4.3 Allowable Limits.

ASME Section VIII-2 chart Fig. 5.1 [9] provides a guide to what the maximum stresses are allowed for different locations of the pressure vessel. Due to the fact that different modes of failure are associated with different category of stress, different allowable values are defined for each category. These are given as a proportion of the basic allowable stress intensity of the material (*S _{m}*) at design/working temperature.

As summarized by Porter and Martens [12], based on the Appendix 4 of ASME Section VIII, Div2:

*P*should be limited to 1.5_{m}*× S*,_{m}(

*P*+_{L}*P*) is limited to 1.5_{b}*× S*, and_{m}(

*P*+_{L}*P*+_{b}*Q*) is limited to 3.0*× S*._{m}

Since the failure modes of concern in this paper are collapse/gross distortion (*P _{m}*), plastic collapse (

*P*), and excessive plastic deformation (

_{b}*P*+

_{L}*P*), stress verifications for safeguard against other modes have not been performed in order to stay within the scope of this work.

_{b}Following a conservative approach, the averaged stress for all the paths are classified as *P _{L}*. Using the criteria described by Porter and Martens [12], for the paths near the nozzle–shell junction (referred as ring area) such as paths-2,3,15-20; the “

*P*+

_{L}*P*+

_{b}*Q*” is compared against 3.0

*× S*. For the sections remote from the junction, the

_{m}*P*+

_{L}*P*is compared against 1.5

_{b}*× S*.

_{m}For the pressure vessel model in consideration, standard steel S30408 was used, which has a basic allowable stress intensity value of 137 MPa at a working temperature of 110 °C. Based on the limits specified in Table 1, all the analyzed regions of the vessel are checked for compliance with respect to the elastic stress analysis criteria for plastic collapse. The combination of the allowable limits mentioned in Table 1 and the output from the stress classification tool is used to produce pass fail judgments on the component under study. This criteria later forms the basis of constraint function in the optimization process. The indicated limits mentioned in Table 1 along with the equipment operating conditions are the so-called design condition for the pressure vessel equipment used in this study.

Stress category | Limits based on S_{m} | Allowable value (MPa) |
---|---|---|

General primary membrane stress (P)_{m} | S_{m} | 137 |

Primary local membrane stress (P)_{L} | 1.5 × S_{m} | 205.5 |

Primary membrane plus primary bending stress (P + _{L}P)_{b} | 1.5 × S_{m} | 205.5 |

Primary plus secondary stress (P + _{L}P + _{b}Q) | 3.0 × S_{m} | 411 |

Stress category | Limits based on S_{m} | Allowable value (MPa) |
---|---|---|

General primary membrane stress (P)_{m} | S_{m} | 137 |

Primary local membrane stress (P)_{L} | 1.5 × S_{m} | 205.5 |

Primary membrane plus primary bending stress (P + _{L}P)_{b} | 1.5 × S_{m} | 205.5 |

Primary plus secondary stress (P + _{L}P + _{b}Q) | 3.0 × S_{m} | 411 |

### 4.4 Stress Verification in ansys.

In its postprocessor module, the ansys program can linearize all six stress components (SX, SY, SZ, SXY, SYZ, SXZ) along a SCL (path) by using an in-built line integral method. Since the model was meshed with a higher-order brick element, two elements through shell thickness were used during the linearization process. The software first linearizes the stresses at a component level and then calculates the equivalent stress on the results. The program considers 47 internal points along the SCL (path) to perform the linearization. The Tresca equivalent stress or the averaged stress intensity is used for this procedure.

An elastic stress analysis was performed on the nominal design of pressure vessel model with shell thickness of 10 mm and flange thickness of 16 mm. As seen from the stress distribution in the initial design shown in Fig. 6, the maximum stress intensity was found at the nozzle–shell junction. Figures 7 and 8 display a few important paths along which the linearization process was conducted and the variation of equivalent stress intensity along these paths are shown in Figs. 9 and 10, respectively. Figure 11 below shows the ansys generated linearization results through a section defined by Path-2 (Fig. 7(b)). ANSYS lists both the component linearized stresses and the calculated Trescas and von-Mises equivalent stress. Table 2 shows the verifications performed on all the 20 defined paths/sections. The calculated stress along all the paths are well below their respective limits. Hence, for all analyzed locations, the elastic criteria for protection against plastic collapse is satisfied.

Stress | Allowable stress (MPa) | |||||
---|---|---|---|---|---|---|

Path | Type | Category | Calculated stress (MPa) | Evaluation result | ||

Path-1 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 59.85 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 73.26 | Pass | |

Path-2 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 105.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 206.6 | Pass | |

Path-3 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 157.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 235 | Pass | |

Path-4 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 45.48 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 59.05 | Pass | |

Path-5 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 73.18 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 80.24 | Pass | |

Path-6 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 61.36 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 128.2 | Pass | |

Path-7 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 109.5 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 169.1 | Pass | |

Path-8 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 16.72 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 26.88 | Pass | |

Path-9 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 44.89 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 54.67 | Pass | |

Path-10 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 7.97 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 57.81 | Pass | |

Path-11 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 46.34 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 77.29 | Pass | |

Path-12 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 16.67 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 47.77 | Pass | |

Path-13 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 36.1 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 64.37 | Pass | |

Path-14 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 10.39 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 30.87 | Pass | |

Path-15 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 96.24 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 198.1 | Pass | |

Path-16 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 158.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 240.1 | Pass | |

Path-17 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 129.5 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 227.7 | Pass | |

Path-18 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 151.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 225.1 | Pass | |

Path-19 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 78.53 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 174.3 | Pass | |

Path-20 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 159.4 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 249.1 | Pass |

Stress | Allowable stress (MPa) | |||||
---|---|---|---|---|---|---|

Path | Type | Category | Calculated stress (MPa) | Evaluation result | ||

Path-1 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 59.85 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 73.26 | Pass | |

Path-2 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 105.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 206.6 | Pass | |

Path-3 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 157.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 235 | Pass | |

Path-4 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 45.48 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 59.05 | Pass | |

Path-5 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 73.18 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 80.24 | Pass | |

Path-6 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 61.36 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 128.2 | Pass | |

Path-7 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 109.5 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 169.1 | Pass | |

Path-8 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 16.72 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 26.88 | Pass | |

Path-9 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 44.89 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 54.67 | Pass | |

Path-10 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 7.97 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 57.81 | Pass | |

Path-11 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 46.34 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 77.29 | Pass | |

Path-12 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 16.67 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 47.77 | Pass | |

Path-13 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 36.1 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 64.37 | Pass | |

Path-14 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 10.39 | Pass |

Membrane plus bending | P + _{L}P_{b} | 1.5× S_{m} | 205.5 | 30.87 | Pass | |

Path-15 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 96.24 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 198.1 | Pass | |

Path-16 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 158.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 240.1 | Pass | |

Path-17 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 129.5 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 227.7 | Pass | |

Path-18 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 151.1 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 225.1 | Pass | |

Path-19 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 78.53 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 174.3 | Pass | |

Path-20 | Membrane | P_{L} | 1.5× S_{m} | 205.5 | 159.4 | Pass |

Membrane plus bending | P + _{L}P + _{b}Q | 3× S_{m} | 411 | 249.1 | Pass |

Although the initial design ensures higher safety against plastic collapse, it is not considered the best fit solution as the weight of the pressure vessel can be reduced further, while the design can still sustain stresses within the allowable limits. Thus, a weight minimizing optimization was carried out by varying the shell and flange thickness of the vessel. When seeking the optimal solution for minimum weight design of this model, elastic stress analysis is performed and the code verifications formulated as constraints in matlab are checked for every optimization search iteration. The complete process has been automated by integrating ansys and matlab, which is explained in detail in Sec. 6.

## 5 matlab Optimization

### 5.1 Optimization Problem Formulation in matlab.

*f*(

*x*) subject to

*f*(

*x*) subject to

#### 5.1.1 Objective Function.

From Eq. 2, the objective function *f* (*x*) to be minimized is the total weight of the pressure vessel. A scalar value representing the total weight of the pressure vessel equipment, obtained from ANSYS FEA postprocessor is directly fed into the objective function.

#### 5.1.2 Design Variables.

For optimization of the vessel equipment used in this work, shell and flange thickness of the vessel have been chosen as the design variables. Figure 12 displays both the variables on the geometry of the model. During optimization process, the value for shell thickness is varied from 4 mm to 10 mm, whereas the value for flange thickness is varied from 16 mm to 30 mm.

#### 5.1.3 Constraints.

As discussed in Sec. 4.3, different allowable limits have been specified for membrane and membrane plus bending stress, based on the stress category and failure theory utilized (plastic collapse in this case). These limits from Table 1 forms the inequality design constraints *g*(*x*) for the optimization problem in hand.

#### 5.1.4 Matlab Fmincon Optimization Solver.

With the help of “optimoptions” function, optimization settings for fmincon were set based on the scale of problem and characteristic of the design functions. Like most of the optimization solvers, fmincon only guarantee's finding a local optimum.

Fmincon provides five different algorithms options for standard and large-scale optimization. In this study, only active-set and sqp (sequential quadratic programming) algorithm were used. The optimization results obtained from both are compared are discussed at the end in Sec. 8.

## 6 The Flow-Integration of MATLAB and ANSYS

The main purpose of integrating ansys with matlab in the field of design optimization is to exploit the unique FEA features of ansys while using the powerful optimization solvers and algorithms provided by matlab, to effectively produce the best design solution under some given structural configuration.

The optimization loop shown in Fig. 13 will flow through the following steps:

The file “PressureVessel_Optimization.m” is the main file which runs fmincon to evaluate the objective and constraint function.

As soon as this file is executed in matlab, the objective function file “PressureVessel_obj.m” is called and ansys script file “PressureVesselModel_script.txt” receives the values of shell thickness and flange thickness from matlab design variables.

The finite element model is solved when the objective function runs ansys.

Once the model is solved, results obtained from APDL postprocessor are stored in a text file “ANYSresults.txt.” These FEA results are then extracted in matlab to evaluate the objective function and constraints.

fmincon algorithm updates the value of design parameters in order to achieve a minimum in the objective function. The new values for the shell and flange thickness are overwritten in ansys script file PressureVesselModel_script.txt.

The loop is repeated until an optimum solution is found. It is evident from the flow that the interaction between ansys and matlab is based on the exchange of text files which are overwritten in every search iteration. This kind of integrated method is specifically desired in optimization of complex designs with computationally expensive objectives, because the process is completely automated and does not require any kind of manual intervention, until an optimum solution is found.

By employing this method for shape optimization of an automotive universal joint, Cristello and Kim [13] suggested an improved cost-effective design. In this research, universal joint designs were analyzed and compared using a weighted sum of three objective functions: minimization of machining cost, maximization of adjoining shaft joint angle, and minimization of total part volume. Part modeling and analysis were conducted using ansys, and the optimization was implemented using matlab fmincon function. Soni et al. [14] had implemented genetic algorithm (GA) in matlab along with ansys to optimize a 40-bar truss structure. A significant (26.66%) reduction in weight was observed thereby depicting that the method of integrating matlab and ansys helps the user to achieve the advantages of both the software with the help of some programing effort. In general, this methodology have proved to be a successful tool in both small-scale as well as large-scale optimization problems.

## 7 Optimization Results and Discussion

Several cases were run by calling fmincon with different initial design variable values and with different optimization solver settings. matlab “Optimoptions” function was used to change the fmincon settings such as *step tolerance, minimum change in variables for finite differencing, max iteration, max function evaluations,* etc. The value for these solver properties were set based on the scale and characteristic of the problem in hand. As the design parameters considered in this problem are defined in millimeters (mm), when utilizing active-set algorithm the minimum change in variables for finite difference gradients (DiffMinChange) is set to 0.1 whereas for sqp algorithm it was set to 0.01. This encourages fmincon function to take bigger steps while searching the design space for optimal solution.

Since the pressure vessel structure was meshed with a large number of finite elements, significant computational resources were required to process the parametric model iteratively and thus some of the runs (optimization loop) were conducted using high processing computer with 16 cores. The comparison of optimized results obtained by active-set and sequential quadratic programing (sqp) algorithm are shown in Table 3. Based on the investigation of different fmincon runs, it was observed that total material volume reduction in the pressure vessel obtained by employing active-set algorithm was in the range of 38–39%, whereas the reduction obtained by using sqp algorithm was in the range of 35–37%. The best solution was produced by using active-set algorithm, where in the total weight of the pressure vessel was reduced by 39.21%. The optimized values for design variables in this case was found to be 4.00 mm and 23.57 mm for shell and flange thickness, respectively (Figs. 14 and 15).

Optimized design Variables | Design constraints | |||||
---|---|---|---|---|---|---|

fmincon | shell thickness (mm) | flange thickness (mm) | Optimal objective:Total Volume (mm^{3}) | Weight reduction % | Maximum membrane stress (MPa) | Maximum membrane plus Bending stress (MPa) |

Initial design | 10 | 16 | 198,559,610 | NA | 159.4 | 249.1 |

Active-set algorithm | 4.1609 | 23.0116 | 122,236,730 | 38.43 | 205.30 | 340.67 |

4.0000 | 23.5703 | 120,699,140 | 39.21 | 204.70 | 337.73 | |

4.1338 | 22.8975 | 121,669,870 | 38.72 | 205.46 | 338.07 | |

4.1442 | 22.9901 | 121,959,420 | 38.58 | 205.35 | 350.07 | |

sqp algorithm | 4.2339 | 22.8461 | 122,918,140 | 38.02 | 205.05 | 353.59 |

4.0000 | 28.9607 | 128,726,400 | 35.17 | 191.19 | 296.37 | |

4.0000 | 26.7502 | 125,423,580 | 36.83 | 204.29 | 313.46 | |

4.0000 | 26.7051 | 125356,370 | 36.86 | 204.02 | 304.88 |

Optimized design Variables | Design constraints | |||||
---|---|---|---|---|---|---|

fmincon | shell thickness (mm) | flange thickness (mm) | Optimal objective:Total Volume (mm^{3}) | Weight reduction % | Maximum membrane stress (MPa) | Maximum membrane plus Bending stress (MPa) |

Initial design | 10 | 16 | 198,559,610 | NA | 159.4 | 249.1 |

Active-set algorithm | 4.1609 | 23.0116 | 122,236,730 | 38.43 | 205.30 | 340.67 |

4.0000 | 23.5703 | 120,699,140 | 39.21 | 204.70 | 337.73 | |

4.1338 | 22.8975 | 121,669,870 | 38.72 | 205.46 | 338.07 | |

4.1442 | 22.9901 | 121,959,420 | 38.58 | 205.35 | 350.07 | |

sqp algorithm | 4.2339 | 22.8461 | 122,918,140 | 38.02 | 205.05 | 353.59 |

4.0000 | 28.9607 | 128,726,400 | 35.17 | 191.19 | 296.37 | |

4.0000 | 26.7502 | 125,423,580 | 36.83 | 204.29 | 313.46 | |

4.0000 | 26.7051 | 125356,370 | 36.86 | 204.02 | 304.88 |

Figure 16 displays the iteration and stopping criteria details for one of the optimization runs with starting point [4.8, 29] using sqp algorithm. The plot functions shown in Fig. 17 were used to view the progress of the solver at each iteration. These plots provide an essential insight into the various measures of progress while the algorithm executes. For example, the function value plot helps user identify whether the objective function is moving in the desired direction (should increase for maximization problem whereas should decrease for minimization problem) with each iteration.

As shown in Table 4, the convergence of the optimal solution was checked using different initial design variable values and different step tolerance values. A faster convergence was obtained by using large step tolerance and at the same time a very slight decrease in the weight reduction percentage was observed. The reason behind this is that for tight tolerances, fmincon evaluates more number of points which thereby increases the number of function evaluations and iterations taken to get convergence at the optimal point. From Table 4, it can be seen that although better optimality is achieved using lower step tolerance, the number of function evaluation increases causing a significant increase in computational time. In fact, setting small tolerances for optimization of complex large-scale problems does not always result in accurate solution or perhaps may not even give a solution. Instead, a solver can fail to recognize when it has converged, and can continue futile iterations. Consequently, sometimes it is necessary to increase the bounds on the finite difference step size, as well as loosen the tolerances on the optimization variable and objective/constraint functions. This will help the algorithm “skip over” the nonsmoothness in the response, and get fmincon to converge quickly. Hence, for optimization problem with expensive objective function such as in this case—the best possible approach for checking the optimal convergence is to start optimization loop with a low step tolerance value specially when the design space is widely spread. This helps attain a significant reduction in computational cost and time by avoiding unnecessary evaluations of the design functions.

fmincon algorithm | Active-set | sqp | ||||
---|---|---|---|---|---|---|

Step tolerance “tolx” | 1.0 × 10^{−2} | 1.0 × 10^{−2}3 | 1.0 × 10^{−4} | 1.0 × 10^{−2} | 1.0 × 10^{−3} | 1.0 × 10^{−4} |

Initial design variable “X0” (mm) (shell thickness, flange thickness) | [5, 23] | [5, 23] | [5, 23] | [4.8, 29] | [4.8, 29] | [4.8, 29] |

Optimum shell thickness “Xopt (1)” | 4.1609 | 4.1442 | 4.1338 | 4.0000 | 4.0000 | 4.0000 |

Optimum flange thickness “Xopt (2)” | 23.0116 | 22.9901 | 22.8975 | 28.9607 | 26.7502 | 26.7051 |

Weight reduction % | 38.43 | 38.58 | 38.72 | 35.17 | 36.83 | 36.86 |

Iterations taken | 7 | 14 | 66 | 2 | 17 | 23 |

Function evaluations | 44 | 98 | 387 | 9 | 55 | 74 |

fmincon algorithm | Active-set | sqp | ||||
---|---|---|---|---|---|---|

Step tolerance “tolx” | 1.0 × 10^{−2} | 1.0 × 10^{−2}3 | 1.0 × 10^{−4} | 1.0 × 10^{−2} | 1.0 × 10^{−3} | 1.0 × 10^{−4} |

Initial design variable “X0” (mm) (shell thickness, flange thickness) | [5, 23] | [5, 23] | [5, 23] | [4.8, 29] | [4.8, 29] | [4.8, 29] |

Optimum shell thickness “Xopt (1)” | 4.1609 | 4.1442 | 4.1338 | 4.0000 | 4.0000 | 4.0000 |

Optimum flange thickness “Xopt (2)” | 23.0116 | 22.9901 | 22.8975 | 28.9607 | 26.7502 | 26.7051 |

Weight reduction % | 38.43 | 38.58 | 38.72 | 35.17 | 36.83 | 36.86 |

Iterations taken | 7 | 14 | 66 | 2 | 17 | 23 |

Function evaluations | 44 | 98 | 387 | 9 | 55 | 74 |

It is worth highlighting that the optimal point obtained for all the fmincon runs, in fact lies in the estimated optimal solution region as predicted from the design space analysis [7]. Design space exploration plays an essential role in optimization of complex structures as it helps analyze the computational model by providing valuable insight into the relationship between the objective/constraint and the design parameters. It should also be noted that fmincon is not a global optimization solver, thus the results obtained are possible local minimum.

## 8 Conclusions

The objective of reducing material cost by minimizing total weight of the pressure vessel while complying with the ASME Section VIII Division 2—elastic criteria for protection against plastic collapse is achieved. Design parameters—shell and flange thickness are optimized while limiting the maximum linearized membrane and membrane plus bending stress evaluated along all the paths below the allowable code limits. To effectively process the repetitive design investigations for ASME code compliance—an automated interface was successfully implemented by integrating matlab fmincon optimization solver and finite element software ansys. To ensure that the design is safe and in accordance with ASME design by analysis method, stress analysis including validation of results for protection against plastic collapse was incorporated as design constraints in the optimization process. The optimal design parameters for the pressure vessel are obtained by using active-set and sqp algorithm. A DOE study was conducted and an attempt was made to narrow down the search space for design variables under assessment by identifying the zone where the process is close to attaining the optimal solution. The design space was analyzed and the potential region for optimal solution was successfully identified.

It can be concluded that the integrated approach where in powerful FEA solvers are interfaced with robust matlab optimization solvers, is specifically desired in optimization of large-scale problems with computationally expensive objectives, because the process is completely automated and does not require any kind of manual intervention, until an optimum solution is found. Also, due to the reason that the user can easily modify the design parameters as well as the vessel geometry, the overall proposed loop can be a successful tool in advanced structural analysis of complex structures. In addition, the parametric-driven routine adopted in this study can help reduce the time and expense parameters associated with the conventional design process of the pressure vessels specified by the ASME code. In general, the application of this methodology is not just limited to pressure vessels and can also be implemented to optimize design of various physical structures within the limits of the standard design codes, for the purpose of producing a more safe, efficient, and cost effective-design solution.

## Funding Data

The National Science Foundation for Young Scientists of China (NSFC) (Grant Nos. 11602219 and 51605435; Funder ID: 10.13039/100000001).

## Nomenclature

*F*=peak stress

*P*=primary stress

*P*=_{b}primary bending stress

*P*=_{m}general primary membrane stress

*P*=_{L}local primary membrane stress

*Q*=secondary stress