Research Article An Open-Source Framework for Modeling RC Shear Walls Using Deep Neural Networks

Reinforced concrete (RC) shear walls macroscopic models are simpli ﬁ ed strategies able to simulate the complex nonlinear behavior of RC shear walls to some extent, but their ef ﬁ cacy and robustness are limited. In contrast, microscopic models are sophisticated ﬁ nite element method (FEM) models that are far more accurate and reliable. However, their elevated computational cost turns them unfeasible for most practical applications. In this study, a data-driven surrogate model for analyzing RC shear walls is developed using deep neural networks (DNNs). The surrogate model is trained with thousands of FEM simulations to predict the characteristic curve obtained when a static nonlinear pushover analysis is performed. The surrogate model is extensively tested and found to exhibit a high degree of accuracy in its predictions while being extremely faster than the detailed FEM analysis. The complete framework that made this study possible is provided as an open-source project. The project is developed in Python and includes a parametric FEM model of an RC shear wall in OpenSeesPy, the training and validation of the DNN model in Tensor-Flow, and an application with an interactive graphical user interface to test the methodology and visualize the results.


Introduction
Reinforced concrete (RC) shear walls are typically used as the main lateral-force-resisting elements in mid and high-rise buildings.Their primary purpose is to increase the building's lateral stiffness and withstand the severe in-plane shear forces generated when strong lateral loads are applied to the structure, such as those induced by earthquakes or high-speed winds.Consequently, RC shear walls are prompt to suffer significant structural damage that could compromise the integrity of the building [1].To ensure a safe and sound structural design, it is essential to develop reliable RC shear wall modeling techniques that take into consideration the well-known nonlinear behavior that characterizes concrete structures.A significant amount of effort and research has been carried out toward this goal, including the rigorous experimental testing of RC shear walls under lateral-induced cyclic loading [2][3][4] and the development of various modeling techniques, which can be classified into two major categories: macroscopic and microscopic models [5].
Macroscopic models or macromodels are essentially simplified systems consisting of multiple vertical (axial) and horizontal/rotational (shear) springs that are connected together with rigid elements.Alternatively, similar techniques have been developed using truss or plane stress elements instead of springs [6].The elements in macromodels are arranged in specific configurations that enable them to simulate the flexural and shear behavior of RC shear walls.For example, the popular multiple vertical lines element model, proposed by Vulcano et al. [7], is depicted in Figure 1(a).Macromodels that are combined with appropriated nonlinear force-displacement relationships have proven capable of reproducing the complex behavior of RC shear walls to some extent [8][9][10][11][12].The main advantage of the macromodeling approach is that it is computationally efficient and relatively easy to implement.Nevertheless, one of the main setbacks is that its accuracy is questionable for certain effects.For instance, such models may considerably underestimate the compressive strain of the concrete, rendering them unable to capture the failure due to concrete crushing [13].
Alternatively, microscopic models consist of detailed finite element method (FEM) models using a combination of solid, shell, and beam elements that describe the geometry of the wall with significantly more detail, such as those depicted in Figures 1(b) and 1(c).Typically, micromodels are implemented with appropriated nonlinear constitutive material laws based on fracture mechanics and provide a much more reliable modeling alternative that can reproduce even severe damage scenarios with reasonable accuracy [14][15][16][17][18]. Nonetheless, their analysis tends to be computationally expensive due to the refined mesh and the small step required for the numerical stability of the nonlinear solution procedure.Moreover, their adequate implementation requires an experienced engineer with advanced knowledge in nonlinear computational mechanics and powerful FEM software that includes the corresponding constitutive models.Therefore, the usage of microscopic models is generally only conceived for research purposes or highly important projects that can afford the increased time and effort.
There is a tradeoff between robustness, accuracy, and computational cost between the RC shear wall macroscopic and microscopic modeling alternatives.So far, no methodology has been found to dominate over the others overwhelmingly.Consequentially, the development of new models and the improvement of existing methods are topics of particularly high importance that motivate researchers to bring innovative ideas to the table.In that context, leveraging the advantages of the recent developments in machine learning (ML), and particularly, artificial neural networks (ANNs), could significantly contribute to tackling the aforementioned challenges more efficiently [19].For instance, finding ways to reduce the computational cost of the microscopic FEMbased models or increasing the robustness of the macroscopic modeling techniques [20], among other interesting applications in structural engineering [21,22].
This paper develops a novel modeling alternative for RC shear walls that consists of creating a computationally efficient surrogate model using deep neural networks (DNNs).The DNN surrogate model is trained to predict the complex nonlinear response of the wall based on an extensive database of thousands of analyses that are generated with a detailed microscopic FEM model.The predicted response corresponds to the nonlinear force-displacement curve obtained when a lateral displacement-controlled pushover static analysis is performed using a detailed FEM model.Furthermore, in this paper, a second but equally important goal is to provide, as an open-source project, the complete framework that has been developed to make this study possible.By making the source code available, we intend to contribute to reducing the gap between the research and the real-world application of ML-powered methodologies in the field of Structural Engineering.The project is entirely developed in Python and includes four major components: (i) a parametric FEM model of an RC shear wall in Open-SeesPy [23]; (ii) an automated subroutine to run thousands of analyses and generate a usable database to train ML models; (iii) the training and testing of the DNN using the Ten-sorFlow library [24]; and (iv) a powerful application with an interactive GUI to explore and visualize the results.
The methodology presented in this paper is inspired by a previous study published by the authors where a similar surrogate model was developed to predict the lateral load capacity of an RC wall [25].The previous study considered only a few parameters to describe the wall properties and predicted a single numerical value corresponding to the peak of the pushover curve.In this new study, the whole curve is approximated, and more variables are introduced to describe the geometry and the material properties of the RC wall, thus, significantly increasing the robustness compared to the previous methodology.Similarly, other studies using ANNs for modeling RC shear walls include the work by Barkhordari and Tehranizadeh [26] that proposed a hybrid approach using ANN and the simulated annealing algorithm to predict the response of RC shear walls.Moradi and Hariri-Ardebili [27] created a database of shear walls by assembling the results from various experimental tests available in the literature.They use the database to develop an ANN capable of approximating the response of shear walls with relatively good accuracy.Furthermore, other examples of studies that use surrogate models to alleviate the computational cost of FEM simulations can be found [28][29][30].
The rest of the paper is structured as follows.In Section 2, the FEM model used to create the training database is thoroughly described.In Section 3, the basic structure of an ANN

