13.2.8. anim_mode (ops_vis)¶
-
ops_vis.
anim_mode
(modeNo, sfac=False, nep=17, unDefoFlag=1, fmt_undefo='g--', interpFlag=1, endDispFlag=1, fmt_interp='b-', fmt_nodes='b-', Eo=0, az_el=(-60.0, 30.0), fig_wi_he=(16.0, 10.0), fig_lbrt=(0.04, 0.04, 0.96, 0.96), xlim=[0, 1], ylim=[0, 1], lw=3.0)[source] Make animation of a mode shape obtained from eigenvalue solution.
Parameters: - modeNo (int) – indicates which mode shape to animate.
- sfac (float) – scale factor
- nep (integer) – number of evaluation points inside the element and including both element ends
- unDefoFlag (integer) – 1 - plot the undeformed model (mesh), 0 - do not plot the mesh
- interpFlag (integer) – 1 - interpolate deformation inside element, 0 - no interpolation
- endDispFlag (integer) – 1 - plot marks at element ends, 0 - no marks
- fmt_interp (string) – format line string for interpolated (continuous) deformated shape. The format contains information on line color, style and marks as in the standard matplotlib plot function.
- fmt_nodes (string) – format string for the marks of element ends
- az_el (tuple) – a tuple containing the azimuth and elevation
- fig_lbrt (tuple) – a tuple contating left, bottom, right and top offsets
- fig_wi_he (tuple) – contains width and height of the figure
Examples
sfac_a = 100. Eds = np.zeros((n_steps, nel, 6)) timeV = np.zeros(n_steps)
- for step in range(n_steps):
ops.analyze(1, dt) timeV[step] = ops.getTime() # collect disp for element nodes for el_i, ele_tag in enumerate(el_tags):
nd1, nd2 = ops.eleNodes(ele_tag) # uAll[step, inode, 0] = ops.nodeDisp() Eds[step, el_i, :] = np.array([ops.nodeDisp(nd1)[0],
ops.nodeDisp(nd1)[1], ops.nodeDisp(nd1)[2], ops.nodeDisp(nd2)[0], ops.nodeDisp(nd2)[1], ops.nodeDisp(nd2)[2]])
fw = 20. fh = 1.2 * 4./6. * fw
- anim = opsv.anim_defo(Eds, timeV, sfac_a, interpFlag=1, xlim=[-1, 7],
- ylim=[-1, 5], fig_wi_he=(fw, fh))
Notes:
See also
anim_mode()