I had previously developed a tool for displaying OpenSees models, but due to time limitation, it was somewhat rudimentary. Moreover, in its post-processing stage, it could only display structural deformations, not stress contour maps, which didn’t fully align with the software intended purpose for visualization. Recently, I took some time to explore VTK and, integrating it with Qt, I rewrote the software. The initial plan was to display all output information from the models. However, due to the lack of inconsistency in input and output styles among elements developed by different authors, it is challenging to unify the results for processing. Currently, the software can only display colors for single elements. Another issue is that displaying element or node numbers in large models will be laggy, which is related to VTK’s operation mechanism. After trying several approaches, I finally settled on a compromise solution that allows for control without affecting the display.
Software Dxtract - Data extraction from image
Previously, I developed a extraction tool for hysteresis curve data but decided to rewrite it for two main reasons. Firstly, the Python packaging program could only be used on a 64-bit platform, and secondly, pre-processing for the images was somewhat cumbersome. Thus, I redeveloped this image data extraction software using C++ combined with OpenCV. The software employs OpenCV’s simplest color recognition method, along with dilation and erosion functions, allowing for effective extraction of curve data from images, including logarithmic coordinate extraction now.
Qt 5.7 OpenCV compiling for minGW
Previously, I utilized OpenCV with Python, but I found that OpenCV demonstrates its capability when integrated with C++. However, the Windows version of OpenCV only offers libraries for the Visual Studio compiler and does not provide libraries for minGW. Therefore, if we downloaded the minGW version of Qt, we need to manually compile OpenCV. After several hours, I successfully compiled OpenCV for minGW.
Perform3D V6.0.0 Installation and Use
Recently, I was wondering about CSI potentially abandoning Perform3D, especially SPA2000 V19 incorporated some features from Perform3D, and Perform3D hadn’t been updated for many years. Surprisingly, last December, CSI quietly released Perform3D V6.0.0. Based on the version number, it seemed to have significant upgrades. However, upon installation and usage, I found the interface remained as unappealing as ever. Let’s delve into the installation and exploration of Perform3D V6.0.0, a product that CSI has purportedly spent “years” developing.
Qt C++ custom Tcl commands
After successfully integrating a Tcl interpreter with C++ in QT, my next goal was to add some custom commands to the Tcl interpreter to enhance user interactivity. Specifically, I aimed to create a custom command named length
to calculate the distance between two points on a plane, with inputs in the format: length x1 y1 x2 y2
. Upon receiving the length
command, the Tcl interpreter would invoke a C++ program to compute the distance between the points (x1, y1) and (x2, y2). Let’s begin with a simple Tcl test program:
Qt C++ integrate Tcl interpreter
Tcl, as a versatile scripting language, has found widespread applications in various fields, including prominent examples like ANSYS in civil engineering. Also, OpenSees, developed by UCB, also utilizes Tcl. However, recent OpenSees source code updates have introduced support for Python. Although official documentation for Python usage has not been released, it’s expected that constructing OpenSees models with Python will soon be feasible.
Software Equhyste - Equivalent viscous damping
I created a handy tool to calculate the area of a hysteresis loop and its equivalent viscous damping. Though the calculation isn’t particularly complex, repetitive tasks can become tedious sometimes. This software can compute the complete cycles of a hysteresis loop, the area of each cycle, and the equivalent viscous damping corresponding to each cycle. The equivalent viscous damping is calculated using the following formula,
Software Splookup - Seismic cefficient tool
I have some free time on a weekend afternoon, so I decided to create a small utility. It’s been a while since I last used Qt for software development, so the development process was a bit of a struggle, but after several hours of effort, I finally completed it. The utility uses Qt Charts in Qt 5.7 as the drawing tool. It appears that Qt Charts now supports GPU acceleration, which feels great to use and delivers impressive results.
OpenSees real-time node displacement
Last time, I discovered that the OpenSees recorder command can send data to a TCP port and monitored it with Python. This time, I decided to directly obtain the model displacement and display it in real-time. The recorder TCP transmission does not affect the computational efficiency of OpenSees and we can achieve the following the effect in the figure,
OpenSees recorder data via TCP
In the process of analyzing structures with OpenSees, the recorder command is essential. It records the displacements of critical nodes and elements in the structure, as well as the base reactions. Then we can use the data to plot the hysteresis curves of the structure. However, when OpenSees is adding data to a file using the recorder command, the file is locked, and it is not possible to access the recorded displacements in real-time during the model computation. To address this, the recorder provides an alternative method – sending data via TCP. By checking the recorder command,