RC Shear Wall FE Model
2.1.Typical RC Shear Wall Reinforcement.RC shear walls are typically built with higher quantities of reinforced steel and stricter detailing criteria near the edges compared to the other sections of the wall.Such reinforcement conditions follow the high concentration of stresses near the edges resulting from the characteristic stress distribution of elements subjected to bending.When in-plane lateral loads are applied to the wall, one edge experiences compression while the other extreme is under tension.Therefore, a standard procedure is the inclusion of so-called boundary elements placed at the edges of the wall.The steel reinforcement at the boundary elements resembles similar characteristics to the standard reinforcement that is applied to columns, providing sufficient longitudinal steel reinforcement as well as appropriate confinement to withstand the developed compressive and tensile stresses.The rest of the wall is commonly denoted as the web and typically requires a lesser quantity of steel reinforcement.A representative image of an RC shear wall cross section is given in Figure 2. Advances in Civil Engineering thickness of the wall can be approximated.The main principle is similar to how the popular fiber beam-column element works [31].First, the strain and the curvature are computed at the middle layer.Next, the strains are obtained in the subsequent layers using a plane-section assumption.Finally, the stresses are obtained based on the corresponding constitutive law at each layer.The MLSE approach has been thoroughly tested in numerous studies.It has been found to be effective in capturing the coupled in-plane and out-of-plane bending, as well as the in-plane direct shear and coupled bending-shear characteristic behavior of RC shear walls [32,33].

