OpenSees Cloud

OpenSees AMI

Wipe Out!

Original Post - 21 Mar 2021 - Michael H. Scott

Visit Structural Analysis Is Simple on Substack.


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.

OpenSees model and Python variable after wipe command

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.