# Optimization Design of Filament Wound Composite Pressure Vessel Based on OpenSees
## 2 Finite Element Analysis
### OpenSees Program Analysis and Calculation
The data filtering work includes two aspects: on the one hand, according to the characteristics of the output data, the position of the convergence step of each displacement step is determined in time; on the other hand, the corresponding relationship between the order of the unit and the order of the output data is determined in space, and the stress value of each unit is determined. Combined with the above-mentioned design of the ply scheme, if APDL is used for calculation and analysis, only one data result of the scheme can be obtained at a time. For different scheme designs, it is necessary to repeatedly model and modify the parameters, and the output data file needs to be saved as many times as possible, otherwise, it cannot be retained for subsequent verification. That is, it uses the OpenSees parametric language to calculate, but also needs to write multiple running files, and undergo multiple runs to obtain the required data files. Based on these problems, a set of programs that can automatically analyze and process data is written. When writing the TCL file, for the same model, its node coordinates, unit information, constraint settings, load values, etc., are unchanged. What needs to be changed is only the material setting part and some parameters of the file output part. Therefore, only the material parameters of a specific row need to be modified, then multiple tcl files are output cyclically, and then the bat file (input OpenSees running environment variables, and the path of various library files) is written. It eliminates the process of compiling in the vs environment, and finally modifies the last line in the bat file so that multiple cmd windows can be opened simultaneously for parallel computing, greatly save computing time and improving efficiency. After the completion of the calculation, the data are processed, and the output data file is extracted by Python, MATLAB, and other tools. The simulation results of composite pressure vessels with different ply modes are compared by different methods: the comparison of APDL simulation and OpenSees simulation results, as shown in Figure 9; the comparison of node displacement diagrams obtained from different angles of ply under OpenSees is shown in Figure 10; the comparison of node displacement diagrams obtained by different thickness layers are shown in Figure 11.  
Figure 8: Stress extraction process. Figure 11: Node displacement diagrams under different thicknesses. Figure 10: Node displacement diagrams at different angles. Figure 9: Comparison diagram of node displacement. It can be seen from Figure 9 that the trend of node displacement simulated by different methods under the control variables is the same, and the numerical values are close. Therefore, the results of OpenSees simulating shellIMTC4 can be trusted. It can be seen from Figure 10 that the changing trend of node displacement is not large. With the increase of different ply angles, the node displacement also increases, and the range of fluctuation also gradually increases. In this figure, the scheme with a ply angle of \(20^{\circ}\), \(-20^{\circ}\), and \(0^{\circ}\) has the most stable displacement and small fluctuation range. It can be seen from Figure 11 that the displacement of the nodes in the previous schemes does not change much, and the fluctuation range is small. However, when the thickness gradually increases, the displacement of the nodes changes greatly, and the displacement of individual nodes increases sharply. The stress that can be outputted by OpenSees is plane stress, while the output in APDL is the first, second, and third principal stresses. Therefore, it is necessary to solve the principal stress and the main plane direction of the point by six stress components at any point. The common methods are the algebraic method, the Mohr circle method, and the three-dimensional stress state [26; 27; 28]. In this paper, the equilibrium equations and real symmetric matrices in three directions are listed through the three-dimensional stress state, and the eigenvalues are solved.