MLSE Model Implementation in
OpenSees.This study uses the MLSE modeling approach to generate a large database of RC shear walls and the corresponding results.The model is implemented in OpenSees [34], more specifically, the Python distribution OpenSeesPy [23].The adopted MLSE implementation is the one developed by Xie et al. [17], which has been successfully applied to the analysis of super-tall buildings [35].Within the OpenSees environment, such MLSE is identified as the element "ShellNLDKGQ."It includes the effect of geometric nonlinearity due to large deformations based on the updated Lagrangian formulation [36].The layer discretization is specified by assigning to every shell element the "LayeredShell" section that stores the information regarding the thickness and the associated material model for each layer.Each shell is discretized with eight layers.Four homogeneous concrete layers and four orthotropic steel reinforcement layers, where two are for the longitudinal rebar and the other two are for the transverse rebar, as shown in Figure 3.The meshing of the model is done so that the whole RC shear wall is discretized with 12 elements in the horizontal direction and 15 elements in the vertical direction totaling 12 × 15 = 180 elements.Each boundary element is discretized with 3 × 15 = 45 elements, and the web is discretized with 6 × 15 = 90 elements.This mesh configuration yields rectangular elements with an approximate size of 15-35 cm per side, as shown in Figure 4(a).The adopted mesh is sufficient to produce accurate results as the size effect is mitigated in the material model with the adoption of the popular crack band theory [37].A more refined meshing scheme does not improve the results considerably; thus, it is not worth the increased computational effort.This claim is pointed out [35] and corroborated in this study by testing different meshing configurations, up to 576 elements, with a computational demand 5× times larger but without any significant improvement in the results.
2.3.1.Material Models.The selected material model for the concrete layers is based on a damage mechanism and the smeared crack model [38].It is identified within OpenSees as "PlaneStressUserMaterial" and has to be combined with the "PlateFromPlaneStress" command to properly account for the out-of-plane behavior.A total of seven material parameters are required for its definition, namely, the compressive strength at 28 days f 0 c ; the tensile strength f t ; the crushing strength f cu ; the strain at the maximum compressive strength ϵ co ; the strain at the crushing strength ϵ cu ; the ultimate tensile strain ϵ tu ; and the shear retention factor (or shear transfer coefficient) β.
The adopted material model for the steel reinforcement layers is the uniaxial Giuffre-Menegotto-Pinto formulation, which includes the characteristic post-yielding and Bauschinger effects [39,40].It is identified in OpenSees as "Steel02", and it is combined with the "PlateRebar" command so that it can be incorporated into the MLSE formulation considering its corresponding angle due to its orthotropic behavior (90°f or longitudinal and 0°for transverse).Its definition requires three parameters: yield stress f y ; initial elastic tangent E 0 ; and the strain-hardening ratio b, which is the ratio between the elastic and the post-yield tangent E p .Advances in Civil Engineering The material models for the concrete and the steel reinforcement are illustrated with uniaxial strain-stress curves in Figure 5.Note that the curves are not in scale and that their only purpose is to provide a graphical interpretation of the material parameters.
The parameters required for the material models are commonly obtained by performing experimental testing.However, for the purposes of this study, values suggested in different sources from the literature have been mainly used.This way, the seven parameters required for the concrete material model depend entirely on the compressive strength f 0 c of concrete.The fracture strength is taken as [42].The strain at the maximum compressive strength is taken as ϵ co ¼ −0:002 [43].The strain at the crushing strength equals ϵ cu ¼ −0:01.The ultimate tensile strain is set to ϵ tu ¼ 0:001, and the shear retention factor is equal to β ¼ 0:3 [44].
Regarding the steel material model, the yield strength f y is the only variable.The initial elastic modulus and the strain hardening ratio are kept constant at E 0 ¼ 200 GPa, and b ¼ 0:01, respectively.

Pushover Analysis and Validation of the FEM Model.
The previously described implementation of the MLSE FEM model is tested and validated with a numerical example.The example's data are taken from an open-access database of various experimental tests conducted on large-scale RC shear walls [4].The selected example is the specimen SW1-1, whose geometry, properties, and loading conditions are depicted in Figure 4(a).A visual representation of the final form of the FEM model 2.3 is presented in Figure 4(b).
The analysis consists of two phases.In the first phase, a vertical force is applied at the top middle node that simulates the weight supported by the wall.The second phase is a lateral displacement-controlled static pushover analysis with a target displacement of 2 cm applied at the wall's top-left corner.The displacement is applied with a rate of 0.005 cm per iteration for 2/0.005 = 400 steps.Note that a beam element with increased stiffness is added to the top edge of the wall to distribute the vertical load and the horizontal deformation to all the nodes on the top edge.The deformed shape and the strain field in the vertical direction at various stages of the analysis are shown in Figure 6.
The pushover curve is obtained by plotting the horizontal reaction force (commonly known as base shear) and the horizontal displacement (measured at the top-left node) at every step during the analysis.To corroborate the accuracy of the FEM model, the analysis results are compared with the experimental test data found [4].The comparison is shown in Figure 7, where it can be noticed that both curves exhibit close agreement.These results corroborate that the implemented FEM model provides a reliable approximation of the actual behavior of the RC shear wall; hence, the model is validated.In this study, only one specimen has been used for validation purposes, as the chosen MLSE implementation has been validated in more depth in other studies [17].

Model Parametrization and Sampling.
The MLSE FE model is used to create a large database composed of thousands of different-sized RC shear walls and their corresponding pushover analysis results.To that end, the model is parametrized with several variables describing the geometry, steel reinforcement quantity, and material properties.The chosen sampling strategy is a random uniform distribution.Table 1 shows all the variable parameters and their corresponding lower and upper bounds used for the sampling.
The bounding values of the parameters and the sampling method are two highly important aspects of the developed methodology.In a sense, they control the quality and required quantity of the data.The quality of the data, in the context of this study, could be defined as how well the data set encompasses the real phenomenon.In other words, the generated walls must be realistic in the context of structural design.Attending to such premise, the selected bounding values

