MomentCurvature¶
- class opstool.anlys.MomentCurvature(sec_tag, axial_force=0)[source]¶
Bases:
objectMoment-Curvature Analysis for Fiber Section in OpenSeesPy.
Parameters¶
- sec_tagint,
The previously defined section Tag.
- axial_forcefloat, optional
Axial load, compression is negative, by default 0
Methods
Performing Moment-Curvature Analysis.
Bilinear Approximation of Moment-Curvature Relation.
Get the moment array.
Get the moment and curvature array.
Get the curvature array.
All fiber data.
Get the curvature and moment corresponding to a certain limit state.
Get the moment array.
Get the curvature array.
Plot the moment-curvature relationship.
Plot the fiber responses.
set a deformation cycle path.
- analyze(axis='y', max_phi=0.5, incr_phi=0.0001, limit_peak_ratio=0.8, cycle_analyze=False, smart_analyze=True, debug=False)[source]¶
Performing Moment-Curvature Analysis.
Parameters¶
- axisstr, optional, “y” or “z”
The axis of the section to be analyzed, by default “y”.
- max_phifloat, optional
The maximum curvature to analyze, by default 0.5.
- incr_phifloat, optional
Curvature analysis increment, by default 1e-4.
- limit_peak_ratiofloat, optional
A ratio of the moment intensity after the peak used to stop the analysis., by default 0.8, i.e., a 20% drop after peak.
- cycle_analyzebool, optional
Whether to perform cyclic analysis, by default False.
- smart_analyzebool, optional
Whether to use smart analysis options, by default True.
- debug: bool, optional
Whether to use debug mode when smart analysis is True, by default, False.
Note
The termination of the analysis depends on whichever reaches max_phi or post_peak_ratio first.
- set_cycle_path(max_phi, n_cycle=20, n_hold=1)[source]¶
set a deformation cycle path.
Parameters¶
- max_phifloat
Peak of the path.
- n_cycleint, optional
Number of cycles, by default 20
- n_holdint, optional
The number of repetitions for each cycle., by default 1
Note
The total number of cycles is
n_cycle * n_hold.Returns¶
- 1D Arraylike.
Displacement path sequence
- plot_M_phi(ax=None)[source]¶
Plot the moment-curvature relationship.
Parameters¶
- axmatplotlib.axes.Axes, optional
The axes to plot the moment-curvature relationship, by default None.
- plot_fiber_responses(return_ax=False)[source]¶
Plot the fiber responses.
Parameters¶
- return_ax: bool, default=False
If True, return the axes for the plot of matplotlib.
- get_M_phi()[source]¶
Get the moment and curvature array.
Returns¶
- (1D array-like, 1D array-like)
(Curvature array, Moment array)
- get_fiber_data()[source]¶
All fiber data.
- Return type:
DataArray
Returns¶
- FiberData: xr.DataArray
All fiber data. “Steps” is the number of steps in the analysis. “Fibers” is the number of fibers in the section. “Properties” is the properties of the fibers, including “yloc”, “zloc”, “area”, “mat”, “stress”, “strain”.
- get_limit_state(matTag=1, threshold=0.0, peak_drop=False)[source]¶
Get the curvature and moment corresponding to a certain limit state.
Parameters¶
- matTagUnion[list[int], int]
The OpenSeesPy material Tag used to determine the limit state., by default 1
- thresholdUnion[list[float], float]
The
strain thresholdused to determine the limit state by material matTag, by default 0. The positive and negative signs are meaningful for tension and compression.
Note
If
matTagis a list, the length of matTag and threshold should be the same. As long as any material reaches its corresponding threshold, it will be set to the limit state.- peak_dropUnion[float, bool], optional, by default False.
If True, A default 20% drop from the peak value of the moment will be used as the limit state; If float in [0, 1], this means that the ratio of ultimate strength to peak value is specified by this value, for example, peak_drop = 0.3, the ultimate strength = 0.7 * peak. matTag and threshold are not needed.
Note
When using
peak_drop, matTag and strain threshold will be ignored!Returns¶
- (float, float)
(Limit Curvature, Limit Moment)
Examples¶
>>> sec = MomentCurvature(sec_tag=1) >>> sec.analyze(axis="y", max_phi=1.0, incr_phi=1e-4, limit_peak_ratio=0.8) >>> # Get the limit state by material Tag 1 and strain threshold 0.002 >>> sec.get_limit_state(matTag=1, threshold=0.002) >>> sec.get_limit_state(peak_drop=0.20)
- bilinearize(phiy, My, phiu, plot=False, ax=None)[source]¶
Bilinear Approximation of Moment-Curvature Relation.
Parameters¶
- phiyfloat
The initial yield curvature.
- Myfloat
The initial yield moment.
- phiufloat
The limit curvature.
- plotbool, optional
If True, plot the bilinear approximation, by default, False.
- axmatplotlib.axes.Axes, optional
The axes to plot the bilinear approximation, by default None.
Returns¶
- (float, float)
(Equivalent Curvature, Equivalent Moment)