本文为OPENSEES自动前后处理程序AutoOS的简单介绍,编写一个可以批量添加ETABS墙肢编号的小插件。这是本码第34篇原创,原创不易,点赞在看加关注。
1 OpenSees简介及学习
OpenSees 是开放的地震工程仿真系统,是一套面向对象的开源软件。OpenSees支持各种有限元串行与并行计算,可以被用于模拟结构和岩土系统在地震或其他灾害中响应。 OpenSees 主要用 C++ 编写,并使用Fortran 和 C 编写的多个线性方程求解、材料和单元子程序。OpenSees 开发的主要目的是通过以下方式改进地震工程领域的建模和计算模拟:
- 开源的开发方式。从OpenSees问世以来,大家添加的材料库和单元库不计其数,想要全部掌握是不可能的,幸好只需掌握其中常用的就行。OpenSees的开源代码库在github上的链接地址为:OpenSees的github链接。有C++基础的朋友可以读一读,OS的依然还在不断维持更新和整理,目前已经3.4版本正在更新中,而3.3版本更为稳 定。
- 可广泛用于有限元理论及地震工程仿真培训教育。通过OpenSees源码来进行有限元编程以及进行地震工程相关专业的研究或教学,是非常有趣的。OpenSees广受科研工作者的亲睐,目前有不少研究论文都是基于OpenSees撰写的。
- 拥有更积极活跃的讨论社区。OpenSees社区网站链接,有OpenSees相关问题在上面。
名称 | 作者 | 内容侧重点 |
---|---|---|
结构弹塑性分析程序OpenSees原理与实例(第二版) | 陈学伟 | 林哲 | 实例多,各个方面均有,可以在陈博博客上下载, |
OpenSees实用教程 | 古泉 | 黄素蓉 | 实例少,但有介绍如何添加单元和材料等,代码实例仓库链接 |
哈工大 基于OpenSees的钢筋混凝土结构非线性分析 | 王震宇| 王代玉 | 侧重钢筋混凝土原理及讲解,实例偏少,代码所占篇幅较大。 |
当然,学习OpenSees的最好方法是看英文帮助文档,最好去它的OpenSees官网看OpenSeesWiki ,用搜索功能可以搜索到所需要的信息,其他不需要掌握的可以不去学。也有同济大学的董翰林博士总结了OpenSees的所有学习资料,在此不再赘述,移步Awesome-OpenSees-翰林苑 。
俗话说,前人种树,后人乘凉。我们不用再去撸OpenSees源代码,但是作为结构软件通,有必要了解下OpenSees及tcl脚本语言,学习下如何使用OpenSees进行自己关注的一系列地震工程或岩土工程相关问题的研究或求解。
跟我工作中平时使用的YJK和ETABS不同,OpenSees编译完成后只有一个exe,然后进行命令行调用tcl脚本进行计算,与我们的使用习惯大不相同。
表2 OpenSees前后处理程序汇总
名称 | 作者 | 下载链接 |
---|---|---|
ETO | 陈学伟 | ETO程序链接免费下载使用 |
OSLite | 陈维晃 | OSLite程序链接免费下载使用 |
STKO | asdeasoft软件公司 | STKO OpenSees Trial 学生免费,试用免费,其他付费 |
vfo | Anurag Upadhyay | vfo: Visualization For OpenSees免费开源,openseespy官网推荐 |
OpenSees Navigator | Tony Yang | OpenSees Navigator官网链接 |
PBSD | 吴梓楠 | 基于AutoCAD,可转YJK模型,仅公开了转换框架结构接口 |
还有其他比较多的前后处理及可视化工具,在此就不一一列出了。当然要用以上的前后处理或多或少都不是那么趁手,而我平时的模型都是YJK模型,而我常用的Abaqus及Perform3D又各种黑箱子,因此采用OpenSees再复核下对我而言显得非常有需要,最主要的还是好玩。
2 自动前后处理程序AutoOS
基于以上的学习和摸索,最终决定自己开发一款OpenSees前后处理程序,期望实现如下目的:
- 接口:直接转换YJK或其他常用软件的模型至OpenSees模型。
- 可视化:显示三维模型,常规结构构件或单元的显示,支持各种三维视图。
- 后处理:常用指标及结果,与常用软件的对比和校核模块。
- 可拓展:把后续更多好玩创新的想法加入其中。
2.1 例题模型
采用陈博和厦门大学古泉老师以及清华大学陆新征老师分享的实例,显示结果如下,AutoOS可以支持常见模型的显示。
![]() 例题1 www.dinochen.com |
![]() 例题2 www.dinochen.com |
---|---|
![]() 例题3 www.dinochen.com |
![]() 例题4 www.dinochen.com |
![]() 例题5 www.dinochen.com |
![]() 例题6 www.dinochen.com |
![]() 例题7 www.dinochen.com |
![]() 例题8 www.dinochen.com |
![]() 例题9 www.dinochen.com |
![]() 例题10 www.luxinzheng.net |
2.2 工程模型
采用自编YJK转OPENSEES转换我司几个项目的工程实例如下:
![]() |
![]() |
2.3 后续工作
前面接口转换和图形显示模块已经完成,后续继续进行后处理模块的编写。
因兴趣而坚持,美好的事情会历久弥新。
【参考文献】
[1] 陈学伟博客
[2] OPENSEES官网
[3] 陆新征博客
[4] 翰林苑|董翰林的个人网站)
[5] 陈维晃博客
[6]静水流深博客
往期文章
#参数化建模#
#结构编程#
#建筑大师#
#结构大师#
#高层建筑设计-以结构为建筑[上] bySOM大神马克*夏凯星
#高层建筑设计-以结构为建筑[中] bySOM大神马克*夏凯星
#高层建筑设计-以结构为建筑[下] bySOM大神马克*夏凯星
#抗震性能设计大神Graham.H.Powell讲座第1节-上
#抗震性能设计大神Graham.H.Powell讲座第1节-下
#超高层建筑抗震性能设计by伯克利教授Jack Moehle
#结构设计#
**English***
This is the 34th original article in this code series. Original work is not easy—please like, bookmark, and follow!
1. OpenSees Introduction and Learning
OpenSees (Open System for Earthquake Engineering Simulation) is an open, object-oriented, open-source software framework. OpenSees supports a wide range of serial and parallel finite element computations, and can be used to simulate the response of structural and geotechnical systems under earthquakes or other disasters. OpenSees is mainly written in C++, and also utilizes several linear equation solvers, material, and element subroutines written in Fortran and C. The main purpose of OpenSees development is to improve modeling and computational simulation in the field of earthquake engineering in the following ways:
- Open-source development model. Since the emergence of OpenSees, countless material and element libraries have been contributed. It’s impossible to master all of them, but fortunately, you only need to focus on the commonly used ones. The OpenSees source code repository is available on GitHub: OpenSees GitHub Link. If you have a C++ background, it’s worth a read. The OS codebase is still being maintained and updated; version 3.4 is in development, while 3.3 is more stable.
- Widely used for finite element theory and earthquake engineering simulation education and training. Exploring finite element programming and research or teaching in earthquake engineering via OpenSees source code is very rewarding. OpenSees is favored by many researchers, and many research papers are based on OpenSees.
- A highly active and vibrant discussion community. OpenSees Community Website hosts a wide range of OpenSees-related discussions.
Table 1: Currently Available OpenSees Chinese Books
Title | Author | Content Focus |
---|---|---|
Principles and Examples of Structural Elastoplastic Analysis Program OpenSees (2nd Edition) | Xuewei Chen | Zhe Lin | Lots of examples and wide coverage; downloadable from Chen Bo’s Blog |
OpenSees Practical Tutorial | Quan Gu | Surong Huang | Fewer examples, but introduces how to add elements and materials, Code Example Repo |
HIT Nonlinear Analysis of Reinforced Concrete Structures Based on OpenSees | Zhenyu Wang | Daiyu Wang | Focuses on RC principles and explanation; fewer examples, large portion of code. |
The best way to learn OpenSees is to read the English documentation, preferably the official OpenSees Wiki, where you can search for what you need. You can skip the rest. Dr. Hanlin Dong from Tongji University has summarized all OpenSees learning resources, see Awesome-OpenSees-Hanlin Academy.
“As the saying goes, those who come before plant the trees, those who come after enjoy the shade.”
We don’t need to delve into the OpenSees source code, but as structural software experts, it’s worthwhile to get to know OpenSees and the Tcl scripting language, and learn how to use OpenSees for research or solving a series of earthquake or geotechnical engineering problems of interest.
Unlike the YJK and ETABS I use at work, OpenSees compiles to a single executable, and calculations are run by calling Tcl scripts from the command line, which is quite different from our typical workflow.
Table 2: Summary of OpenSees Pre- and Post-Processing Programs
Name | Author | Download Link |
---|---|---|
ETO | Xuewei Chen | ETO Program Link Free to use |
OSLite | Weihuang Chen | OSLite Program Link Free to use |
STKO | asdeasoft Software | STKO OpenSees Trial Free for students/trial, others paid |
vfo | Anurag Upadhyay | vfo: Visualization For OpenSees Free open source, recommended by OpenSeesPy |
OpenSees Navigator | Tony Yang | OpenSees Navigator Official link |
PBSD | Zinan Wu | Based on AutoCAD, can convert YJK models, only the frame structure interface is public |
There are many other pre/post-processing and visualization tools, which won’t be listed here. None of the above tools is perfect in practice, and my models are mostly YJK models. Also, my commonly used Abaqus and Perform3D are black-boxed, so using OpenSees for cross-checking is both necessary and—most importantly—fun.
2. Automatic Pre- and Post-Processing Program AutoOS
Based on the above learning and exploration, I ultimately decided to develop my own OpenSees pre- and post-processing program, hoping to achieve the following:
- Interface: Direct conversion from YJK or other common software models to OpenSees models.
- Visualization: 3D model display, conventional structural member/unit display, support for various 3D views.
- Post-processing: Common indicators and results, with comparison and verification modules against standard software.
- Extensible: Incorporate more fun and innovative features in the future.
2.1 Example Models
Using examples shared by Chen Bo, Professor Quan Gu of Xiamen University, and Professor Xinzheng Lu of Tsinghua University, AutoOS can display common models as shown below:
![]() Example 1 www.dinochen.com |
![]() Example 2 www.dinochen.com |
---|---|
![]() Example 3 www.dinochen.com |
![]() Example 4 www.dinochen.com |
![]() Example 5 www.dinochen.com |
![]() Example 6 www.dinochen.com |
![]() Example 7 www.dinochen.com |
![]() Example 8 www.dinochen.com |
![]() Example 9 www.dinochen.com |
![]() Example 10 www.luxinzheng.net |
2.2 Project Models
Using my self-developed YJK-to-OPENSEES converter, here are some engineering project examples from our company:
![]() |
![]() |
2.3 Next Steps
The interface conversion and graphics display modules are complete. Next, the post-processing module will be developed.
Persistence out of interest; beautiful things remain new through time.
References:
[4] Hanlin Academy | Dr. Hanlin Dong’s Personal Website
[6] Still Waters Run Deep Blog
Previous Articles
#Parametric Modeling#
- Detailed Explanation of C# Script Components in Grasshopper [with source code]
- How to Develop Grasshopper Plugins [with source code]
- Rhino.Python Script Modeling Study Notes [1]
#Structural Programming#
- Demo of the Small Earthquake Module of the Exceedance Report Auto-Generation Platform 2022
- Playing with Structural Design Software APIs
- ETABS Wall Limb Numbering Plugin and Demo
- Abaqus Simulation of Shear Wall Hysteresis Curves [Python Source Code]
- Some Technical Complaints About Ground Motion Selection
- AutoWave Auto-Selection and Artificial Wave Generation Tool Update
- PKPM5 to ETABS201X Interface Program [Free]
- Introduction to Custom YJK-to-ETABS201X Interface
- Consideration of Beam-Column Rigid Zones in Structural Software
- AutoWave Auto-Selection and Artificial Wave Generation Tool Demo
- [What Structural Analysis and Design Tasks Can Python Handle?](http://mp.weixin.qq.com/s?__biz=MzAwNDUyOTcxMw==\&mid=2649342034\&idx=1\&sn=636523773656c91d73ab0e30244dcd42\&chksm=8337eb0cb440621ab52d7ab7c07461a04ea