Despite plentiful constitutive models and analysis options, testing and verifying OpenSees has been quite limited. At this point, going back and testing all the contributions from the last 25 years is a nearly insurmountable task. But, as the saying goes: The best time to start testing OpenSees was 25 years ago.The second best time is … Continue reading How to Use pytest with OpenSees
Category: Programming
Counting Flops
When I was an undergraduate at Pine State University, all engineering freshmen had to take a programming course. We could pick between Fortran, Pascal, and C++. From what I recall, most civil and mechanical engineering students took Fortran because that's how you crunch numbers. I chose C++ and liked it so much I willingly took … Continue reading Counting Flops
How to Profile an OpenSeesPy Analysis
Python has a couple of profiling libraries--pyinstrument and cProfile--for finding out where all the time goes when you run a script. But, as far as I can tell, these libraries only tell you that the ops.analyze() command is called, not what happens therein. What you really want is to drill down into the state determinations … Continue reading How to Profile an OpenSeesPy Analysis
Getting the Number of Nodal DOFs
Do you ever get tired of typing a lot of zeros, e.g., to apply a 20 kip load in the X-direction at node 18 on a 3D frame model? ops.timeSeries('Linear',1) ops.pattern('Plain',1,1) ops.load(18,20,0,0,0,0,0) I know what you're thinking. Did I put five zeros after the 20 kip load or only four? Well, to tell you the … Continue reading Getting the Number of Nodal DOFs
Dangling Recorders
Because I don't perform very large or time-consuming OpenSees analyses, I use recorders rather infrequently, instead preferring commands like nodeDisp and eleResponse. An issue with node and element recorders is they can segmentation fault after the node or element to which they point is removed from a model--a common scenario for progressive collapse simulations. A … Continue reading Dangling Recorders
Is It Close Enough?
The locations and weights for Gauss-Lobatto beam integration, the de facto beam integration for force-based elements, are hard-coded in the OpenSees source code. For most cases in the LobattoBeamIntegration class, the locations and weights are written to only ten significant figures instead of 16 or more. Although I am certain that leaving six sig-figs on … Continue reading Is It Close Enough?
Set and Get Concrete23 Response
When I wrote Concrete23, I copied Concrete01 then tweaked the unloading and reloading rules. I also added a couple of bells and whistles and it was music to my ears. But I wanted to record those sounds during an analysis. Recorders in OpenSees use the setResponse and getResponse methods to identify and obtain element, section, … Continue reading Set and Get Concrete23 Response
Valid Range of OpenSees Tags
A few draft blog posts are swirling around the abyss of approximately 80% complete. In need of a diversion, I found a question about tags, posted on the OpenSees Facebook group, to be perfectly timed. The question was about strange behavior when using large integers for node and element tags. Not many other details were … Continue reading Valid Range of OpenSees Tags
Monte Carlo Simulation with OpenSeesMP
The parallel computing capabilities of OpenSeesSP and OpenSeesMP are easily confused. OpenSeesSP runs your script on a single processor with the other processors awaiting instructions on what to do. OpenSeesSP is ideal for assigning subdomains of a large model to each processor. The main processor, processor 0, directs traffic and solves the governing equations of … Continue reading Monte Carlo Simulation with OpenSeesMP
Is OpenSees Pythonic?
OpenSeesPy is sometimes criticized for not being "Pythonic". But what does "Pythonic" even mean? And does achieving "Pythonic" status matter? From what I gathered in this blog post, Pythonic code uses the idioms, i.e., the specific syntax and constructs, of Python. That definition is circular--an example from the post better demonstrates the meaning. If you … Continue reading Is OpenSees Pythonic?
