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 the 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.

4 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

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

WordPress.com Logo

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

Google photo

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

Twitter picture

You are commenting using your Twitter 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.