Advances in Civil Engineering
(see Table 1) are based on some of the design guidelines provided by the American Concrete Institute (ACI318-19) [45] as well as on structural engineering criteria.For example, from the ACI318-19, the minimum thickness allowed for a structural wall is t ¼ 12:5 cm, and the smallest length-tothickness ratio is l w =t ¼ 6, then the chosen lower bound for the wall length is set to t ⋅ 6.Similarly, according to section 18.10.6.4 of ACI318-19, the quantity of transverse reinforcement ρ t be for the boundary element is approximately within the range of 0.0075-0.020(depending on the material properties).The longitudinal reinforcement ρ l be is similar to those in concrete columns, so a value between 0.01 and 0.04 is reasonably selected.Note that the reinforcement is expressed as a ratio of the corresponding concrete cross-section area.
The compressive strength f 0 c and the yield strength f y vary within traditional values normally used in the construction of modern buildings.The length l w and the height h are chosen based on the wall dimensions commonly found in mediumrise buildings.The axial load value q a is expressed as a ratio of the maximum axial strength for concrete sections according to equation 22.4.2.2 of ACI318-19.The range from 0.010 to 0.1 is selected based on the premise that a value of 0.1 represents the loading of a wall in the bottom story of a medium-height building [2].
2.5.Database Generation.The database is created by randomly generating multiple input vectors with the 11 parameters described in Table 1.Each input vector is processed by a function that creates the corresponding FEM model and performs the static nonlinear pushover analysis.The obtained force-displacement curve is discretized by taking the base shear at seven stations of horizontal displacement.The chosen stations are 0, 0.5, 1.0, 2.5, 5.0, 10.0, and 20.0 mm.Since the base shear at 0 mm is also 0 kN, only six values are required to discretize the curve into six sections.The base shear values at these stations become the corresponding output for the given input values.Therefore, each data point in the database contains 18 values: 11 input values describing the geometry and properties of the shear wall and six output values denoting the base shear at each displacement interval.As an example, Figure 8(a) shows a table with the input and output values for four randomly chosen data points referred to as DP1, DP2, DP3, and DP4.Additionally, Figure 8(b) shows the pushover curves obtained with the FEM analysis and their discretization into six segments.

Advances in Civil Engineering
For some input values, the pushover analysis does not converge to the target displacement of 20 mm, as seen in the data point DP2 in Figure 8(b).In such cases, the base shear at 20 mm is taken as 1.055 times the base shear at 10 mm to complete the required six output values: BS 20 ð Þ ¼ 1:055 ⋅ BS 10 ð Þ.The factor of 1.055 is taken as the average of BS 20 ð Þ=BS 10 ð Þ measured in all the analyses where the convergence does reach the last step of 20 mm.Note that the data points with convergence issues are most likely a result of numerical instabilities typically encountered when solving nonlinear FEM analyses.A complete loss of stiffness due to material failure is not likely to happen in the scenarios tested in this study.
The selected stations at which the curve is discretized (0.5, 1.0, 2.5, 5.0, 10.0, and 20.0 mm) have been selected based on trial and error where the goal is to approximate the curve with sufficient accuracy but with the least number of segments to reduce the complexity of the problem.Alternatively, using physically meaningful stations, such as the limit states of cracking, yielding, peak capacity, ultimate capacity, and failure, could also be useful.Nevertheless, accurately estimating such transitional states for all the data points is a challenging task that is out of the scope of this study.Instead, the selected stations have shown to be sufficient to obtain a reliable approximation of the actual pushover curve.

ANN Surrogate Model
3.1.ANNs Basics.ANNs are a subset of ML and are the basis of most modern artificial intelligence applications.Essentially, an ANN is a mathematical structure that attempts to mimic the complex biological structure and the information processing capacity observed in the brains of living animals.The ANN is composed of several artificial neurons arranged in sequentially connected layers; such structure can be depicted graphically in Figure 9(a).

Advances in Civil Engineering
The structure of the ANN can be written in the following form: where the subscript indicates the position of the layer, starting from the input layer z ¼ 0 to the output layer z ¼ n, so that z ¼ 0; f 1; …; ng.The variable Y z indicates the number of neurons in the zth layer.Following such notation, the ANN depicted in Figure 9(a) could be written as 2 − 4 − 4 − 2.
The connection between neurons is represented by a numerical value known as weight w.The weight w ij denotes the value for the connection between the neurons i and j, where i belongs to the layer z, and j belongs to the layer z − 1.
In an ANN, the information flows from the input layer Y 0 to the output layer Y n .At each layer, Y z , the value of every neuron is computed by performing the weighted summation depicted in Figure 9(b).Such flow of information can be conveniently written as a matrix multiplication that must be computed layer by layer in a sequential order starting at the layer z ¼ 1: where variables p and q are local variables that denote the number of neurons in the layers z and z − 1, respectively.The function σ z indicates the activation function for the layer z.
Activation functions are used to incorporate nonlinearity to the ANN and restrict the neuron's output value to a specific range.Two commonly used activation functions are the Sigmoid and the ReLu [46]: The letter b in Equation (2) represents the vector that contains the bias values for the neurons in the layer n.The biases are added to increase the flexibility of the ANN by shifting the activation function to the left or right.
The keys to the proper functionality of the ANN are the weights which are also referred to as the model's features or parameters.Normally, the weights are initialized randomly; therefore, the problem becomes in finding their value so that the output Y n becomes meaningful.The procedure that is followed to find the appropriate value for the weights is a numerical optimization problem referred to as training.It is solved by an iterative process of trial and error using large volumes of data that must be known a priori.
The basic functionality of an ANN could be described with the following mathematical analogy.Suppose that for a given problem f x ð Þ ¼ y, the function f is unknown.Then, a function denoted as g, is created to find an approximation g w; ð xÞ ¼ y p such that y p ≈ y.The problem then becomes in finding a value for w that minimizes the error e ¼ y − y p .Such minimization problem is solved by an iterative process of trial an error that utilizes known information.In this analogy, the known information refers to a database T that consists of a number m of pairs of input and output values such as T ¼ x 1 ; f y 1 ; x 2 ; y 2 ; …; x m ; y m g.The ultimate goal is that with an appropriate training procedure, the function g w; ð xÞ should reach a state that is capable of extrapolating the information contained in the training data to predict any value that lays in-between.

