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

Transformation Cross-Training

Athletes often cross-train in secondary activities in order to improve performance in their primary sport. For example, football players may practice ballet in order to improve their flexibility and endurance. Using OpenSees, you practically have to be a mathlete to understand the geometric transformation in three dimensions. But instead of fumbling your way through space … Continue reading Transformation Cross-Training