Shell Element Responses (Plotly)¶
[1]:
import openseespy.opensees as ops
import opstool as opst
import opstool.vis.plotly as opsvis
[2]:
opst.load_ops_examples("Shell3D")
ops.timeSeries("Linear", 1)
ops.pattern("Plain", 1, 1)
opst.pre.gen_grav_load(direction="Z", factor=-9810)
The original Tcl file comes from http://www.dinochen.com/, and the Python version is converted by opstool.tcl2py().
[2]:
{1: [0.0, 0.0, -3179.421, 0.0, 0.0, 0.0],
2: [0.0, 0.0, -3179.421, 0.0, 0.0, 0.0],
3: [0.0, 0.0, -3179.421, 0.0, 0.0, 0.0],
4: [0.0, 0.0, -3179.421, 0.0, 0.0, 0.0],
5: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
14: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
15: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
20: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
21: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
26: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
27: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
32: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
37: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
56: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
58: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
72: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
74: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
88: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
90: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
104: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
106: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0],
120: [0.0, 0.0, -6359.823, 0.0, 0.0, 0.0]}
[3]:
fig = opsvis.plot_model(show_nodal_loads=True, show_ele_loads=True)
fig.show()
# fig.show(renderer="jupyterlab")
# fig.show(renderer="notebook")
# fig.show(renderer="browser")
# fig.show() # for auto
# fig.write_html("**.html")
Data type cannot be displayed: application/vnd.plotly.v1+json
[5]:
ops.constraints("Transformation")
ops.numberer("RCM")
ops.system("BandGeneral")
ops.test("NormDispIncr", 1.0e-6, 6, 2)
ops.algorithm("Linear")
ops.integrator("LoadControl", 0.1)
ops.analysis("Static")
[6]:
ODB = opst.post.CreateODB(odb_tag=1)
for i in range(10):
ops.analyze(1)
ODB.fetch_response_step()
ODB.save_response()
OPSTOOL :: All responses data with _odb_tag = 1 saved in .opstool.output/RespStepData-1.nc!
[7]:
opsvis.set_plot_props(cmap="rdylbu", point_size=2.0)
fig = opsvis.plot_unstruct_responses(
odb_tag=1,
slides=False,
ele_type="Shell",
resp_type="sectionForces",
resp_dof="FXX",
unit_symbol="kN",
unit_factor=1,
show_values=True,
)
fig.show()
# fig.show(renderer="jupyterlab")
# fig.show(renderer="notebook")
# fig.show(renderer="browser")
# fig.show() # for auto
# fig.write_html("**.html")
OPSTOOL :: Loading response data from .opstool.output/RespStepData-1.nc ...
Data type cannot be displayed: application/vnd.plotly.v1+json