OpenSees Command Interface¤
Overview¤
Almost all OpenSees commands are encapsulated in the .opensees module.
All commands use the same input format as OpenSees and OpenSeesPy.
For example:
1 2 3 4 5 6 7 8 9 10 | |
For details, please refer to their official documentation, You can call it in the same way.
Usage Tips
- ✨ Both
charandstringinputs are supported. However, usingcharis recommended. -
✨ Most commands accept scalar arguments only and do not support passing a
numeric arraydirectly. Please pass scalar arguments one by one.To unpack a
cellarray, use{:}expansion:1ops.node(1, coords{:}); % coords is a cell arrayTo unpack a numeric array, convert to cell first:
1 2
coords = num2cell(coords); ops.node(1, coords{:});The following commands are exceptions and do support
numeric arrayandcellarray inputs, which are flattened automatically (Since OpenSeesMatlab v3.8.0.1):node,element,eleLoad,geomTransf,uniaxialMaterial,nDMaterial,equalDOF,equationConstraint,rigidDiaphragm,rigidLink,fix,fixX,fixY,fixZ,section,fiber,layer,patch,load,mass,rayleigh,ShallowFoundationGen,block2D,block3D,setNodeDisp,setNodeVel,setNodeAccel,frictionModel,region,setElementRayleighDampingFactors,setElementRayleighFactors,recorder, andtimeSeries(Pathtype only: numeric array accepted for-valuesand-time) -
✨ Commands with return values will return MATLAB data. If a command has no return value, an empty array
[]will be returned. - ✨ The additional post-processing provided by OpenSeesMatlab may be slow or buggy. If you think so, you can use only the OpenSees command interface and use
recorderor other output commands to post-process the analysis results.
Example¤
The following is an example of Nolinear Truss Pushover Analysis:
First, instantiate the OpenSeesMatlab interface class. This class provides native OpenSees commands, as well as additional visualization, pre/post-processing, and utility methods.
1 2 | |
Create model¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
Start of analysis generation¤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Finally perform the analysis¤
Analysis results data are returned directly from the OpenSees domain:
1 2 3 4 5 6 7 | |
Plot¤
You can visualize it directly in MATLAB.
1 2 3 4 5 | |