In the GitHub repository, the Seismo-VLAB's folder structure is organized in three directories:
Entities
dictionary. It also provides with builder.py to generate simple domains in 1D, 2D, and 3D and discretize it. Similarly, several domains can be merged to generate more complex models, and they can be display using Display.py functions in ParaView software.Entities
in SVL.Inside the previous directories, the Seismo-VLAB's program files are provided and they are essential to run the two processes:
In general, as it will be discussed later, the Pre-Analysis can be totally omitted as long as the files required to run the Run-Analysis are provided in JSON format. More details are presented below.
The Pre-Analysis consists on a set of Python routines that allows to construct a finite element model. This interface is designed to be user friendly and to handle large models in different formats. The main task is orchestrated by two scripts: 01-Pre_Process/Core/SeismoVLAB.py that essentially loads all required modules to generate a model; and 01-Pre_Process/Core/Definitions.py that contains the data structure (dictionaries) that stores the finite element information to be transformed into Run-Analysis input files.
A normal Pre-Analysis execution diagram is illustrated in the following figure:
As it is shown, the Pre-Analysis starts running the Script.py file and ends generating the File.#.$.json output files (where .$.
token represents the processor number while the .#.
token represents the load combination identifier). During this process the Pre-Analysis handles the degree-of-freedom numbering in 01-Pre_Process/Core/Numberer.py, the domain partition in 01-Pre_Process/Core/Partition.py, soil spatial variability in 01-Pre_Process/Core/RandomField.py, and domain reduction forces in 01-Pre_Process/Core/PlaneWave.py.
The Pre-Analysis also allows the user to parse formats from other softwares. For example, ETABS (.e2k), SAP (.s2k), and GMSH (.mesh) are currently available. Basic features such as node, material, element, restriction are transformed into SVL format, but they can be manipulated using Python to include other features as well. The Pre-Analysis also offers several routines that are provided in the 01-Pre_Process/Method/Attach.py that allows the user to create/append new entities using a Python interface. Then, a user can take full advantage of all the features available in Python to manipulate, modify and create more sophisticated finite element model.
The Run-Analysis is a C++ program that forms the main core of SVL. This process is in charge of generating the finite element model and performing the desired analysis. The Run-Analysis essentially generates the finite element matrices, assembles the contribution of each elements, and solves the resulting systems of equations to finally provided with the desired simulation results.
The Run-Analysis classes are stored in different folders so that the internal structure is better defined. For example, in the folders: 02-Run_Process/01-Node, 02-Run_Process/02-Materials, 02-Run_Process/03-Sections, 02-Run_Process/04-Elements, 02-Run_Process/05-Loads, and 02-Run_Process/06-Mesh the user will find all required classes to construct a finite element model. Similarly in folders such as: 02-Run_Process/08-Analysis, 02-Run_Process/09-Algorithms, 02-Run_Process/10-Integrators, and 02-Run_Process/11-Solvers contains all classes required to perform modifications on the finite element mesh.
The Run-Analysis classes and their interaction are shown in the figure below:
The figure above shows the main abstract classes employed to develop the Run-Analysis. In this diagram, the diamond arrow that arrives at an abstract class represents an internal relation between them, for example the Element class is formed by Node and Material. The point arrow that arrives at an abstract class represents a dependency between them, for example a Load is given to an Element to compute external forces. The diagram represents in blue boxes the main classes (core) of the Run-Analysis, classes represented in green boxes forms the geometry module, while classes represented in yellow forms the analysis module.
The Run-Analysis class diagram is illustrated in the following figure:
The flowchart starts at execution of the public member function Analysis::Analyze(). After this execution, the Recorder is immediately initialized using Recorder::Initialize. Then, the Integrator::ComputeNewStep() is called for each time step during the simulation. In each time step, the Algorithm::UpdateStatesIncrements() member is called. Inside this function, the effective stiffness matrix and force vector are computed using the Assembler. The Assembler asks the Mesh to provide with all Element and Nodes so that the Element::ComputeStiffnessMatrix() and Element::ComputeInternalForces() are for instance computed at each Element. The Element contribution is thus assembled into the global stiffness matrix and force vector. These quantities are passed to the Solver to obtain the solution of the linear system. The solution is retrieved in the Algorithm and used to update the incremental displacement at the public member function Algorithm::UpdateStatesIncrements(). Here, a convergence test is performed:
Finally, after the domain has been updated, if the simulation reaches the last time step, then the Recorder::Finalize() is executed and the simulation is terminated, otherwise a new time step is computed.
In general, SVL involves two independent execution:
The communication or link between the Pre-Analysis and the Run-Analysis is done through input and output file as shown below.
The generated input and output files during a SVL execution are:
./Script.py
: Main python file (generated by the user) employed to create the finite element model. The Pre-Analysis python file is described in Modules. We insist on this process can be skipped as long as the File.#.$.json
is written in Run-Analysis format../Partition/File.#.$.json
: Set of partitioned input files generated in Pre-Analysis and written in Run-Analysis json format. Note that the .$.
represents the processor number while .#.
the load combination number. Each one of these files contains a subdomain of the finite element model../Solution/Response.out
: Output files specified by the user that include Element, Node, Material, or Section responses../Paraview/Animation_PART$.n.vtk
: These are VTK output files that can be displayed using ParaView. In the output file format $
represents the partition number and n
the iteration or time step.We have decided to generate the Mesh partitions and the degree of freedom numbering off-line using the Pre-Analysis. This allows Seismo-VLAB to be run almost fully parallel, avoiding the user to make mistakes by partitioning the domain manually. The Mesh partition can be easily checked using ParaView after executing the Pre-Analysis. This information is stored in the File.#.$.json
files that are loaded in the Run-Analysis (using the function renderData() located at 01-Pre_Process/Method/Display.py).