feat(analysis): enhance static_split with custom start and improved w… #70
+111
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
嗨,闫老师!这个pr修改了
opstool/anlys/_smart_analyze.py中的static_split(...)和opstool/pre/section/sec_mesh.py中的plot_response(...)具体如下:static_split(...)函数添加了可自定义起点(start=)的选项。在拟静力试验时,结构的一些构件会在某一位移下破坏并退出工作,使用openseespy进行复现时可以通过删除单元再继续分析来复现这一现象。通过添加自定义起点的选项可使复现的滞回曲线更加贴近实际(以往都是将控制位移归零再删除单元,最后得到的滞回曲线虽然已经比较好了,但总感觉缺了点什么)。另外,当自定义起点不为零时,我添加了一个警告(警告的样式我做了修改放在_smart_analyze.py的开头部分,您觉得不合适可以删除),用于提醒注意必要的前置分析。相关的脚本还是之前删除和添加单元的脚本,对应的部分已做修改。
Example-Remove&AddElement.ipynb
以下这些代码您可以检查修改后
static_split(...)的可用性plot_response(...)对传入的points参数做了过滤nan的处理。points参数依赖于odb内的纤维截面坐标,但这些坐标有时会包含的nan(猜测是为了将不同维度的数据放在一个odb内而做的妥协),这些坐标点不加处理直接传入plot_response(...)会引起如下报错。这个脚本Example-Remove&AddElement.ipynb生成的数据库中,纤维截面(zeroLengthSection)的纤维点坐标就包含nan。