Hidden layers
Output layer 8

Advances in Civil Engineering
One of the most popular training strategies for ANNs is the backpropagation (BP) algorithm applied with the stochastic gradient descent (SGD) updating scheme.The fundamental principle is to compute the total error and propagate it to all the weights in the ANN.Then, a gradient for the error with respect to the model weights is defined, and the weights are adjusted accordingly.A graphical simplification of the procedure is depicted in Figure 10.A complete description of the BP algorithm and its detailed formulation can be found [47].
Every time that the whole training database has been processed by the updating scheme is called an epoch.Depending on the size of the training database and the ANN, several epochs may be required to train the model.The most common stopping criterion is monitoring the error of a small subset of the training database known as the validation data.The validation data is not used in the training process; however, the error in the validation data is measured after every epoch.If the error increases for several consecutive epochs, it may be a signal of overfitting, which may compromise the generalization capabilities of the model.Hence, the training is stopped to prevent the overfitting.
The scheme described in this section corresponds to a type of ANN known as a feedforward neural network or BP neural network (BPNN).The final size and properties of the ANN are commonly known as the hyperparameters.For example, the number of layers, number of neurons per layer, type of activation functions, and type of algorithm for training.Typically, several combinations of hyperparameters are tested, and the configuration that shows the best performance is selected.

ANN as Surrogate Model for FE Simulations.
A surrogate model is a simplified model that approximates the behavior of a more complex model, and it is often used when the complex model is computationally expensive to evaluate [48].In this work, an ANN is used as a surrogate model of the expensive RC shear wall FEM model described in Section 2. The surrogate model is trained to approximate the characteristic pushover curve with a much lower computational cost.
The data required for the training are generated using the same expensive FEM model that the surrogate model is intended to replace.While this may seem counter-intuitive, it has to be noted that the data creation and the training processes are typically one-time operations that can be done efficiently using techniques such as parallelization and GPU processing.Once the surrogate model is fully trained, it can be used indefinitely as a less computationally intensive alternative.

Construction of the ANN Surrogate
Model.The surrogate model is a fully connected BPNN implemented in Python using the TensorFlow [24] library.Its final configuration is a five-layered network with three hidden layers containing 200 neurons each: 11 − 200 − 200 − 200 − 6.The total number of trainable weights (or features) can be computed as follows ¼ 84;006 (where the + 1 value corresponds to the bias neuron added to every layer).Due to its size, the proposed ANN falls into the category of deep learning; therefore, it could also be referred to as a DNN [49].
For the activation functions, two types are used.The ReLu function (Equation ( 4)) is used in the first four layers, and a linear function σ x ð Þ ¼ x in the output layer.The weights are initialized by a uniform random distribution from 0 to 1.The selected error function for the training is the mean square error (MSE): , where y i is the ground truth, ŷi is the predicted output, and s is the number of data points.The adopted optimization scheme is the Adam algorithm [50], which is an improvement to the SGD that considers the exponentially weighted average of the gradients.It is particularly well-suited for large data sets and high-dimensional parameter spaces.The training database contains 2,500 data points generated with the process described in Section 2.5.The input data are normalized to add stability to the ANN.For validation purposes, 10% of the training data are separated and monitored during the training phase.The network is set to run for 200 epochs; however, an early stopping algorithm is introduced to avoid  Advances in Civil Engineering overfitting.The stopping criterion is set to terminate the training when the error in the validation database is increased for five consecutive epochs.
The previously described hyperparameters are the final selection after testing several configurations of the ANN.The obtained results of some of those tested variants are presented in Table 2.It can be appreciated that the 11-200-200-200-6 ANN yields the lowest error and better correlation values by far.Despite the relatively large size of the surrogate model with 84,006 features, it is fast enough to produce realtime results, taking less than 1 ms to predict the output for a set of input values on a typical computer.Additionally, its storage on a digital file consumes approximately 1 MB, which is substantially small for a modern computer.Thus, for this particular application, there is no practical advantage in optimizing the hyperparameters any further, as the proposed 11-200-200-200-6 ANN configuration works very well, providing good and quick solutions without becoming extremely large in size.

