Polymorphic Pitfall

Polymorphism is what makes OpenSees, and other object-oriented software, flexible and extensible. With polymorphism, you can program to an interface, not an implementation. You see this approach all over OpenSees--elements don't care how materials compute stress and tangent (more here); integrators don't care how the elements form resisting force and tangent stiffness (more here); and … Continue reading Polymorphic Pitfall

How Many Clicks Does It Take?

Coding single degree of freedom (SDF) response in order to generate earthquake response spectra is a rite of passage in earthquake engineering research and education. I wrote my first response spectrum in MATLAB. Nowadays, people are likely to use Python. To generate response spectra in OpenSees, you can create a simple one-dimensional model of SDF … Continue reading How Many Clicks Does It Take?

PSA: OpenSees Commands Are Case Sensitive

I recently had a conversation with an experienced OpenSees user who asked why distributed loads were not working on their elastic beam-column model. I initially thought something must have changed in GitHub, but was relieved when I looked at their input file and saw the following: pattern Plain 2 Linear { eleLoad -ele 10020001 -type … Continue reading PSA: OpenSees Commands Are Case Sensitive

Don’t Forget to Take a Selfie

If you've programmed your own UniaxialMaterial in OpenSees, you were likely hyper-focused on correct implementation of the constructor and the methods for state determination, getStress and commitState. Rightfully so. But there are a couple UniaxialMaterial methods, and a code addition elsewhere, that are critically important when using the database command to save/restore your model or … Continue reading Don’t Forget to Take a Selfie