## 2 Background of the Constitutive Metamodel Based on Responses of Representative Volume Elements  
Numerical homogenization uses an RVE with several materials (composite) or microstructure and calculates homogenized properties, which in turn are used for the study of a whole structure with a continuous model [16; 17]. In nonlinear behavior, this step must be repeated for each level of stress response. This approach has been proposed to facilitate multiscale modeling and avoid the more accurate but expensive FEM2 [18]. FEM2 requires the solution of the detailed model of the RVE for every different combination of loadings and points in the structure that appear during the incremental iterative solution of the homogenized finite element model. Classical polynomial surrogates as well as a neural network and other ones have been proposed and tested in [1; 19; 20; 21; 22; 23; 24; 25]. A feedforward neural network has the ability to correlate vector inputs with vector outputs provided that the parameters involved have been suitably calculated. This step is accomplished with the help of data (examples) within a step called training. The topology of the neural network (number of layers and neurons) as well as the activation functions (basis functions) at nodes in correlation with the number of examples define the ability of the network to approximate well an unknown target function. Trial and error or optimal design principles can be used toward a satisfactory result [26]. A modern approach for introducing physics into the neural network metamodel uses differential equations of mechanics in combination with the automatic differentiation of output of the neural network, in order to train the network, without using specific input-output sample examples. This is the so-called physics-informed neural networks approach ([27; 28; 29; 30; 14], etc.). Within the homogenization metamodel, PINN could provide thermomechanically consistent approximations that are more stable than those of the blind neural network. Using ANNs is able to simulate classical mechanical problems if sufficient samples of input-output data are provided for training. The concept is shown schematically in Figures 1 and 2 ([1]) for the stress-strain relation of the RVE. The RVE for every possible complexity is solved for different combinations of stresses, and the corresponding strainsare calculated and used for training. More refined approaches introduce additional physical restrictions on the corresponding constitutive metamodel so the thermomechanical principles are not violated [25]. Furthermore, loading sequences can be used in a path-dependent problem to train a corresponding neural network that will provide the response based on previous loading sequences at a given point. The trained neural network can be integrated into a finite element program and replaces the required constitutive response, as shown in Figure 1 (see, among others, [1; 2; 31; 32]). The material constitutive law is based on experimental or RVE data. It is based either on an established mechanical material law or a metamodel (interpolation). This approach is close to the classical usage of constitutive relations, and it can be integrated with existing commercial finite element packages [33; 34; 35; 36]. The results used here correspond to a masonry structure with different stones and mortar materials subjected to various stress-strain levels. The Representative Volume Element has been discretized by the finite element method. The results have been collected in a database that are used for the training of the neural network. A MATLAB v.2021a implementation for the multiscale analysis of two-dimensional problems as well as the database is available as a Supplementary Material to reference [1]. The masonry RVE has been used for the creation of the database. The plastic deformations calculated under a given strain loading are shown in Figure 3 ([1]). The method has been described in reference [37], where the reader can find more details. Figure 1: The concept of FEM multiscale modeling.