Surrogate Model Training and Performance.
To create the surrogate model, 2,500 data points are generated as training data.The training process runs for 65 epochs and takes around 30 s to finalize.The evolution of the error throughout the training, for both the validation and training data, is presented in Figure 11.
Two metrics are used to determine the correlation between the predicted data and the ground truth: the correlation coefficient (R) and the coefficient of determination (R 2 ).The R score measures the direction and strength of the linear relationship of both variables, while R 2 measures the proportion of variance of the predictions.In the context of ML, these metrics provide a simple way of judging the performance of a regression model.If both R and R 2 have values close to 1, it indicates that the error is low and the model is effective.A comprehensive description of the formulation and the limitations of these metrics is provided [51].
A second database containing 150 data points is generated as a testing set to assess the surrogate model's performance properly.The generated database is entirely new in the sense that it has not been used in the training process; thus, it serves as an effective test to check the generalization capabilities of the model.Such testing set is fed to the trained surrogate model, and the correlation coefficients R and R 2 are computed for each of the six output variables.The results are presented in Figure 12.
It can be noted that there is a good correlation between the predicted data and the ground truth.The resulting average values of the metrics R, and R 2 , are 0:9919, and 0:9838, respectively.Such result hints that the predictions of the model are accurate with high correlation and low error with respect to the ground truth, even for data that were not used in the training.Therefore, the training database has been sufficient for the surrogate model to generalize and learn the corresponding mapping.
An additional set of eight input vectors is randomly generated as a final test of the surrogate model.For each input vector, the nonlinear static pushover analysis is performed using the FEM model, and then it is compared with the prediction from the surrogate model.The eight results can be observed in Figure 14.It can be seen by a simple visual inspection that the surrogate model is indeed able to accurately approximate the pushover curve of each analyzed input vector, despite the different shape of the curve in each case.1,000 2,000 3,000 4,000 5,000

Discussion
Output 4 Output 2 FIGURE 12: Correlation value between the ground truth and the prediction for each of the six output variables of the surrogate model.

Advances in Civil Engineering
(i) Speed: The main advantage of the surrogate model is that it is extremely fast in comparison to the original FEM model.The achieved time reduction is from an average of 40 s per analysis with the FEM model to 0.025 ms with the surrogate model.The surrogate model is significantly faster than the conventional FEM model.(ii) Adaptability: Once the methodology is developed, the surrogate model can be easily extended or modified to tackle different challenges if necessary.For example, changing the input variable bounding values and adding more data to increase the generalization capabilities of the model or modifying the ANN structure to increase its accuracy.(iii) Portability: An ANN created with the TensorFlow framework can be easily serialized and utilized across different platforms and programing languages.In contrast, the FE model is usually restricted to a particular software or solver.
(iv) Improved convergence: Since the ANN is, in principle, a regression model, the entire pushover curve is always predicted, and there are no converge issues that result from numerical instabilities as those encountered when using FEM models.An example can be seen in Figure 14 for the curves DP3 and DP4, where the FEM model failed to converge, but the surrogate model was able to approximate the complete response.

Limitations.
There are also a few limitations when using an ANN-based surrogate model as a substitute for the FEM model, such as the well-known tradeoff of accuracy with respect to the exact FEM simulation.The accuracy of the ANN's predictions will depend on its complexity and the quality of the training.If the training data do not represent the full range of the input parameters or if the ANN is not complex enough to capture the relationships between the inputs and outputs, the accuracy of the predictions may be 12 Advances in Civil Engineering poor.Additionally, ANNs are commonly defined as "black box" models, meaning that it is difficult to interpret how they arrived at their predictions, making it challenging to understand the system's underlying physics.However, in this case, this is not an issue as the physics of the problem is known from the detailed FEM model; the ANN is only used to increase the speed of the final solution.
4.3.Computational Efficiency.All the operations, including the solutions of the FEM models, the training and testing of the ANN, and the generation of the database are conducted using a regular PC with an Intel Core i7-6700 HQ CPU @2.60 GHz and 16 GB RAM.The static nonlinear pushover analysis using the FEM model takes, on average, 41:3 s to finalize.In contrast, loading the trained ANN surrogate model from a file takes 0.05 s.Once the ANN is loaded, predicting the output for a set of input values takes 0:000025 s.This amounts to an improvement of 1,652,000 times in terms of computational time needed for a nonlinear analysis.Nonetheless, it is not fair to compare the models without taking into account the considerable computational time and effort that is required to generate the training data.Considering the 41:3 s average of each FEM analysis, the generation of the 2,500 data points required for the training take approximately 28:68 hr to complete.However, the generation of the training database is a process that has to be done only once.Furthermore, the data may be generated using parallel processing or highperformance computing systems which can further significantly reduce the time required.After the model is trained, it is ready to be used indefinitely, providing results at lightning speed.
4.4.Database and Sampling.As stated in Section 2.5, the bounding values of the parameters and the sampling method are two fundamental aspects of the developed methodology.
In that regard, even though the bounding values are carefully selected based on structural engineering criteria, the selected sampling scheme may still produce some unrealistic wall geometries.For example, a data point where the minimum vertical reinforcement ratio is selected together with the maximum transverse reinforcement.Such a scenario is uncommon in RC shear walls, and it is actually unrealistic.Unfortunately, there is no trivial solution to this problem.One simple alternative is to hard-code some rules to impose certain criteria into the data generation process.However, this is usually not a clever idea because despite the fact that some of the generated geometries may not be practical from an engineering or economic perspective, they may still be compliant with the building design code.Thus, this can introduce some bias into the predictive model leading to a compromise in its performance.Additionally, adding certain rules in the data generation could turn some parameters into discrete values rather than continuous variables, which may have a negative impact in the accuracy of the model.
Other sampling strategies may improve the data generation strategy, such as using the Latin hypercube sampling (LHS) method [52].Nonetheless, it would most-likely not improve much the accuracy or performance of the datadriven model.At best, it would only reduce the amount of data required.With that in mind, for the present study, the authors have chosen to keep a clean and simple strategy, that is, generate the data randomly in a continuous way within specific bounds.It is fundamental to keep in mind that datadriven methodologies are normally nonstatic, meaning that the available data are usually evolving, and the models are retrained and improved constantly.In any case, the sampling method is not restricted to the strategy followed by the authors.In fact, changing the sampling strategy from a uniform random distribution to a more advanced scheme, such as the LHS, could be achieved by changing a few lines of code Advances in Civil Engineering 13 in the provided open-source framework that is introduced in Section 5.

