Minimal Working Example

When people post online or e-mail me about what could be a bug in OpenSees, I’ll ask for a minimal working example (MWE), i.e., a simple script that demonstrates the problem. I don’t want to deal with elaborate scripts–yours or mine.

So, what does an MWE look like for OpenSees? Here’s a non-exhaustive list of OpenSees MWE characteristics:

  • One script file, either .tcl or .py, containing the entire model and analysis
  • As few Tcl or Python constructs as possible
  • One element, two at most
  • One ground motion file (if required)
  • As few analysis steps as possible

Like OpenSees itself, the simpler the better for an MWE.

Going through the process of creating an MWE is sometimes enough to resolve the issue. Often, a “bug” is actually a scripting or input error. I would like to believe that’s why I don’t always receive an MWE when I ask for one.

9 thoughts on “Minimal Working Example

  1. Absolutely true Prof. If one cannot explain an idea to others then it’s not clear to himself or herself. This I noticed about 30 yrs back when I started my teaching career.
    Your posts here are always enlightening and I do enjoy a lot.
    Best regards.

    Liked by 1 person

Leave a Reply to Dr Sukumar Baishya Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.