SmartAnalyze#
- class opstool.analysis.SmartAnalyze(analysis_type='Transient', **kargs)[source]#
The SmartAnalyze is a class to provide OpenSeesPy users a easier way to conduct analyses. Original Tcl version Author: Dr. Dong Hanlin (http://www.hanlindong.com/2019/opensees-converge/) Here’s the converted python version, with some modifications.
Parameters#
- analysis_type: str, default=”Transient”
Assign the analysis type, “Transient” or “Static”.
Other Parameters that control convergence#
Examples#
Note
test()andalgorithm()will run automatically inSmartAnalyze, but commands such asintegrator()must be defined outsideSmartAnalyze.Example 1: Basic usage for Transient#
>>> import opstool as opst >>> ops.constraints('Transformation') >>> ops.numberer('Plain') >>> ops.system('BandGeneral') >>> ops.integrator('Newmark', 0.5, 0.25) >>> analysis = opst.SmartAnalyze(analysis_type="Transient") >>> segs = analysis.transient_split(npts) >>> for seg in segs: >>> analysis.TransientAnalyze(dt)
Example 2: Basic usage for Static#
>>> import opstool as opst >>> ops.constraints('Transformation') >>> ops.numberer('Plain') >>> ops.system('BandGeneral') >>> protocol=[1, -1, 1, -1, 0] >>> analysis = opst.SmartAnalyze(analysis_type="Static") >>> segs = analysis.static_split(protocol, 0.01) >>> for seg in segs: >>> analysis.StaticAnalyze(1, 1, seg)
Example 3: change control parameters#
>>> analysis = opst.SmartAnalyze(analysis_type="Transient", >>> algoTypes=[20, 30], >>> printPer=20, >>> tryAlterAlgoTypes=True, >>> )
- StaticAnalyze(node, dof, seg)[source]#
Single Step Static Analysis.
Parameters#
- nodeint
The node tag in the displacement control.
- dofint
The dof in the displacement control.
- segfloat
Each load step, i.e. each element returned by static_split.
Returns#
None
- TransientAnalyze(dt)[source]#
Single Step Transient Analysis.
Parameters#
- dtfloat
Time Step.
Returns#
None
- static_split(targets, maxStep=None)[source]#
Returns a sequence of substeps for static analysis, for use in outer analysis loops.
Parameters#
- targets: list
A list of target displacements, the first element must be positive.
- maxStep: float, default=None
The maximum step length in the displacement control. If None, targets[1] - targets[0].
Returns#
- segs: list
A sequence of substeps for static analysis.