Applications and Future Work.
To visualize some of the potential applications, it is important to keep in mind that the developed surrogate model is not meant to fully replace the traditional FE modeling of RC shear walls, which follows a strong theoretical framework built on decades of research.Instead, it is envisioned as a powerful strategy that could replace a computationally expensive model with a significantly faster approximation for certain types of applications.For instance, for the optimal design of RC shear walls [53], failure probability analysis, uncertainty quantification, and risk assessment [54].These applications usually involve running a large number of analyses, sometimes hundreds of thousands, with different parameters and conditions in order to estimate risk levels, failure probabilities, or optimal configurations.Therefore, in such scenarios, having a simpler but much faster model is preferred over a highly detailed computationally expensive one.Another potential application is using the surrogate model to improve the macroscopic modeling technique for the analysis and design of buildings.That may be achieved by using the predicted pushover curve as the force-displacement relation in the horizontal shear spring of a macro model.This can increase the effectiveness and accuracy of the macro modeling approach [55].
There are various directions in which the methodology described in this study could be continued or enhanced with further research.A potential improvement could be achieved by increasing the input variables bounding ranges or adding more variables to describe other properties of the RC shear wall to significantly increase the surrogate model's generalization capabilities.Alternatively, increasing the amount of output information so that the surrogate model is made capable of predicting additional results, such as the stresses, strains, or any other relevant output quantity that can be extracted from the FEM model.Similarly, increasing the number of stations in which the curve is discretized to obtain a more refined discretization could also be easily implemented.

The Open-Source Framework
The full framework that has been developed to create the surrogate model is published as an open-source project in the GitHub platform under the following link: https://github.com/germansr/RC.ShearWall.DNN.SurrogateModel.
The project includes (1) the parametric code for the multilayered-shell FEM model of the RC shear wall in Open-SeesPy (it contains various 2D visualization routines, such as those used to create Figures 5 and 6).(2) A script that takes the parametric FEM model to create random RC shear wall geometries runs the corresponding nonlinear static pushover analyses and stores the results on a text file.(3) A routine that cleans the results and creates a functional database with the required 11 inputs and six outputs for the training of the surrogate model.(4) A script to create, train, and test the ANN-based surrogate model using TensorFlow and other scientific libraries.(5) A powerful application with an interactive GUI to analyze RC shear walls using OpenSees and to test the surrogate model in real-time with neat visualization graphics.(6) Other useful scripts for testing and visualization.
The project is entirely developed in Python and consists of thousands of lines of code that are well-structured, modularized in several files, and extensively commented.We strongly believe that the project can serve as a motivation for other researchers and professionals to explore the advantages of using ML and data-driven solutions in structural engineering applications.

