Wipe Out!

I am often reminded that what seems basic to me is not so obvious to others who use OpenSees.

For example, the wipe command. What it does–and what it does not do–can be confusing.

The wipe command clears out the entire OpenSees model domain (nodes, elements, materials, loads, etc.) and analysis options (algorithm, system, etc.). However, it does not affect any Python or Tcl variables you have defined in your scripts.

For example, after executing the code below, the Python variable E will still be around, but the OpenSees model disappears.

It goes without saying that the same idea applies to OpenSees/Tcl.

There are other “wipe” commands in OpenSees–wipeAnalysis clears out only the current analysis options and is useful when switching between static and transient analyses. If you are doing reliability analyses, wipeReliability will clear out random variables and reliability analysis options. Neither wipeAnalysis nor wipeReliability affects the OpenSees model domain.

If you actually want to delete or “wipe” a Python variable, use the del() function. For a Tcl variable, use the unset command.

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 )

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.