Welcome to Opsvis documentation!
Contents:
Warning - Incompatible changes!
Starting from Opsvis ver. 1.0.1 (May 2022):
the
plot_supports_and_loads_2d
function is removed and insteadplot_loads_2d
is available. The model supports can now be shown in theplot_model
function. The additiona function argumentnode_supports
(default is True) can be switched off (e.g.plot_model(node_supports=False)
).the
plot_mesh_with_ips_2d()
function is removed.See and use the updated example
.py
files (Examples).Now the opsvis plotting functions use the Python dictionary (instead of the string) for the maptplotlib line formatting. Example: Use
fmt_model = {'color': 'blue', 'linestyle': 'solid', 'linewidth': 1.2, 'marker': '.', 'markersize': 6}
instead of the previousfmt_defo = 'b-'
string format. Also thelw
(linewidth) arguments are removed from the plotting functions as they can be defined in thefmt_*
dictionary. This feature has been implemented as suggested by mbbatukan.
Opsvis is an OpenSeesPy postprocessing and visualization module written by Seweryn Kokot (Opole University of Technology, Poland).
For OpenSeesPy documentation click the following link: OpenSeesPy documentation
Opsvis 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.
Opsvis offers the following plots:
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 deformation (from time history analysis) and 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:
Helper functions include:
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 plotsplot_fiber_section
is inspired by MatlabplotSection.zip
written by D. Vamvatsikos available at http://users.ntua.gr/divamva/software.html