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

Background

The Recorder class defines a solution output file. Currently, there are three object solution that can be recorded:

The Recorder main member functions are:

  • Recorder::Initialize()
    which creates the output files and writes the headers depending on the response to be written.
  • Recorder::WriteResponse()
    which writes the information requested for the user depending on the requested output.
  • Recorder::Finalize()
    which once is called finishes all recorder instances and close all the opened files.

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 Pre-Analysis in the 01-Pre_Process/Method/Attach.py file provides with an interface to create a Recorder in JSON format. For example, we use:

  • addRecorder(tag, attributes):

    • tag : The identifier of this recorder, i.e., tag > -1
    • attributes : Specific properties for the created recorder, for example
      • 'name' : The recorder type: 'Node', 'Element', 'Material', 'Section', 'ParaView'
      • 'file' : The output's file name
      • 'ndps' : Number of digit of precision for solution
      • 'nsamp' : Number of point to skip when sampling the response
      • 'resp' : The response to be recorded, for example:
        • Node = disp, vel, accel, reaction
        • Section = strain, stress
        • Element = strain, stress, strainrate, internalforce
      • 'coords' : Coordinate where to measure stress/strain in section
      • 'list' : The identifier list to be recorded

    Example

    A RECORDER can be defined using the python interface as follows:
    SVL.addRecorder(tag=1, attributes={'name': 'PARAVIEW', 'file': 'Animation.out', 'ndps': 8})
    SVL.addRecorder(tag=2, attributes={'name': 'NODE', 'file': 'Displacement.out', 'ndps': 8, 'resp': 'disp', 'list': [25, 26, 32]}) SVL.addRecorder(tag=3, attributes={'name': 'SECTION', 'file': filename, 'resp': 'stress', 'ndps': 8, 'coords': [zi, yi], 'list': 1})

    Application
    Please refer to any python file located at 03-Validations/01-Debugging/ to see an example on how to define a Recorder using the python interface.

On the contrary, the 01-Pre_Process/Method/Remove.py file provides with an interface to depopulate the Entities dictionary. For example, to remove an already define Recorder, use:

  • delRecorder(tag):
    • tag : The identifier of the recorder to be removed, i.e., tag > -1

Run-Analysis

The C++ Run-Analysis in the 02-Run_Process/12-Utilities/Recorder.cpp file provides the class implementation. A Recorder is created using the built-in json parse-structure provided in the Driver.hpp. A Recorder is defined inside the "Recorders" json field indicating its "Tag". However, depending on the recorded object response, it will be the required fields to be specified.

Node

A NODE Recorder can be created using the built-in parse-function provided in the Parser as follows,

  •  {
        "Recorders": {
            "Tag": {
                "name": "NODE",
                "file": str,
                "ndps": int,
                "resp": str,
                "nsamp": int,
                "list" : [ ],
            }
        }
    }
    
    Variable Description
    file The file name where the results are going to be stored.
    resp Depend on the object, see the NOTE below.
    nsampThe number of sampling points (dynamics analysis) to record the solution.
    ndps The precision number to store the results.
    list The list of Node identifiers.

    The output file of a NODE Recorder has the structure showed in the Figure below.
    NodeRecorder.png

    Attention
    The options available are resp= disp, vel, accel, reaction.

Element

An ELEMENT Recorder can be created using the built-in parse-function provided in the Parser as follows,

  • {
        "Recorders": {
            "Tag": {
                "name": "ELEMENT",
                "file": str,
                "ndps": int,
                "resp": str,
                "nsamp": int,
                "list" : [ ],
            }
        }
    }
    
    Variable Description
    file The file name where the results are going to be stored.
    resp Depend on the object, see the NOTE below.
    nsamp The number of sampling points (dynamics analysis) to record the solution.
    ndps The precision number to store the results.
    list The list of Element identifiers.

    The output file of a ELEMENT recorder for internal force has the structure showed in the Figure below.
    ForceRecorder.png

    The output file of a ELEMENT Recorder for stress/strain/strainrate has the structure showed in the Figure below.
    StressRecorder.png

    Attention
    The options available are response=strain, stress, internalforce, strainrate.

Section

An SECTION Recorder can be created using the built-in parse-function provided in the Parser as follows,

  • {
        "Recorders": {
            "Tag": {
                "name": "SECTION",
                "file": str,
                "ndps": int,
                "resp": str,
                "nsamp": int,
                "coords": [ ],
                "list" : [ ],
            }
        }
    }
    
    Variable Description
    file The file name where the results are going to be stored.
    resp Depend on the object, see the NOTE below.
    nsamp The number of sampling points (dynamics analysis) to record the solution.
    ndps The precision number to store the results.
    coordsVector with the section coordinates.
    list The list of Element identifiers.

    Attention
    A SECTION for frame elements requires two coordinates ( \(x_3\), \(x_2\)), while a SECTION for shell elements requires only one coordinate \(x_3\).
    The SECTION response = strain, stress are allowed, and they are computed at each integration point.

Paraview

An PARAVIEW Recorder can be created using the built-in parse-function provided in the Parser as follows,

  • {
        "Recorders": {
            "Tag": {
                "name": "PARAVIEW",
                "file": str,
                "ndps": int,
                "nsamp": int,
                "features" : int,
            }
        }
    }
    
    Variable Description
    file The file name where the results are going to be stored.
    nsamp The number of sampling points (dynamics analysis) to record the solution.
    ndps The precision number to store the results.
    featuresThe number of features (for elements) to be written in paraview (computed using Pre-Analysis).

    Note
    Parallel results are provided in separated files. Thus, the solution within each processor is named as: Animation_PARTp.q.vtk, where p represents the partition number (starting from 0 to np), and q the solution number (starting from 0 to nTimeSteps/nsample).
    The Paraview software needs to be installed to generate the animations.
    Attention
    A nsamp = n means the paraview solution will be stored every n time steps. Paraview files are heavy and a default sampling rate of five is assumed.
    A features = n means that the number of connectivities with its length of all elements in the partition is n. This parameter is internally used in Paraview.
    The PARAVIEW option currently saves two types of output:
    • POINT: Response at each Node of the finite element model. Thus, displacement, velocity and accelerations are displayed. The point quantities are represented in global coordinates.
    • CELL: Response at each Element of the finite element model. Thus, stresses and strains are displayed. Note that these quantities are computed at the integration points, for now SeismoVLAB interpolates these results to the Element center.
    Please refer to the ParaView section for more details.