Post-Processing¶
The opstool framework adopts xarray as its core data structure, leveraging its powerful capabilities for handling labeled multi-dimensional data.
This choice provides a flexible and intuitive way to manage and process structural analysis results.
Key Features of xarray
Labeled Dimensions xarray allows you to associate meaningful labels with dimensions, making the data self-descriptive and easier to interpret. For example: - Node-based results can have dimensions like
nodeTagsandtime. - Element-based results can have dimensions likeeleTagsandGaussPoints.Coordinate Metadata Coordinates provide additional metadata for dimensions, such as the physical meaning of
nodeTagsor timestamps intime.Multi-Dimensional Data xarray efficiently handles multi-dimensional arrays, enabling simultaneous storage of results like displacements, reaction forces, and internal forces.
Built-in Operations xarray supports advanced operations such as: - Data selection (e.g.,
selfor slicing specific nodes or times). - Aggregation (e.g., summing over nodes or elements). - Mathematical operations applied across dimensions.NetCDF Compatibility xarray integrates seamlessly with NetCDF, a widely used format for scientific data, allowing easy storage and sharing of results.
Benefits in Structural Analysis
Clarity and Ease of Use Labeled dimensions and coordinates make structural analysis results easier to understand and manipulate.
Efficient Processing Built-in operations eliminate the need for complex indexing, improving code clarity and efficiency.
Scalable Storage Large-scale analysis results can be easily managed, stored, and retrieved using xarray’s NetCDF support.
xarray’s integration into opstool enables streamlined workflows for analyzing and visualizing structural response data, enhancing productivity and precision.
You can learn xarray through the following resources:
In a nutshell¶
In opstool, saving responses is very simple.
You only need to run the analysis iteratively and use the following concise code:
opstool.post.CreateODB is used to create a database object, where odb_tag specifies the label.
Then, the method opstool.post.CreateODB.fetch_response_step() is called to iteratively save the data at each step.
Once the analysis is complete, all responses are saved by the method opstool.post.CreateODB.save_response().
That’s it.
The above code will automatically retrieve and save most of the commonly used output quantities of OpenSees.
Supported response types¶
The following is a non-exhaustive list of response types supported by opstool:
“disp”
“vel”
“accel”
“reaction”
“reactionIncInertia”
“rayleighForces”
“pressure”
“localForces”
“basicForces”
“basicDeformations”
“plasticDeformation”
“sectionForces”
“sectionDeformations”
“sectionLocs”
“axialForce”
“axialDefo”
“Stress”
“Strain”
“basicDeformation”
“basicForce”
“Stresses”
“Strains”
“secForce”
“secDefo”
“sectionForces”
“sectionDeformations”
“Stresses”
“Strains”
“sectionForcesAtNodes”
“sectionDeformationsAtNodes”
“StressesAtNodes”
“StrainsAtNodes”
“Stresses”
“Strains”
“StressesAtNodes”
“StressAtNodesErr”
“StrainsAtNodes”
“StrainsAtNodesErr”
“StressMeasures”
“StrainMeasures”
“StressMeasuresAtNodes”
“StrainMeasuresAtNodes”
“Stresses”
“Strains”
“StressesAtNodes”
“StressAtNodesErr”
“StrainsAtNodes”
“StrainsAtNodesErr”
“StressMeasures”
“StrainMeasures”
“StressMeasuresAtNodes”
“StrainMeasuresAtNodes”
“globalForces”
“localForces”
“localDisp”
“slips”
“disp”
“vel”
“accel”
“pressure”
“lambdas”









