9.3. Static Pushover Animation

plotter.animate_spo(spo_top_disp, spo_rxn, spo_disps, spo_midr, nodeList, elementList, push_dir, phi, export_path, frame_step=5, dpi=100)[source]

Generate and save an animation of a static (monotonic) pushover analysis.

9.3. Layout — self.figsize_anim

Left (wide) - 2-D deformed model shape with orange load arrows. Top-right - Pushover curve (base shear vs. roof displacement). Bottom-right - Base shear vs. maximum inter-storey drift ratio.

param spo_top_disp:

type spo_top_disp:

array-like

param spo_rxn:

type spo_rxn:

array-like

param spo_disps:

type spo_disps:

array-like, shape (n_steps, n_floors)

param spo_midr:

type spo_midr:

array-like

param nodeList:

type nodeList:

list of int

param elementList:

type elementList:

list of int

param push_dir:

type push_dir:

int (1=X, 2=Y, 3=Z)

param phi:

type phi:

list of float (floor load pattern, no base node)

param export_path:

type export_path:

str

param frame_step:

Render every N-th step to reduce frame count and speed up export. Default 5.

type frame_step:

int, optional

param dpi:

Export resolution. Default 100.

type dpi:

int, optional

Example

from openquake.vmtk.plotter import plotter

# Usual route: ``do_spo_analysis`` calls this method when
# ``save_animation_path`` is given
spo_dict = m.do_spo_analysis(
    ref_disp=0.005, disp_scale_factor=20, push_dir=1, phi=phi,
    save_animation_path="spo_animation.gif",
)

# Direct call, from the arrays in ``spo_dict``
pl = plotter()
pl.animate_spo(
    spo_top_disp=spo_dict["spo_disps"][:, -1],   # roof displacement [m]
    spo_rxn=spo_dict["spo_rxn"],
    spo_disps=spo_dict["spo_disps"],
    spo_midr=spo_dict["spo_midr"],
    nodeList=nodeList,
    elementList=elementList,
    push_dir=1,
    phi=phi,                       # floor load pattern, no base node
    export_path="spo_animation.gif",
)