This page aims to show an overview of how a model looks like by establishing a simple model, which is a simple elastic
cantilever beam subjected to an end load.
A native CPP parser is used by suanPan. The default syntax resembles the one of OpenSees. Model files are written in
plain text. Although there is no restriction, the suffix .supan is reserved by default.
The line starts with the hash symbol (#) or the exclamation symbol (!) is a comment line. To write one command spans
a few lines, please use backslash (\) to concatenate multiple lines. Please refer to Syntax for details.
# defines two nodes at (0,0) and (1.34,0)
node 1 0 0
node 2 1.34 0
# define an elastic material with the elastic modulus of 132
material Elastic1D 1 132
# define an (E)lastic (B)eam element 1 connecting node 1 and node 2 with A=7.213 and I=6.825 using material 1
element EB21 1 1 2 7.213 6.825 1
# fix all DoFs (P) of node 1
fix 1 P 1
# apply a load of magnitude 23 at DoF 2 of node 2
cload 1 0 23 2 2
# apply another load of magnitude 17 at DoF 1 of node 2
cload 2 0 17 1 2
# create a static step
step static 1
analyze
# print the state of node 2
peek node 2
exit
Since each command is commented, there is not much to explain. This model is similar to the one created by the example
command, both are simple one element models. The output is directly printed on screen by default. For this model, it is