Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations

Background

The Mesh is a class which encapsulates Node, Material, Elements, Load, and Constraint objects that defines a finite element model. This object provides several member functions to add/erase/get Node, Material, Element, and Load objects to be used in the Solution Module.

Mesh.png

The previous Figure shows an example of a finite element Mesh. The depicted Mesh has Node that are schematically represented by white-solid dots. The Mesh is also constructed with Element such as frame (represented in black-lines) and quadrilateral (represented in blue-rectangles). Each Node has two degree-of-freedom (in blue arrows) or three degree-of-freedom (in red arrows) depending on the element that forms. RESTRAIN are applied to the Node that belongs to semi-circle boundary in thick-black line. In a similar manner, the connection between frame and quadrilateral elements is performed using Constraint. A point Load is prescribed at Node (1). In addition, several surface Load are prescribed to elements from 1 to 10.

REFERENCE:

  • Forde, B. W. R., Foschi, R. O., & Stiemer, S. F. (1990). "Object-oriented finite element analysis". Computers & Structures, 34(3), 355–374.
  • Mackie, R. I. (1992). "Object oriented programming of the finite element method". International Journal for Numerical Methods in Engineering, 35(2), 425–436.

Pre-Analysis

The python 01-Pre_Process/Method/Display.py file provides with an interface to show the finite element mesh defined so far. The generated file (with extension .vtu) can be opened using ParaView. The SVL output options defined for POINT and CELL variables are:

VTKOptionsRenderData.png
  • GlobalNodeId : The node identifier (tag) provided by the user.
  • DegreeOfFreedom: The number of degree of freedom for each node.
  • NodeConditions: The applied node condition. The value 0 means the node is free, the value 1 means the node is restrained (fixed), and the value -1 means the node is constrained (kinematic).
  • ElementGlobalId : The element identifier (tag) provided by the user.
  • GroupElementId : The element group identifier, the groups are: TRUSS (10), TRIA (11), QUAD (12), TETRA (13), HEXA (14), FRAME (20), SHELL (21), ZERO (31), PML (32), BWEN (41), HDRB (42), and NULL (50).
  • DomainPartition: The domain partition that will be used in each processor.

The python mesh can be visualized at any level of the scripting process using the renderData() function. Once this function is called, a '.vtu' file will be created inside the Paraview folder.

Example

A ParaView file with name 'output.vtu' is generated as follows:
SVL.renderData('output')

Attention
Please use ParaView version 5.9.0 (or above) to have all functionalities available in Seismo-VLAB.

The python 01-Pre_Process/Method/Builder.py file provides with an interface to populate the Entities dictionary with Node, Material, Element and Constraint. A Domain can be created using the makeDomainVolume(), makeDomainArea() or makeDomainLine() function. These functions will transform the provided information into json format to be parse in the Run-Analysis.

  • makeDomainVolume(option):
    Creates a volume domain in 3D. This function returns a dictionary with the fields 'Nodes' and 'Elements'. The option dictionary specifies the geometry, number of elements, type of elements for this mesh, some fields are:

    • 'ne' : The number of elements per dimension, i.e., ne = [nx,ny,nz]
    • 'ndof' : Number of degree of freedom per node
    • 'class' : SeismoVLAB element class name for the generated elements
    • 'P0' : The origin point of the volume element
    • 'P1' : The corner point (x-side) of the volume element
    • 'P2' : The corner point (y-side) of the volume element
    • 'P3' : The corner point (z-side) of the volume element
    • 'elems' : The type of element during meshing,i.e., TETRA4, TETRA10, HEXA8, HEXA20
    • 'attributes' : A dictionary to specify attributes in 'Elements'
    makeDomainVolume.png

    Example

    A 3D rectangular domain of 1 x 1 x 10 [m] with PML3DHexa8 elements is created using the python interface as follows:
    opts = {
    'ne' : [1, 1, 10],
    'class': 'PML3DHexa8',
    'ndof' : 9,
    'P0' : [0, 0, 0],
    'P1' : [1.0, 0, 0],
    'P2' : [0, 1.0, 0],
    'P3' : [0, 0, 10.0],
    'elems': 'HEXA8',
    'attributes': {'material': 2, 'n': 2.0, 'L': 10.0, 'R': 1E-5, 'x0': [0.5, 0.5, 10.0], 'npml': [0.0, 0.0, -1.0], 'rule': 'Gauss', 'np': 8}
    }
    mesh = SVL.makeDomainVolume(options=opts)

  • makeDomainArea(option):
    Creates an are domain in 2D/3D. This function returns a dictionary with the fields 'Nodes' and 'Elements'. The option dictionary specifies the geometry, number of elements, type of elements for this mesh, some fields are:

    • 'ne' : The number of elements per dimension, i.e., ne = [nx,ny]
    • 'ndof' : Number of degree of freedom per node
    • 'class' : SeismoVLAB element class name for the generated elements
    • 'P0' : The origin point of the volume element
    • 'P1' : The corner point (x-side) of the volume element
    • 'P2' : The corner point (y-side) of the volume element
    • 'elems' : The type of element during meshing,i.e., TRIA3, TRIA6, QUAD4, QUAD8
    • 'attributes' : A dictionary to specify attributes in 'Elements'
    makeDomainArea.png

    Example

    A 2D rectangular domain of 5 x 10 [m] with Lin2DQuad4 elements is created using the python interface as follows:
    opts = {
    'ne' : [5, 10],
    'class': 'Lin2DQuad4',
    'ndof' : 2,
    'P0' : [0, 0, 0],
    'P1' : [1.0, 0, 0],
    'P2' : [0, 1.0, 0],
    'elems': 'QUAD4',
    'attributes': {'material': 2, 'rule': 'Gauss', 'np': 4}
    }
    mesh = SVL.makeDomainArea(options=opts)

  • makeDomainLine(option):
    Creates an are domain in 1D/2D/3D. This function returns a dictionary with the fields 'Nodes' and 'Elements'. The option dictionary specifies the geometry, number of elements, type of elements for this mesh, some fields are:

    • 'ne' : The number of elements per dimension, i.e., ne = [nx]
    • 'ndof' : Number of degree of freedom per node
    • 'class' : SeismoVLAB element class name for the generated elements
    • 'P0' : The origin point of the volume element
    • 'P1' : The corner point (x-side) of the volume element
    • 'P2' : The corner point (y-side) of the volume element
    • 'elems' : The type of element during meshing,i.e., LINE2, LINE3
    • 'attributes' : A dictionary to specify attributes in 'Elements'
    makeDomainLine.png

    Example

    A 2D rectangular domain of 10 [m] with Lin2DFrame2 elements is created using the python interface as follows:
    opts = {
    'ne' : 10,
    'class': 'Lin2DFrame2',
    'ndof' : 3,
    'P0' : [0, 0, 0],
    'P1' : [1.0, 0, 0],
    'elems': 'LINE2',
    'attributes': {'section': 2, 'rule': 'Gauss', 'np': 5}
    }
    mesh = SVL.makeDomainArea(options=opts)

