How to Apply a Pulse Ground Motion

In an OpenSees analysis, not all earthquake excitations have to come from recorded ground motions. In some cases, you just want to apply a full or half sine pulse. Sure, you can use Matlab or Python to create a ground motion file with discrete values that match your desired sine pulse. But that's kinda cumbersome. … Continue reading How to Apply a Pulse Ground Motion

Gotta Catch ‘Em All

Python has built-in Exception types for dealing with various run-time errors. You've probably seen a few Exceptions like ModuleNotFoundError if you had issues installing OpenSeesPy or KeyboardInterrupt when you have used Ctrl+C to get your script out of an infinite loop. A common Exception encountered within a script is divide by zero, in which case … Continue reading Gotta Catch ‘Em All

Hidden Fees

Helper functions are often implemented as private methods in a class. For example, here is a private cross product function in an Element class of OpenSees. Vector CadillacBeamColumn3d::cross(Vector v1, Vector v2){ Vector v3(3); v3(0) = v1(1)*v2(2)-v1(2)*v2(1); v3(1) = v2(0)*v1(2)-v1(0)*v2(2); v3(2) = v1(0)*v2(1)-v1(1)*v2(0); return v3; } Note that the class name has been changed and other … Continue reading Hidden Fees