OpenSees Cloud

OpenSees AMI

A Simple Material Tester

Original Post - 26 Nov 2022 - Michael H. Scott

Visit Structural Analysis Is Simple on Substack.


A UniaxialMaterial tester was my first foray into Tk widgets back in the early 2000s. The tester has come along for the ride through all the OpenSees source code repositories. First cvs, then svn, and now GitHub.

You could select various materials and drag the slider back and forth to see the stress-strain response history.

Screenshot of material tester

Certain that the tester would no longer work, I was pleased to be proven wrong a few months ago.

Comparing the version on my Zip disk artifact and the version currently available on GitHub, it appears Frank re-organized the code a bit and made it much easier to add a material to the tester. Simply add a line to SCRIPTS/uniaxialMaterial.tcl with parameter names and default values. The rest is taken care of in SCRIPTS/strain.tcl.

To run the tester in Linux, you need to build the OpenSeesTk executable using the tk make option.

OpenSees/$ make tk

Then run the script and the blue window shown above should pop up.

OpenSees/$ cd SCRIPTS
OpenSees/SCRIPTS/$ OpenSeesTk strain.tcl

In Windows, build the OpenSeesTk project in Visual Studio, which will create an OpenSeesTk.exe executable in the Win64/bin directory. In Windows Explorer, drag the strain.tcl file over the OpenSeesTk.exe executable, or double click OpenSeesTk.exe then source strain.tcl. You’ll see a blue window like above, but with trimmings that match the Windows operating system.

After this tester, I made only one more foray into Tk widgets. The software is still in use as far as I know.