Pre, Post-Processing and Visualization¤
OpenSeesMatlab provides a comprehensive set of pre- and post-processing tools that work seamlessly with OpenSees. This guide covers the essential workflows for model visualization, response retrieval, and result export.
Table of Contents¤
- Initialization
- Model Visualization
- Eigenvalue Analysis Visualization
- Response Data Recording (ODB)
- Retrieving Responses
- Visualization of Analysis Results
- Export to ParaView (PVD)
- Preprocessing Utilities
Initialization¤
All pre/post-processing features are accessed through the OpenSeesMatlab interface. Create an instance and obtain the OpenSees command handle:
1 2 | |
The opsMAT object provides three main namespaces:
| Namespace | Purpose |
|---|---|
opsMAT.opensees |
Native OpenSees Tcl commands |
opsMAT.pre |
Preprocessing helpers (sections, loads, units, etc.) |
opsMAT.post |
Post-processing (ODB, responses, visualization) |
opsMAT.vis |
Visualization (model, eigen, deformation, etc.) |
Model Visualization¤
At any point during model creation, visualize the current geometry:
1 2 3 4 5 6 7 8 9 10 11 | |
Eigenvalue Analysis Visualization¤
Save eigen data during analysis, then visualize mode shapes:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Response Data Recording (ODB)¤
OpenSeesMatlab uses an ODB (Output Database) system to record analysis results in HDF5 format.
For optimal performance, OpenSeesMatlab implements a custom recorder object in C++ internally.
Note that odbTag is important — it is used to distinguish between different analysis cases.
Create an ODB before analysis:
1 2 | |
Once created, all subsequent ops.analyze() calls automatically write data to the ODB:
1 2 3 4 5 6 7 8 | |
ODB files are stored in .openseesmatlab.output/Responses-myODB.odb/output.h5.
Retrieving Responses¤
Once the analysis is complete and the ODB has saved the data properly, a series of functions can be used to retrieve the analysis results. Typically, they return a nested struct (or a struct array if the model data changes).
Note
Once these functions are called, the ODB corresponding to odbTag will stop recording. Therefore, it is recommended to read the results only after the analysis is complete.
Nodal Responses¤
1 2 3 4 5 6 7 8 9 10 | |
Element Responses¤
1 2 3 4 5 6 7 | |
Visualization of Analysis Results¤
Nodal Response Visualization¤
1 2 3 4 5 6 7 | |
Frame Response Diagrams¤
1 2 3 4 5 6 7 8 9 | |
Plane/Solid Response Visualization¤
1 2 3 4 5 | |
Step Index Options¤
All stepIdx parameters accept:
| Value | Meaning |
|---|---|
| Integer (0-based) | Specific step index |
"absMax" / "absmin" |
Maximum absolute value step |
"max" / "min" |
Maximum / minimum value step |
Export to ParaView (PVD)¤
For high-performance visualization of large models or animations, export ODB data to ParaView-compatible PVD/VTU files:
1 2 | |
Output structure:
1 2 3 4 5 6 7 8 9 10 | |
Open the .pvd file in ParaView. For deformation visualization, apply the "Warp By Vector" filter to the disp field.
Preprocessing Utilities¤
OpenSeesMatlab provides a variety of preprocessing utilities for model setup, including fiber section generation, gravity loads, MCK matrices, unit system conversion, and GMSH model import. Details can be found in the Detailed Examples.
Complete Example¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Performance Note¤
Maximum Runtime Efficiency
If your top priority is analysis speed (matching native OpenSees performance),
use only the opensees module (opsMAT.opensees) and avoid the
post-processing wrappers.
- Use OpenSees
recordercommands to write.outor.h5result files. - Use query commands (
nodeDisp,nodeReaction,eleForce,eleResponse,nodeVel,nodeAccel, etc.) to pull data directly into MATLAB variables during or after the analysis loop.
The post and vis layers add convenience (automatic tag mapping, unified
data structures, plotting), but they introduce overhead. For large models or
long transient analyses, the core opensees command interface is the fastest
path.