Welcome to opsvis’s documentation!

Since October 2021, opsvis is no longer distributed with the main OpenSeesPy, and therefore must be installed separately with pip.

The opsvis postprocessing and plotting module is meant to be used with Opensees Python (OpenSeesPy). First read the OpenSeesPy documentation before geting started with opsvis.

This module can be mainly useful for students when learning the fundamentals of structural analysis (interpolated deformation of frame structures (static images or animations), section force distribution of frame structures, stress distribution in triangle, quadrilateral 2d elements, orientation of frame members in 3d space, fibers of a cross section, static and animated eigenvalue mode shapes etc.). This way, we can lower the bar in teaching and learning OpenSees at earlier years of civil engineering studies. However the visualization features for OpenSees can also be helpful for research studies.

Note that there are other OpenSeesPy visualization modules (for example Get_Rendering), however opsvis is an alternative with some distinct features (on the other hand the Get_Rendering has other features that opsvis does not have), which for example allow us to plot:

  • interpolated deformation of frame structures,

  • stresses of triangular and (four, eight and nine-node) quadrilateral 2d elements (calculation of Huber-Mieses-Hencky equivalent stress, principal stresses),

  • fibers of cross-sections,

  • models with extruded cross sections

  • animation of mode shapes.

Installation

pip install opsvis

Note the name of the PyPi package is without the underscore _.

Usage

To use opsvis in OpenSeesPy scripts, your .py file should start as follows:

import openseespy.opensees as ops
import opsvis as opsv
import matplotlib.pyplot as plt

# ... your OpenSeesPy model and analysis commands ...
opsv.plot_model()
sfac = opsv.plot_defo()

Commands

The main commands related to various aspects of OpenSees model visualization are as follows:

  1. plot_model

  2. plot_defo

  3. plot_supports_and_loads_2d

  4. plot_mode_shape

  5. section_force_diagram_2d

  6. section_force_diagram_3d

  7. plot_stress_2d

  8. plot_extruded_model_rect_section_3d

  9. anim_defo

  10. anim_mode

  11. plot_fiber_section

Helper functions include:

  1. fib_sec_list_to_cmds

  2. sig_out_per_node

For examples go to: Examples.

Notes:

  • matplotlib’s plt.axis('equal') does not work for 3d plots therefore right angles are not guaranteed to be 90 degrees on the plots

  • plot_fiber_section is inspired by Matlab plotSection.zip written by D. Vamvatsikos available at http://users.ntua.gr/divamva/software.html