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,
Matplotlib CPU usage monitoring
Matplotlib, as a Python plotting library, is known for its capability to produce high-quality figures. Beyond static images, Matplotlib can also plot simple animations. While it doesn’t adopt OpenGL for high-performance graphics like VisPy, it is still sufficiently for basic academic and research applications. This post turn a default Matplotlib example into a straightforward CPU monitor and introduces the basics of Matplotlib animation functions.
OpenSee running Tcl with Notepad++
Previously, I introduced the latest OpenSees editor, Cypress Editor, which not only provides help but also has the functionality to directly run OpenSees command files. However, the need for registration and potential future charges can make its use somewhat inconvenient. Therefore, it is import to find a suitable editor here. Notepad++, as an open-source text editor, not only supports syntax highlighting for Tcl language but also its built-in plugin library makes running OpenSees command files very straightforward.
OpenSee new cypress editor trial
The OpenSees official website recently posted a message about the launch of a new editor called Cypress Editor, which can be directly accessed from the official website. I immediately downloaded this software. The official webpage of this software is impressively designed. This make this editor seem decades ahead compared to the OpenSees official website.
Matplotlib figure speeding up
Let’s start with something important: for Python 3.5 with Anaconda, install OpenCV using the command:
1 | |
And to install Mayavi on Python 3.5 with Anaconda, use the command:
1 | |
Ansys UPF configuration
When working with Ansys, there may be situations where the available materials or element models are insufficient for our needs, Then, we need to do custom development. However, setting up the environment for custom development is the first challenge in the development process. It is recommended to configure the Ansys UPF development environment on a newly installed system. My personal experience was that after configuring the environments for ABAQUS and MARC on my computer, attempting to set up the Ansys development environment led to numerous strange behaviors and difficult-to-resolve LINK errors. Fortunately, after reinstalling my computer and removing ABAQUS and MARC, I decided to configure the Ansys development environment.
Python package into executable file
After writing a script in Python, I want to package it into an executable file. However, py2exe does not support Python 3+, So I have to find an alternative packaging tools like PyInstaller and cx_Freeze. After checking various sources, it appears that PyInstaller provides better packaging results, making it the preferred choice.
.NET 3.5 offline installation
After updating my system, I wanted to use a PDF merging tool and discovered that many such tools are developed with .NET 3.5. Unfortunately, my system didn’t have .NET 3.5 installed, and the system was only left with the default option of online installation.
MSC.Marc 2015 user subroutine configuration
Recently, I restarted my research project, which requires the use of finite element analysis. After some consideration, I decided to install MSC.Marc. A search on Google revealed that Marc 2015 is available now. I installed Marc 2015 and configured the development environment for user subrountine.