i've tried to execute your script row by row, copying and pasting every single line in the command textbox.
this way the user can really appreciate the power of your program, but i think that the distributed script miss a line, because the force and tension in the script are defined in the user-defined system, but i've set in my computer the SI: m, kPa, kN/m3 option.
so, just after the first row, that is "newmodel()", the second row should be "set("unit","user-defined")", otherwise in my computer and in other computers with a different unit system some properties will became unreal. for example, the isoelastic material defined in your script in my computer had a density of 2500 kN/m3.
this is a problem to be solved when a script is created to be distributed.