5.1.
Visualizing the Results of the Surrogate Model.When dealing with ML-oriented methodologies, the physical concepts behind the problem being solved may not be entirely clear and could easily get lost in the data.Therefore, providing visual feedback could significantly enhance the experience and efficacy when using ML-based methodologies.For these reasons, a simple yet powerful interactive application has been developed to test and visualize the results of the surrogate model; see Figure 15.
The surrogate model has to be trained and serialized to a text file before using the application.When the application is initialized, the surrogate model is loaded from the text file and used to make real-time predictions based on the current values of the input variables, which are controlled by 11 interactive components known as sliders, see Figure 15 The application also includes an easy way of testing the predictions by incorporating a button that runs the pushover analysis in the background.Note that the FEM analysis is not required to obtain the predictions, and the optional analysis only serves as a means to demonstrate the accuracy of the results for any given set of inputs.The analysis is performed using the same FEM model that is used to generate the training data, which has been described in this paper in Section 2.3.A small loading screen is added to indicate that the analysis is running.Upon finalizing, the model is temporarily locked (the input values cannot be updated), and the analytical pushover curve is plotted and compared to the surrogate model's current prediction.Additionally, when the model is analyzed, a small module can be called to visualize the FEM analysis results in more detail; see Figure 15(e).The model can be unlocked at any time to analyze different cases.The GUI is constructed using the Tkinter library, typically included in the regular Python distribution.

Conclusion and Outlook
6.1.Conclusion.In this study, a deep-learning surrogate model using DNNs has been developed for the analysis of RC shear walls.The surrogate model is capable of approximating the characteristic nonlinear curve that is obtained when a lateral pushover analysis is performed using a The most significant advantage is the speed of the surrogate model, which takes roughly 0.025 ms to run in contrast to the 40 s that the FEM analysis takes to complete.Thus, the improvement in speed is an impressive factor of 1.6 million times faster than the nonlinear FEM analysis.Additionally, another advantage is that there are no converge problems as those encountered when using nonlinear FEM procedures.With the surrogate model, the entire pushover curve is always predicted.
Another significant contribution of this paper is that the complete source code and framework that made this study possible has been made available as an open-source project, along with an interactive application to test and visualize the results.We hope that this approach facilitates further research and development in the area and contributes to narrowing the gap between research-oriented and practical applications of ML-powered methodologies in the field of structural engineering.

FIGURE 1 :
FIGURE 1: Different modeling techniques for an RC wall: (a) macromodel using the MLVM approach; (b) finite element model using shell elements; (c) finite element model using 3D solid and truss elements.

2
Advances in Civil Engineering is detailed, followed by a description of the creation, training, and validation of the ANN-based surrogate model in Sections 3.2 to 3.4.Various numerical examples to test the surrogate model predictions are presented in Section 3.5, and the results are discussed in Section 4. A brief description of the developed open-source framework is presented in Section 5. Finally, the conclusions of this study and the possible future directions are discussed in Section 6.

FIGURE 5 :
FIGURE 5: Schematic uniaxial stress-strain curve of the adopted material models: (a) concrete model; (b) steel reinforcement model.

FIGURE 7 : 5 -
FIGURE 7:  Comparison between the experimental results and the pushover curve obtained with the FEM analysis.

FIGURE 6 :
FIGURE 6: Deformation and strain field in the vertical direction at various stations throughout the pushover analysis.The units of the horizontal deformation (dx) are in mm.The scale factor for the deformations is 20.

FIGURE 9 :
FIGURE 9: ANN graphical representation: (a) connectivity of the layers; (b) detail of a single neuron.

FIGURE 10 :
FIGURE 10: Flowchart of the training procedure of an ANN using the stochastic gradient descent and backpropagation algorithm.

4. 1 .
Advantages.The main advantages of the developed strategy are summarized as follows:

FIGURE 13 :
FIGURE 13: Numerical example of the surrogate model: (a) cross-section of the RC shear wall; (b) elevation view of the RC shear wall; (c) comparison between surrogate model and FEM results.

FIGURE 14 :
FIGURE 14: Comparison of the surrogate model and the FEM results for eight randomly-generated input vectors.
(a).The sliders provide a simple way of changing the input values within the upper and lower bounds of the training data.Every time that the user modifies the value of any slider, the displayed geometry (Figures15(a) and 15(b)) is refreshed, and the surrogate model is fired in the background to update the corresponding pushover curve almost instantly (Figure 15(d)).

14
Advances in Civil Engineering conventional FEM analysis.The DNN-based surrogate model is constructed in such a way that it takes as input 11 values describing the RC shear wall's geometry, properties, and loading conditions.The output is a vector of six values corresponding to the nonlinear pushover curve discretized into six segments.The final configuration of the DNN is a BPNN architecture composed of 11 input nodes, three hidden layers with 150 nodes each, and six output nodes.The data used for the training have been generated with a sophisticated FEM model using multi-layered shell elements and state-of-the-art constitutive laws for the reinforcement steel and concrete materials.A total of 2,500 data points were generated for the training database, which took about 13 hr using parallel processing.After a successful training procedure, the surrogate model has been thoroughly tested and compared to the FEM model in several examples.The obtained results have shown good accuracy and a strong correlation between the predicted data and the FEM simulations, thus, indicating that the ANN-based surrogate model is indeed a viable and computationally efficient alternative.

TABLE 1 :
Variable parameters are used for the parametric model generation.

TABLE 2 :
Results of various different ANN configurations.