The python 01-Pre_Process/Method/Builder.py file also provides with function that allows to mergeDomain(), removeDomain() or setPMLDomain() function. These functions will transform the provided mesh information that can be later transformed into json format to be parse in the Run-Analysis.

  • mergeDomain(mesh1, mesh2, TOL):
    This function essentially merge two domain. This function returns a merged dictionary with the fields 'Nodes' and 'Elements' in mesh1. The function does not merge nodes that are the same in both meshes, it just re-number them so that these are 2 independent meshes. Therefore, kinematic constraints should be applied to those nodes.

    mergeDomain.png
  • removeDomain(mesh,attributes):
    This function removes a rectangular domain. The dictionary mesh is where the elements and nodes are going to be removed, and attributes is a dictionary containing the information of the domain to be removed. The attributes dictionary has the following fields
    • 'attributes'

      • 'sides' The length of the sides in x,y, and z
      • 'center' The center of the rectangular domain
      removeDomain.png
  • setPMLDomain((attributes, x0, xl)):
    • 'attributes': Same as options in makeDomainVolume, makeDomainArea, or makeDomainLine.
    • 'x0': The center of the rectangle
    • 'xl': The side half-length in each direction

      setPMLDomain.png
      Attention
      The python functions makeDomainVolume, makeDomainArea, makeDomainLine, mergeDomain, removeDomain are extremely simple and they are not recommended to be used to create complex geometry.
      The user can modify the above functions to account for more sophisticated geometries.

      .

More complex domain can be parsed from other formats. The functions provided in 01-Pre_Process/Parser/Formats.py allows currently to parse from SAP2000, ETABS, and GMSH formats:

  • parseFile(filepath, fileformat):
    This is the main parsing function. The filepath specifies the path where the files is located, while fileformat is the format of this file. Currently the available formats are: ETABS, SAP, and VTK.
  • parseJSON(filepath):
    This function parses a model in JSON (.json) format that is located at filepath. The structure of the JSON file must be consistent to the one defined in Entities.

    Attention
    Please refer to SVL/01-Pre_Process/Parser/Formats.py for more details in declarations and implementation aspects
    Other formats for ANSYS and ABAQUS are under construction.

    Example

    A SAP2000 file can be loaded using the python interface as follows:
    SVL.parseFile('/path/to/sap/file.s2k','SAP')

Run-Analysis

The Mesh object is not needed to be parsed since it is created internally as soon as the JSON input file is specified.

Note
There is no RESTRAIN class since fixed degree of freedom are declared by negative numbers in the free-degree-of-freedom list at each Node.
Attention
The Mesh object computes the memory needed for the storage of model matrices such as total stiffness matrix \(\textbf{K}\), total mass matrix \(\textbf{M}\), and total damping matrix \(\textbf{C}\) as well as the external force vector \(F\).
The Mesh object is responsible of creating the transformation matrix \(\textbf{T}\) to enforce restrains and constraints that are used in the Assembler to generate the global mass matrix \(\textbf{M}\), global stiffness matrix \(\textbf{K}\), global damping matrix \(\textbf{C}\) as well as the global external force vector \(\textrm{F}_{\textrm{ext}}\).